A small x86 operating system kernel with a minimal GUI and simple apps.
SafeOS is an experimental kernel and graphical shell implemented in C/assembly. It includes a basic filesystem header, framebuffer support, a desktop GUI, and a handful of example applications (browser, calculator, notepad, spreadsheet, file explorer).
linker.ld— linker scriptMakefile— build rulesiso/— ISO and GRUB config (bootable image)kernel/arch/x86/— architecture-specific startup and framebuffercore/— core kernel sources (e.g.kmain.c,fs.h)gui/— GUI system, desktop and apps (gui.c,desktop.c,cursor.c)gui/apps/— sample applications:browser.c,calculator.c,file_explorer.c,notepad.c,spreadsheet.c
- GNU Make
- A C cross-compiler or native GCC capable of targeting x86 (toolchain varies by host)
- GRUB utilities and an ISO generator (
xorrisoorgenisoimage) (if building the ISO) qemu-system-x86_64(recommended) for testing
Note: Exact toolchain names and setup depend on your host OS. On Windows you may prefer WSL or MSYS2.
From the repository root run:
make
# optionally create a bootable ISO (if supported by the Makefile)
make iso
# clean build artifacts
make cleanIf the Makefile expects a specific cross-compiler prefix (e.g. i686-elf-), set your environment accordingly or install a matching toolchain.
After building, check the iso/ directory for a generated ISO. Example run command:
qemu-system-x86_64 -cdrom iso/safeos.iso -m 512 -serial stdioAdjust the ISO filename if your build outputs a different name. You can also use other emulators or write the ISO to real media at your own risk.
- UI code and apps live under
gui/andgui/apps/. - Kernel entry/early init is in
kernel/arch/x86/. - To add an app, create a new
.cfile ingui/apps/and register it with the desktop as appropriate.
Contributions are welcome. Open issues for bugs or feature requests, and send pull requests for fixes or enhancements. Keep changes focused and small. This project is a side-project and is currently not recognised as an official HouseLearning project. I find this to do in my own free time.
Apache Licence 2.0