9c97cefc57
Port the brush shell (reubeno/brush) to Redox and adopt the recipe as a
Red Bear local recipe under local/recipes/shells/brush, with the standard
recipes/shells/brush -> ../../local/recipes/shells/brush overlay symlink so
it takes priority over any upstream WIP copy (per local/AGENTS.md "Local
recipe priority vs upstream WIP"). Removes the old recipes/wip/shells/brush.
The dependency tree did not build for Redox: nix 0.31 only partially
cfg-enables Redox and the libc crate's Redox module omits POSIX symbols that
relibc provides. Fixes are reviewable unified diffs under
local/recipes/shells/brush/patches/:
nix-0.31-redox.patch cfg-enable resource/Id/waitid/from_siginfo, rlimit
import + repr(i32), SaFlags width casts, pty.
libc-0.2-redox.patch add idtype_t, P_*/CLD_*, rusage, getrusage/waitid/
forkpty externs, siginfo child accessors.
brush-umask-redox.patch mode_t is signed on Redox; cast, not u32::from.
The recipe runs `cargo fetch` to materialise registry sources before
patching (they are only unpacked during the build), resolves the right
crate version from Cargo.lock (brush pulls both nix 0.26 and 0.31), and
applies each patch idempotently, failing loudly on version drift. The
binary target is named `brush` (not `brush-shell`), so install it
explicitly. Verified: cooks from a pristine cargo cache using only the
patch files. brush is shipped in redbear-mini as a package for in-image
validation; the login shell stays zsh until brush is runtime-proven.
617 lines
12 KiB
TOML
617 lines
12 KiB
TOML
# Red Bear OS Mini Configuration
|
|
# Text-only ISO for console/recovery/install on bare metal.
|
|
#
|
|
# Build: make live CONFIG_NAME=redbear-mini
|
|
#
|
|
# Target contract:
|
|
# - text-login live/recovery/install surface
|
|
# - boot framebuffer for VT text consoles via vesad + fbcond
|
|
# - all non-graphics, non-firmware packages from the full profile
|
|
# - no linux-firmware payload, no firmware-loader, no GPU/display drivers
|
|
|
|
include = ["minimal.toml", "redbear-legacy-base.toml", "redbear-netctl.toml", "redbear-device-services.toml", "redbear-boot-stages.toml"]
|
|
|
|
[general]
|
|
filesystem_size = 512
|
|
|
|
[users.messagebus]
|
|
uid = 100
|
|
gid = 100
|
|
name = "messagebus"
|
|
home = "/nonexistent"
|
|
shell = "/usr/bin/zsh"
|
|
|
|
[packages]
|
|
# Red Bear OS branding and host utilities.
|
|
redbear-release = {}
|
|
redbear-hwutils = {}
|
|
redbear-quirks = {}
|
|
|
|
# Device driver infrastructure (pcid-spawner is built by the base recipe;
|
|
# driver-manager requires driver config migration and is not yet ready)
|
|
ehcid = {}
|
|
ohcid = {}
|
|
uhcid = {}
|
|
|
|
# Redox-native netctl tooling.
|
|
redbear-netctl = {}
|
|
redbear-netctl-console = {}
|
|
redbear-netstat = {}
|
|
redbear-traceroute = {}
|
|
redbear-mtr = {}
|
|
redbear-nmap = {}
|
|
|
|
# Wi-Fi control daemon (firmware-loader excluded — no firmware blobs in mini).
|
|
redbear-wifictl = {}
|
|
|
|
# Diagnostics and shell-side utilities.
|
|
tlc = {}
|
|
#mc = {}
|
|
redbear-info = {}
|
|
|
|
# brush: Rust shell, candidate default login shell (validated in-image before
|
|
# switching the [users.*] shell over from zsh).
|
|
brush = {}
|
|
|
|
# Keep package builder utility in live environment.
|
|
cub = {}
|
|
cpufreqd = {}
|
|
thermald = {}
|
|
redbear-power = {}
|
|
hwrngd = {}
|
|
redbear-acmd = {}
|
|
redbear-ftdi = {}
|
|
redbear-ecmd = {}
|
|
redbear-usbaudiod = {}
|
|
redbear-usb-hotplugd = {}
|
|
driver-params = {}
|
|
|
|
# ── PCI device database (critical for PCI driver matching) ──
|
|
pciids = {}
|
|
|
|
# ── Filesystem support ──
|
|
ext4d = {}
|
|
fatd = {}
|
|
redoxfs = {}
|
|
|
|
# ── System installer ──
|
|
installer = {}
|
|
|
|
# ── Input / device management ──
|
|
evdevd = {}
|
|
udev-shim = {}
|
|
|
|
# ── D-Bus IPC and session services ──
|
|
dbus = {}
|
|
redbear-sessiond = {}
|
|
redbear-dbus-services = {}
|
|
redbear-notifications = {}
|
|
redbear-upower = {}
|
|
redbear-udisks = {}
|
|
redbear-polkit = {}
|
|
|
|
# ── IOMMU DMA remapping ──
|
|
iommu = {}
|
|
|
|
# ── Standard CLI tools (from server profile) ──
|
|
bash = {}
|
|
bottom = {}
|
|
curl = {}
|
|
diffutils = {}
|
|
findutils = {}
|
|
uutils-tar = {}
|
|
bison = {}
|
|
flex = {}
|
|
meson = {}
|
|
ninja-build = {}
|
|
m4 = {}
|
|
#git = {} # suppressed: cascading rebuild; git not needed for boot/recovery
|
|
htop = {}
|
|
|
|
# ── Build / packaging utilities ──
|
|
# patchelf = {} # requires strtold which is missing in relibc
|
|
shared-mime-info = {}
|
|
|
|
# VT/getty/login chain: initfs starts inputd + vesad + fbcond in phase 1,
|
|
# then minimal.toml legacy 30_console runs inputd -A 2 + getty 2 + getty debug.
|
|
|
|
[[files]]
|
|
path = "/etc/netctl/active"
|
|
data = "wired-dhcp\n"
|
|
|
|
[[files]]
|
|
path = "/etc/init.d/10_smolnetd.service"
|
|
data = """
|
|
[unit]
|
|
description = "Network stack (non-blocking on live-mini)"
|
|
requires_weak = [
|
|
"00_pcid-spawner.service",
|
|
]
|
|
|
|
[service]
|
|
cmd = "netstack"
|
|
type = "oneshot_async"
|
|
"""
|
|
|
|
[[files]]
|
|
path = "/etc/init.d/10_dhcpd.service"
|
|
data = """
|
|
[unit]
|
|
description = "DHCP client daemon (non-blocking on live-mini)"
|
|
requires_weak = [
|
|
"10_smolnetd.service",
|
|
]
|
|
|
|
[service]
|
|
cmd = "dhcpd"
|
|
args = ["-f"]
|
|
type = "oneshot_async"
|
|
"""
|
|
|
|
[[files]]
|
|
path = "/etc/issue"
|
|
data = """
|
|
########## Red Bear OS #########
|
|
# Login with the following: #
|
|
# `user` #
|
|
# `root`:`password` #
|
|
################################
|
|
"""
|
|
|
|
# motd is provided by the redbear-release recipe (generated from motd.in
|
|
# template with the current git-branch version). Do NOT add a static
|
|
# motd [[files]] override here — it creates a collision with recipe
|
|
# staging and goes stale when the version bumps.
|
|
|
|
[[files]]
|
|
path = "/etc/init.d/20_audiod.service"
|
|
data = """
|
|
[unit]
|
|
description = "Audio multiplexer (non-blocking on live-mini)"
|
|
requires_weak = [
|
|
"00_base.target",
|
|
]
|
|
|
|
[service]
|
|
cmd = "audiod"
|
|
type = "oneshot_async"
|
|
"""
|
|
|
|
[[files]]
|
|
path = "/etc/init.d/02_usb_hotplug.service"
|
|
data = """
|
|
[unit]
|
|
description = "USB device hotplug daemon (auto-spawns class drivers)"
|
|
requires_weak = [
|
|
"00_base.target",
|
|
"00_pcid-spawner.service",
|
|
]
|
|
|
|
[service]
|
|
cmd = "redbear-usb-hotplugd"
|
|
type = "oneshot_async"
|
|
"""
|
|
|
|
[[files]]
|
|
path = "/etc/init.d/02_serial_probe.service"
|
|
data = """
|
|
[unit]
|
|
description = "Serial boot probe marker"
|
|
requires_weak = [
|
|
"00_base.target",
|
|
]
|
|
|
|
[service]
|
|
cmd = "echo"
|
|
args = ["RB_SERIAL_PROBE_OK"]
|
|
type = "oneshot"
|
|
"""
|
|
|
|
[[files]]
|
|
path = "/etc/init.d/00_gpiod.service"
|
|
data = """
|
|
[unit]
|
|
description = "GPIO controller registry"
|
|
requires_weak = [
|
|
"00_base.target",
|
|
]
|
|
|
|
[service]
|
|
cmd = "gpiod"
|
|
type = { scheme = "gpio" }
|
|
"""
|
|
|
|
[[files]]
|
|
path = "/etc/init.d/00_i2cd.service"
|
|
data = """
|
|
[unit]
|
|
description = "I2C adapter registry"
|
|
requires_weak = [
|
|
"00_base.target",
|
|
]
|
|
|
|
[service]
|
|
cmd = "i2cd"
|
|
type = { scheme = "i2c" }
|
|
"""
|
|
|
|
[[files]]
|
|
path = "/etc/init.d/00_i2c-dw-acpi.service"
|
|
data = """
|
|
[unit]
|
|
description = "DesignWare ACPI I2C controller"
|
|
requires_weak = [
|
|
"00_i2cd.service",
|
|
]
|
|
|
|
[service]
|
|
cmd = "dw-acpi-i2cd"
|
|
type = "oneshot_async"
|
|
"""
|
|
|
|
[[files]]
|
|
path = "/etc/init.d/00_intel-gpiod.service"
|
|
data = """
|
|
[unit]
|
|
description = "Intel ACPI GPIO registrar"
|
|
requires_weak = [
|
|
"00_gpiod.service",
|
|
"00_i2cd.service",
|
|
]
|
|
|
|
[service]
|
|
cmd = "intel-gpiod"
|
|
type = "oneshot_async"
|
|
"""
|
|
|
|
[[files]]
|
|
path = "/etc/init.d/00_i2c-gpio-expanderd.service"
|
|
data = """
|
|
[unit]
|
|
description = "I2C GPIO expander companion bridge"
|
|
requires_weak = [
|
|
"00_i2cd.service",
|
|
"00_gpiod.service",
|
|
]
|
|
|
|
[service]
|
|
cmd = "i2c-gpio-expanderd"
|
|
type = "oneshot_async"
|
|
"""
|
|
|
|
[[files]]
|
|
path = "/etc/init.d/00_i2c-hidd.service"
|
|
data = """
|
|
[unit]
|
|
description = "ACPI I2C HID bring-up daemon"
|
|
requires_weak = [
|
|
"00_i2cd.service",
|
|
"00_i2c-dw-acpi.service",
|
|
"00_intel-gpiod.service",
|
|
"00_i2c-gpio-expanderd.service",
|
|
]
|
|
|
|
[service]
|
|
cmd = "i2c-hidd"
|
|
type = "oneshot_async"
|
|
"""
|
|
|
|
[[files]]
|
|
path = "/etc/init.d/00_ucsid.service"
|
|
data = """
|
|
[unit]
|
|
description = "USB-C UCSI topology detector"
|
|
requires_weak = [
|
|
"00_base.target",
|
|
"00_i2cd.service",
|
|
]
|
|
|
|
[service]
|
|
cmd = "ucsid"
|
|
type = { scheme = "ucsi" }
|
|
"""
|
|
|
|
[[files]]
|
|
path = "/etc/init.d/12_boot-late.target"
|
|
data = """
|
|
[unit]
|
|
description = "Late boot services target"
|
|
requires_weak = [
|
|
"00_base.target",
|
|
]
|
|
"""
|
|
|
|
[[files]]
|
|
path = "/etc/init.d/11_udev.service"
|
|
data = """
|
|
[unit]
|
|
description = "udev compatibility shim"
|
|
requires_weak = [
|
|
"12_boot-late.target",
|
|
"00_pcid-spawner.service",
|
|
]
|
|
|
|
[service]
|
|
cmd = "udev-shim"
|
|
type = "oneshot_async"
|
|
"""
|
|
|
|
[[files]]
|
|
path = "/etc/init.d/10_evdevd.service"
|
|
data = """
|
|
[unit]
|
|
description = "Evdev input daemon"
|
|
requires_weak = [
|
|
"12_boot-late.target",
|
|
"00_pcid-spawner.service",
|
|
]
|
|
|
|
[service]
|
|
cmd = "evdevd"
|
|
type = "oneshot_async"
|
|
"""
|
|
|
|
[[files]]
|
|
path = "/etc/init.d/11_wifictl.service"
|
|
data = """
|
|
[unit]
|
|
description = "Wi-Fi control daemon"
|
|
requires_weak = [
|
|
"12_boot-late.target",
|
|
"00_pcid-spawner.service",
|
|
]
|
|
|
|
[service]
|
|
cmd = "redbear-wifictl"
|
|
type = "oneshot_async"
|
|
"""
|
|
|
|
[[files]]
|
|
path = "/etc/init.d/12_dbus.service"
|
|
data = """
|
|
[unit]
|
|
description = "D-Bus system bus"
|
|
requires_weak = [
|
|
"12_boot-late.target",
|
|
]
|
|
|
|
[service]
|
|
cmd = "dbus-daemon"
|
|
args = ["--system", "--nopidfile", "--address=unix:path=/run/dbus/system_bus_socket"]
|
|
envs = { DBUS_SYSTEM_BUS_ADDRESS = "unix:path=/run/dbus/system_bus_socket" }
|
|
type = "oneshot_async"
|
|
"""
|
|
|
|
[[files]]
|
|
path = "/etc/init.d/13_seatd.service"
|
|
data = """
|
|
[unit]
|
|
description = "seatd seat management (no-op on live-mini)"
|
|
|
|
[service]
|
|
cmd = "echo"
|
|
args = ["seatd: skipped on live-mini"]
|
|
type = "oneshot"
|
|
"""
|
|
|
|
[[files]]
|
|
path = "/etc/init.d/13_redbear-sessiond.service"
|
|
data = """
|
|
[unit]
|
|
description = "Red Bear session broker (org.freedesktop.login1)"
|
|
requires_weak = [
|
|
"12_dbus.service",
|
|
]
|
|
|
|
[service]
|
|
cmd = "redbear-sessiond"
|
|
envs = { DBUS_SYSTEM_BUS_ADDRESS = "unix:path=/run/dbus/system_bus_socket" }
|
|
type = "oneshot_async"
|
|
"""
|
|
|
|
[[files]]
|
|
path = "/etc/init.d/13_iommu.service"
|
|
data = """
|
|
[unit]
|
|
description = "IOMMU DMA remapping daemon"
|
|
requires_weak = [
|
|
"12_boot-late.target",
|
|
"00_pcid-spawner.service",
|
|
]
|
|
|
|
[service]
|
|
cmd = "/usr/bin/iommu"
|
|
type = "oneshot_async"
|
|
"""
|
|
|
|
[[files]]
|
|
path = "/etc/init.d/14_redbear-upower.service"
|
|
data = """
|
|
[unit]
|
|
description = "UPower D-Bus service (org.freedesktop.UPower)"
|
|
requires_weak = [
|
|
"12_dbus.service",
|
|
]
|
|
|
|
[service]
|
|
cmd = "redbear-upower"
|
|
envs = { DBUS_SYSTEM_BUS_ADDRESS = "unix:path=/run/dbus/system_bus_socket" }
|
|
type = "oneshot_async"
|
|
"""
|
|
|
|
[[files]]
|
|
path = "/etc/init.d/14_redbear-udisks.service"
|
|
data = """
|
|
[unit]
|
|
description = "UDisks2 D-Bus service (org.freedesktop.UDisks2)"
|
|
requires_weak = [
|
|
"12_dbus.service",
|
|
]
|
|
|
|
[service]
|
|
cmd = "redbear-udisks"
|
|
envs = { DBUS_SYSTEM_BUS_ADDRESS = "unix:path=/run/dbus/system_bus_socket" }
|
|
type = "oneshot_async"
|
|
"""
|
|
|
|
[[files]]
|
|
path = "/etc/init.d/14_redbear-polkit.service"
|
|
data = """
|
|
[unit]
|
|
description = "PolicyKit1 D-Bus service (org.freedesktop.PolicyKit1)"
|
|
requires_weak = [
|
|
"12_dbus.service",
|
|
]
|
|
|
|
[service]
|
|
cmd = "redbear-polkit"
|
|
envs = { DBUS_SYSTEM_BUS_ADDRESS = "unix:path=/run/dbus/system_bus_socket" }
|
|
type = "oneshot_async"
|
|
"""
|
|
|
|
[[files]]
|
|
path = "/var/lib/dbus"
|
|
data = ""
|
|
directory = true
|
|
mode = 0o755
|
|
|
|
[[files]]
|
|
path = "/run/dbus"
|
|
data = ""
|
|
directory = true
|
|
mode = 0o755
|
|
|
|
[[files]]
|
|
path = "/etc/pcid.d/ihdgd.toml"
|
|
data = """
|
|
# redbear-live-mini: text-only image; override upstream ihdgd config with empty file
|
|
"""
|
|
|
|
[[files]]
|
|
path = "/etc/pcid.d/virtio-gpud.toml"
|
|
data = """
|
|
# redbear-live-mini: text-only image; override upstream virtio-gpud config with empty file
|
|
"""
|
|
|
|
[[files]]
|
|
path = "/etc/pcid.d/00_text_mode_gpu_mask.toml"
|
|
data = """
|
|
# redbear-live-mini: no display driver matched; class 0x03 devices are skipped
|
|
"""
|
|
|
|
# INIT_SKIP removed — all daemons are now enabled for boot.
|
|
# Individual hardware daemons that fail in QEMU will exit cleanly
|
|
# rather than blocking boot via the oneshot_async service type.
|
|
|
|
[[files]]
|
|
path = "/etc/init.d/29_activate_console.service"
|
|
data = """
|
|
[unit]
|
|
description = "Activate console VT"
|
|
requires_weak = ["00_base.target"]
|
|
|
|
[service]
|
|
cmd = "inputd"
|
|
args = ["-A", "2", "-K", "us"]
|
|
type = "oneshot_async"
|
|
"""
|
|
|
|
[[files]]
|
|
path = "/etc/init.d/30_cpufreqd.service"
|
|
data = """
|
|
[unit]
|
|
description = "CPU frequency governor (throttles CPU on bare metal to prevent overheating)"
|
|
requires_weak = ["00_base.target"]
|
|
|
|
[service]
|
|
cmd = "cpufreqd"
|
|
type = "oneshot_async"
|
|
"""
|
|
|
|
[[files]]
|
|
path = "/etc/init.d/30_console.service"
|
|
data = """
|
|
[unit]
|
|
description = "Console terminals"
|
|
requires_weak = [
|
|
"29_activate_console.service",
|
|
"00_ptyd.service",
|
|
]
|
|
|
|
[service]
|
|
cmd = "getty"
|
|
args = ["2"]
|
|
type = "oneshot_async"
|
|
"""
|
|
|
|
[[files]]
|
|
path = "/etc/init.d/31_debug_console.service"
|
|
data = """
|
|
[unit]
|
|
description = "Debug console"
|
|
requires_weak = [
|
|
"29_activate_console.service",
|
|
"00_ptyd.service",
|
|
]
|
|
|
|
[service]
|
|
cmd = "getty"
|
|
args = ["/scheme/debug/no-preserve", "-J"]
|
|
type = "oneshot_async"
|
|
"""
|
|
|
|
[[files]]
|
|
path = "/etc/init.d/00_pcid-spawner.service"
|
|
data = """
|
|
[unit]
|
|
description = "PCI driver spawner (non-blocking on live-mini)"
|
|
|
|
[service]
|
|
cmd = "pcid-spawner"
|
|
type = "oneshot_async"
|
|
"""
|
|
|
|
[[files]]
|
|
path = "/etc/init.d/00_ipcd.service"
|
|
data = """
|
|
[unit]
|
|
description = "Inter-process communication daemon (non-blocking on live-mini)"
|
|
|
|
[service]
|
|
cmd = "ipcd"
|
|
type = "oneshot_async"
|
|
"""
|
|
|
|
[[files]]
|
|
path = "/etc/init.d/13_ftdi-probe.service"
|
|
data = """
|
|
[unit]
|
|
description = "FTDI USB serial probe (non-blocking on redbear-mini)"
|
|
requires_weak = [
|
|
"00_base.target",
|
|
]
|
|
|
|
[service]
|
|
cmd = "echo"
|
|
args = ["RB_FTDI_PROBE_OK"]
|
|
type = "oneshot"
|
|
"""
|
|
|
|
[[files]]
|
|
path = "/etc/init.d/00_ptyd.service"
|
|
data = """
|
|
[unit]
|
|
description = "Pseudo-terminal daemon"
|
|
|
|
[service]
|
|
cmd = "ptyd"
|
|
# ptyd registers the "pty" scheme and signals readiness by sending its scheme
|
|
# cap fd back to init (redox_scheme ready_sync_scheme / ready_with_fd). init's
|
|
# scheme-service startup does a call_ro(FD) to receive that fd and register the
|
|
# scheme. It MUST therefore be type={scheme="pty"} — NOT "notify". With "notify"
|
|
# init does a plain readiness-byte read_exact that ptyd never sends, so init
|
|
# blocks forever here (the observed post-switchroot boot hang before the console
|
|
# stack). See ptyd/src/main.rs: it is on the SchemeDaemon/ready_with_fd path.
|
|
type = { scheme = "pty" }
|
|
"""
|