~colatkinson/boios

World's worst OS

0518dbc Update clang to 11.1.0

an hour ago

92371b4 Enable clang-tidy for known-cpp headers

3 hours ago

#BoiOS

Pronounced like "boyos."


builds.sr.ht status

BoiOS is a hobby operating system. It exists purely for educational and entertainment purposes. It's pretty dang small, runs only on 32-bit, x86-compatible machines, and is generally about as useful as a steering wheel on the subway.

#Current status

  • It boots (at least in QEMU)!
  • Primitive paging support.
  • Loads the kernel into the higher half of memory (at address 0xC0000000, specifically).
  • Sets up interrupts.
  • Controls the PIT.
  • Hops into user mode.
  • Crappy preemptive multitasking.

#Building/testing

Building is currently officially supported on Linux, using Bazel. Really, the kernel itself is simple enough that it could just be a bunch of Makefiles, but where's the fun in that?

Bazel will take care of (almost) all dependencies, including a compiler toolchain. It's a pretty hefty initial download, but through the power of caching, should rarely have to be repeated.

#Prerequisites

  • Bazel.
  • xz-utils, for decompressing some dependencies.
  • libtinfo5 to make clang work.
  • A 32-bit glibc (install libc6-i386-dev on Ubuntu).
    • This really shouldn't be required, and will hopefully go away soon.
  • qemu if you want to run the damn thing.
  • GNU make if you want to use the wrapper Makefile.

#Building

Just type make and you're good to go!

This will create a bootable disk image in ./bazel-bin/img/disk.img.

#Testing

Simply run make test. This will pull in Google Test and run all tests with changed inputs.

#Running

If you haven't noticed the pattern: make run.

#Linting

Run make fmt-diff to check for style violations.

Run make fmt to fix them automatically.

#Contributing/reporting issues

BoiOS makes use of an email-based workflow. That entails a bit of setup overhead, but as a recent convert, it really is quite nice.

Patches, bug reports, and feature requests should be directed to the mailing list. Please try to search for existing threads before starting a new one.

#Licensing

All source code within the repository, unless otherwise indicated, is licensed under the GNU Public License (GPL) version 3.0. See LICENSE or the GNU website for more details.