Building, Running, and Deployment
BoredOS utilizes a highly modular architecture. Core userland binaries, shells, environments, and assets are isolated into specialized external repositories stored under external/ and dynamically staged during compilation.
Autonomic Dependency Fetching
External repositories are fetched and synchronized using the custom shell automation tools/fetch_external.sh.
How it works:
- When compile commands like
make boredos.isoormake runare executed, the Makefile triggers theexternal-fetchtarget. - The fetcher iterates over the repositories registered in
fetch_external.sh. - If a repository is not cloned: It clones the repository using a fast, blobless clone (
--filter=blob:none) and checks out the registered branch (usuallymain). - If a repository already exists: Rather than making slow
git pullcalls that can trigger API rate limits, the script performs a fast, non-blocking check:- It queries the remote Git server directly using
git ls-remote - If the local Git hash matches the remote branch head hash, it completely skips pulling.
- If a new commit is detected on the remote, it pulls the updates.
- It queries the remote Git server directly using
- Parallel Safety Lock: It secures a directory lock (
build/fetch.lock) to prevent concurrent parallel execution when running high-performance parallel compiles (e.g.make -j10).
The Staged Build & Staging Pipeline
The build process enforces a multi-phase build pipeline:
graph TD
A[make boredos.iso / make run] --> B[external-fetch]
B --> C[build/sdk: Compile libc & setup build/sdk/]
C --> D[Compile Kernel ELF]
C --> E[Compile Modular Apps passing BOREDOS_SDK]
D --> F[Stage Initrd: Copy Base/ skeleton]
E --> F
F --> G[Stage binaries, config, packages]
G --> H[Create initrd.tar.lz4]
H --> I[Limine bios-install & xorriso bootable ISO]
The Compile Phases:
- SDK Bootstrap Phase:
external/libcis compiled first. It installs standard headers and startup routines (crt0.o,crt1.o,libc.a) directly into a local target SDK folder:build/sdk/.
- Integrated Multi-Repo Compilation:
- The root Makefile builds all other external application repositories in parallel, explicitly passing
BOREDOS_SDK=$(abspath build/sdk)to their sub-Makefiles. - The application sub-Makefiles detect this local SDK path, link immediately against it, and skip all local fetching or SDK rebuild routines, providing massive speedups.
- The root Makefile builds all other external application repositories in parallel, explicitly passing
- Initrd Assembly & Staging:
- The
Base/folder contains the root skeleton of the BoredOS file system (including standard directories like/Library,/boot,/etc,/usr,/dev, etc.). - The build script first copies the
Base/contents tobuild/initrd/as the starting skeleton. - Compiled binaries, assets, documentation, and modular
.buppackage files are then copied and staged into their respective paths withinbuild/initrd/before compression.
- The
- Single-Pass Dispatch Target:
- Targets like
make runandmake run-hdresolve platform-specific emulation rules at parse-time using GNU Make conditionals (ifeq ($(HOST_OS),Darwin) run: run-mac ...), completely preventing duplicate sub-make execution offetch_external.sh.
- Targets like
4. Standalone Repository Builds (Developer Friendly)
Every external repository features complete isolation and autonomy. A developer can copy or clone any of the directories inside external/ and compile it independently outside the BoredOS environment:
- Isolated Build Flow:
- If a sub-Makefile detects that
BOREDOS_SDKis not defined, it knows it is being run standalone. - It automatically clones
https://github.com/boredos/libc.gitlocally. - It builds it locally, caches the compiled artifacts at
build/sdk/, and compiles the standalone application binary perfectly.
- If a sub-Makefile detects that
5. Minimum System Requirements
To run BoredOS successfully (either in emulation or on bare metal), your target machine should meet the following minimum requirements:
- CPU: An
x86_64(64-bit) compatible processor. - Memory: Approximately
~256 MBof RAM. - Display: A display, rendered via the framebuffer. (A GPU will not work.)
- Networking (Optional): A compatible Network Interface Card (NIC) is required if you want to use the networking stack. (e.g. Intel E1000, Realtek 8139, or VirtIO NIC.)
6. Running and Deployment
Emulation:
To test the built ISO image quickly in QEMU:
make run
To boot directly from an UEFI-enabled expandable hard disk image (after installing with boredos_install inside of BoredOS)
make run-hd
Bare Metal Flashing:
- Compile the project to generate
boredos.iso. - Flash the ISO to a USB drive using a raw imaging tool (such as
ddor Balena Etcher). - Disable Secure Boot in your target PC's UEFI firmware.
- Select the USB drive from the bootloader menu. BoredOS boots natively on both legacy BIOS and modern UEFI systems.