Enforce that every source-tree edit must be mirrored to local/patches/
and wired into recipe.toml in the same session. Apply the policy
retroactively to userutils res/issue and res/motd (Redox → Red Bear).
relibc select_epoll() forced timeout=0 when any FD doesn't support epoll
(e.g. TTY on Redox), causing busy-loop. Poll with 100ms interval instead.
Also add stdint.h to signal/cbindgen.toml sys_includes so signalfd_siginfo
struct types (uint32_t, int32_t) resolve without build errors.
Upstream relibc netdb DNS lookup has two bugs exposed by Rust 2024 edition
strict unsafe handling:
1. packet_data is moved into Box::via into_boxed_slice() but the retry
loop tries to call packet_data.as_ptr() on the moved value. Use the
already-created raw pointer packet_data_ptr instead.
2. close() is a safe function in relibc, so wrapping it in unsafe{}
triggers unused-unsafe (promoted to error by -D unused-unsafe). Remove
the unnecessary unsafe blocks around close() calls.
Patch carries in local/patches/relibc/P3-netdb-lookup-retry-fix.patch and
is applied via the relibc recipe patches list.
The previous fire-and-forget fix passed hwd's own INIT_NOTIFY fd to pcid,
but that fd had CLOEXEC set (by daemon::Daemon::new), so pcid inherited
a closed fd and panicked in PipeWriter::from_raw_fd.
Fix: create a new pipe in hwd before spawning pcid. Pass the write end
as INIT_NOTIFY with CLOEXEC cleared (via pre_exec). Drop the read end
immediately — pcid's daemon.ready() will get EPIPE, which is silently
ignored by the daemon library. This gives pcid a valid fd while still
being fully non-blocking from hwd's perspective.
Root cause: hwd used daemon::Daemon::spawn(pcid) which blocks waiting
for pcid's readiness signal. But pcid only signals readiness after
completing full PCI enumeration. On real Intel hardware with complex
ACPI tables, enumeration can hang (unresponsive device, AML deadlock),
causing pcid to never signal readiness, hwd to never signal its own
readiness, and init to stall the entire initfs phase.
Fix: replace blocking daemon::Daemon::spawn with std::process::Command::spawn
(fire-and-forget). hwd signals its own readiness immediately, allowing
init to continue the initfs phase regardless of pcid's enumeration progress.
pcid runs independently and registers the pci scheme when ready.
Also: promote pcid enumeration completion log from debug to info level.
Suppress EPIPE in SchemeDaemon::ready_with_fd() to eliminate broken pipe
errors from gpiod, i2cd, ucsid at boot. Handle ENODEV gracefully in audiod
when /scheme/audiohw is absent. Both fixes verified: QEMU boots to login
prompt with zero non-fatal errors, patch applies cleanly on clean rebuild.
- IOAPIC: enable full IOAPIC initialization on AMD/Intel bare metal,
dual GSI 0/2 timer mapping for platform compatibility, NMI handler
uses raw COM1 PIO writes to avoid mutex deadlock
- HPET: counter validation, graceful fallback to PIT when HPET missing
- PS/2: fix 0xFE RESEND handling in all MouseState variants, add
controller flush/self-test retry/aux port test from Linux 7.0
- ACPI: defer AML evaluation to avoid blocking initfs driver spawn
- VT chain: remove duplicate rootfs service files (inputd, vesad,
fbcond, getty) that were already handled by initfs phase 1 and the
legacy 30_console script from minimal.toml
- QEMU verified: boots to login prompt, 20 rootfs units (was 26),
single login prompt (was double), only 1 expected error (wifictl)
215 fixes across 33 Rust source files replacing unwrap/expect/panic
with graceful error handling in init, all boot-critical daemons,
and the six graphics driver packages. Fixes inverted scheduler
conditions_met() logic that prevented rootfs from mounting.
Both P2 patches were stale — generated against an older upstream HEAD whose
context lines shifted after redox.patch modified the same files. Regenerated
from scratch against the current upstream commit so they apply cleanly.
P2-boot-runtime-fixes: hwd I2C candidate logging, pcid-spawner initfs detach,
pcid sendfd PCI fd handoff (319 lines)
P2-acpi-i2c-resources: new acpi-resource shared decoder crate (688 lines),
acpid /scheme/acpi/resources/ endpoint, resources.rs re-export shim,
sleep.rs restore (1265 lines)
- Add /scheme/acpi/resources/<device> endpoint to acpid for _CRS evaluation
- Extract acpi-resource shared crate (917 lines) with ResourceDescriptor types
- Eliminate duplicate type definitions in 5 consumers (i2c-hidd, dw-acpi-i2cd,
intel-thc-hidd, i2c-gpio-expanderd, ucsid)
- Add P2-acpi-i2c-resources.patch (48KB) with all source changes
- Update ACPI-I2C-HID-IMPLEMENTATION-PLAN.md to reflect actual codebase state
Consolidate the active desktop path around redbear-full while landing the greeter/session stack and the runtime fixes needed to keep Wayland and KWin bring-up moving forward.
Keep the relibc compatibility work in tracked local patch carriers and align the recipe with the full durable patch stack so clean reapply and rebuild paths stay reproducible.
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Keep the relibc overlay consistent so the generated stdlib header preserves C linkage for strtold and the existing toolchain can still satisfy stale C++ callers while it is refreshed.
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Regenerate aggregate base patch to include ihdgd device ID additions
for modern Intel integrated GPUs (12th-14th Gen, Core Ultra, Arrow Lake).
This allows pcid-spawner to match and load ihdgd on current Intel laptops.
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Create grub-install and grub-mkconfig scripts in local/scripts/ that
match GNU GRUB CLI conventions for users migrating from Linux. Support
standard switches: --target, --efi-directory, --bootloader-id,
--removable, -o/--output, --verbose, --help, --version. Unsupported
Linux options are accepted and ignored for script compatibility.
Also fix ESP FAT type: force FAT32 in both with_whole_disk and
with_whole_disk_ext4 (UEFI spec requires FAT32, fatfs auto-selects
FAT16 for partitions under 32 MiB). Fix --write-bootloader to export
GRUB EFI in GRUB mode. Fix CLI example in GRUB plan. Update AGENTS.md
and GRUB-INTEGRATION-PLAN.md with Linux-compatible CLI docs.
- Add grub package to redbear-full-grub.toml so make all works from
a clean tree (the installer needs grub.efi before it runs)
- Fix stat -f%z (macOS-only) to stat -c%s (Linux) in GRUB recipe
- Normalize bootloader config value to lowercase in install_inner so
bootloader = "GRUB" from config files is accepted
- Add bad-cluster marker (0x0FFFFFF7) check in fat_tool.py
_next_cluster to prevent potential infinite loops on degraded media
- Fix file handle leak in fat_tool.py if _read_bpb raises
- Clean up temp directory in fetch_bootloaders on error
- Update AGENTS.md with GRUB recipe and installer documentation
- Update GRUB plan with clean-build prerequisite note
When bootloader = "grub" is set, the installer now:
- Rejects unknown bootloader values (only "redox" and "grub" accepted)
- Enforces minimum efi_partition_size of 8 MiB for GRUB mode
- Fails with a clear error if grub.efi or grub.cfg are missing from
the GRUB package output instead of silently falling back
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Adds --bootloader and --filesystem to installer help text. Fixes
fstools host build by symlinking local/ directory alongside recipes/
so the ext4-blockdev path dependency resolves correctly.
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Extends the installer to write a GRUB chainload ESP layout when
bootloader = "grub" is set in config. Changes GeneralConfig, DiskOption,
fetch_bootloaders, with_whole_disk, with_whole_disk_ext4, and both CLI
binaries. When GRUB mode is active, the ESP contains GRUB as primary
(BOOTX64.EFI), grub.cfg, and the Redox bootloader as chainload target
(EFI/REDBEAR/redbear.efi).
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
5-second countdown with any-key cancel into manual mode selection. Defaults to 1280x720, falls back to EDID best resolution. UEFI only via get_key_timeout polling with BootServices.Stall.
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Rebuild base/acpid patch as comprehensive unified diff combining: DMAR iterator fix, FADT shutdown via PM1a/PM1b CNT_BLK with S5 sleep types from _S5 AML, ACPI reset register reboot with keyboard controller fallback (port 0x64, 0xFE), and power methods (_PS0/_PS3/_PPC). GenericAddress now supports memory-mapped and I/O port writes. Reboot wired into main.rs event loop with reboot_requested flag. All ivrs/mcfg stub references removed. Validated with git apply --check against upstream base source.
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>