This is a minimalist kernel which prints "my first kernel
" on the screen and then hangs.
- The kernel is multi-boot compliant and loads with GRUB.
Kernel 101 – Let’s write a Kernel
make kernel
make run
To generate a grub image
make grub.img
To test in QEMU
make run-grub
GRUB requires your kernel executable to be of the pattern kernel-<version>
.
So, rename the kernel:
mv kernel kernel-701
Copy it to your boot partition (assuming you are superuser):
cp kernel-701 /boot/kernel-701
Configure your grub/grub2 similar to what is given in _grub_grub2_config
folder.
Reboot.
Voila!
See mkeykernel repo