Page 1 of 1
GRUB vs. Custom
Posted: Mon Dec 13, 2004 4:50 pm
by dh
simple question: should my kernel rely on GRUB to do A20 and Protected Mode? Should I have extra code just in case?
Re:GRUB vs. Custom
Posted: Tue Dec 14, 2004 3:12 am
by Pype.Clicker
you can trust GRUB for that.
Re:GRUB vs. Custom
Posted: Tue Dec 14, 2004 10:41 am
by dh
thanks Pype. I needed that to know if it was worth my time right now.
Re:GRUB vs. Custom
Posted: Tue Dec 14, 2004 4:04 pm
by dh
in that case, should I /ever/ write the a20 and PM code?
(planning ahead)
Re:GRUB vs. Custom
Posted: Tue Dec 14, 2004 7:56 pm
by Brendan
Hi,
Dragon_Hilord wrote:
in that case, should I /ever/ write the a20 and PM code?
(planning ahead)
If you ever decide to write your own boot loader/s (ie. stop using GRUB), then you'd need to write code for A20 and switching to protected mode.
If you ever want to reliably/intelligently set a decent video mode before booting your OS, then you may want to write your own boot loader (a useful feature unless you've written a pile of video drivers). Alternatively you can boot with GRUB, switch back to real mode, change the video and switch back to protected mode.
IMHO if you have enough experience to write an OS, then writing a custom boot loader will only take a week or so part time. If you don't have enough experience to write an OS, then writing a custom boot loader will help gain experience.
It's also possible to boot from GRUB
and your own custom boot loader/s, rather than being restricted to one way or the other. See my OS's boot loader source code for details -
http://www.users.bigpond.com/sacabling/dl.html (about 3/4 of the way down under "Boot Loader Package")..
Cheers,
Brendan
Re:GRUB vs. Custom
Posted: Sun Dec 19, 2004 5:02 pm
by dh
well, if I were /ever/ to make my own bootloader it would do just that: boot and load. the kernel would handel the rest.
Thanks guys!
Re:GRUB vs. Custom
Posted: Mon Dec 20, 2004 2:10 am
by distantvoices
One can also use vm86 or writing directly to registers to switch to graphics mode - I'd rather do it the vm86 way for the first time. It is not *that* awful to incorporate a vm86 module in the kernel. It just requires some cross thinking and some tricks.