On Jan 31, 2008, at 10:58 AM, Kevin Wolf wrote:
Hi, I like this idea. When I just tried to load my multiboot kernel it failed, though, because of the following piece of code:+ // XXX: multiboot header may be within the first 8192 bytes, but header+ // is only the first 1024 + + // Ok, let's see if it is a multiboot image + for(i=0; i<(256 - 12); i+=4) { // the header is 12x32bit long + if(ldl_p(header+i) == 0x1BADB002) {I wonder if there is any reason why you didn't just replace the 1024 by8192 in load_linux but added an XXX. Would this cause any problems Imissed? With this change and replacing 256 by 8192 in the above code itworks for my kernel, too. Anyway, I think the for condition should be i < 4 * (256 - 12), even without changing the 1024.
This version should fix the long header issue. I made the linux loader fetch the first 8kb as header, so multiboot can search through all necessary data.
I also implemented module parameters. Kevin needed this to boot a homebrew kernel. You can now pass commandline parameters to the multiboot modules by adding them after the filename, seperated through a space. This is the very same approach grub takes.
To boot a xen kernel you would give a command line like this:qemu -hda image -kernel xen -initrd "vmlinux-xen root=/dev/hda,initrd- xen"
This way the vmlinux module gets the command line parameter "root=/dev/ hda".
Regards, Alex
multiboot.new.patch
Description: Binary data