Gentoo
From Openmoko
Languages: |
English • العربية • Български • Česky • Dansk • Deutsch • Esperanto • Eesti • Español • فارسی • Suomi • Français • עברית • Magyar • Italiano • 한국어 • Nederlands • Norsk (bokmål) • Polski • Português • Română • Русский • Svenska • Slovenčina • Українська • 中文(中国大陆) • 中文(台灣) • Euskara • Català |
Contents |
Overview
Gentoo armv4tl-softfloat-linux-gnueabi optimalized for Openmoko (-Os -march=armv4t -mtune=arm920t) on 2008.0/arm profile (glibc based, sane bootstrapable toolchain)
(embedded uclibc/arm profile armv4tl-softfloat-linux-uclibcgnueabi in plans)
Screenshot (hosted at ImageShack)
Read first
http://www.gentoo.org/doc/en/handbook/handbook-arm.xml (Skip points 2 and 3)
Needed things
- At least 2GB SD card
- Gentoo stage: http://torindel.sezamkowa.net/openmoko/armv4tl-softfloat-linux-gnueabi/~arm/
- Portage snapshot: look for mirror on: http://www.gentoo.org/main/en/mirrors2.xml and get snapshots/portage-DATE.tar.bz2
- Kernel and modules
- Any working Openmoko distro
Installation
Be careful, the overlay seems to be dead, so you'll have to manually compile (please make ebuilds if you do) illume and anything openomoko-specific
- Partition your sd card if needed (don`t make swap partitions (but see [1]), ensure card isn't mounted):
- Make ext2 or ext3 filesystem:
- Mount partition:
- Copy stage and portage from host to moko (e.g. on localhost):
- Unpack stage and portage:
- Cleanup removing tar.bz2:
- Chroot:
- Update chroot environment:
- Set timezone:
- Set hostname:
- Remove console font changing (small is beautiful ;]):
- Setup fstab:
- Edit inittab (hash out c3, c4, c5, c6, s0, s1 lines):
- Setup usb networking:
- Enable sshd:
- Change root password:
- Leave chroot:
- Copy kernel.
- Copy modules.
- Setup uboot for booting from sd card.
- Reboot.
- Setup/emerge rest of the system.
- Binary package sites
- http://tinderbox.dev.gentoo.org/embedded/openmoko/armv4tl-softfloat-linux-gnueabi/
- http://torindel.sezamkowa.net/openmoko/armv4tl-softfloat-linux-gnueabi/~arm/packages/All
- Add PORTAGE_BINHOST to make.conf
- e.g.
echo "PORTAGE_BINHOST=\"http://torindel.sezamkowa.net/openmoko/armv4tl-softfloat-linux-gnueabi/~arm/packages/All\"" >> /etc/make.conf
- Update environment
- e.g.
source /etc/profile; env-update
- Setup install mask if you don't want compiler headers/docs etc (mask headers only if you'll be always using binary packages)
- e.g.
export INSTALL_MASK="*.h"
- Add the following line to make.conf to tell portage to always use binary packages.
EMERGE_DEFAULT_OPTS="-gK"
fdisk /dev/mmcblk0
mkfs.ext2 /dev/mmcblk0p1
mount /dev/mmcblk0p1 /media/card
scp stage3-armv4tl-*.tar.bz2 portage-*.tar.bz2 root@openmoko:/media/card
tar -xjpf /media/card/stage3-armv4tl-*.tar.bz2 -C /media/card tar -xjpf /media/card/portage-*.tar.bz2 -C /media/card/usr
rm /media/card/stage3-armv4tl-*.tar.bz2 /media/card/portage-*.tar.bz2
chroot /media/card /bin/bash
source /etc/profile; env-update
cp /usr/share/zoneinfo/YOURZONE /etc/localtime
nano /etc/conf.d/hostname
rc-update del consolefont boot
nano /etc/fstab
nano /etc/inittab
echo "modules=\"g_ether\"" >> /etc/conf.d/modules ln -s /etc/init.d/net.lo /etc/init.d/net.usb0 echo "config_usb0=\"192.168.0.202 netmask 255.255.255.0\"" > /etc/conf.d/net echo "routes_usb0=\"default via 192.168.0.200\"" >> /etc/conf.d/net echo "nameserver 192.168.0.200" > /etc/resolv.conf
rc-update add sshd default
passwd
exit
cp /boot/uImage-2.6.24 /media/card/boot/
cp -rpf /lib/modules /media/card/lib/
Emerging binary packages
Alternative: Squashed Portage
An alternative to installing a full, writable, and uncompressed portage tree directly on the microSD card, is to compress portage using SquashFS and then to mount the resulting SquashFS file (usually compressed from about 500 MB to 50 MB) at /usr/portage.
In this case, it is also suggested to set DISTDIR to /tmp/distfiles, because the default DISTDIR (/usr/portage/distfiles) is not writable. Similarly, PKGDIR can be set to /tmp/binpkgs instead of the default /usr/portage/packages.
See this blog post for further details. If you are lacking in extra space on your flash device, or are concerned about extraneous write-cycles to your flash memory, then you should perform all of the steps on desktop linux machine and then finally copy the resulting squashfs image to the FreeRunner.
Openmoko Overlay
Add svn://torindel.sezamkowa.net/openmoko to layman (emerge layman)
Binary package wishlist
As i'll be adding some packages to ftp above you might want to ask for some package here: GentooPackageWishList