Skip to content
C kernel project ; current architecture : x86
C C++ Assembly Makefile
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
cpu various bugfixes and modifications Dec 16, 2018
devices fixed a sys_stat() bug, chmod Oct 14, 2018
error fixed a sys_stat() bug, chmod Oct 14, 2018
filesystem added ability to get path from fd, work done on stat() Feb 3, 2019
internal test Jul 3, 2018
io started ANSI escape sequence parsing on ttys + ext2 bugfix Jan 29, 2019
memory added ability to get path from fd, work done on stat() Feb 3, 2019
storage various bugfixes and modifications Dec 16, 2018
sync
tasking fixed open memleak, enabled syscall trace (todo debug kheap on cp) Mar 5, 2019
time test Jul 3, 2018
util started ANSI escape sequence parsing on ttys + ext2 bugfix Jan 29, 2019
video
LICENSE fixed a sys_stat() bug, chmod Oct 14, 2018
README ATAPI bug FIXED : isoboot WORKING Dec 4, 2018
args.c fixed a sys_stat() bug, chmod Oct 14, 2018
ckernel.c fixed a sys_stat() bug, chmod Oct 14, 2018
link.ld fixed a sys_stat() bug, chmod Oct 14, 2018
loader.s fixed a sys_stat() bug, chmod Oct 14, 2018
makefile added ability to get path from fd, work done on stat() Feb 3, 2019
multiboot.h fixed a sys_stat() bug, chmod Oct 14, 2018
system.h fixed a sys_stat() bug, chmod Oct 14, 2018

README

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.