Compiling the XO 1.5 Kernel on an F11 Desktop

I tried, but couldn’t get this to work on the XO 1.5 itself.  But that gave me the impetus to finally get my dual boot Ubuntu Lucid / F11 machine sorted out.

As we all know, compiling a kernel takes a lot of dependencies and getting all those is usually the most time consuming part at first.  Once you get that covered, see what I did to compile and install a kernel on the XO 1.5 after the jump.


Make sure you do this as a normal user so you don’t accidentally hose something on your host machine.

Get the kernel source:

git clone git://dev.laptop.org/olpc-2.6
cd olpc-2.6
git checkout origin/olpc-2.6.31

Create your new config.  I like xconfig, but you can always use menuconfig instead.

make clean distclean
make xo_1.5_defconfig
make xconfig

I don’t know if all this is necessary, but I did this anyway cause I didn’t want to waste a bunch of compilation time just in case:

mv arch/x86/configs/xo_1.5_defconfig arch/x86/configs/xo_1.5_defconfig.original
cp .config arch/x86/configs/xo_1.5_defconfig
make clean distclean
make xo_1.5_defconfig

And finally:

make xo_1_5-kernel-rpm

This takes awhile, of course.  When it’s done, you’ll find the rpms in olpc/RPMS/i586.  Take these two over to the XO 1.5 and install them:

rpm -ivh kernel-firmware…rpm
rpm -ivh kernel…i586.rpm

Some stuff to do to get it to boot:

Go into /boot and make sure the initrd.img and vmlinuz symlinks were created correctly.

cd /boot
ls -lh

If you don’t do this, the XO 1.5 won’t boot into the new kernel

rsync –delete-before -av /boot/ /bootpart/boot/

While still in /boot, copy the new initrd and vmlinuz to /versions/pristine/NN/boot.  Replace the elipses with your kernel version and NN with your build version.

cp initrd…DIRTY.img vmlinuz…DIRTY.img /versions/pristine/NN/boot

Make your symlinks:

cd /versions/pristine/NN/boot
rm initrd.img vmlinuz
ln -sf initrd…DIRTY.img initrd.img
ln -sf vmlinuz…DIRTY.img vmlinuz

Reboot and you should see that lovely DIRTY kernel when you do uname -a

One thought on “Compiling the XO 1.5 Kernel on an F11 Desktop”

Leave a Reply