|
hey hn, i made BoltOS (https://github.com/adriantips/boltossource), a 64-bit OS written from scratch in C and x86-64 asm, plus an AArch64 port for the Orange Pi Zero3.
i got tired of hobby OS projects stopping at a shell so i kept going until it could actually build its own native binaries and sleep/wake properly. right now it has a custom BIOS/UEFI bootloader, a 3-pass NASM-syntax assembler, ar, static ELF64 linker, a C compiler/preprocessor that outputs x86-64, a ring-3 DOM/CSS/JS browser, TLS 1.3 with X.509 verification, SSH-2, and a windowed desktop with DOOM and a Game Boy emulator. the hardest part by far was getting ACPI S3 suspend to RAM working without triple faulting on wake—setting CMOS 0x0F to 0xFE so the BIOS knows it's a resume, climbing back to long mode, turning SSE back on in CR4 before C zeroes any structs, reloading GS_BASE after gdt_init, and restoring PCI BARs so NVMe doesn't freak out. i also wrote a host-side fuzzer (test/t_fuzz.py) with redzones and fake alloc failures that caught a nasty integer wrap in my HTTP chunk parser. still missing a real ACPI AML interpreter for laptop batteries and SMP APs just sit in an idle loop for now, but everything else boots and runs on real hardware and QEMU. if you have clang, nasm, lld, and qemu installed you can boot it with: git clone https://github.com/adriantips/boltossource && cd boltossource && bash build.sh && bash run.sh would love any feedback on the code or bugs if you try breaking it, and if you think it's cool a star on the repo helps a ton! |