The fork branch normalization it described is done — all local/sources forks are
on submodule/* branches (submodule/relibc, submodule/base, ... in active use).
Unreferenced one-time handoff; recoverable from git history if needed.
Track base 01200174 (smolnetd empty-router/broadcast warnings silenced, e1000e
82574 NIC support). redbear-sessiond: suppress the harmless first dbus connect
retry so it does not print an alarming line on every boot.
SESSION-2026-07-13-DOC-CLEANUP.md was an explicitly-transient session handoff
log (marked not-edit-me) recording a past cleanup; its content is fully
historical. Durable records (post-mortems, policy, resolved-plan implementation
notes) are intentionally kept.
Text login (getty -> brush) works on bare/mini after the relibc F_DUPFD_CLOEXEC
fix; document storage/USB/GOP bare-metal boot coverage and the outstanding
Intel 2.5GbE igc (I225/I226) and e1000e (I219) network driver gap for modern
Arrow Lake boards.
Track base 1769b083 (condition_path_exists for optional daemons, ahcid no-media,
netstack no-NIC idle, dhcpd fast-fail). Re-enable the serial debug console on
the bare target so it has a headless-visible login prompt (matching mini up to
login).
Track relibc submodule pointer 733da068 (translate POSIX F_DUPFD_CLOEXEC 1030 to
Redox syscall value 5, so OwnedFd::try_clone and thus tokio Runtime::build stop
failing with EINVAL). Also revert the ineffective epoll_ctl retry.
Remove temporary tokio/sessiond EINVAL diagnostics now that the root cause is
fixed.
The kernel event scheme now implements kdup, so dup() of an epoll fd works
and tokio's registry.try_clone() succeeds — fixing the tokio runtime EINVAL
that killed every zbus daemon and the brush login shell.
build-redbear.sh: gate the userspace build/sysroot clean on relibc/base
(the forks userspace links) instead of any low-level fork, so a kernel-only
change rebuilds the kernel + initfs + image without a full userspace re-cook.
relibc is statically linked into every userspace binary, so a relibc change
invalidates every consumer, not just the 4 initfs-critical packages the old
ABI_CRITICAL_PKGS list covered. A stale consumer silently bakes in old relibc
behaviour; diagnosing against such stale binaries wastes enormous time. Now:
if relibc rebuilds, ALL package pkgars + recipe build trees are invalidated
for a clean relink; otherwise any consumer pkgar older than relibc.pkgar (the
interrupted-build skew that shipped a broken login image) is invalidated.
Also add a temporary SESSIOND_DIAG probe that tries each tokio runtime config
and logs which one EINVALs, to pinpoint the tokio-runtime failure.
ion pulls nix 0.23.1 (git), which has the Redox SaFlags_t=c_ulong bug
(relibc/libc use c_int) and fails to compile on a clean rebuild with the
`kill`/signal feature. ion was only a bundled initfs recovery shell that
nothing execs (init runs daemons then switchroots to /usr, where the
interactive login shell is brush). Per operator directive, drop ion rather
than hold nix back on an ancient pinned version for its sake.
nix 0.30.1 wrongly types Redox's sigaction SaFlags_t as c_ulong, but
relibc and the libc crate both declare sa_flags/SA_* as c_int (nix 0.31
already uses c_int for Redox). With the `kill` feature the nix signal
module is compiled and the u64-vs-i32 mismatch breaks the SaFlags
bitflags (E0308). This was latent (uutils built from cache); the relibc
epoll rebuild forced a clean recompile and surfaced it.
Patch the nix Redox branch before cookbook_cargo, with cargo fetch first
so the registry source exists before patching.
Track relibc submodule at the epoll_ctl transient-retry fix (415fa3c8),
which lets tokio runtimes (the zbus daemons and the brush login shell)
build past the transient /scheme/event EINVAL/EBADF during early-boot
scheme churn.
redbear-bare.toml: switch [users.root]/[users.user] to /usr/bin/brush and
add the brush package, so bare and mini share an identical boot-to-login
shell (bare = minimal boot-test surface, mini = +app payload).
Switch the text-login shell from zsh to brush now that brush builds and
packages for Redox. base.toml [users.root]/[users.user] -> /usr/bin/brush
covers mini (which inherits base); redbear-bare.toml gets the same shell
plus the brush package so bare and mini share an identical boot-to-login
path (bare stays the minimal boot-test surface, mini adds the app payload).
bare/full keep their own [users.root]; full and the greeter remain on zsh
(that is the graphical/sddm path, handled separately). zsh stays installed
as a fallback. Verified: redbear-mini.iso builds and its /etc/passwd reads
`.../usr/bin/brush` for root and user.
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.
Base submodule 1f826240: 00_pcid-spawner (/usr) and 10_smolnetd base-default
init units switched to oneshot_async so init never blocks the boot-to-login
path on PCI driver enumeration or a network adapter binding. Adds the
2026-07-16 CHANGELOG entry (mini login restored, kernel MSR #GP guard,
build-system staleness/lock/override fixes).
Mini now boots (q35/KVM) all the way to the getty "Red Bear login:" prompt
on VT2 with zero kernel panics. Root-cause fixes across submodules + config:
- config: 00_base.service zsh->mkdir (a full shell startup hangs an init
oneshot; the earlier 'echo/mkdir also hang' result was a silent config
override running zsh). 00_ptyd.service notify->{scheme=pty} (ptyd signals
readiness via its scheme fd; notify made init block on a byte forever).
- kernel: wrmsr_safe/rdmsr_safe #GP recovery so /scheme/sys/msr can't panic
the kernel (cpufreqd's P-state MSR write #GP'd on KVM, halting the boot
before login). base: ptyd scheme type + hwd ACPI enum -> debug (noise).
installer: warn on config [[files]] override. relibc/bootloader: prior
getrlimit + warning-demotion pointers.
- build-redbear.sh: fix host-fstools staleness (installer/redoxfs never
rebuilt on source change), prefix rebuild-every-build (touch libc.a), add
concurrent-build flock.
Submodule pointers: base 8aa8616d, installer 460d9530, kernel 155d01b1,
relibc a7663b3a, bootloader 6e119641.
The thr_fd.take() and mem::forget(proc_fd) workarounds were
intended to keep the parent's proc scheme handles alive after
posix_spawn returns, so the child's ld_so could use them via
AT_REDOX_*_FD auxv entries. The boot diagnostic shows the actual
relibc binary does NOT take the 'fork' / 'thread-0' kdup path
(those calls never appear in the kdup trace), so the workarounds
targeted a code path that was not running. The real fix is
kernel-side: each Context must hold a self-reference to its own
proc handle so the handle cannot be dropped while the context
is alive.
Multiple fixes to make redbear-bare actually build and progress
through boot:
config/redbear-bare.toml:
- filesystem_size: 96 -> 192 MiB. The bare image packages ~153 MiB
of installed content (zsh, base, base-initfs, kernel, relibc,
userutils, libgcc, libstdcxx, plus coreutils/extrautils/etc.),
so 96 MiB triggers installer ENOSPC during commit.
- Override 31_debug_console.service with postinstall=true so the
override wins over minimal.toml's version that uses
/scheme/debug/no-preserve (which busy-loops when the debug
scheme returns ENODEV in the bare initfs).
recipes/core/base-initfs/recipe.toml:
- bare_initfs() now only references BINS in the base workspace
(init, logd, ramfs, randd, zerod, ptyd). getty is removed from
BINS because it lives in userutils, not base.
- Copy getty from the sysroot into the initfs after the cargo
build (analogous to the existing redoxfs/ion/driver-manager
sysroot copies).
- Filter the init.d copy under REDBEAR_BARE_INITFS to keep only
services for binaries we actually built (logd, randd, zerod,
runtime.target, ramfs@.service, 90_initfs.target, 50_rootfs).
The mainline 23 services reference fbcond/vesad/acpid/pcid/
fbbootlogd/hwd/inputd which aren't in the bare BINS, so
init would try to start them and busy-loop.
- Synthesize minimal 00_ptyd.service and 30_getty.service units
in the initfs since they're built/copied but not in the
mainline init.initfs.d.
- Override 00_runtime.target to add ptyd and getty as weak
requires (the mainline target references nulld/rtcd which we
filtered out).
Kernel is built with target-feature=+soft-float (no SSE), but the
upstream ProcUptime code used f64 in format!() which requires SSE
register return. This caused a build error:
error: src/scheme/proc.rs:2047:32: ... SSE register return with
SSE disabled
Replace the f64 arithmetic with integer math (seconds.milliseconds)
to make the kernel buildable on the redoxer cross-toolchain.
The redbear-bare target (added in 48a6f4c20b) was not registered in
the build dispatchers. Running build-redbear.sh redbear-bare
silently exited with 'ERROR: Unknown config redbear-bare'.
Fix:
- build-redbear.sh: extend the case statement + usage block + error
message to include redbear-bare
- integrate-redbear.sh: add config/redbear-bare.toml to the configs
array so source-tree integration picks up the bare target too
- build-all-isos.sh: include redbear-bare in the targets list
This closes the gap where the bare target existed as a config file
and as a recipe branch (REDBEAR_BARE_INITFS) but was invisible to
the build dispatch layer.
(NO AI attribution)
Round-25 fix landed the bare initfs conditional in
recipes/core/base-initfs/recipe.toml but the cookbook does NOT parse
[build.env] sections in TOML configs. The REDBEAR_BARE_INITFS=1
env var I put in redbear-bare.toml was silently ignored.
Fix: propagate REDBEAR_BARE_INITFS through build-redbear.sh's make live
invocation. When CONFIG=redbear-bare and the operator has not already
exported REDBEAR_BARE_INITFS, auto-set it to 1 so the bare initfs
branch is triggered. Also propagates any pre-existing REDBEAR_BARE_INITFS
through the make call (override-only).
Also rewrote the [build.env] section in redbear-bare.toml to a
comment-only section explaining the dispatch mechanism, since the
cookbook parser ignores it.
(NO AI attribution)
Address 4 gaps in the new redbear-bare target per review:
Gap 1: add REDBEAR_BARE_INITFS env var to base-initfs recipe. When
set, BINS=init logd ramfs randd zerod ptyd getty instead of 22+
daemons/drivers. The bare target can now opt into the truly-minimal
initfs via the env var.
Gap 2: add ptyd and getty to the cp case-list so they go to /initfs/bin
not /initfs/lib/drivers. Without this, the getty 2 service cannot
start because ptyd (which it requires) isn't in the initfs.
Gap 3: add /etc/issue (pre-login banner) and /etc/motd (post-login
message) to the bare config. Standard Unix login surface polish.
Gap 4: trim packages in the bare config. Override ca-certificates,
pkgutils, kibi (from minimal.toml) to empty. Bare only needs:
zsh, coreutils, base, base-initfs, kernel, relibc, userutils,
libgcc, libstdcxx.
Build invocation:
REDBEAR_BARE_INITFS=1 make live CONFIG_NAME=redbear-bare
(NO AI attribution)
Strips to bare minimum: kernel boots, base-initfs 90_initfs.target
brings up init daemons (logd, randd, zerod, ptyd, inputd), console
getty 2 hands off to zsh as default shell. No networking, no
display/audio, no driver-manager, no extra services.
filesystem_size=96 MiB. Includes only minimal.toml. Overrides
base.toml's /etc/net/* and /etc/pkg.d/50_redox (empty) and
/etc/login_schemes.toml (display/audio removed).
Build: make live CONFIG_NAME=redbear-bare
(NO AI attribution)
Submodule local/sources/relibc moved from 7dee5480 to 7a8c7564
(operator-side work). Local + origin now in sync.
(NO AI attribution)
# Conflicts:
# local/sources/relibc
Local had the SUBMODULE-NORMALIZATION doc + Round-22 build system commit
uncommitted; origin had the same doc pre-Round-22. This merge combines
both into a single linear history.
(NO AI attribution)
# Conflicts:
# local/docs/SUBMODULE-NORMALIZATION-2026-07-13.md
Per local/AGENTS.md § "BRANCH AND SUBMODULE POLICY (ABSOLUTE)":\neach Red Bear fork worktree must be on the canonical\n"submodule/<name>" branch. Until now, the build system had NO\ncode enforcing this — drift was caught only by operator discipline\n(Round-21 hand-normalized 6 of 9 forks).\n\nAdd a new redbear_check_fork_branches() function called as a peer of\nthe existing dirty-source gate. It iterates REDBEAR_FORK_SOURCES,\nreads each fork worktree's current branch via 'git branch\n--show-current', and compares to 'submodule/<label>'. On mismatch\nthe build aborts with a clear error message and a documented fix\nrecipe. Escape hatch: REDBEAR_ALLOW_WRONG_BRANCH=1.
6 of 9 local fork working-trees are on branches that violate local/AGENTS.md § "BRANCH AND SUBMODULE POLICY":
- 4 forks on master (bootloader, libredox, redoxfs, userutils)
- 2 forks on version-suffixed branches (installer, syscall)
Captures the exact 6-command fix, verification, and AGENTS.md policy citations. NO fallbacks, NO code changes — operator-only per "agents MUST NOT create new git branches" rule.
(NO AI attribution)
6 of 9 local fork working-trees are on branches that violate local/AGENTS.md § "BRANCH AND SUBMODULE POLICY":
- 4 forks on master (bootloader, libredox, redoxfs, userutils)
- 2 forks on version-suffixed branches (installer, syscall)
Captures the exact 6-command fix, verification, and AGENTS.md policy citations. NO fallbacks, NO code changes — operator-only per "agents MUST NOT create new git branches" rule.
(NO AI attribution)
The script uses '${BRANCH_VERSION:-0.0.0}' as the +rb suffix when
bumping a fork to a new upstream version. BRANCH_VERSION was never
set, so any fork bump would have produced 'X.Y.Z+rb0.0.0' instead
of the correct 'X.Y.Z+rb0.3.2' (or whichever branch is current).
Derive BRANCH_VERSION from 'git branch --show-current' using the same
pattern as local/scripts/build-redbear.sh:158-165. Falls back to
'0.0.0' if the branch name doesn't match semver (e.g., on 'master').
(NO AI attribution)