Mercury is a WIP x86-32 kernel.
Report problems or give suggestions here (Issue page)
Tested & working on REAL hardware
To build the kernel and create a bootable image including grub:
sudo make grub
To run the kernel using qemu:
make qemu
Or using bochs:
make bochs
- FAT16 driver
- ELF32 App / SO loader
- Multitasking
- Per-process page directories & address space separation
- User vs. kernel memory protection via page flags
- User stack and heap management (
brk()-like syscall) - Switch
cr3on context switch to isolate memory
- Syscall mechanism (e.g.
int 0x80,syscall/sysret) - Syscall table and dispatcher
- Basic syscalls:
read,write,open,close,exit,execve - User-space test program using syscalls
- Syscall wrappers (
write(),read(), etc.) - String/memory functions (
memcpy,strlen, etc.) - File I/O (
fopen,fread,fclose) - Static linking support (
libc.a)
- Block device abstraction
- BPB and FAT table parsing
- File access (
open,read,close)
- Define driver format (e.g. ELF + metadata)
- Extend ELF loader for driver files
- Kernel driver registration API
- Load driver from FAT32 and call
init()
- Launch shell or init from FAT32
- Load userland apps using
execve
- Finish SATA driver
- Start with networking
- Maybe switch to GRUB
Screenshots
Multitasking and SO loading working:
You can see two idle tasks counting up and a program using functions from LIBC.SO running
