meine Gentoo success story

Nach geschätzten 20 Stunden kompilierzeit ist mein hoch optimiertes Gentoo-System nun auf dem Asus Eeepc 1201N lauffähig. Ich habe den Weg zum Erfolg dokumentiert.

mkfs.ext4 /dev/sda5
mount /dev/sda5 /mnt/
cd /mnt

# Download Stage 3 and Portage

# Check for integrity
md5sum stage3-amd64-20100514.tar.bz2
md5sum portage-20100605.tar.bz2

# Unpack system
tar xvjpf stage3-amd64-20100514.tar.bz2
tar xvjf portage-20100605.tar.bz2 -C usr/

# chroot into our new system
mount -o bind /dev /mnt/dev/
mount -t proc none /mnt/proc
chroot . /bin/bash

vi etc/resolv.conf # set nameserver
emerge --sync
eselect profile list
eselect profile set 2 # Desktop System without GNOME/KDE

# We want to compile with gcc4.5 to optimize for -mtune=atom, so we need to
# install layman to add the toolchain overlay
emerge subversion
emerge layman
echo "source /usr/local/portage/layman/make.conf" >> /etc/make.conf
echo "PORTDIR_OVERLAY=\"/usr/local/portage\"" >> /usr/local/portage/layman/make.conf
layman -a toolchain
nano /etc/make.conf
add ACCEPT_KEYWORDS="~amd64" to make.conf to allow development version of gcc
mkdir /etc/portage

# Unmask gcc 4.5.0
echo "=sys-devel/gcc-4.5.0 **" >> /etc/portage/package.keywords
echo "=sys-devel/gcc-4.5.0" >> /etc/portage/packages.unmask
emerge gcc
gcc-config x86_64-pc-linux-gnu-4.5.0
source /etc/profile
emerge binutils
emerge libtool

nano /etc/make.conf
# CFLAGS="-march=native -mtune=atom -msse3 -O2 -pipe"
# MAKEOPTS="-j5"

emerge -eav system
emerge -eav world

emerge vim # i don't like nano
vi etc/locale.gen # set your locale

cd usr/src/
tar xvf linux-2.6.34.tar.bz2
ln -s linux-2.6.34 linux
cd linux/
# configure your kernel or copy existing .config here
make; make modules; make modules_install
cp arch/x86_64/boot/bzImage /boot/linux-2.6.34
vi /etc/fstab
# configure your fstab here

# configure your bootloader. when using ubuntu 10.04 see this

emerge dhcpcd

# We now need to boot our system to have our kernel running

# The Asus Eeepc1201N has an Nvidia Ion (Geforce 9400M) chipset, so we need
# to install the nvidia-drivers. Portage will automatically emerge the
# environment for us.

emerge nvidia-drivers
emerge xf86-input-evdev # important because will freeze without evdev

# Now install the other system essentials

# the dual-core atom isn't the fastest processor around, so we should try to
# reduce compile time as much as possible using ccache
emerge ccache

# emerge other system essentials
emerge xterm fluxbox irssi hnb alpine screen xdm xfe

# make sure that hald is running
/etc/init.d/hald start


# enjoy your new optimized gentoo System

Hier meine make.conf (work in progress):
CFLAGS="-march=native -mtune=atom -msse3 -O2 -pipe"
USE="mmx sse sse2 gtk -qt4 -qt3 -qt3-support -xulrunner -kde xvmc threads"
INPUT_DEVICES="keyboard mouse evdev"


source /usr/local/portage/layman/make.conf