mouse/cheesed

Blob: README.md

Raw · Blame

# cheesed

`cheesed` is MOUSE's PID 1 and boot coordinator. Milestones C0 and C1 from
[`PLAN.md`](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, provides a recovery `tcsh`, and coordinates OpenRC shutdown before
reboot or poweroff.

## Development checks

Unit tests and lint checks run on the development host:

```sh
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:

```sh
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.

```sh
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.