Commit Graph

1904 Commits

Author SHA1 Message Date
vasilito a92f698849 chore: track base pointer (fbcond keyboard CR->LF) 2026-07-18 12:02:48 +09:00
vasilito 246ebdfc4b chore: track userutils pointer (login chdir-before-mkns fix) 2026-07-18 11:01:26 +09:00
vasilito 4c610e6555 chore: track base+userutils pointers (init CWD fix) + clean brush patch 2026-07-18 10:43:18 +09:00
vasilito ab2ca5399a chore: track userutils pointer (spawn diag) 2026-07-18 10:26:53 +09:00
vasilito 74bea85fe7 chore: track userutils pointer (login CWD fix) 2026-07-18 10:17:13 +09:00
vasilito 302ae880da chore: track base submodule pointer (revert logger Warn) 2026-07-18 09:47:28 +09:00
vasilito c843db2682 chore: base gitlink (console log quiet) + durable brush redox patch
- Track base submodule pointer for output_level Warn console-quiet change.
- Capture brush entry.rs redox edits (tokio current-thread runtime, default
  minimal input backend) as patches/brush-redox-runtime-and-input.patch and
  apply it in the recipe, so a clean source re-fetch keeps the Redox port.
2026-07-18 08:55:55 +09:00
vasilito dc97454734 chore: track base submodule pointer for switch_root chdir restore 2026-07-18 08:24:20 +09:00
vasilito f8d269c4b6 chore: track userutils submodule pointer for spawn_shell diagnostics 2026-07-18 08:09:05 +09:00
vasilito 688645bf98 feat(serial): headless serial console for mini/bare via fbcond mirror
Track base e9342b78 (fbcond bidirectional serial mirror) + kernel 229046c6
(debug fevent readable). Disable the standalone 31_debug_console getty since
fbcond now owns the serial/debug console (avoids competing for the shared debug
input queue and duplicated output). Gives headless serial login on mini + bare.
2026-07-18 07:23:58 +09:00
vasilito eddc5c737d fix(mesa): disable gbm (needs DRM/KMS platform; not on Redox surfaceless/llvmpipe) 2026-07-18 04:17:51 +09:00
vasilito b2c174875c fix(full+build): unblock glib/mesa/libinput; close fork-staleness gap
- build-redbear.sh: detect changes to the 4 forks the staleness loop missed
  (userutils pkgar; syscall/libredox/redox-scheme crate path-deps force a full
  userspace relink) — prevents stale-binary skew (bash -n validated).
- glib: drop the stale '#undef AT_FDCWD' Redox workaround — relibc now provides
  faccessat()/AT_FDCWD, and glib's HAVE_FACCESSAT path needs AT_FDCWD.
- mesa: remove the dropped '-Dosmesa=true' meson option (unknown option) and
  guard the osmesa.pc pkg-config edit.
- libinput: unblocked by syncing the fresh relibc libc.a (with timerfd_*) into
  the stale prefix sysroot (prefix-sysroot staleness — see notes).
2026-07-18 03:36:01 +09:00
vasilito 79e7f24f00 docs: remove completed submodule-normalization handoff
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.
2026-07-18 03:11:56 +09:00
vasilito 061184a64c fix(libinput): disable lua-plugins (no lua-5.4 in Redox sysroot) to unblock build 2026-07-18 02:52:57 +09:00
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 40d45c1422 docs(hardware): record working text-console login + driver coverage
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.
2026-07-18 00:33: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 5f99f19411 base-initfs: drop ion (initfs recovery shell) to move forward with nix
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.
2026-07-17 09:01:14 +09:00
vasilito ca757f9898 uutils: fix nix 0.30.1 Redox SaFlags_t (c_ulong -> c_int)
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.
2026-07-17 08:19:10 +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 c096e29825 config: use brush as the login shell for bare and mini
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.
2026-07-16 23:42:36 +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 73d0e6ed01 changelog: bare ISO login verified 2026-07-16 20:10:35 +09:00
vasilito 1dfc13ac10 changelog: bare+mini login verified; audiod/00_tmp fixes; make-live consistency note 2026-07-16 20:10:03 +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 87d5a24dbc fix(redbear-bare): enable bare target to build and boot
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).
2026-07-15 06:48:46 +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