
Boink Kernel Project
logo courtesy of Sohitha Krishna
The Boink Kernel Project aims to provide a fairly usable abstraction for every layer between bare metal and user. It provides the following:
- filesystem (GLFS)
- bootloader (Boink Interactive Bootloader)
- kernel (BoinkOS)
- syscall interface
- custom libc
Two novel ideas have been implemented as part of this kernel —
-
Kernel Scratchpad
provides 16kb of "scratchpad" space for the kernel to use — avoids page management where it may not be needed -
Panic Diagnostic Shell
provides a way to easily debug programs when a panic state is entered
Several OSDev milestones were accomplished in this project —
- custom 32-bit protected mode bootloader with VESA graphics
- paging and frame allocation
- syscalls + userland mode (ring3) context switching
- ELF binary loading and execution
- basic shell with file viewing, image viewing, and app execution
- interrupt handling with IRQs, ISRs, PIT, and keyboard input
- simple framebuffer-based graphics output
- GLFS — a simple loadable filesystem baked into the boot process
Other milestones were also achieved —
- less-inspired terminal pager with search function
- bitmap image viewer
Screenshots from development
First Steps — printing to the screen in VGA text mode
GLFS disk reads
VGA framebuffer graphics
Less-inspired Text Pager
Panic diagnostic shell
Boink Interactive Bootloader
Bitmap Image Viewer
ring3 context switching
Custom libc with basic I/O support
GLFS Project
good little file system (affectionately good luck file system)GLFS intends to be an insanely simple filesystem for use in hobby projects. GLFS is used by the Boink Interactive Bootloader to load the system into memory.
GLFS Structure Overview
[sector 0] GLFS SUPERBLOCK
----------
- magic GLFS+version identifier
[sector 1+] DIRECTORY TABLE
-----------
[entry 0] filename: string
start sector: int
size: int (bytes)
[entry 1] filename: string
start sector: int
size: int (bytes)
(...)
[end of table marker]
----------
[file data]
(...)
[0] Superblock Overview
- size: 512b
- contents:
- bytes 0..7:
GLFSv0\n(7 bytes+newline) - bytes 7..511: reserved
- bytes 0..7:
[sector 1+] Directory Table Overview
- each 40-byte directory entry contains:
- 32 byte filename
- 4 byte (uint32) start sector (offset from sector 0)
- 4 byte (uint32) file size in bytes
- end of table is marked with
b'__END__'(8 bytes)
A full suite of GLFS tools is available here.
Available Code
-
BoinkOS
main kernel code
get the code> -
Boink Interactive Bootloader
bootloader
get the code> -
Kernel Template
sample kernel template, loadable by Boink Interactive Bootloader
get the code> -
Boink C Standard Library
minimal C Standard Library implemntation for BoinkOS.
get the code>
or get the reference> -
BoinkOS Userland Template
userland program template for BoinkOS — compiles both .elf and .bin files
get the code> -
GLFS Tools
tools for creation and editing of GLFS formatted disk images
get the code>
Downloadable Content
All downloadable BoinkOS files are uploaded here.
"How did you do it?"
"It's very simple — you read the protocol and write the code." — Bill Joy
"It's very simple — you read the protocol and write the code." — Bill Joy