Skip to content
Branch: master
Clone or download
arjun024 Merge pull request #11 from johnlunney/patch-1
Improve formatting of README.md
Latest commit 2f0235e Jan 6, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
_grub_grub2_config grub: GRUB requires device name be wrapped with () Jul 4, 2015
binary_x86 final binary Apr 15, 2014
LICENSE Initial commit Apr 14, 2014
README.md
kernel.asm
kernel.c .c: refactor with gcc warning flags Feb 3, 2015
link.ld src files Apr 14, 2014

README.md

mkernel

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.

Blog post

Kernel 101 – Let’s write a Kernel

Build commands

nasm -f elf32 kernel.asm -o kasm.o
gcc -m32 -c kernel.c -o kc.o
ld -m elf_i386 -T link.ld -o kernel kasm.o kc.o

Test on emulator

qemu-system-i386 -kernel kernel

Get to boot

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!

kernel screenshot

The next step

See mkeykernel repo

You can’t perform that action at this time.