Gentoo

From Openmoko

(Difference between revisions)
Jump to: navigation, search
Line 82: Line 82:
 
As i'll be adding some packages to ftp above you might want to ask for some package here: [[GentooPackageWishList]]<br>
 
As i'll be adding some packages to ftp above you might want to ask for some package here: [[GentooPackageWishList]]<br>
 
Overlay with moko things and more packages coming soon.
 
Overlay with moko things and more packages coming soon.
 +
[[category:Technical]]

Revision as of 06:30, 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


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. (on 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.
export 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.

Personal tools

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


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. (on 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.
export 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.