Commit Graph

9 Commits

Author SHA1 Message Date
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 8db3c7731a Update installer patch for GRUB bootloader and ext4 filesystem support
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-18 00:48:58 +01:00
vasilito 3bed450071 Add Linux-compatible grub-install and grub-mkconfig wrappers
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.
2026-04-17 22:47:01 +01:00
vasilito 1b785fea6a Fix GRUB reassessment findings: clean-build gap, validation, robustness
- 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
2026-04-17 22:21:08 +01:00
vasilito 33d8a4deaa Regenerate installer patch with GRUB quality fixes 2026-04-17 22:03:27 +01:00
vasilito c79c536a6c Add fail-hard validation for GRUB bootloader mode in installer
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>
2026-04-17 21:36:44 +01:00
vasilito 7e7647c4b8 Update installer patch with GRUB help text and fix fstools build
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>
2026-04-17 21:24:01 +01:00
vasilito 9a58b786ce Add installer-native GRUB bootloader support
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>
2026-04-17 21:14:36 +01:00
vasilito 50b731f1b7 Red Bear OS — microkernel OS in Rust, based on Redox
Derivative of Redox OS (https://www.redox-os.org) adding:
- AMD GPU driver (amdgpu) via LinuxKPI compat layer
- ext4 filesystem support (ext4d scheme daemon)
- ACPI fixes for AMD bare metal (x2APIC, DMAR, IVRS, MCFG)
- Custom branding (hostname, os-release, boot identity)

Build system is full upstream Redox with RBOS overlay in local/.
Patches for kernel, base, and relibc are symlinked from local/patches/
and protected from make clean/distclean. Custom recipes live in
local/recipes/ with symlinks into the recipes/ search path.

Build:  make all CONFIG_NAME=redbear-full
Sync:   ./local/scripts/sync-upstream.sh
2026-04-12 19:05:00 +01:00