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.
is your kernel mulitboot compliant? qemu caused the same message when I gave it a non multiboot kernel. I can replicate your problem with my own non multiboot compilant kernel. apparently pvh is a boot protocol. QEMU probably only supports some boot protocols. apparently somebody got the same message with the linux kernel, which uses its own protocol.
put it in the makefile. if it cause an error 1. it is not compliant. did you copy paste or type from hand. maybe a typo?
probably this will return a negative code. if not, that is pretty weird.
I tried to slove this problem by modifying the link scritp file linker.ld and everything worked fine. If anybody know why, please tell me.I just simply move multiboot header from rodata area to text area. The version of binutil and gcc is 2.37 and 11.2.0 respectively.
* The bootloader will start execution at the symbol designated as the entry point. In this case, that's 'start' (defined in start.s) */
ENTRY(start)
/* Tell the linker part of the compiler where the various sections of the kernel will be put in the final kernel executable. */
SECTIONS
{
/* Begin putting sections at 1 Megabyte (1M), a good place for kernels to be loaded at by the bootloader. */
/* This is because memory below 1 Megabyte is reserved for other x86-related things, so we can't use it */
. = 1M;
/* We align all sections in the executable at multiples of 4 Kilobytes (4K). This will become useful later in development when we add paging */
/* First put the multiboot header, as it's required to be near the start of the executable otherwise the bootloader won't find it */
/* The Multiboot header is Read-Only data, so we can put it in a '.rodata' section. */
.text BLOCK(4K) : ALIGN(4K)
{
*(.multiboot)
*(.text)
}
/* Read-only data. */
.rodata BLOCK(4K) : ALIGN(4K)
{
*(.rodata)
}
/* Read-write data (initialized) */
.data BLOCK(4K) : ALIGN(4K)
{
*(.data)
}
/* Read-write data (uninitialized) and stack */
.bss BLOCK(4K) : ALIGN(4K)
{
*(COMMON)
*(.bss)
}
}