Hi! I am a beginner and I have made a boot loader return in flat binary and planning to execute the kernel. I have written the code for loading up files and entered protected mode. I planning to write a kernel ini686-elf. So after the kernel is loader in memory, how to run the code.
I have been using the following tutorial http://www.brokenthorn.com/Resources/OSDevIndex.html in order making the boot loader.
How to exucute an elf kernel from a bootloader
- BASICFreak
- Member
- Posts: 284
- Joined: Fri Jan 16, 2009 8:34 pm
- Location: Louisiana, USA
Re: How to exucute an elf kernel from a bootloader
Hello, so the steps are:
Process ELF Header - Get Entry Point and Program Header Information
Process each Program Header - Copy each section to there respected location, and clear any allocated memory not located in the ELF.
Switch Modes
Jump to ELF Entry Point.
Grab a copy of the ELF Spec - if I'm not mistaken you should only have to worry about sections 1-3 and 2-2 (until you get into SOs or Relocs)
B!
Process ELF Header - Get Entry Point and Program Header Information
Process each Program Header - Copy each section to there respected location, and clear any allocated memory not located in the ELF.
Switch Modes
Jump to ELF Entry Point.
Grab a copy of the ELF Spec - if I'm not mistaken you should only have to worry about sections 1-3 and 2-2 (until you get into SOs or Relocs)
B!
BOS Source Thanks to GitHub
BOS Expanded Commentary
Both under active development!
BOS Expanded Commentary
Both under active development!
Sortie wrote:
- Don't play the role of an operating systems developer, be one.
- Be truly afraid of undefined [behavior].
- Your operating system should be itself, not fight what it is.