Gentoo
From Openmoko
(Gentoo Howto) |
|||
Line 18: | Line 18: | ||
== Installation == | == Installation == | ||
*Partition your sd card if needed (don`t make swap partitions, ensure card isn't mounted) | *Partition your sd card if needed (don`t make swap partitions, ensure card isn't mounted) | ||
− | :<tt>e.g.</tt> fdisk /dev/mmcblk0 | + | :<tt>e.g.</tt> |
+ | fdisk /dev/mmcblk0 | ||
*Make ext2 or ext3 filesystem | *Make ext2 or ext3 filesystem | ||
− | :<tt>e.g.</tt> mkfs.ext2 /dev/mmcblk0p1 | + | :<tt>e.g.</tt> |
+ | mkfs.ext2 /dev/mmcblk0p1 | ||
*Mount partition | *Mount partition | ||
− | :<tt>e.g.</tt> mount /dev/mmcblk0p1 /media/card | + | :<tt>e.g.</tt> |
+ | mount /dev/mmcblk0p1 /media/card | ||
*Copy stage and portage from host to moko | *Copy stage and portage from host to moko | ||
− | :<tt>e.g.</tt> ''[localhost]'' scp stage3-armv4tl-*.tar.bz2 portage-*.tar.bz2 root@openmoko:/media/card | + | :<tt>e.g.</tt> ''[localhost]'' |
+ | scp stage3-armv4tl-*.tar.bz2 portage-*.tar.bz2 root@openmoko:/media/card | ||
*Unpack stage and portage | *Unpack stage and portage | ||
− | :<tt>e.g.</tt> tar -xjpf /media/card/stage3-armv4tl-*.tar.bz2 -C /media/card | + | :<tt>e.g.</tt> |
− | + | tar -xjpf /media/card/stage3-armv4tl-*.tar.bz2 -C /media/card | |
+ | tar -xjpf /media/card/portage-*.tar.bz2 -C /media/card/usr | ||
*Cleanup removing tar.bz2 | *Cleanup removing tar.bz2 | ||
− | :<tt>e.g.</tt> rm /media/card/stage3-armv4tl-*.tar.bz2 /media/card/portage-*.tar.bz2 | + | :<tt>e.g.</tt> |
+ | rm /media/card/stage3-armv4tl-*.tar.bz2 /media/card/portage-*.tar.bz2 | ||
*Chroot | *Chroot | ||
− | :<tt>e.g.</tt> chroot /media/card /bin/bash | + | :<tt>e.g.</tt> |
+ | chroot /media/card /bin/bash | ||
*Update chroot environment | *Update chroot environment | ||
− | :<tt>e.g.</tt> source /etc/profiles; env-update | + | :<tt>e.g.</tt> |
+ | source /etc/profiles; env-update | ||
*Set timezone | *Set timezone | ||
− | :<tt>e.g.</tt> cp /usr/zoneinfo/YOURZONE /etc/localtime | + | :<tt>e.g.</tt> |
+ | cp /usr/zoneinfo/YOURZONE /etc/localtime | ||
*Set hostname | *Set hostname | ||
− | :<tt>e.g.</tt> nano /etc/conf.d/hostname | + | :<tt>e.g.</tt> |
+ | nano /etc/conf.d/hostname | ||
*Remove console font changing (small is beautiful ;]) | *Remove console font changing (small is beautiful ;]) | ||
− | :<tt>e.g.</tt> nano /etc/conf.d/consolefont (hash consolefont= line) | + | :<tt>e.g.</tt> |
+ | nano /etc/conf.d/consolefont (hash consolefont= line) | ||
*Setup fstab | *Setup fstab | ||
− | :<tt>e.g.</tt> nano /etc/fstab | + | :<tt>e.g.</tt> |
+ | nano /etc/fstab | ||
*Edit inittab (hash out c3, c4, c5, c6, s0, s1 lines) | *Edit inittab (hash out c3, c4, c5, c6, s0, s1 lines) | ||
− | :<tt>e.g.</tt> nano /etc/inittab | + | :<tt>e.g.</tt> |
+ | nano /etc/inittab | ||
*Setup usb networking | *Setup usb networking | ||
− | :<tt>e.g.</tt> ln -s /etc/init.d/net.lo /etc/init.d/net.usb0 | + | :<tt>e.g.</tt> |
− | + | 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 | ||
*Enable sshd | *Enable sshd | ||
− | :<tt>e.g.</tt> rc-update add sshd default | + | :<tt>e.g.</tt> |
+ | rc-update add sshd default | ||
*Change root password | *Change root password | ||
− | :<tt>e.g.</tt> passwd | + | :<tt>e.g.</tt> |
+ | passwd | ||
*Leave chroot | *Leave chroot | ||
− | :<tt>e.g.</tt> exit | + | :<tt>e.g.</tt> |
+ | exit | ||
*Copy kernel | *Copy kernel | ||
*Copy modules | *Copy modules | ||
Line 64: | Line 81: | ||
== Emerging binary packages == | == Emerging binary packages == | ||
*Add PORTAGE_BINHOST to make.conf | *Add PORTAGE_BINHOST to make.conf | ||
− | :<tt>e.g.</tt> echo "PORTAGE_BINHOST=http://torindel.sezamkowa.net/openmoko/armv4tl-softfloat-linux-gnueabi/~arm/packages/All" >> /etc/make.conf | + | :<tt>e.g.</tt> |
+ | echo "PORTAGE_BINHOST=http://torindel.sezamkowa.net/openmoko/armv4tl-softfloat-linux-gnueabi/~arm/packages/All" >> /etc/make.conf | ||
*Update environment | *Update environment | ||
− | :<tt>e.g.</tt> source /etc/profiles; env-update | + | :<tt>e.g.</tt> |
+ | source /etc/profiles; 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) | *Setup install mask if you don't want compiler headers/docs etc (mask headers only if you'll be always using binary packages) | ||
− | :<tt>e.g.</tt> INSTALL_MASK="*.h" | + | :<tt>e.g.</tt> |
+ | INSTALL_MASK="*.h" | ||
*Emerge packages with -kG | *Emerge packages with -kG | ||
− | :<tt>e.g.</tt> emerge -kG syslog-ng | + | :<tt>e.g.</tt> |
+ | emerge -kG syslog-ng | ||
Revision as of 02:44, 4 September 2008
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)
Read first
http://www.gentoo.org/doc/en/handbook/handbook-arm.xml (Skip points 2 and 3)
Needed things
- 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
- Partition your sd card if needed (don`t make swap partitions, ensure card isn't mounted)
- e.g.
fdisk /dev/mmcblk0
- Make ext2 or ext3 filesystem
- e.g.
mkfs.ext2 /dev/mmcblk0p1
- Mount partition
- e.g.
mount /dev/mmcblk0p1 /media/card
- Copy stage and portage from host to moko
- e.g. [localhost]
scp stage3-armv4tl-*.tar.bz2 portage-*.tar.bz2 root@openmoko:/media/card
- Unpack stage and portage
- e.g.
tar -xjpf /media/card/stage3-armv4tl-*.tar.bz2 -C /media/card tar -xjpf /media/card/portage-*.tar.bz2 -C /media/card/usr
- Cleanup removing tar.bz2
- e.g.
rm /media/card/stage3-armv4tl-*.tar.bz2 /media/card/portage-*.tar.bz2
- Chroot
- e.g.
chroot /media/card /bin/bash
- Update chroot environment
- e.g.
source /etc/profiles; env-update
- Set timezone
- e.g.
cp /usr/zoneinfo/YOURZONE /etc/localtime
- Set hostname
- e.g.
nano /etc/conf.d/hostname
- Remove console font changing (small is beautiful ;])
- e.g.
nano /etc/conf.d/consolefont (hash consolefont= line)
- Setup fstab
- e.g.
nano /etc/fstab
- Edit inittab (hash out c3, c4, c5, c6, s0, s1 lines)
- e.g.
nano /etc/inittab
- Setup usb networking
- e.g.
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
- Enable sshd
- e.g.
rc-update add sshd default
- Change root password
- e.g.
passwd
- Leave chroot
- e.g.
exit
- Copy kernel
- Copy modules
- Setup uboot for booting from sd card
- Reboot
- Setup/emerge rest of the system
Emerging binary packages
- 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/profiles; 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.
INSTALL_MASK="*.h"
- Emerge packages with -kG
- e.g.
emerge -kG syslog-ng
Binary package wishlist
As i'll be adding some packages to ftp above you might want to ask for some package here: GentooPackageWishList
Overlay with moko things and more packages coming soon.