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)
Submodule pointers for base and relibc moved (operator-side work).
recipes/wip/wayland/qt6-wayland-smoke remains a broken gitlink
(known; see local/docs/SESSION-2026-07-13-DOC-CLEANUP.md for carry-over).
(NO AI attribution)
D7 validation: PROFILE-MATRIX.md was deleted during cleanup but still
linked from docs/README.md bullet list. Replaced with
local/docs/CONSOLE-TO-KDE-DESKTOP-PLAN.md (consolidation target).
(NO AI attribution)
D7 validation: INPUT-SCHEME-ENHANCEMENT.md + PROFILE-MATRIX.md deleted
during cleanup but still referenced. Replaced with local/docs/CONSOLE-TO-KDE-DESKTOP-PLAN.md (consolidation target).
(NO AI attribution)
D7 validation: 3 stale refs remained after cleanup.
- Removed DESKTOP-STACK-CURRENT-STATUS.md ref (file deleted)
- Removed docs/QUIRKS-IMPROVEMENT-PLAN.md ref (correct path is local/docs/)
- Verified all remaining refs resolve.
(NO AI attribution)
D7 validation found fork SHAs in this doc were stale vs the actual
local fork HEADs. Refreshed kernel/relibc rows to current; added
missing base row.
(NO AI attribution)
Captures what was done this session (doc cleanup) and what carry-over issues remain (kernel fork at detached HEAD 2086faec with fix 22f5f622 in master; boot still fails at unit loading).
For handoff to next agent or operator.
D6 verification flagged 3 stale remnants missed by the Round-12 cleanup pass. Per ground-truth:
- Line 155: relibc "active patches" is stale. Core recipes use PATCHED-VIA-PATH-FORK; 26 patch files in local/patches/relibc/ are reference/archived only.
- Lines 1832, 1902: qtbase 6.11.0 bumped to 6.11.1 to match README and actual fork state.
(NO AI attribution)
Round-7 audit found stale entries for files deleted by c04da4f031 and ecf1f19d55, plus missing entries for files still present in the archive. Rewrote the inventory to match the filesystem and added the 2026-07-13 sync note.
Per ground-truth: BOOT-PROCESS-ASSESSMENT.md, IOMMU-SPEC-REFERENCE.md, and LINUX-BORROWING-RUST-IMPLEMENTATION-PLAN.md are gone. Replaced with "(deleted)" markers. Lines 73-74 (duplicate BOOT-PROCESS-ASSESSMENT.md refs) collapsed to a single marker.
Per ground-truth: AMD-FIRST-INTEGRATION.md, HARDWARE-3D-ASSESSMENT.md, DMA-BUF-IMPROVEMENT-PLAN.md were deleted during the P0 archive cleanup. Replaced each occurrence with "(deleted)" markers.
Lines 298-311 had 8 fork HEAD SHAs from 2026-07-07 (+rb0.3.0 era) that have since advanced. Per ground-truth section A:\n base 4d09ab7f\n bootloader c78c3a6\n installer 1e9dcde\n kernel 22f5f622\n libredox b99b204\n redoxfs b78a791\n relibc 11a1f8bc\n syscall 6e4e5bd (+rb0.3.1)\n userutils 0dc0cb7\n\nAll forks now use +rb0.3.1 suffix. Line 311 "intentionally kept at +rb0.3.0" updated to "kept at +rb0.3.1".
Recipe example now notes that core components use path-fork recipes, while the CONFIG_NAME table entry is aligned to the actual default behavior exposed by mk/config.mk and build-redbear.sh.
Qt version: 6.11.0→6.11.1 globally (lines 56-57, 66-69, 105) per ground-truth — matches README.md and fork state.\n\nkirigami: was reported as "Build blocked at the QML gate" but local/patches/kirigami/ has patches indicating it builds. Updated to "Builds; runtime QML validation incomplete".\n\nkf6-kio: same — local/patches/kf6-kio/01-no-testlib.patch shows builds are now succeeding with tests disabled. Updated to "Builds; runtime QML validation incomplete".
Ground-truth staleness fix for AGENTS.md, aligned to section A of /tmp/rb-ground-truth.txt (core forks use PATCHED-VIA-PATH-FORK; e.g. base 4d09ab7f, kernel 22f5f622).
Per ground-truth: 9 forks exist (the 7 listed + syscall + libredox). Added syscall and libredox to the fork list with a note about how they're wired (Cargo path deps via redox-rt consumers, not via recipes/<comp>/recipe.toml path = ).
POSIX gaps row: "~38 active patches" is stale — relibc now uses PATCHED-VIA-PATH-FORK; the local/patches/relibc/ directory holds reference and archived patches, not active build-time patches.
KDE Plasma / KWin row was conflating two distinct statuses. KWin BUILDS successfully (the redox-drm + Qt6 Wayland patches exist); only the RUNTIME is blocked by the Qt6 Wayland crash. Split into two rows so readers know exactly what works vs what's blocked.
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
The verify-overlay-integrity.sh script has two blind spots for stale
symlink detection:
1. find recipes -maxdepth 3 misses paths at depth 4+
2. only checks targets under /local/recipes/, misses /local/patches/
This adds a parallel scan that finds all dangling symlinks under recipes/
without maxdepth, classifies them by target path, and reports each with a
suggested action. Pure diagnostic — does not modify any files.
Enables preventive detection of the recipes/wip/x11/mesa-x11/source
orphan and recipes/core/base/redox.patch pointer-rot that triggered the
build integrity warnings on this session's rebuilds.
(NO AI attribution in commit message.)