multiboot

Grub 2 not detecting Multiboot header in kernel

拜拜、爱过 提交于 2019-12-01 20:48:00
问题 I'm having an issue with Grub 2 (and QEMU's -kernel ) not detecting the Multiboot v1 header in my kernel. I have the header in a separate section before .text . linker.ld : SECTIONS { . = 1M; .multiboot ALIGN(4K) : { *(.multiboot) } .text ALIGN(4K) : { *(.text) } [snip] boot.s (GNU as syntax): .set MAGIC, 0x1badb002 .set FLAGS, (1<<0 | 1<<1) # align, provide mem map .set CHECKSUM, -(MAGIC + FLAGS) .section .multiboot .long MAGIC .long FLAGS .long CHECKSUM .section .text [snip] I have verified

Grub 2 not detecting Multiboot header in kernel

一笑奈何 提交于 2019-12-01 18:36:34
I'm having an issue with Grub 2 (and QEMU's -kernel ) not detecting the Multiboot v1 header in my kernel. I have the header in a separate section before .text . linker.ld : SECTIONS { . = 1M; .multiboot ALIGN(4K) : { *(.multiboot) } .text ALIGN(4K) : { *(.text) } [snip] boot.s (GNU as syntax): .set MAGIC, 0x1badb002 .set FLAGS, (1<<0 | 1<<1) # align, provide mem map .set CHECKSUM, -(MAGIC + FLAGS) .section .multiboot .long MAGIC .long FLAGS .long CHECKSUM .section .text [snip] I have verified that the header section is being added as specified with the magic number: kernel.bin: file format