I cloned from the xinu-os repo.
I followed the Multiboot Specification#OS-image-format, and added the required header to the end of _start, to make the binary multiboot-compliant:
/* /xinu/loader/platforms/x86/start.S
* ...
* #define MULTIBOOT_HEADER_MAGIC 0x1BADB002
* #define MULTIBOOT_HEADER_FLAGS 0x00000003
* _start:
* ...
*/
jmp startup
/* Enable multiboot support */
.align 4
.long MULTIBOOT_HEADER_MAGIC
.long MULTIBOOT_HEADER_FLAGS
.long -(MULTIBOOT_HEADER_MAGIC + MULTIBOOT_HEADER_FLAGS)
I built my Xinu.boot and Xinu.elf out of the modified code.
I set up minicom as instructed, and successfully booted the VBox version.
I examined the Xinu.boot used in the VBox version, and found that it was an 32bit elf for i386, but the Xinu.boot I built with the Makefile was made from objcopy, while the Xinu.elf was an elf. So I renamed Xinu.elf I built to Xinu.boot, and substituted it for that in the VBox version.
Then I tried to boot with the same files except the Xinu.boot, in the same environment.
It failed, and grub gave me the grub commandline. I also tried using a debug version. It failed too, but before it showed the grub commandline, it displayed a message "Unknown command: r(0, 1)".