mouse/cheesed

NameTypeObject
.cargo/ tree 4e2c72405c2a
scripts/ tree e24a99153e3a
src/ tree 0751c5f57951
.gitignore blob 76daa494e2c1
Cargo.lock blob 646be65f97da
Cargo.toml blob cca7371514a4
PLAN.md blob e0f97e6f31e1
README.md blob 931e83c65fea

README.md

cheesed

cheesed is MOUSE's PID 1 and boot coordinator. Milestones C0 through C3 from PLAN.md are implemented: the static Linux init performs early bootstrap, strictly translates /etc/rc.conf into disposable OpenRC runlevels, runs the boot graph, reaps children during transitions and steady state, delegates restart and stop policy to supervise-daemon, provides a tcsh recovery console when a required service fails, and coordinates OpenRC shutdown before reboot or poweroff. A healthy integrated boot leaves the console to OpenRC's supervised login service rather than starting the recovery shell.

Development checks

Unit tests and lint checks run on the development host:

cargo test --locked
cargo clippy --locked --all-targets -- -D warnings
cargo fmt --check

PID 1 mode is Linux-only. Build the static release binary with:

rustup target add x86_64-unknown-linux-musl
scripts/build-static.sh

Standalone QEMU boot

The initramfs deliberately takes an explicit static tcsh; it does not copy a host shell with unresolved dynamic-library dependencies.

scripts/build-initramfs.sh \
    target/x86_64-unknown-linux-musl/release/cheesed \
    /path/to/static/tcsh \
    build/cheesed-initramfs.cpio.gz

scripts/run-qemu.sh /path/to/bzImage build/cheesed-initramfs.cpio.gz

Inside the guest, SIGINT requests reboot and SIGTERM requests poweroff. Exiting the emergency shell causes cheesed to reap and restart it.