Commit Graph

1678 Commits

Author SHA1 Message Date
vasilito 76d609a39e fix(timerfd): base ptr — compile sys_timerfd so timerfd_* link (unblocks Wayland) 2026-07-18 02:51:37 +09:00
vasilito ff49356d58 fix(full): unblock desktop stack build
- relibc ptr 3b40cc8e: sys/timerfd.h compiles in C (unblocks libwayland + glib)
- redbear-meta: add [package].version = 0.3.1 (cookbook couldn't guess it)
- pam-redbear: regenerate Cargo.lock (in-house crate version drift vs --locked)
- (glib corrupted partial source cleaned to force a fresh re-fetch)
2026-07-18 01:57:26 +09:00
vasilito 72351f2a6a fix(boot): base ptr (net warning cleanup + e1000e) + quieter sessiond dbus retry
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.
2026-07-18 00:50:04 +09:00
vasilito 7462574f3c docs: remove completed one-time doc-cleanup session log
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.
2026-07-18 00:36:56 +09:00
vasilito 5b49b36724 fix(boot): base submodule ptr (bare/mini warning cleanup) + bare serial console
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).
2026-07-18 00:30:00 +09:00
vasilito c415829a12 fix(relibc): F_DUPFD_CLOEXEC ABI translation -> tokio runtime works on Redox
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.
2026-07-17 23:00:23 +09:00
vasilito e0d62330ac kernel: track event kdup fix (tokio Runtime EINVAL root cause); build: only re-cook userspace when relibc/base change
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.
2026-07-17 21:47:32 +09:00
vasilito 053d10276f sessiond: fix DIAG probe crate name (redox_syscall) 2026-07-17 18:18:40 +09:00
vasilito d61b878d03 sessiond: syscall-level DIAG — register pipe vs uds_stream fd with /scheme/event 2026-07-17 18:13:54 +09:00
vasilito 333f1ac023 build: invalidate ALL relibc consumers on relibc change (bulletproof)
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.
2026-07-17 09:42:41 +09:00
vasilito ccccf94fb5 relibc: track epoll EINVAL/EBADF retry pointer; bare: brush login shell
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).
2026-07-17 00:32:09 +09:00
vasilito 9c97cefc57 recipes: adopt brush shell into local/recipes with Redox port patches
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.
2026-07-16 23:23:37 +09:00
vasilito 81a1d7d565 track relibc pointer: waitid unsafe fix 2026-07-16 22:08:37 +09:00
vasilito 0c3b769b24 track submodule pointers: relibc waitid, fbcond scrollback, bootloader color 2026-07-16 22:04:37 +09:00
vasilito 4afefcd8e1 base: 00_tmp idempotent mkdir + audiod/pcid/smolnetd non-blocking (pointer c14a577d) 2026-07-16 20:05:55 +09:00
vasilito 1ebc92f51f base: 20_audiod.service oneshot_async (pointer f5f726ca) 2026-07-16 18:39:28 +09:00
vasilito 19470fb444 boot: make bare/base driver-manager + netstack non-blocking; changelog
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).
2026-07-16 12:48:57 +09:00
vasilito d5561184f0 boot: restore mini ISO to a working login prompt + build-system 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.
2026-07-16 12:20:14 +09:00
vasilito 2b64199007 fix: track clean kernel+base pointers (FileTableVerb::Resize fix, diagnostics removed) 2026-07-15 15:40:21 +09:00
vasilito 543cdfb962 chore: track kernel submodule pointer for PROCMGR write-mirror diag 2026-07-15 13:25:55 +09:00
vasilito b81ff59197 chore: track base submodule pointer for procmgr diagnostic 2026-07-15 13:06:03 +09:00
vasilito 0fbf56b2cd chore: track kernel submodule pointer for scheme-id diagnostic 2026-07-15 12:39:06 +09:00
vasilito 8cdd2b799a chore: track kernel submodule pointer for kdup diagnostic 2026-07-15 06:48:47 +09:00
vasilito d888ed0dff revert(relibc): drop ineffective spawn-leak workarounds
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.
2026-07-15 06:48:47 +09:00
vasilito 08ee8c23f5 chore: track relibc submodule pointer for mem::forget proc_fd leak 2026-07-15 06:48:47 +09:00
vasilito f8d5f390d2 chore: track relibc submodule pointer for proc_fd leak fix 2026-07-15 06:48:47 +09:00
vasilito 2fa8b3b835 chore: track relibc submodule pointer for spawn leak fix 2026-07-15 06:48:47 +09:00
vasilito c08379e03e chore: track base submodule pointer for waitpid fix 2026-07-15 06:48:46 +09:00
vasilito fac69f9d03 fix(kernel): ProcUptime f64 → integer in soft-float build
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.
2026-07-15 06:48:46 +09:00
vasilito f93f9e8ea8 build-system: add redbear-bare to dispatch + integrate + build-all
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)
2026-07-15 00:40:23 +09:00
vasilito b447c22da1 build-redbear.sh + redbear-bare: wire REDBEAR_BARE_INITFS to make
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)
2026-07-14 23:39:18 +09:00
vasilito ff1aa97ca7 Revert "chore: track relibc submodule pointer update"
This reverts commit 4f102d1e2b.
2026-07-14 23:08:57 +09:00
vasilito 4f102d1e2b chore: track relibc submodule pointer update
Submodule local/sources/relibc moved from 7dee5480 to 7a8c7564
(operator-side work). Local + origin now in sync.

