Re:Kernel 101 – Let’s write a Kernel
by akkartik on Monday April 14, 2014 @07:15PM
(#7589450)
I got this running on qemu by cannibalizing a tiny bit of code from xv6 (http://pdos.csail.mit.edu/6.828/2012/xv6.html) to replace the GRUB dependency. After cloning and building mkernel according to its instructions:
Now you should be able to run xv6 by itself:
To run mkernel on qemu, we'll replace xv6's kernel with mkernel's:
Now you can boot up the mkernel.img rather than xv6.img:
(Based on xv6 at hash ff2783442ea2801a4bf6c76f198f36a6e985e7dd and mkernel at hash 42fd4c83fe47933b3e0d1b54f761a323f8350904. Ping me if you have questions; email in profile.)
[ Parent
| on HN ]
> I got this running on qemu by cannibalizing a tiny bit of code from xv6 to replace the GRUB dependency.
This thing doesn't depend on GRUB, per se. It requires a multiboot protocol compliant bootloader, and QEMU and Bochs emulator have one built-in.
All you need to do is:
qemu-system-i386 -kernel kernel
This was mentioned in the last lines of the OP, perhaps they were added after you read it.