Yesterday I found this forum (and it's wiki), when I was searching for some
information to develop an operating system.
I started just a few days ago (:P), and now I've some problems.
1) How could I load a kernel from my bootloader? Are there maybe some simple
examples on the internet? Maybe I searched on the wrong way.
2) I thought you always need to write a bootloader to start your OS. But i saw on
different examples on this site nothing about a home made bootloader, but GRUB.
Is it possible to run your kernel straight from GRUB? (So you don't have to start
with 16 bit mode)
I hope there is someone who could help me I hope I did not make many big
mistakes with my English.
(This forum and wiki are great, with lots of information. I think I will come back
many times to find something I need)
Load the kernel
Load the kernel
If you live each day as if it was your last, someday you'll most certainly be right.
1) The bootloader essentailly just reads sectors from a floppy/hdd/usb and throws them in a specified memory location and 'jumps' to that loaction to start up the kernel.
2) GRUB is a great multi-stage bootloader that sets up protected mode (32-bit) and does all the grunge work for you. Making a bootloader yourself does not mean that it is all 16-bit. Mine (in development) starts in 16-bit mode (you have to), reads floppy sectors, enables the A20 and enters protected mode and then jumps to high memory where I placed my kernel.
Another great place for tutorials (besides the wiki here) is OsDever.net .
2) GRUB is a great multi-stage bootloader that sets up protected mode (32-bit) and does all the grunge work for you. Making a bootloader yourself does not mean that it is all 16-bit. Mine (in development) starts in 16-bit mode (you have to), reads floppy sectors, enables the A20 and enters protected mode and then jumps to high memory where I placed my kernel.
Another great place for tutorials (besides the wiki here) is OsDever.net .
Website: https://joscor.com
Hey, Also, a really helpful site is http://www.mohanraj.info/ .
gives a good breakdown of the bootloader->kernel relationship.
Pe@cE
gives a good breakdown of the bootloader->kernel relationship.
Pe@cE
Website: https://joscor.com
beyond tutorials, specifications are essential, make sure you get the CPU manuals -- the intel manuals assuming you are using an x86 chip -- the link in my signature will get you to a site where you can download or (preferably) order copies of the intel manuals (there are 5 volumes, make sure you get them all)
I would personally reccommend using GRUB to get you started. It's an easy way of getting your kernel up-and-running quickly, and it seems most people that get bored of OSDev get bored of writing the bootloader and jumping through all the strange x86 hoops and pitfalls!
You can always write your own bootloader later.
If you're after tutorials there are some (that I wrote) in my signature that use GRUB.
http://www.jamesmolloy.co.uk
Good luck!
You can always write your own bootloader later.
If you're after tutorials there are some (that I wrote) in my signature that use GRUB.
http://www.jamesmolloy.co.uk
Good luck!