loading linux kernel from my own bootloader

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
sp3tsnaz
Posts: 3
Joined: Fri Mar 19, 2010 11:36 pm

loading linux kernel from my own bootloader

Post 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.
User avatar
KotuxGuy
Member
Member
Posts: 96
Joined: Wed Nov 25, 2009 1:28 pm
Location: Somewhere within 10ft of my favorite chubby penguin!

Re: loading linux kernel from my own bootloader

Post by KotuxGuy »

Give a man Linux, you feed the nearest optician ( Been staring at the PC too long again? ).
Give a man OS X, you feed the nearest NVidia outlet ( I need more GPU power!! )
Give a man Windows, you feed the entire Tylenol company ( Self explanatory :D )
quok
Member
Member
Posts: 490
Joined: Wed Oct 18, 2006 10:43 pm
Location: Kansas City, KS, USA

Re: loading linux kernel from my own bootloader

Post 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.
User avatar
KotuxGuy
Member
Member
Posts: 96
Joined: Wed Nov 25, 2009 1:28 pm
Location: Somewhere within 10ft of my favorite chubby penguin!

Re: loading linux kernel from my own bootloader

Post by KotuxGuy »

Whoops, my bad. :oops:
Give a man Linux, you feed the nearest optician ( Been staring at the PC too long again? ).
Give a man OS X, you feed the nearest NVidia outlet ( I need more GPU power!! )
Give a man Windows, you feed the entire Tylenol company ( Self explanatory :D )
Selenic
Member
Member
Posts: 123
Joined: Sat Jan 23, 2010 2:56 pm

Re: loading linux kernel from my own bootloader

Post 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.
sp3tsnaz
Posts: 3
Joined: Fri Mar 19, 2010 11:36 pm

Re: loading linux kernel from my own bootloader

Post by sp3tsnaz »

can someone please give me an example ? :( i have tried searching alot .. all i get is theory :(
quok
Member
Member
Posts: 490
Joined: Wed Oct 18, 2006 10:43 pm
Location: Kansas City, KS, USA

Re: loading linux kernel from my own bootloader

Post 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.
sp3tsnaz
Posts: 3
Joined: Fri Mar 19, 2010 11:36 pm

Re: loading linux kernel from my own bootloader

Post by sp3tsnaz »

so if i have a 32 bit operating system , do i have to call start_32 to get linux kernel running ?
User avatar
Love4Boobies
Member
Member
Posts: 2111
Joined: Fri Mar 07, 2008 5:36 pm
Location: Bucharest, Romania

Re: loading linux kernel from my own bootloader

Post by Love4Boobies »

For the third time, read boot.txt. Stop bugging us until you've read it.
"Computers in the future may weigh no more than 1.5 tons.", Popular Mechanics (1949)
[ Project UDI ]
Post Reply