Hi all, long time lurker but first time poster.
I'm interested in running a stripped-down NetBSD kernel in QEMU. I've been able to get a working setup with an i386 build, but the status of amd64 multiboot is a bit more unclear to me.
Following the same steps for a 64-bit build, QEMU (via the -kernel option) returns:
Error loading uncompressed kernel without PVH ELF Note
This leads me to believe that something might be off with the multiboot header. Indeed a search of the mailing lists has shown me a related issue: http://mail-index.netbsd.org/port-i386/2020/11/13/msg004008.html
If I look at the source tree, I see the MULTIBOOT option is available for amd64:
Additionally, a man page for multiboot(8) on amd64 exists: https://man.netbsd.org/NetBSD-9.3/amd64/multiboot.8
This email seems to be the biggest clue, suggesting that the kernel (and therefore multiboot section) is loaded at a memory address much higher than what is suggested by the spec (if it's linked at all?): https://mail-index.netbsd.org/tech-toolchain/2019/10/24/msg003655.html
If someone more familiar with NetBSD internals could confirm/deny if multiboot on amd64 is even supported, I would greatly appreciate it!