OSDev.org

The Place to Start for Operating System Developers
It is currently Tue Oct 19, 2021 7:22 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Bootloader Development Goals.
PostPosted: Sat Jul 24, 2021 3:23 pm 
Offline

Joined: Mon Aug 24, 2020 2:25 pm
Posts: 13
Hello everyone! I'm thinking about developing an operating system and I had some doubts about bootloader development. From what I've read, using your own bootloader and a public one (like GRUB) doesn't make that much of a difference, and I don't have that much to lose by getting full project oversight in return. So, I went to investigate trying to know the goals of a bootloader (and in case I forget one, please remind me):
-Use identifier 0x55aa.
-Create a GDT.
-Switch from real mode to protected mode (32bits).
-Start the kernel.

Something I keep thinking about is the hard drive and file systems. When, in the future, the kernel jumps to other spaces on the hard drive, is it the bootloader that has to do "the request"? As a bootloader, is it necessary/recommended to work with file systems?
Please give your opinion. Thanks in advance.


Top
 Profile  
 
 Post subject: Re: Bootloader Development Goals.
PostPosted: Sat Jul 24, 2021 3:57 pm 
Offline
Member
Member

Joined: Mon Mar 25, 2013 7:01 pm
Posts: 3400
yByonic wrote:
From what I've read, using your own bootloader and a public one (like GRUB) doesn't make that much of a difference,

It makes a big difference! GRUB is stable. If you write your own bootloader, you have to debug it too, and there will be bugs that only happen on real hardware.

Also, GRUB does the work of at least six bootloaders: BIOS hard/floppy disk, BIOS CD, BIOS PXE TFTP, UEFI disk, UEFI PXE TFTP, and UEFI PXE HTTP.

yByonic wrote:
-Use identifier 0x55aa.
-Create a GDT.
-Switch from real mode to protected mode (32bits).
-Start the kernel.

-Load the kernel into memory.
-Get information from the firmware (memory map).
-Initialize the display.

yByonic wrote:
When, in the future, the kernel jumps to other spaces on the hard drive, is it the bootloader that has to do "the request"?

Typically no, but you can do that if you really want to. I've heard of kernels that work this way before the storage drivers are loaded.

yByonic wrote:
As a bootloader, is it necessary/recommended to work with file systems?

It's not necessary, but it is convenient. GRUB works with file systems.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group