How to create / use a simple bootloader
-
Hello, I am trying to make a small OS as a hobby. But I am not sure how can I code / use (and which one) a bootloader that transfers control over to my kernel. Can anyone guide me / suggest a simple bootloader with an example of kernel control handover ? Thanks Ashish
-
Hello, I am trying to make a small OS as a hobby. But I am not sure how can I code / use (and which one) a bootloader that transfers control over to my kernel. Can anyone guide me / suggest a simple bootloader with an example of kernel control handover ? Thanks Ashish
What about http://www.osdev.org/?
-
Hello, I am trying to make a small OS as a hobby. But I am not sure how can I code / use (and which one) a bootloader that transfers control over to my kernel. Can anyone guide me / suggest a simple bootloader with an example of kernel control handover ? Thanks Ashish
also, check out grub and lilo, the linux bootloaders. since they're open source, you can look at their code, and probably get advice from their authors too. -- Raoul Snyman Saturn Laboratories e-mail: raoul.snyman@saturnlaboratories.co.za web: http://www.saturnlaboratories.co.za/ blog: http://blog.saturnlaboratories.co.za/ linux user: #333298
-
Hello, I am trying to make a small OS as a hobby. But I am not sure how can I code / use (and which one) a bootloader that transfers control over to my kernel. Can anyone guide me / suggest a simple bootloader with an example of kernel control handover ? Thanks Ashish
Hi, You are confusing between boot-loader & OS. (1) Bootloader is the initial stage program which will ultimately load final OS. It is of fixed size(512 bytes). But if your boot-loader goes beyond this size you can cut this in pieces leaving the intent of bootloader intact. Boot -loader is basically written in assembly(8086 or higher). (2) Os is....you know what it is. So once you power ON your system; it will perform normal BIOS routines & then cheks for boot sequence. According to boot sequence it will verify first sector (512 bytes)for validity & if it is valid it will load that sector in RAM. And later pass control to it. Here starts the job of boot-loader which should take care of loading all imp files reqd for loading OS ultimately. if you have more doubts feel free to contact me.