Disadvantages of using grub for x86-64

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
glolichen
Posts: 15
Joined: Wed Jul 10, 2024 9:23 pm

Disadvantages of using grub for x86-64

Post by glolichen »

I'm in the process of moving from 32-bit to 64-bit, and my plan is to continue using legacy grub and bootstrapping into long mode using a separate loader. It sounds that this would be the easiest option at https://wiki.osdev.org/Creating_a_64-bit_kernel (I've tried limine but I want to enter long mode myself because it sounds fun). What are some disadvantages of this approach that I should be aware of? Thank you
nullplan
Member
Member
Posts: 1789
Joined: Wed Aug 30, 2017 8:24 am

Re: Disadvantages of using grub for x86-64

Post by nullplan »

This is the approach I use myself. I see it as superior, since it allows me to adjust to different boot environments without changing the main kernel. I can boot using the legacy method or using UEFI.
Carpe diem!
glolichen
Posts: 15
Joined: Wed Jul 10, 2024 9:23 pm

Re: Disadvantages of using grub for x86-64

Post by glolichen »

What format do you compile the bootstrapping 32 bit code to? x86_64-elf-gcc refuses to link anything compiled to elf32, should elf64 be used instead then? Thanks.
User avatar
iansjack
Member
Member
Posts: 4703
Joined: Sat Mar 31, 2012 3:07 am
Location: Chichester, UK

Re: Disadvantages of using grub for x86-64

Post by iansjack »

I compile the initial code as elf32. The 64-bit code is compiled as a separate elf64 file which is loaded as a module.
Post Reply