View source for Gentoo

From Openmoko

Jump to: navigation, search

You do not have permission to edit this page, for the following reasons:

  • The action you have requested is limited to users in the group: Administrators.
  • You must confirm your email address before editing pages. Please set and validate your email address through your user preferences.

You can view and copy the source of this page:

Templates used on this page:

Return to Gentoo.

Personal tools


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 (Skip points 2 and 3)

Needed things


  • 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=( \" netmask\" )" > /etc/conf,d/net
echo "routes_usb0=\"default via\"" >> /etc/conf.d/net
echo "nameserver" > /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=" >> /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.