This simple kernel is an exploration project that I am developing in my free time, the kernel is for x86 arch I do not know if I will ever move it to x86_64, the booting process is made with grub and the multiboot1 specs.
The kernel support logging on serial and VGA text mode there is a common interface display to select witch output stream to use, for input device only ps2 is supported, all standard x86 interrupt are mapped and as a default behavior they log there call. There is support for physical and virtual page allocation but is only 4KiB no 4MiB page and the implementation of kmalloc(memory allocator) can only handle allocation of [1, 4096] byte
The kernel now exposes a small slab allocator for fixed-size objects.
Caches can be created with slab_create(name, obj_size, alignment,
ctor, dtor) and are initialized from init_slab_allocator() during
boot. Allocations use slab_alloc_obj(cache) / slab_free_obj(cache,
fatptr) and return a fatptr_t pointing to the object with
len = obj_size. A general-purpose allocator wrapper is available via
get_slab_allocator(), which uses slab-backed allocations for objects
up to a page and falls back to the general page allocator for larger
requests. get_gpa_allocator() returns the original GPA allocator.
Double-free and cross-cache frees are checked and logged alongside
alignment issues.
- [ ] Basic user space
- [ ] Context switching
- [ ] Better GPA
- [ ] Disk access
- [ ] ext2/4?
- [ ] FAT32
- [ ] Multiprocessing
- [ ] Message passing
- [ ] Synchronization primitive
- [ ] Video output
- [ ] Display custom shape
- [ ] Printing text as in VGA text mode
This tools are need to compile the building environment
- bash
- make
- gcc
- nasm
- tar
- xz
Enter in the directory tools and execute the bash script get-tools.sh
cd tools && ./get-tools.shthis will download and compile or the tools needed for development except for nams
Running the build.sh script should be enough to build the kernel elf and make a UNIX like root structure in sysroot
To get an ISO run the iso.sh and it will output a JanOS.iso on the current directory.
If you want to use QEMU (recommended) run the qemu.sh script it will build create the iso and then run a temporary QEMU instance