FerriteOS
- 5 Devlogs
- 27 Total hours
A custom Linux-ABI compatible kernel written entirely from scratch and in Rust
A custom Linux-ABI compatible kernel written entirely from scratch and in Rust
I’ve refactored PMM and VMM into SIMPLE_STATE, updated the build and docs scripts, enhanced kernel logging via log levels and more, added and fleshed out a Claude Code Skill for writing rustdoc and let Claude re-do a lot of the rust doc to reduce the over-documentation that was done by none other than… Claude.
Currently working on improving the kernel a lot to make it robuster for its later stages.
Tooling
docs.py, refactor build.py to work on linux tooKernel
text.rs and move its logic into kprint (which has also been refactored to be concurrency-safe)I also tested the kernel on real hardware!!
To my suprise, grabbing the ISO from the build folder, flashing it onto a USB drive and plugging it into a laptop just… WORKED?!?
I attached a video of the kernel booting on real hardware and IRQ0 (the BIOS-configured 18.2 Hz hardware timer) printing “a” repeatedly. :)
CHAINED_PICS
I’ve noticed that my so far work has been kinda sloppy, so I’m currently working on improving everything (as u can see on the changelist above ive already started). I’m doing this because when I started with IRQs, stuff started breaking a lot. My goal is to get everything thread-safe and ready in a way that it’ll work in later stages of the kernel too.
Next, I’ll be working on fixing logging (add a ringbuffer to prevent interrupts creating half-printed or partially drawn logs)
Tried to implement a live web demo using a wasm implementation of qemu with UEFI and more, but couldnt get it to run.
Also, I heavily improved documentation and finished up the virtual memory manager (for now…).
Next, the heap allocator is coming then I’ll finally be able to use dynamic types!
(Well, idk if you can call it a whole OS if im only planning to do a kernel, but anyways)
My end goal is for it to be able to run systemd, GNOME and more. But thats a very, VERY distant goal. For now, im focusing on getting a statically linked C binary running in userspace.
I’ve already managed to get some basic logging via serial and a basic framebuffer going, aswell as x86_64 GDT, IDT, TSS and a physical aswell as a very slim virtual memory manager.
Next, I’ll be “finishing” up the VMM a little to be able to start work on the heap allocator, which will enable use of datatypes like Vec, Box and more.
For anyone interested in the more technical stuff:
The build toolchain works through python scripts, which use docker to build and then QEMU to run the kernel.
I’m mainly targeting x86_64, but aarch64 support is also my plan (but I’ll be focusing on x86_64 during this challenge).