Skip to content

Repository files navigation

IR0 Kernel

IR0 is a research operating-system kernel (GPL-3.0). Primary bring-up target is x86-64 under QEMU (Multiboot, GRUB, VFS/MINIX, ELF userspace). Version string: 0.0.1-rc4 (last pre-release before v0.0.1 final).

It is not a general-purpose production OS. The tree emphasizes narrow facades (includes/ir0/), Kconfig selection, and honest partial Linux ABI (-ENOSYS where unimplemented).

ISD — IR0 Software Distribution

ISD is the official product userspace for IR0: runit PID 1, BusyBox, login/firstboot, packages, rootfs, and the MINIX disk.img. Sources live in the sibling repo ISD. This tree is the kernel, UAPI export, and QEMU/boot orchestration.

Layer Repo Role
Kernel IR0 (this tree) mechanisms, drivers, UAPI, ISO
Distribution ISD packages, services, rootfs, disk.img
Product both make first-boot / make run PROFILE=…

IR0 does not inject BusyBox/runit/nano individually on the canonical path — ISD builds a finished image; IR0 boots it.

ISD first boot — create your account

ISD first boot: runit stage1 → account wizard (password also used for doas).

ISD shell — ls, uname, doas

Logged-in shell: Unix hierarchy, uname -a, privilege elevation with doas.

ISD guest — BusyBox vi editing main.c

In-guest BusyBox vi after make run: edit C sources on the ISD rootfs (QEMU GTK).

ISD guest — BusyBox top under runit

BusyBox top after login: runit PID 1, runsvdir/runsv, ash, and idle — live process view on the ISD image.

IR0/Unix — Doom on QEMU (desktop profile)

Doom on IR0/Unix under QEMU: framebuffer + input path on the ISD desktop image (PROFILE=desktop).

Getting started

git clone https://github.com/IRodriguez13/IR0.git
cd IR0
make check-env                    # host diagnostic (or: first-boot asks to install)
make first-boot PROFILE=minimal   # host deps (ask) + clone ../ISD + image + ISO
make run PROFILE=minimal          # QEMU GTK → getty → BusyBox ash

first-boot asks before installing host packages (IR0_DEPS_INSTALL=ask|yes|never). sudo is used only for that install, never for clone/build. It does not require Rust nightly (only if you enable example drivers in menuconfig). Host needs musl-tools, bison (yacc), git, curl, and the usual desktop ISO toolchain — see SETUP.md.

Layout:

parent/
├── IR0/
└── ISD/                  # cloned automatically if missing

Kernel-only ISO (no shell): make ir0. Without /sbin/init on the ISD disk the kernel panics at handoff — there is no in-kernel fallback shell.

make sync-mandocs         # man pages → ~/.local/share/man (no sudo)
make man TOPIC=onboarding
make man TOPIC=boot

Full coupling guide: Documentation/USERSPACE.md.

Profile Meaning Status
desktop / make desktop-x86_64 x86-64 ISO + QEMU Supported — official first boot
userspace musl / BusyBox ISO path Experimental
hub-rpi4 ARM64 RPi4 UART min Hardware lab / UART — boots under QEMU raspi4b when present; not SD-flashable
watch-rpi5-stub ARM64 RPi5 stub Planned — compile-only (uart=none)
make check-env PROFILE=desktop-x86_64
make run-bootlog                   # optional: boot log → build/hostshare/ir0-boot.log
make help-profiles
make pre-submit                    # local contributor gate → PRE_SUBMIT_OK

Full toolchain notes: SETUP.md. How to contribute: CONTRIBUTING.md. Subsystem docs: Documentation/make man TOPIC=….

Context

x86-64 (default): uniprocessor kernel with RR scheduling, fork/exec/wait, demand paging and fork COW paths exercised in-tree, VFS (MINIX root, tmpfs, path-routed /proc//sys), console/TTY, and a partial Linux syscall surface for musl/BusyBox bring-up. Networking includes UDP/ICMP, AF_UNIX streams, and lab-grade TCP (sock_stream / wire path with limited recovery) — not a full Internet stack or production NIC story. Optional demos: BusyBox ash via runit (make load-userspace-runit / run-fase58e-ash-gui), doomgeneric on /dev/fb0.

ARM64: early bring-up and board scaffolding (QEMU virt, RPi4 UART lab). Not a flashable appliance and not feature-parity with x86.

Non-goals today: SMP, complete Linux syscall coverage, desktop-class userspace, or “better than Linux.” Near-term focus is open, rebuildable appliance profiles with a thin Makefile surface and actionable diagnostics.

License

GNU General Public License v3.0 — see LICENSE. Third-party trees (BusyBox, doomgeneric, …) keep their own licenses under setup/.