kernel not bootable if too large?

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
marios
Posts: 1
Joined: Thu Dec 15, 2011 10:51 am

kernel not bootable if too large?

Post 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...
User avatar
Nessphoro
Member
Member
Posts: 308
Joined: Sat Apr 30, 2011 12:50 am

Re: kernel not bootable if too large?

Post by Nessphoro »

Mine kernel never boots with QEMU's --kernel.
It's a lousy hack, and I wouldn't suggest using i.
User avatar
Kazinsal
Member
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?

Post by Kazinsal »

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.
Kevin
Member
Member
Posts: 1071
Joined: Sun Feb 01, 2009 6:11 am
Location: Germany
Contact:

Re: kernel not bootable if too large?

Post 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.
Developer of tyndur - community OS of Lowlevel (German)
Post Reply