Commit Graph

436 Commits

Author SHA1 Message Date
vasilito 2ae7ad7afd fix: iommu InterruptRemapTable — add DmaBuffer-backed allocation, fix compile
interrupt.rs:
- InterruptRemapTable now owns optional DmaBuffer for self-allocated tables
- new_allocated(entry_count) constructor allocates physically contiguous
  DMA memory via DmaBuffer::allocate, returns Result
- new(base_addr, size) still works for externally-provided tables
- private addr() helper replaces direct 'base' field access
- len_encoding() returns AMD-Vi log2-encoded IRT length for DTE entries
- physical_address() returns table base physical address
- Remove unused 'warn' and 'error' imports from log crate

amd_vi.rs:
- Use InterruptRemapTable::new_allocated instead of ::new for IRT init
- Cast len_encoding() from u64 to u8 for DeviceTableEntry::set_int_table_len

Verified: iommu crate compiles clean (0 errors, 0 warnings).
2026-05-04 18:27:56 +01:00
vasilito 029472d5e3 feat: IOMMU-aware DmaAllocator + comprehensive DMA/thread audit
dma.rs: IommuDmaAllocator (145 lines)
- New struct wires existing IOMMU daemon (1003 lines) to existing DmaBuffer (261)
- allocate(): phys-contiguous alloc via scheme:memory, then MAP through IOMMU domain
- unmap(): sends UNMAP to IOMMU domain, releases IOVA
- Inlined IOMMU protocol constants — no new crate dependency
- encode_iommu_request/decode_iommu_response for scheme write/read cycle

Documentation updates:
- IMPLEMENTATION-MASTER-PLAN.md: K2 DMA/IOMMU section expanded from 3-line gap
  list to full audit with component inventory, gap analysis, implementation plan
  (D2.1-D2.5), Linux reference table. Added K2b thread/fork audit.
- CPU-DMA-IRQ-MSI-SCHEDULER-FIX-PLAN.md: Phase 1 (MSI) marked complete with
  per-task status. Phase 2 (DMA) re-scoped from 'create' to 'wire' based on
  audit. Phase 3 (scheduler) marked mostly done.
- IRQ-AND-LOWLEVEL-CONTROLLERS-ENHANCEMENT-PLAN.md: kernel MSI support noted
  as materially strong with P8-msi.patch reference.

Audit findings:
- IOMMU daemon is solid: 1003-line lib.rs with full scheme protocol,
  427-line amd_vi.rs, host-runnable tests. Needs wiring, not rewriting.
- DmaBuffer exists but is IOMMU-unaware — IommuDmaAllocator bridges this.
- relibc rlct_clone is correct for threads (shares addr space implicitly).
  '3 IPC hops' claim is microkernel-architectural, not a real perf issue.
- No stale docs to archive at this time.
2026-05-04 18:18:04 +01:00
vasilito 678980521c feat: T1.1-T2.2 MSI subsystem — kernel MSI, vectors, affinity, validation
Kernel:
- T1.1 msi.rs: MSI message composition (MsiMessage), validation
  (is_valid_msi_address, is_valid_msi_vector), capability parsing
  (MsiCapability, MsixCapability) with bounds-safe .get() access
- T1.2 vector.rs: per-CPU bitmatrix vector allocation/deallocation
- T1.3 IRQ scheme: MSI vector validation gate at irq_trigger,
  iommu_validate_msi_irq hook, msi_vector_is_valid helper
- mod.rs: declarations for msi + vector modules
- Fix validation mask 0xFEEF_F000→0xFFF0_0000 (bits 31:20 check)

T2.1 driver-sys: program_x86_message kernel-mediated validation
- Validates MSI address range 0xFEE0_0000–0xFEEF_EFFF and vector 32–254
- Gated behind #[cfg(target_os = "redox")]; clearly rejects non-Redox
- Uses correct 0xFFF0_0000 mask for destination-ID-tolerant validation

