Page 1 of 1
kernel not bootable if too large?
Posted: Mon Dec 19, 2011 5:27 pm
by marios
While using qemu, sometimes the emulator hangs at "Booting from ROM" when using the -kernel option.
I also found out that this is dependent to the size of the kernel, with a maximum limit about 15kB. Looks strange...
Does it have to do with the segments, with the linker.ld file or anything else? I don't even know where to look...
Re: kernel not bootable if too large?
Posted: Mon Dec 19, 2011 6:28 pm
by Nessphoro
Mine kernel never boots with QEMU's --kernel.
It's a lousy hack, and I wouldn't suggest using i.
Re: kernel not bootable if too large?
Posted: Wed Dec 21, 2011 4:30 am
by araxestroy
I'm fairly certain that the -kernel option is
designed to boot a Linux kernel image. That would most likely be why it doesn't work for your own kernel.
Re: kernel not bootable if too large?
Posted: Wed Dec 21, 2011 5:03 am
by Kevin
-kernel works for Linux and for Multiboot kernels.
I suspect the problem is that you don't explicitly place your multiboot header. It needs to be dword aligned and within the first 8k of the file. It probably happened to end up there by chance for your < 15k kernels and now it's moved to somewhere else. The solution is to move the multiboot header into its own section and specify this section first in the linker script.