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...
kernel not bootable if too large?
Re: kernel not bootable if too large?
Mine kernel never boots with QEMU's --kernel.
It's a lousy hack, and I wouldn't suggest using i.
It's a lousy hack, and I wouldn't suggest using i.
- Kazinsal
- Member
- Posts: 559
- Joined: Wed Jul 13, 2011 7:38 pm
- Libera.chat IRC: Kazinsal
- Location: Vancouver
- Contact:
Re: kernel not bootable if too large?
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?
-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.
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.