Fedora kernel on XO progress -- initrd is loaded in the wrong by place by OpenFirmware

Jeremy Katz katzj at redhat.com
Mon Sep 22 20:48:42 UTC 2008


After going down a few more dead ends than I would have preferred, I've
figured out the root cause of the problems booting the Fedora kernel on
the XO.  The base problem is that OFW always loads the initrd at
0x800000 which, while it used to be okay, isn't a safe assumption with
current kernels.  With the Fedora kernel images for example, this ends
up being smack in the middle of the .bss and thus things explode.

The correct thing to do with an initrd (according to
Documentation/boot/x86/i386/boot.txt and manual verification with hpa)
is to first check the value of initrd_addr_max (0x22c) in the header of
the bzImage.  initrd_addr_max is defined as the maximum safe address for
a byte of the initrd, so you want to load the ramdisk at
initrd_addr_max-len(ramdisk)+1.  This then will make OFW's kernel
loading match that of all the other bootloaders used on x86.  It might
also be worth checking some of the other newer things (especially the
kernel_alignment field), but I've got no indication of them causing any
problems at all right now with anything that anyone is actually doing in
practice.

Unfortunately, I have nowhere near the forth-fu to whip up a patch to
fix the ramdisk load location.  But I'm pretty sure that with such a
patch, a standard Fedora kernel should be able to boot just fine on the
XO hardware which would be a really big win for being able to run any of
the variety of Fedora live images.  Mitch -- any chance you could take a
look or give me pointers in the correct direction?

Thanks,

Jeremy




More information about the Fedora-olpc-list mailing list