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.
After getting a basic 32-bit i386 kernel emulating through QEMU, I figured I would go ahead and get one fired up on x86_64. I am still completely in the "Let's make sure this actually works before doing anything else" phase. Running "qemu-system-x86_64 -kernel out.bin" results in QEMU spitting out "Error loading uncompressed kernel without PVH ELF Note." The binary file has been verified with grub-file as well.
I've read around that QEMU does not support multiboot2 so I figured I would just give it what it wants and include the elf note. My only issue here is figuring out how to do this correctly. As of now I have
Running readelf does show that the elfnote is present and contains what I thought was the correct information (see below). QEMU still tells me that it wants its PVH elfnote despite this. I have exhausted every resource trying to get it to work over the past week and I'm about at the end of my ropes; Thinking I misunderstood something big-time. Would love if someone could point me in the right direction here on where I went wrong.
Octocontrabass wrote:I'm no PVH expert, but I think you might run into trouble if you tell QEMU your kernel supports paravirtualization when it actually doesn't.
Thank you! You're probably right on the first part but I'm going to give it a shot anyway and see if everything doesn't blow up. Good to know that the name field absolutely requires null termination at the end; I have tried that already but I haven't tried putting the labeled note section so I'll give it a go and let you know what comes out of it.
EDIT: The section naming was it! Words cannot explain how ecstatic I am to see something so mediocre working right now haha