25. 08. 08

quick roundup about how to install gentoo on the epia m9000 or similar cmov-less c3 boards

since the emerging is on fast-forward right now (thanks to icecream/crossdev)
i thought it might be a good idea to sum up what i have done to get gentoo running on an epia m9000 board featuring a cmov-less c3 ezra (933mhz).

you should at first make sure that you are able to efficiently cool the c3 and the northbridge since it becomes really hot in a closed case with these small 40x40mm fans.
i read about a maximum temperature of about 75°C.
ok, now get yourself the gentoo minimal install cd for x86.Here is the Link.

boot into the cd (no boot options needed)
i assume you are using dhcp so you do not need to care about network settings right now.
in case you want to test it, here is a neat one-liner:[ $(ping -c1 http://www.google.com -W1 -w1 | awk '/received/ {print $4}') ] && echo "ONLINE" || echo "OFFLINE"
let’s you easily know wether you are online and wether dns resolving works.

ok now it’s time to partition your harddisk, take a look at what we got right now:fdisk -l

we need a boot, a swap and a root partition.
i like to do it this way:
boot = 32M (space to store different kernels for testing around)
swap = half the size of the RAM
root = what’s left

fdisk /dev/yourDevice

well, no need to explain really as fdisk is kinda self-explaining.

after you set up your disk, it is time to make some filesystems.
i like to use ext2 for the boot and reiserfs for the root partition.
choose what you like best.

you should choose another mirror which is geographically near to you.http://www.gentoo.org/main/en/mirrors2.xml
notice how i chained the commands together, this way we do not have to sit there and wait, enter some commands, wait…
we just enter this chain and everything is fine.

ok proceed with the make.conf located in /mnt/gentoo/etc/make.conf
set your options and save.
for the c3 it should look like this:/mnt/gentoo/etc/make.conf
CFLAGS="-march=c3 -mmmx -m3dnow -fomit-frame-pointer -Os -pipe"
CXXFLAGS="${CFLAGS}"
CHOST="i586-pc-linux-gnu"
MAKEOPTS="-j3"
FEATURES="parallel-fetch"

parallel-fetch tells portage to fetch the next tarball while compiling.
the chost and cflags settings are the ones i chose after failing several times.
so this should work on cmov-less c3s. (look at this post)

ok next step would be to copy our dns resolution config to the new root.
we need this because we are not getting a new ip adress via dhcp after chrooting.cp -L /etc/resolv.conf /mnt/gentoo/etc/

now we need to mount the /proc and /dev dirs to let the new chroot environment know about our hardware.mount -t proc none /mnt/gentoo/proc
mount -o bind /dev /mnt/gentoo/dev

you will now see a nice ncurses based menu.
if you like, you could use my kernel .config, it is for the 2.6.25-r7 version.
take a look at this post
this one includes every feature of the epia m9000 and some other features that might be interesting for the use of mythtv.
just save it as /usr/src/linux/.config
and call make menuconfig
now you can look through the options to modify things.

if you are ready you could start building the kernel:make && make modules_install
cp arch/i386/boot/bzImage /boot/kernel-2.6.24-gentoo-r5