Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
executable file 42 lines (36 sloc) 2.76 KB
VK is a Kernel
C kernel project ; current architecture : x86
The goal of this project is to get a POSIX-compliant C kernel.
I started it to learn POSIX, C, UNIX conventions and how does a computer really works.
I also want to have a working kernel to actually use it on old hardware that i have that can barely run linux.
Current status : the kernel can load an ELF executable, statically linked with newlib, and execute the code, from an ATA disk with a FAT32/EXT2 fs or an ATAPI cd-rom with an ISO9660 fs.
Multitasking is working, and processes can use fork() and exec() system calls to run other processes.
I want to get ACPI support, at least for ACPI shutdown but also to use things like HPET...
I already ported Newlib and made my custom (i386-vk-*) toolchain ; i have successfully compiled and executed simple programs like hello world, and tested scanf()/getc().. and everything worked.
I'm now trying to port real software but i need to be more POSIX-compliant.
I currently have a port of dash that i use to debug the kernel (because i can't really do anything with it for now).
Once i get dash to run well, i'll fix cpu exception handling and release the kernel as 0.1-alpha.
If you want to compile the kernel or to contribute, you're welcome.
All i need now is to fix all the bugs so if you want to provide patches or bug reports, feel free.
For now there is no binary distribution, but the kernel is easy to compile.
You can look at my makefile (which is ugly and basic) to see all the tools that you need.
Basically, you just need to have gcc 7.2 with some flags or i386-elf-gcc 7.2.
You can try to compile it with another gcc version but you might get compile warning or bugs.
Source code organization:
/cpu Contains code to detect cpu features, set up GDT/IDT, and handle interrupts
/devices (TEMP) Contains temp keyboard driver (will be moved/changed later)
/error Contains error handling (fatal_kernel_error + errcodes)
/filesystem Contains VFS and FAT32/Ext2/Iso9660/DevFS implementations
/internal Contains PCI device mapper and PIC remapper (will be moved later)
/io Contains I/O structures/tty implementations
/memory Contains paging, heap/page heap, physical and virtual memory manager
/storage Contains block devices drivers (ATA/ATAPI)
/sync Contains synchronization primitives (mutex)
/tasking Contains scheduler, processes, elf parser and system calls
/time Contains time (clock) layer (CMOS only for now)
/util Contains data structures, string/standard functions and type definition
/video Contains video drivers (vga_text only for now)
ckernel.c Kernel C entry point (kmain())
loader.s Kernel ASM entry point (loads the kernel in higher half and call kmain())
multiboot.h Multiboot standard structures
system.h Define/include system functions, informations about kernel, inb/outb...
You can’t perform that action at this time.