Skip to content

shirgho/mkernel

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mkernel

This is a minimalistic kernel which prints "my first kernel" on the screen and then hangs.

  • The kernel is Multiboot compliant and loads with GRUB.

####Blog post####

Kernel 101 – Let’s write a Kernel

(http://arjunsreedharan.org/post/82710718100/kernel-101-lets-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

####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

About

a minimalistic kernel

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published