Page 1 of 1
Disadvantages of using grub for x86-64
Posted: Fri Jul 12, 2024 9:09 pm
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
Re: Disadvantages of using grub for x86-64
Posted: Fri Jul 12, 2024 9:24 pm
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.
Re: Disadvantages of using grub for x86-64
Posted: Fri Jul 12, 2024 10:02 pm
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.
Re: Disadvantages of using grub for x86-64
Posted: Fri Jul 12, 2024 11:33 pm
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.