Re: Against bootloaders
Posted: Wed Jul 24, 2019 10:21 am
Thread for reference: viewtopic.php?f=1&t=33784
I don't understand. There are as many if not more threads about GRUB issues...thomtl wrote:Thread for reference: viewtopic.php?f=1&t=33784
True, not the software itself, but they are usability issues of grub, and problems loading OSes using multiboot. Perfect examples that grub and its accompanied multiboot protocol are overcomplicated, therefore not as easy option as one would expect. And that was my original point: it's easier to write a boot record that just loads your kernel like Xv6 does (not to mention that you could use Xv6 boot record as-is to load ANY ELF kernel if you don't want to roll your own loader. It is a hell lot easier to install Xv6 boot record than installing and configuring grub correctly).iansjack wrote:Neither of those threads are about grub, per se.
This is true. However my OS is not DOS-like, does not use fixed filesystem nor is it limited to very small storage, yet I decided to roll my own loader. My reasons were:saltlamp wrote:I'd say, If your not using a fixed file-system and/or not on a very small storage medium,
- Which leads us to my final point, my multi-platform bootloader translates everything into a machine-independent structure, something GRUB won't do for your kernel. You see, my kernel does not know nor care if for example the memory map was provided by E820, EFI_Get_MemoryMap, GPU MailBox calls or whatever, it receives the map in exactly the same format with exactly the same memory type codes on all platforms. Unlike Multiboot, you can implement this on new platforms without the need of updating the spec.However multiboot1 is very x86 specific. multiboot2 is cross platform but doesn't currently support ARM. Both are more complicated than what is needed on ARM.
This design scheme (platform agnostic boot protocol) is very essential in my kernel, I couldn't patch it into an existing one. It had to be designed that way from the start. All I'm saying here is, if you choose to write your OS first, and you add the bootloader later, then be prepared for a kernel rewrite (I see no point in developing yet another Multiboot bootloader for your existing kernel which loader would have exactly the same restrictions as GRUB, but probably less roboust and less stable, imho). I think if you want to write your own bootloader, there has to be a good reason, something that you can't do with Multiboot, and you should start with that loader. Imho.saltlamp wrote:then develop your operating system first, using another boot-loader; then, if you want, you can write a boot-loader.