- archive-sources.sh: exports fully-patched source archives as
category-pkgname-vVERSION-patched.tar.gz with recipe.toml
- Integrated into build-redbear.sh (runs after every successful build)
- Versions extracted from: explicit rev=, tar URL, or git HEAD
- integrate-redbear.sh: added all missing local recipe symlinks
(breeze, kde-cli-tools, kdecoration, kirigami, plasma-*, wayland/*,
redbear-compositor, redbear-passwd, redox-drm, amdgpu, tests/*)
- 210 archives generated, 171 packages in manifest
- All 12 I2C/GPIO/UCSI drivers verified in base archive
- Add P0-bootstrap-workspace-fix.patch and P2-i2c-gpio-ucsi-drivers.patch
symlinks to integrate-redbear.sh (auto-created on every build)
- Update PATCH-GOVERNANCE.md with Apr 30 recovery: rebased P2 patch,
fixed PCI API (try_mem→map_bar, try_map_bar→map_bar), 12 drivers
- All daemon patches now durable: survive source refresh, make clean,
make distclean via recipe patches list + integrate script
Verified x86_64-unknown-redox cross-compilation:
redbear-hwutils, redbear-info, redbear-compositor all build and publish.
Host cargo check zero warnings. Target make r.* successful.
12 total commits. 7 master plan workstreams advanced.
test-posix-runtime.sh: unified POSIX runtime harness running all 6
relibc-phase1-tests C programs in guest/QEMU modes, exit-code-based
redbear-usb-check.rs: recreated after cancelled task cleanup —
full Phase-pattern checker with JSON output, xHCI/USB/HID/storage probes
Zero warnings, all scripts syntax-clean.
redbear-usb-check: rewritten from 99-line minimal checker to full
Phase-pattern validation (CheckResult/Report, JSON output, proper
cfg-gating). Checks xHCI controllers, USB device enumeration,
HID class detection, storage class detection.
test-usb-runtime.sh: guest + QEMU harness following Phase 1-5 pattern.
Zero warnings.
test-wifi-runtime.sh: runs redbear-phase5-wifi-check + wifi-link-check
in guest/QEMU modes, exit-code-based, following Phase 1-5 pattern
test-bt-runtime.sh: runs redbear-bluetooth-battery-check in
guest/QEMU modes, following same pattern
Hardware validation requires real BT controller + USB passthrough.
Packages/ is the canonical binary package repository for Red Bear OS.
Contains stage.pkgar copies of all built packages (91 files).
New scripts:
- local/scripts/sync-packages.sh: syncs built pkgar → Packages/
- make packages-sync: run sync
- make packages-list: list package count
Future: cache-auto will auto-sync to Packages/ after each build.
Red Bear is a fork/overlay on top of Redox. The upstream build
system wasn't designed for forks — it loses all cached stages on
make clean with no recovery path.
This commit adds a git-tracked build cache:
- local/cache/pkgar/{pkg}/stage.pkgar — per-package cache files
- cache-sync.sh: sync built packages → git-tracked cache
- cache-sync.sh --restore: restore cache → recipe targets
- cache-sync.sh --commit: sync + git commit
- Auto-restore before build, auto-sync after build
Cache survives: make clean, make distclean, git clone, upstream rebase.
Recovery from clean: seconds (restore from git) vs hours (full rebuild).
Adds comprehensive build cache snapshot and restore for overlay OS.
Problem: Upstream Redox build system is single-stream — make clean
destroys cached stage.pkgar files permanently. Build can't recover
without full from-scratch rebuild (2-4 hours).
Solution: Red Bear cache system provides:
- snapshot-cache.sh: Save all stage.pkgar to local/cache/
- restore-cache.sh: Restore from snapshot after make clean
- Auto-restore: Makefile auto-restores cache before build
- Essential cache: Pre-built caches for boot packages tracked in git
- Cookbook fixes: Missing deps trigger rebuild instead of crash
With cache restore, make clean recovery is measured in seconds,
not hours.
Gaps fixed in cookbook:
- modified_all_btree: missing dep → UNIX_EPOCH (rebuild trigger)
- sysroot install: missing dep → skip + rebuild
- apply-patches.sh: add signature-marker checks for build-system patches
to handle cases where reverse-check fails but patch is already applied
- test-baremetal.sh: auto-disable TUI when stdout is not a terminal;
pass CI=1 to make
- test-live-iso-qemu.sh: pass CI=1 via env to prevent repo cook panic
- scripts/run.sh: auto-disable TUI when stdout is not a terminal;
pass CI=1 to qemu launch
- repo.rs: improve TUI initialization error messages (raw mode + alternate
screen) and rustfmt cleanups
- config.rs: auto-detect TTY presence for TUI enablement; use is_terminal()
instead of relying solely on CI env var
Consolidate compile target naming (redbear-live, redbear-grub-live-full,
etc.), add config/redbear-grub-live-full.toml, make redbear-live-full-grub
a legacy alias, update build-iso.sh to support all GRUB live targets, and
sync AGENTS.md/README.md build command documentation.
fetch.rs: use full commit hash for deterministic checkout. recipe.rs:
refactor recipe handling for cleaner patch application. sync-upstream:
add dry-run mode and improve rebase error recovery.
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.
Fix BOOT_PATH logic in grub-install: non-removable installs now use
EFI/${BOOTLOADER_ID} per UEFI spec instead of always EFI/BOOT.
Add timeout validation to grub-mkconfig (must be non-negative integer).
Add sync() method to fat_tool.py and call os.fsync after cp_in to
ensure data reaches disk. Fix misleading block-device error message.
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
The symlink from recipes/wip/services/grub was using ../../../../local/
which goes above the repo root. Fixed to ../../../local/ which correctly
resolves from recipes/wip/services/ to local/recipes/core/grub.
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
install-grub.sh now searches both recipes/core/bootloader/target and
local/recipes/core/bootloader/target for the Redox bootloader artifact.
The WIP grub recipe (recipes/wip/services/grub) is now a full directory
symlink to local/recipes/core/grub instead of just recipe.toml, ensuring
COOKBOOK_RECIPE resolves to a directory that contains grub.cfg. This also
eliminates the duplicate recipe warning from the cookbook.
The GRUB recipe now fails hard (exit 1) if grub.cfg is missing instead of
just warning.
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Ensures recipes/core/grub and the WIP conflict redirect are created
by apply-patches.sh, so a fresh sync-upstream + apply-patches cycle
preserves the GRUB integration.
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
The script now reads the Redox bootloader from the cookbook's bootloader
package output instead of extracting it from the ESP. This makes it
idempotent — previously, rerunning after GRUB install would copy GRUB
itself into EFI/REDBEAR/redbear.efi because ESP's BOOTX64.EFI was GRUB.
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
fat_tool.py provides zero-dependency FAT32 manipulation (ls, mkdir,
cp-in, cp-out) using only Python stdlib struct/os. install-grub.sh uses
it to extract the existing Redox bootloader from ESP, install GRUB as
the primary boot manager, and set up the chainload configuration.
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>