(NO AI attribution)

# Conflicts:
#	local/sources/relibc
2026-07-14 18:30:18 +09:00
vasilito 05ae87bd61 merge: combine local Round-22 build system commit with origin/0.3.1 SUBMODULE-NORMALIZATION doc
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
2026-07-14 13:36:00 +09:00
vasilito e462d576f4 build-redbear.sh: enforce submodule/<name> branch on every fork worktree
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.
2026-07-14 13:00:52 +09:00
vasilito 441aba3d32 local/docs/SUBMODULE-NORMALIZATION-2026-07-13.md: operator handoff for fork branch normalization
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)
2026-07-14 12:41:17 +09:00
vasilito b135dfdcd9 local/docs/SUBMODULE-NORMALIZATION-2026-07-13.md: operator handoff for fork branch normalization
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)
2026-07-14 12:02:44 +09:00
vasilito 137da99644 scripts/bump-fork.sh: derive BRANCH_VERSION from git branch
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)
2026-07-14 11:53:39 +09:00
vasilito 314f655f37 chore: update base and kernel submodule pointers for fd-transfer diagnostics 2026-07-14 11:19:31 +09:00
vasilito e38b1bac27 chore: update base and relibc submodule pointers for FILETABLE fixes
- base: pipe2 FILETABLE desync fix (1e341ff7)

- relibc: open() FILETABLE-aware allocation fix (aeabac73)
2026-07-14 08:52:08 +09:00
vasilito adbea07ec8 track forked-component pointer updates + qt6-wayland-smoke gitlink
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)
2026-07-14 01:18:38 +03:00
vasilito aec5a71096 local/docs/BLUETOOTH-IMPLEMENTATION-PLAN.md: fix deleted + wrong-path cross-refs
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)
2026-07-14 01:18:22 +03:00
vasilito ec9697f5d9 local/docs/DRM-MODERNIZATION-EXECUTION-PLAN.md: fix deleted + wrong-path cross-refs
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)
2026-07-14 01:18:21 +03:00
vasilito 757f5cfa53 local/docs/NETWORKING-IMPROVEMENT-PLAN.md: refresh fork SHAs to current HEADs
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)
2026-07-14 01:18:10 +03:00
vasilito 88654e62c7 local/docs/SESSION-2026-07-13-DOC-CLEANUP.md: session-end state summary
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.
2026-07-14 00:46:43 +03:00
vasilito 724923f6cc local/docs/CONSOLE-TO-KDE-DESKTOP-PLAN.md: D6 follow-up cleanups
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)
2026-07-13 19:47:44 +03:00
vasilito d367a86083 docs: sync archived inventory with current files
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.
2026-07-13 19:43:56 +03:00
vasilito e8f35c9869 local/docs/BLUETOOTH-IMPLEMENTATION-PLAN.md: remove AMD-FIRST-INTEGRATION.md reference
Per ground-truth: AMD-FIRST-INTEGRATION.md was deleted. Replaced the cross-ref at line 91.
2026-07-13 19:42:01 +03:00
vasilito 338892d3ec local/docs/ACPI-IMPROVEMENT-PLAN.md: remove references to deleted plans
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.
2026-07-13 19:41:55 +03:00
vasilito 67507071c0 local/docs/DRM-MODERNIZATION-EXECUTION-PLAN.md: remove references to deleted plans
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.
2026-07-13 19:41:47 +03:00