Page 1 of 1
loading linux kernel from my own bootloader
Posted: Mon Apr 12, 2010 1:21 am
by sp3tsnaz
how can i start linux kernel from my own bootloader ? i have already formatted my flash drive to ext3 and pasted the compiled kernel there. . now how can i load linux from my assembly code ? examples are much welcome // Thankyou in advance ..
Regards,
Mohsin.
Re: loading linux kernel from my own bootloader
Posted: Mon Apr 12, 2010 2:15 pm
by KotuxGuy
Re: loading linux kernel from my own bootloader
Posted: Mon Apr 12, 2010 2:30 pm
by quok
Um, what? No, linux certainly is not multiboot compliant. Linux uses its own boot protocol, which for x86 is fairly well documented. Newer kernels have both 16-bit and 32-bit entry points. Look at Documentation/x86/boot.txt in the linux kernel source.
Re: loading linux kernel from my own bootloader
Posted: Mon Apr 12, 2010 2:36 pm
by KotuxGuy
Whoops, my bad.
Re: loading linux kernel from my own bootloader
Posted: Mon Apr 12, 2010 3:41 pm
by Selenic
Yeah, if you want to load Linux you'll have to implement the bzImage format. From looking at it briefly, it doesn't look too complicated - there's a decompression stub that handles all the interesting stuff in the kernel image, you just have to find out how to locate the entry point and how to pass parameters/modules/whatever.
Re: loading linux kernel from my own bootloader
Posted: Mon Apr 12, 2010 5:36 pm
by sp3tsnaz
can someone please give me an example ?
i have tried searching alot .. all i get is theory
Re: loading linux kernel from my own bootloader
Posted: Mon Apr 12, 2010 6:00 pm
by quok
sp3tsnaz wrote:can someone please give me an example ?
i have tried searching alot .. all i get is theory
Sure, look at the grub source code. But really, the boot protocol as documented in Documentation/x86/boot.txt should be more than enough.
Re: loading linux kernel from my own bootloader
Posted: Mon Apr 19, 2010 12:49 am
by sp3tsnaz
so if i have a 32 bit operating system , do i have to call start_32 to get linux kernel running ?
Re: loading linux kernel from my own bootloader
Posted: Mon Apr 19, 2010 1:07 am
by Love4Boobies
For the third time, read boot.txt. Stop bugging us until you've read it.