I've recently been trying to re-explore GRUB2 and UEFI; if you remember I asked about such things as these before. I don't think the problem was ever solved, so I moved away from GRUB2 -- now I'm back!
After a gruelling afternoon, involving misinterpretation of help (sorry geist), Parallels 8 being a cavity irrigation device and Apple's toolchain being incompetent, I finally managed to build GRUB2, and with some help from Jordan_U on #grub, managed to get a bootx64.efi using
Code: Select all
grub2-mkstandalone --format=x86_64-efi -o bootx64.efi
1. When it loads my kernel, it apparently provides no memory map -- even using multiboot1. Thus my kernel halts because it cannot find available memory to allocate. I'm pretty sure I've got the flags right:
Code: Select all
// Multiboot 1 Header
.align 4
MultibootHeader:
.long 0x1BADB002 // Magic Number
.long 0x00000003 // Flags (bits 0, 1)
.long -(0x1BADB002 + 0x00000003) // Checksum
// Multiboot 2 Header
.align 8
Multiboot2Header:
// Magic number
.long 0xE85250D6
// Architecture: Intel IA-32(e)
.long 0
// Length of header:
.long Multiboot2HeaderEnd - Multiboot2Header
// Checksum
.long -(0xE85250D6 + 0 + Multiboot2HeaderEnd - Multiboot2Header)
.word 1
.word 0
.long 16
.long 6
.word 0
.word 0
Multiboot2HeaderEnd:
However, I get an endless stream of tags of type=0x03 and size=0x0 -- presumably because there's no end tag.
All I really need is the memory map, as well as a way to either switch the EFI firmware's video mode, or get to a VBE-compatible LFB mode.
2. GRUB seems to not want to load my grub.cfg. I think it's because I need to
Code: Select all
insmod part_gpt
Sorry for the long post -- thanks!