T2.2 kernel-side affinity: Handle::IrqAffinity variant
- kopenat handles <irq>/affinity and cpu-XX/<irq>/affinity paths
- kwrite validates CPU id exists, stores mask atomically
- kfstat/kfpath/kreadoff/close all handle new variant
- Fix unused handle_irq warning in kwrite match arm

T2.3 driver-sys: MsiAllocation struct + irq_set_affinity helper
- MsiAllocation with round-robin CPU allocation via alloc_cpu_id
- irq_set_affinity uses scheme:irq/<irq>/affinity write path
- IrqFd type alias in pci.rs for file descriptor tracking

IOMMU T3.1: InterruptRemapTable, IRTE encode/decode, IrqRemapManager
- IRTE (16-byte) encoding/decoding for AMD-Vi interrupt remapping
- InterruptRemapTable with program/invalidate/find_free
- IrqRemapManager with multi-table remap and validate_msi gate
- Remove arbitrary .min(256) bound on find_free

P8-msi.patch: 281-line durable kernel patch, wired in recipe.toml
2026-05-04 18:00:15 +01:00
vasilito 091f19167b kwin: plugin path fix + KF6Svg stub + QmlPlugins cleanup
- Mirror usr/plugins/*.so to plugins/ for cmake Imported target verification
- Delete QmlPlugins dirs (reference host QML paths)
- Stub KF6Svg cmake config
- Remove UiTools/Sensors from Qt6 find_package
- Blocked: KF6Svg requires KF6Config.cmake component registration
2026-05-04 16:42:19 +01:00
vasilito f5d71b05db plasma-framework: add BLAKE3 hash, kwin cmake fixes (WIP)
- BLAKE3 hash for plasma-framework v6.10.0 tarball
- KWin recipe: remove UiTools/Sensors/KF6::Svg from cmake
- KWin recipe: stub Qt6Plugin targets, QmlPlugins cleanup
- Blocked: Qt6Plugin cmake host-path issue requires deeper qtbase fix
2026-05-04 16:27:58 +01:00
vasilito 07c6e422c1 feat: comprehensive scheduler, ACPI, driver, and cpufreqd improvements
Scheduler: LAPIC timer calibration, TSC-deadline mode, work-stealing
load balancer, RT scheduling class, per-CPU nr_running counter.
Direct tick routing via vector 48.

ACPI: S3/S4 sleep states with full AML sequence (_PTS/_GTS/_BFS/_WAK),
NVS save/restore, EC driver hardening, panic-grade behavior removed.

Drivers: 5 driver mains at zero unwrap, 12 new modules across storage,
network, and audio subsystems. AHCI NCQ/PM/TRIM, e1000 ITR/checksum/TSO,
rtl8169 PHY config, HDA codec/jack detection.

cpufreqd: Replaced 26-line stub with 5-governor implementation including
ACPI P-state reading, MSR control, thermal throttle, and error suppression.
thermald: Fan control module with speed curves and emergency mode.

Docs: IMPLEMENTATION-MASTER-PLAN.md, CPU-DMA-IRQ-MSI-SCHEDULER-FIX-PLAN.md.
30 stale docs archived. 3 superseded plans archived.

Patches: P5-named-semaphores (relibc), P6-driver fixes (base),
P7-scheduler (kernel), P6-cpufreqd (local).
2026-05-04 16:08:58 +01:00
vasilito fab5120f87 kwin: cmake cleanup of host-path Qt6Plugin targets (incomplete)
- Delete QmlPlugins dirs and stub PluginTargets files
- Blocked: Qt6Plugin cmake files reference host paths from QT_HOST_PATH
- Needs qtbase recipe cmake config regeneration for cross-build sysroot
2026-05-04 16:04:00 +01:00
vasilito 30e36e53ec feat: kirigami builds (QML gate cleared)
- QNetworkReply stub header for Redox cross-build
- GuiPrivate + Network in find_package
- QElapsedTimer include fix
- networkAccessManager null stub in icon.cpp
- Primitives target links Qt6::Network for headers
2026-05-04 15:29:00 +01:00
vasilito 15d77b6254 kirigami: fix Qt6::GuiPrivate cmake target, QElapsedTimer include
- Add GuiPrivate to Qt6 find_package in top-level CMakeLists.txt
- Add missing QElapsedTimer include in toolbarlayout.cpp
- Add network stub infrastructure in recipe (incomplete, Qt6Network
  cross-compilation still needed for full build)
2026-05-04 14:49:07 +01:00
vasilito 4e439faae5 docs: add authoritative master implementation plan 2026-05-04 14:45:21 +01:00
vasilito 50af2023f6 fix: cpufreqd MSR spam, udev-shim PCI spam, scheme throttle, keymaps dir
- cpufreqd: suppress MSR errors after 1 failure (was 10)
- udev-shim: demote PCI scan failures from WARN to DEBUG
- accessibility/ime/keymapd: throttle EBADF loop with 100ms sleep
- config: create /etc/keymaps directory for keymapd
2026-05-04 14:28:19 +01:00
vasilito 8b872979ef fix: udev-shim panic, sessiond duplicate, scheme Bad-fd handling
- udev-shim: replace .expect() with graceful errors (no more panic on Broken pipe)
- P4-initfs: remove duplicate sessiond (conflicted with config)
- accessibility/ime/keymapd: break instead of exit(1) on EBADF
- P6 driver patches rebased
- Docs: archive old reports, add implementation master plan
2026-05-04 14:04:03 +01:00
vasilito ce0ac10b6d chore: sync all pending changes — kirigami platform headers, cookbook fix, docs, patches
Kirigami: remove stub .cpp, add Qt platform integration headers for
QML gate. Matches KDE src/pattern for direct header-only builds.

Cookbook: add --no-backup-if-mismatch to patch invocation (fetch.rs).

Kernel: consolidate patch chain, add debug-scheme-serial-fix.

Docs: archive old audit reports, add CHANGELOG and hardware validation
matrix. Update AGENTS.md with Linux reference source policy.

Scripts: add test-network-qemu.sh, test-storage-qemu.sh.

.gitignore: add local/reference/ exclusion.
2026-05-04 11:57:48 +01:00
vasilito 11993af01f fix: rebase base patches, commit recipe drift, add relibc rlimit/sysconf
Base: fix P6-driver-new-modules.patch (ed format -> unified diff) for new
driver modules (ncq, itr, phy). P6-driver-main-fixes.patch now applies with
offset on current upstream source.

Relibc: remove stale P5-named-semaphores (upstream has stubs), add
P10-stack-size-8mb and P11-getrlimit-getrusage (per-process rlimit table,
sysconf integration, getdtablesize fix, null-pointer safety).

Kernel: consolidate 29 individual patches into single redbear-consolidated.patch.

Userutils: P5-redbear-branding replaces P4-login-rate-limit.

Recipe.toml changes now committed so they survive source resets.
2026-05-04 11:49:15 +01:00
vasilito cfd5d30f74 fix: handle PS/2 mouse RESEND (0xFE) response during init
MouseTx::handle() treated 0xFE (PS/2 RESEND) as an unknown response,
causing mouse init to fail on hardware where the mouse requests a
resend during the reset/command exchange. Now resends the current
command byte when the mouse returns 0xFE, matching the PS/2 protocol.
2026-05-04 00:58:15 +01:00
vasilito bbd0bd0ffd fix: GPT partition offset parsing in bootloader + remove invalid respawn field
Bootloader hardcoded RedoxFS partition offset at 2 MiB, which fails when
efi_partition_size > 1 (redbear-full, redbear-grub use 16 MiB, placing
RedoxFS at LBA 34816 = 17 MiB). Added GPT partition table parser that
scans for Linux filesystem GUID (0FC63DAF) to find the actual offset.

Also removed invalid 'respawn = true' from 31_debug_console.service in
redbear-full.toml — init's service format does not support this field.

Verified: all three ISOs boot in QEMU UEFI and reach login prompt.
2026-05-04 00:46:48 +01:00
vasilito b9874d0941 feat: USB storage read/write proof + full Red Bear OS tree sync
Add redbear-usb-storage-check in-guest binary that validates USB mass
storage read and write I/O: discovers /scheme/disk/ devices, writes a
test pattern to sector 2048, reads it back, verifies match, restores
original content. Updates test-usb-storage-qemu.sh with write-proof
verification step.

Includes all accumulated Red Bear OS work: kernel patches, relibc
patches, driver infrastructure, DRM/GPU, KDE recipes, firmware,
validation tooling, build system hardening, and documentation.
2026-05-03 23:03:24 +01:00
vasilito 2e764746e7 feat: build system hardening — collision detection, validation gates, init path enforcement
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.
2026-05-03 22:25:22 +01:00
vasilito 907d447369 fix: remove [service] sections from .target init files in P4 patch
The init system parser (serde deny_unknown_fields) rejects [service]
sections in .target files. The P4-initfs-dbus-services patch was
creating 05_boot_essential.target and 12_boot_late.target with a
no-op [service] section (cmd=/usr/bin/true). Removed those sections
so targets only contain [unit].

This eliminates "unknown field service, expected unit" init warnings
that could prevent proper service dependency resolution.
2026-05-03 18:31:38 +01:00
vasilito 3a3a4df4dc fix: polkit builds without zbus header API + remove broken dbus patch 2026-05-03 17:13:25 +01:00
vasilito c23f966a56 docs: update polkit recipe TODO to reflect real implementation 2026-05-03 16:42:18 +01:00
vasilito 2e0ccf079e fix: polkit P5 integration — update recipe TODO, add init.d service
Oracle review found 3 gaps. All fixed:
1. Recipe #TODO updated from 'Always-permit stub' to 'Real UID-based policy'
2. init.d/20_polkit.service created
3. redbear-full.toml already has 14_redbear-polkit via [[files]] — verified
2026-05-03 16:40:26 +01:00
vasilito e6923f5c4d feat: real polkit authorization (replaces permit-all stub)
P5: redbear-polkit now enforces real authorization:
- is_authorized(uid, action_id) checks UID-based policy
- uid=0 (root) always authorized
- Other users checked against /etc/polkit-1/policy.toml
- Default: deny for unknown actions (fail-closed)
- Backend name changed from 'redbear-permit-all' to 'redbear-uid-policy'
- Default policy grants power/network/storage to root+user(1000)
2026-05-03 16:37:16 +01:00
vasilito 13ac42b218 docs: final stale doc cleanup — 22 archived, 18 active
Archived: IOMMU-SPEC, KERNEL-IPC, KERNEL-SCHEDULER, PROFILE-MATRIX,
QUIRKS-IMPROVEMENT, RELIBC-IPC, repo-governance, SCHEDULER-REVIEW,
SCRIPT-BEHAVIOR, USB-VALIDATION, XHCID-DEVICE-IMPROVEMENT.

Active: all implementation plans + 3 audits + governance docs.
2026-05-03 16:26:13 +01:00
vasilito a9e2c77296 feat: fbcond scrollback with scheme access (accessible via /scheme/fbcon/N/scrollback)
P3-3: fbcond scrollback is now fully functional:
- text.rs: 1000-line ring buffer captures all console output
- scheme.rs: new Scrollback handle type, path/N/scrollback open
- main.rs: Scrollback match arm in event loop
- Users can read scrollback via:
  cat /scheme/fbcon/2/scrollback

19/19 patches. base + base-initfs build.
2026-05-03 16:09:04 +01:00
vasilito c9bf8a1efa fix: thermal daemon workspace integration (19 patches)
Fixed common dependency path (../../common → ../common).
Added workspace member entry for drivers/thermald.
thermald now builds as part of base recipe.

19/19 patches. base + base-initfs build.
2026-05-03 16:00:59 +01:00
vasilito 764dadd78e feat: ACPI S3 suspend-to-RAM + battery status queries (18 patches)
P3-4: ACPI S3 sleep — suspend_to_ram() method reads _S3 AML,
writes PM1a_CNT with SLEEP_EN + SLP_TYPa. Gated to x86/x86_64.
Applies after shutdown hardening for correct context.

P3-6: ACPI battery — read_battery_status() queries _BST,
read_battery_info() queries _BIF. Returns capacity/voltage data.

18/18 patches. base + base-initfs build.
2026-05-03 15:44:33 +01:00
vasilito 010d96a4b4 feat: P3 fbcond scrollback + thermal daemon (17 patches total)
P3-3: fbcond scrollback — 1000-line ring buffer captures
text output, exposed via read_scrollback()

P3-5: thermal daemon — reads ACPI thermal zone temperature,
logs warnings >70C, errors >85C, polling every 5 seconds

P3-4/P3-6: ACPI S3 sleep + battery stubs created.
acpi-s3-sleep.patch needs post-hardening context fix.
Battery reading requires AML interpreter enhancement.

17/17 patches apply. base + base-initfs build.
2026-05-03 15:39:59 +01:00
vasilito 5cc4e13f09 wip: fbcond scrollback patch + thermal daemon source (P3)
P3-3: fbcond scrollback — captures last 1000 lines of text output
in ring buffer, exposes via read_scrollback(). Patch created but
needs line number adjustment for clean application.

P3-5: thermal daemon source created at drivers/thermald/. Reads
ACPI thermal zone temperature, logs warnings >65°C, errors >80°C.
Needs Cargo.toml workspace integration and recipe.toml BINS entry.

Part of COMPREHENSIVE-FIX-PLAN-FINAL P3 implementation.
2026-05-03 15:29:09 +01:00
vasilito 2736b33202 wip: D-Bus root user uid fix (patch created, needs tar strip fix)
Changed <policy user="root"> to <policy user="0"> in D-Bus
system.conf.in to avoid getpwnam lookup failures on Redox.

Patch written but does not apply yet — tar source extraction
puts files under dbus-1.16.2/ which requires strip=2 or different
path prefix. Left as documented work-in-progress.

D-Bus daemon runs despite cosmetic user lookup warnings.
2026-05-03 15:24:52 +01:00
vasilito 526ab376fd fix: restore working D-Bus patch (37 services confirmed in QEMU)
D-Bus daemon, sessiond, and seatd all running on redbear-full.
User lookup warnings are pre-existing Redox D-Bus config issue
(does not affect functionality).
2026-05-03 14:56:06 +01:00
vasilito 79667c9697 feat: D-Bus + sessiond services wired into init.d
Added boot target hierarchy (boot_essential → boot_late) and
D-Bus services directly to base recipe init.d:
- 12_dbus.service: dbus-daemon --system
- 13_sessiond.service: redbear-sessiond (org.freedesktop.login1)
- 13_seatd.service: seatd seat management

D-Bus daemon confirmed running in QEMU boot. User lookup
warning (unknown username root) is a pre-existing Redox
D-Bus configuration issue.
2026-05-03 14:37:03 +01:00
vasilito 2e4c09a6b6 fix: bootloader UEFI alloc panic + pkgar staging fallback
Bootloader: alloc_zeroed_page_aligned no longer panics on OVMF
AllocatePages failure. Returns null on error.

Cookbook: pkgar falls back to repo/ dir when target pkgar missing.
Resolves KDE build chain failure.

redbear-full: builds 4.0GB image+ISO, boots without crash.
2026-05-03 14:23:54 +01:00
vasilito a4e18e242a fix: getty services use numeric args for /scheme/fbcon/ paths
getty converts numeric args to /scheme/fbcon/{N} paths.
Non-numeric args (like ttyS0) are treated as literal paths
which don't exist in Redox. Changed to:
- 29_activate_console: inputd -A 2
- 30_console: getty 2 → /scheme/fbcon/2 (VT2 login)
- 31_debug_console: getty 3 → /scheme/fbcon/3 (VT3 debug)

Serial console (ttyS0) has no standard scheme path in Redox.
Login prompt is on the framebuffer console (requires graphical QEMU
or VNC to view).
2026-05-03 11:50:55 +01:00
vasilito d319701c5a fix: add serial getty and console activation services to init.d
Boot process now includes:
- 25_serial_getty.service: getty on serial console (visible in QEMU -nographic)
- 29_activate_console.service: inputd -A 2 (activate VT2)
- 30_console.service: getty on VT2 (framebuffer console)

Fixed hunk counts (7→8, 8→9) for correct patch application.
Services use 'oneshot_async' type for fire-and-forget startup.

ZSH is the default shell for all user accounts (base.toml, mini, full, greeter).
2026-05-03 11:33:56 +01:00
vasilito 466b68a643 docs: comprehensive fix plan (final) — KDE build chain, graphical boot, remaining gaps
Consolidated from all audits, QEMU testing, and implementation sessions.

P0: KDE build chain broken — libwayland pkgar staging race in cookbook.
     Fix requires investigation of src/cook/package.rs pkgar path lookup.
P1: Graphical boot testing — dbus-daemon, sessiond, compositor, greeter.
P2: 7 remaining gaps — ion shell, shadow support, polkit, scrollback.

Includes cookbook tool investigation areas and total effort estimate
(~12 days per developer).
2026-05-03 10:46:19 +01:00
vasilito 3f957ba6c2 docs: graphical boot assessment — redbear-full KDE build chain broken
libwayland stage.pkgar missing when kf6-kitemviews builds during
make live CONFIG_NAME=redbear-full. This is a cookbook pkgar
staging race condition, not a code error.

redbear-mini (text-only) boots fully in QEMU with colored init
output, 25+ services, and login prompt on framebuffer console.
2026-05-03 10:44:05 +01:00
vasilito 528115b33a fix: logd persistent logging now uses Option<File>, doesn't panic at initfs time
At initfs time, /var/log/ doesn't exist (rootfs not yet mounted).
Changed persistent_log from File to Option<File> with .ok() instead
of .unwrap_or_else(|| panic!()). If the file can't be opened, logging
continues without persistence — no crash.

QEMU verification: system boots through initfs→rootfs→switch_root→userland.
Colored init output visible. 25+ services start successfully.
2026-05-03 10:16:48 +01:00
vasilito 8237bc45e8 feat: login rate limiting, network drivers in initfs
P2-2: Login rate limiting (userutils/login.rs):
- Tracks consecutive failures, resets on success
- 3+ failures: exponential delay up to 30 seconds
- Applies to both password and blank-password login paths

P2-3: Network stack in initfs (base-initfs + service files):
- Added e1000d, rtl8168d to base-initfs BINS
- 60_smolnetd.service: network stack in initfs
- 61_dhcpd.service: DHCP client in initfs
- Network available before switch_root

Part of COMPREHENSIVE-FIX-AND-IMPROVEMENT-PLAN Phases P2.
2026-05-03 09:50:59 +01:00
vasilito 2e313860f0 docs: comprehensive fix and improvement plan — consolidated P0-P4 roadmap
Merges findings from both boot audits into a single authoritative plan:
- 0. Current state (12 patches, 3 targets, completed phases)
- 1. Priority matrix (P0 blocking → P4 deferred)
- 2. P0 — 2 blocking issues (boot redbear-full, clean build verify)
- 3. P1 — 4 critical gaps (D-Bus runtime, ion job control, tab completion, DRM in boot)
- 4. P2 — 4 high priority (shadow support, rate limiting, network in initfs, polkit)
- 5. P3 — 6 medium priority (ion features, fbcond, ACPI sleep, thermal, battery)
- 6. P4 — 6 deferred items
- 7. Week-by-week implementation order with parallel opportunities
- 8. Acceptance gates (G1-G5)
- 9. Total effort: ~103h / ~13 days solo, ~1 week with 2 devs
2026-05-03 09:42:14 +01:00
vasilito e586a44be6 docs: second-pass boot audit (D-Bus honesty, shell quality, login), archive 4 stale docs
BOOT-PROCESS-SECOND-AUDIT-2026-05-03.md: deep dive into:
- D-Bus implementation honesty (15/19 login1 methods real, not stubs)
- ion shell quality matrix (vs bash/dash)
- Login prompt completeness (getty→login→ion chain)
- Per-subsystem hardware init status (storage/display/input/network/USB/audio/ACPI)
- Implementation plan Phases F1-F6

Archived 4 completed/deferred plans: GRUB, VFAT, USB-BOOT-INPUT, ZSH-PORTING
2026-05-03 09:37:09 +01:00
vasilito 39ce0115a5 fix: remove unused std::path::Path import from logd patch 2026-05-03 09:25:34 +01:00
vasilito 09f0f59d06 feat: add USB mass storage and DRM/KMS service files to initfs
Phase B1+B2 from BOOT-PROCESS-AUDIT:
- 45_usbscsid.service: USB mass storage driver in initfs (requires xhcid)
- 30_redox-drm.service: DRM/KMS display driver in initfs (requires hwd+pcid-spawner)
Both condition-architecture-gated to x86/x86_64.
2026-05-03 09:07:57 +01:00
vasilito 62b1fa408f feat: ACPI shutdown hardening with timeout, PM1b retry, and keyboard reset fallback
Phase A1 from BOOT-PROCESS-AUDIT. The ACPI shutdown path now:
- Validates PM1a port is non-zero before writing
- Waits 3 seconds for power-off, then retries with PM1b+SLEEP_EN
- Falls back to keyboard controller reset (0x64=0xFE) on failure
- Handles SLP_TYPb correctly
- Removes fragile Pio::new()+write() without validation
2026-05-03 09:05:31 +01:00
vasilito 1b1ef19f82 feat: persistent logging to logd with /var/log/system.log
logd now writes all log output to /var/log/system.log (5MB auto-rotation)
in addition to existing scheme listeners. Falls back to /tmp/logd-fallback.log
if /var/log is unavailable. Logs survive reboots for post-mortem analysis.
Part of Phase A2 (Boot Reliability) from BOOT-PROCESS-AUDIT-2026-05-03.
2026-05-03 08:57:53 +01:00
vasilito 1c7ce83173 docs: comprehensive boot process audit + archive stale plans
BOOT-PROCESS-AUDIT-2026-05-03.md: full daemon-by-daemon review
of boot sequence from power-on to login prompt. Covers:
- 25+ daemons assessed (critical path, input, display, hardware,
  storage, network, audio, UI, system services)
- Hardware initialization completeness matrix
- ion shell analysis (strengths/gaps vs bash/dash)
- Stale documentation inventory

Archived 5 superseded plans to local/docs/archived/:
- ACPI-I2C-HID, BOOT-PROCESS-IMPROVEMENT, DEVICE-INIT,
  GREETER-LOGIN-ANALYSIS, INTEL-HDA-IMPLEMENTATION

Improvement plan: 5 phases (boot reliability, drivers, UX,
documentation, security) across 6 weeks
2026-05-03 08:47:24 +01:00
vasilito 8cb90c97a5 chore: remove stale redox.patch.bak 2026-05-03 08:37:34 +01:00
vasilito 4434ae207f chore: remove redox.patch chunks and reassembly script (no longer needed) 2026-05-03 08:36:15 +01:00
vasilito c0587f9a2d refactor: deconsolidate redox.patch into individual patches
The 556MB monolithic redox.patch was impossible to manage, unreviewable,
blocked GitHub pushes, and could only grow. This commit:

- Moves all 64 absorbed patches from absorbed/ to active use in base/
- Removes the absorbed/ directory (consolidation history is now PATCH-HISTORY.md)
- Removes the redox.patch symlink from recipes/core/base/
- Fixes all recipe symlinks to point to active patches (not absorbed/)
- Patches are now individually wired, reviewable, and independently rebasable

The redox.patch mega-file is no longer needed — individual patches
are applied directly from the recipe.toml patches list.
2026-05-03 08:35:26 +01:00
vasilito 7726a3da36 fix: split redox.patch into 90MB chunks for GitHub push limit
redox.patch is 556MB, exceeding GitHub's 100MB file size limit.
Split into 7 chunks of ~90MB each under local/patches/base/redox-patch-chunks/.
Reassembly script: local/patches/base/reassemble-redox-patch.sh.
Added redox.patch to .gitignore to prevent future push failures.
2026-05-03 08:26:56 +01:00