Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/arjun024/mkernel
A minimalist kernel
https://github.com/arjun024/mkernel
Last synced: 4 days ago
JSON representation
A minimalist kernel
- Host: GitHub
- URL: https://github.com/arjun024/mkernel
- Owner: arjun024
- License: gpl-2.0
- Created: 2014-04-14T18:55:33.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2021-04-27T20:01:12.000Z (over 3 years ago)
- Last Synced: 2024-11-16T00:02:25.330Z (27 days ago)
- Language: C
- Homepage: https://arjunsreedharan.org/post/82710718100/kernels-101-lets-write-a-kernel
- Size: 20.5 KB
- Stars: 1,337
- Watchers: 60
- Forks: 162
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome - mkernel - A minimalist kernel (C)
README
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](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
```#### Test on emulator ####
```
qemu-system-i386 -kernel kernel
```#### Get to boot ####
GRUB requires your kernel executable to be of the pattern `kernel-`.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](http://static.tumblr.com/gltvynn/yOdn443dr/mkernel.png "Screenshot")
#### The next step ####
See [mkeykernel repo](//github.com/arjun024/mkeykernel)