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
On Tue, Sep 23, 2008 at 8:48 AM, Jeremy Katz katzj@redhat.com wrote:
After going down a few more dead ends than I would have preferred,
great sleuthing!
... 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.
... even F9 kernels?
cheers,
m
On Tue, 2008-09-23 at 11:04 +1200, Martin Langhoff wrote:
On Tue, Sep 23, 2008 at 8:48 AM, Jeremy Katz katzj@redhat.com wrote:
... 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.
.. even F9 kernels?
There's still some config work to be done as well as another bug or three to shake out. But we now get into the kernel and get oopsen, so it's just a Simple Matter of Follow and Fix the Oops (tm). Which is a far simpler process
Jeremy