What is inside
Boot & kernel
- ELF-aware bootloader: 16-sector bootblock loads
kernel.elffrom disk, walks PT_LOAD program headers, jumps to entry. - Multiboot-1 header in the kernel ELF so GRUB can boot it too.
- Kernel linked at
0x100000; userland window at0x400000. - Flat 4 GiB identity-mapped paging, separate user code/heap/stack windows.
- GDT + IDT + PIT @ 100 Hz, PIC remapped, full IRQ dispatch.
Multitasking
- Process control block, process table (PROC_MAX = 16).
- Kernel-stack context switch; round-robin scheduler driven by the PIT IRQ.
- Anonymous pipes, cooperative signals (SIGINT/SIGTERM), per-process VFS.
SYS_GETPID / KILL / WAIT / WAITPID / SETPRIO / SUSPEND / RESUME / PROC_INFO.- Mid-syscall preemption (interrupts re-enabled inside
syscall_dispatch).
Network stack
- TCP RFC 793: retransmit + RTO, slow start, cwnd, fast retransmit, OOO reassembly, MSS, window-scale, SACK, keepalive, persist probe, TIME_WAIT reap.
- IPv4 with martian filter, Teardrop guard, 2-slot fragment reassembly, source-route drop.
- DHCP (with retry + secondary DNS), DNS cache, ARP cache with TTL eviction.
- e1000 NIC driver, IRQ-driven RX.
- BSD-style sockets:
bind / listen / accept / connect.
Userland & shell
- 30+ shell commands:
ps kill suspend resume mem netstat dns arp dmesg vol audio keymap alarm shutdown reboot clock hostname. - 256-line scrollback, persisted command history (
SHELL.HIS). - BR ABNT2 + US keymaps, runtime switch.
- UTF-8 multi-byte collapse in scrollback.
Storage & FS
- StinkFS: contiguous-file FS on a raw partition, ~100 MiB data region.
- VFS layer with per-process fd table, open/read/write/seek/close.
- ATA driver with PIIX bus-master DMA + PIO fallback.
- Real MBR partition tables on install media.
Audio
- SB16 driver, ISA DMA on channels 1 (8-bit) and 5 (16-bit stereo).
- 8-channel software mixer with Q16.16 per-channel resampling.
- Half-buffer IRQ for low latency, master + per-channel volume.
- Doom SFX wired to the kernel mixer.
Doom port
- doomgeneric + Freedoom1 / Freedoom2 / FreeDM ship as three apps.
- Fullscreen via
SYS_BLIT_SCALED(kernel-side nearest-neighbour). - Save games via VFS; demos via
DOOMARGS.CFG(-record,-playdemo).
Package manager
.stinkpkgarchive format with optional compression.stink-pkg install / query / upgrade / verify / replay.- Recursive dependency resolution.
- SHA-256-hashed manifests, lockfile (
STINKPKG.LCK).
Screenshots
help / mem / ps / netinfo. DHCP bound, gateway and DNS picked up from QEMU's user-mode SLIRP, free-page count exposed via SYS_MEMINFO.
SYS_MAP_FB in action -- the framebuffer is mapped read-write into the user address space, so each pixel write is one store instruction, zero syscalls.Get started
01.
Boot the latest ISO
Download from GitHub Releases. The ISO is a raw disk image -- write to a USB stick or run in QEMU:
qemu-system-i386 -drive format=raw,file=stinkos-install.iso \ -netdev user,id=net0 -device e1000,netdev=net0 \ -audiodev sdl,id=snd0 -device sb16,audiodev=snd0
02.
Build from source
Linux or WSL. Needs an i386-elf cross-toolchain (the build script grabs it):
git clone https://github.com/Jovinull/StinkOS.git cd StinkOS bash tools/build-cross-toolchain.sh # one-time, ~15 min make # builds os.bin + kernel.elf make run # boots in QEMU
03.
Run the tests
62 host-side unit tests pin the kernel's decision logic without QEMU:
make unittest # all 62 host tests make test-headless # full QEMU boot + every app make readelf-kernel # PT_LOAD inspection
Package repository
This site hosts a sample .stinkpkg repository so a fresh StinkOS install can fetch software out of the box. Point your install at this URL by writing STINKPKG.CONF:
repo_url=https://jovinull.github.io/StinkOS
Then on the running system:
stink-pkg install snake stink-pkg install pong stink-pkg upgrade
Documentation
The kernel is documented in tree -- every subsystem has a markdown doc tied to it.
- ARCHITECTURE.md -- kernel overview, boot path, memory layout, process model
- SYSCALLS.md -- complete
int 0x80table - NETWORK.md -- DHCP boot timing, TCP state graph, the IPv4 path
- STINKFS.md -- on-disk format
- PACKAGING.md --
.stinkpkgauthoring guide - TESTING.md -- host-mirror unit test contract
- TUTORIAL.md -- build the toolchain, the kernel, a package, end-to-end
- CONTRIBUTING.md -- 7-step recipe for adding a subsystem
- CHANGELOG.md
Contributing
The repo accepts PRs. Branch protection on master requires the headless boot test to pass; CI runs the cross-toolchain build and every host-side unit test on every push.
Open issues for any of the items in the changelog backlog -- per-process CR3, sys_fork, AC97/HDA audio, PXE install, rtl8139 / virtio-net, IPv6 -- and the rest of the multi-process and driver surface.
Pick something small to start: there is a list of TODO §X.Y markers across the kernel that are explicitly tagged for new contributors.