Gentoo

From Openmoko

(Difference between revisions)
Jump to: navigation, search
m (Overview: - image link used incorrect wiki formatting)
m (fixed some typos)
Line 38: Line 38:
 
:<tt>e.g.</tt> <pre>chroot /media/card /bin/bash</pre>
 
:<tt>e.g.</tt> <pre>chroot /media/card /bin/bash</pre>
 
*Update chroot environment
 
*Update chroot environment
:<tt>e.g.</tt> <pre>source /etc/profiles; env-update</pre>
+
:<tt>e.g.</tt> <pre>source /etc/profile; env-update</pre>
 
*Set timezone
 
*Set timezone
:<tt>e.g.</tt> <pre>cp /usr/zoneinfo/YOURZONE /etc/localtime</pre>
+
:<tt>e.g.</tt> <pre>cp /usr/share/zoneinfo/YOURZONE /etc/localtime</pre>
 
*Set hostname
 
*Set hostname
 
:<tt>e.g.</tt> <pre>nano /etc/conf.d/hostname</pre>
 
:<tt>e.g.</tt> <pre>nano /etc/conf.d/hostname</pre>

Revision as of 23:26, 9 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)

Screenshot (hosted at ImageShack)

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/profile; env-update
  • Set timezone
e.g.
cp /usr/share/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)

Screenshot (hosted at ImageShack)

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.