Complete 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
User avatar
djnorthyy
Member
Member
Posts: 49
Joined: Mon Apr 09, 2007 10:50 am
Location: UK, Hants
Contact:

Complete Bootloader

Post by djnorthyy »

Hey,

I have been tearing the internet apart for a tutorial(s) on how to develop a complete 2 stage bootloader. Eventually i would be nice to have it support network boot, although i know this is a big step!

I know there is always GRUB out there but I feel it would be a good learning tool and I am intent on developing every compont of my operating system myself. I know that is a lot to ask but I feel it is a challenge!

This bootloader needs to be able to load a kernel.bin file. 32bit protected mode. Is there anyway it could hadle 64bit as well? I know that would mean changing the kernel. The kernel would be coded in C/C++ as much as possible. The bootloader needs to be able to cope with all this.

Any link, docs, tutorials on this topic will be apprieated!

Harry.
Reflect Desktop Operating System - ' You only remember the name of the OS when it crashes '
User avatar
lukem95
Member
Member
Posts: 536
Joined: Fri Aug 03, 2007 6:03 am
Location: Cambridge, UK

Post by lukem95 »

osdever.net
grub source code
the osdev.org wiki
other sources... look through the project list
~ Lukem95 [ Cake ]
Release: 0.08b
Image
User avatar
djnorthyy
Member
Member
Posts: 49
Joined: Mon Apr 09, 2007 10:50 am
Location: UK, Hants
Contact:

Bootloader

Post by djnorthyy »

Thanks for that, i will check them out.

I have completed all the tutorials over at BrokenThorn apart from the MSVC++ one. Where can i go from here because this bootloader does not actually load a kernel file, it just displays text on the screen? Sorry if i am being completly stupid! :)

Harry.
Reflect Desktop Operating System - ' You only remember the name of the OS when it crashes '
User avatar
Dex
Member
Member
Posts: 1444
Joined: Fri Jan 27, 2006 12:00 am
Contact:

Post by Dex »

You could look at "OS Development for Dummies - OS Loader", that may help you.
http://alexfru.chat.ru/epm.html#los4d
User avatar
djnorthyy
Member
Member
Posts: 49
Joined: Mon Apr 09, 2007 10:50 am
Location: UK, Hants
Contact:

Anything else?

Post by djnorthyy »

Thanks, is there any advice on how to finish off the bootloader I developed from the tutorial over at BrokenThorn?
Reflect Desktop Operating System - ' You only remember the name of the OS when it crashes '
User avatar
lukem95
Member
Member
Posts: 536
Joined: Fri Aug 03, 2007 6:03 am
Location: Cambridge, UK

Post by lukem95 »

yeah, depending on the filesystem/bootmedium your using, you need to get your bootloader to:

+ write basic disk i/o driver using BIOS ints
+ write a basic filesystem driver, probably gonna be a FAT one
+ load the kernel (.bin is easiest) into memory
+ set up protected mode (optional)
+ jmp to the address you loaded the kernel at
~ Lukem95 [ Cake ]
Release: 0.08b
Image
Post Reply