Nintento Entertainment Kernel: Nintendo emulator
MIT License
Nintendo Entertainment Kernel is a very basic kernel with only the minimun to run a NES emulator. This means that it can be run without any OS. It does not have pagging nor userspace nor any kind of protection at all. Only one program can be run. It is embedded in the kernel, which means the program's code is compiled alongside the kernel.
You should use make and provide the cross compiler:
PATH=/path/to/crosscompiler/bin:$PATH make kernel program=emulador
If there are not errors, kernel.elf should be in the bin folder.
Besides "emulador" there are three other working programs:
All of them can be compiled with the kernel using make.
Ej: make program=examples/mandelbrot
You may copy kernel.elf to /boot/ and add an entry at /etc/grub.d/40_custom like:
menuentry "nek" {
multiboot /boot/kernel.elf module /boot/initrd.img
}
Remember to update the config file:
sudo grub-mkconfig -o /boot/grub/grub.cfg
The makefile should run QEMU using the disk image disk.img. A loop device to this file must have been set up in the mount folder.
GRUB (multiboot standard)
kernel/arch/x86/init/boot.s <-- calls c code, initializes stack
kernel_entry() at kernel/arch/x86/init/kernel_entry.c <--base system initilization
kmain() at kernel/kmain.c <--- some services are started
main() at program/main.(c|cpp) <--- main program