Till KTH:s startsida Till KTH:s startsida

A minimal x86 kernel

The first thing that we will do is to create a minimal kernel. It will not be able to do anything else but to write OK to the screen but when you see this message you will fell quite proud and you will have learned a lot.

As you boot you computer (or virtual computer) the BIOS will read and start executing GRUB i.e. the boot loader. Instead of choosing your regular Linux or WIndows kernel the boot loader will then choose our minimal kernel. To make this work we need to write a small program in assembler and package it in a way that GRUB will treat it as a loadable kernel.

Go through the first two tutorials from Oppermann's blog and make sure that you can boot your system using the qemu emulator. If you're running a Linux system you can try to add the kernel as one of the kernels the Grup boot loader will load and boot your own computer with the kernel.  You can also try to create a bootable USB-stick and boot your computer directly from this.

At the seminar be prepared to explain the steps that were required to make this work and also be prepared to do changes to the kernel i.e. you should master the edit-compile-build-run process.