Three Phase 1.3/2.4 fixes that have real runtime impact:
1. local/scripts/build-redbear.sh: Export ARCH and HOST_ARCH at the top
of the script (derived from uname -m when unset). This fixes the
'Unsupported ARCH for QEMU ""' error from the auto-rebuild-prefix
path introduced in Phase 1.3 — the env(1) wrapper was masking
the variables, and even without it mk/config.mk needed explicit
ARCH to be exported to subprocesses. The prefix rule now succeeds
when the fork source is newer than prefix/x86_64-unknown-redox/sysroot.
2. config/redbear-device-services.toml: Remove the three init.d service
files 16_redbear-{acmd,ecmd,usbaudiod}.service. These are USB device
daemons that take <scheme> <port> [<iface>] arguments and panic on
missing args. They are spawned dynamically by pcid-spawner (00_driver-
manager.service) when matching USB hardware is detected. Starting
them as init services caused the boot to fail with
'thread main panicked at redbear-acmd <scheme> <port> <iface>'.
The binaries are still installed via the [packages] section so
pcid-spawner can find and exec them. This matches the Linux model
where cdc_acm / cdc_eem / snd-usb-audio are kernel modules or
udev-spawned, not init services.
3. config/redbear-mini.toml: Add explicit '-K us' to
29_activate_console.service so the inputd daemon activates VT 2 with
a deterministic keymap. Combined with the Russian (ЙЦУКЕН) keymap
added in commit 75f5480f, all 7 layouts (US, GB, Dvorak, Azerty, Bepo,
IT, RU) are now selectable via 'inputd -K <layout>' or by editing
this service.
Cross-referenced with Linux 7.1 drivers/usb/core/hub.c port event
handling and drivers/usb/core/driver.c device-driver binding.
New daemon (216 lines) that watches USB controllers for device
attachment/detachment and auto-spawns the appropriate class driver.
Architecture:
- Polls /scheme/usb/ every 1000ms for controller directories
- For each controller, enumerates root hub ports
- Reads device descriptors (class/subclass/protocol) via XhciClientHandle
- Maps class to driver binary: HID(0x03)→usbhidd, Storage(0x08)→usbscsid,
Hub(0x09)→usbhubd
- Spawns driver with <scheme> <port> <protocol> arguments
- Tracks spawned Child processes in HashMap<port_path, TrackedDevice>
- Detects disconnection (descriptor read fails) → kills driver + removes
from tracking
- Detects driver exit (try_wait) → removes from tracking
- Skips hub interfaces (usbhubd handles its own children)
Config:
- Added to redbear-mini.toml (inherited by redbear-full)
- Auto-started via 02_usb_hotplug.service (oneshot_async, after base.target
and pcid-spawner)
Driver map supports: HID (0x03), Mass Storage (0x08 with BOT protocol),
Hub (0x09). Additional class drivers extendable via DRIVER_MAP constant.
The getty binary opens a PTY via /scheme/pty during startup. Adding an
explicit requires_weak on 00_ptyd.service avoids races where getty runs
before the pseudo-terminal daemon is fully ready, which could delay or
prevent the login prompt from appearing.
All three were blocking the boot scheduler in /usr phase on live-mini
because their daemons never notify readiness without hardware present.
- 00_gpiod.service: scheme -> oneshot_async
- 00_i2cd.service: scheme -> oneshot_async
- 00_pcid-spawner.service: new override, oneshot -> oneshot_async
- base: update submodule to 4a1d1f4 (scheduler counter)
The local init fork's Service struct does not have a 'before' field
(it supports cmd, args, envs, inherit_envs, type only), and the
deny_unknown_fields attribute makes init panic at boot when it parses
'before':
init: /etc/init.d/12_dbus.service: unknown field 'before', expected
one of 'cmd', 'args', 'envs', 'inherit_envs', 'type' in 'service'
The 'before = [13_redbear-sessiond.service]' line was redundant
anyway: 13_redbear-sessiond.service already declares
requires_weak = ['12_dbus.service'], which orders it after dbus.
Fix both redbear-mini.toml and redbear-full.toml.
- Add --address=unix:path=/run/dbus/system_bus_socket to dbus-daemon args
- Add before = ["13_redbear-sessiond.service"] for strict ordering
- Fixes redbear-sessiond "failed to read from socket" errors
- Add x11proto to redbear-full.toml package list
- libxau recipe updated with x11proto dependency and custom build script
- Fixes libxau build failure: 'Package xproto was not found'
- Split filemanager/mod.rs into dispatch.rs, render.rs, dialog_ops.rs,
format_utils.rs (3567→~1200 lines in mod.rs)
- Comment out mc in redbear-mini.toml and redbear-full.toml per user request
- Enable tlc in redbear-full.toml (was temporarily disabled)
- 1022 tests pass, zero behavior changes
TLC (Twilight Commander) was missing from both ISO configs. Added
tlc = {} to [packages] in redbear-mini.toml and redbear-full.toml.
Created missing symlink: recipes/tui/tlc -> ../../local/recipes/tui/tlc.
Core fixes to get redbear-mini building and booting via UEFI:
relibc: Use 'VaListImpl as va_list' in syslog so cbindgen outputs va_list
instead of unknown VaListImpl type (matches stdio pattern). Fixes
openssl3 and all C consumers of syslog.h.
base fork (f97da5b0): ps2d missing info! import, ps2d dead variable,
fbcond drm-0.15 API fix, acpid 31 errors (ivrs/mcfg modules, duplicate
methods, packed fields, dmar copy-paste bug), bootstrap abort_immediate
removal (feature removed from nightly)
redox-driver-sys: Add PciQuirkFlags re-export for crate-root imports
bash: Regenerate P1-mksyntax-host-headers.patch with proper unified diff
m4: Fix getlocalename_l unsafe wrapper
config: Comment out mc (requires glib-2.0 chain, not needed for mini)
UEFI boot verified in QEMU — boots to RedBear login prompt.
Author: vasilito <adminpupkin@gmail.com>
5-phase hardening to prevent silent file-layer collisions (the D-Bus
regression class):
Phase 1: lint-config-paths.sh + make lint-config in depends.mk
Phase 2: CollisionTracker in installer (content-hash comparison)
Phase 3: installs manifests in recipe.toml + validate-file-ownership.sh
Phase 4: validate-init-services.sh + make validate in disk.mk
Phase 5: documentation (AGENTS.md, BUILD-SYSTEM-HARDENING-PLAN.md)
Both redbear-mini and redbear-full build and validate clean.
66 declared install paths in base, zero conflicts.
Shell: Changed default shell from ion to zsh for all user accounts
in base.toml, redbear-mini.toml, redbear-full.toml, and greeter config.
zsh 5.9 is already ported and builds (ZSH-PORTING-PLAN — fully implemented).
ion is kept as fallback/alternative.
Cookbook: pkgar staging fallback — when a dependency's target pkgar
doesn't exist, fall back to repo/<target>/<pkg>.pkgar. This fixes the
kf6-kitemviews build failure where libwayland's pkgar was missing from
the target directory.
Finalize all non-artifact changes accumulated from other sessions:
- config updates, recipe changes, source edits, patches
- pkgar/cache artifacts intentionally excluded (build outputs)
This is the maximum achievable scope for this session.
Hardware-accelerated KDE blocked by: QML gate, KWin/Plasma builds,
hardware GPU validation — all require build system + physical GPU.