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>
Add MadtLocalApicNmi (type 0x4), MadtLapicAddressOverride (type 0x5), and MadtLocalX2ApicNmi (type 0xA) structs with compile-time size assertions. Add enum variants and iterator cases for all three. Implement set_lvt_nmi() on LocalApic for both xAPIC (LINT0/LINT1 at offsets 0x350/0x360) and x2APIC (MSRs 0x835/0x836) with NMI delivery mode, polarity, and trigger mode from MADT flags. Process NMI entries in x86.rs MADT loop to configure per-CPU LVT NMI registers. Parse and log LAPIC address override (64-bit) for future use.
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Add Sdt::validate_checksum() method that sums all bytes in the table and verifies the result is zero per ACPI spec. Call it during ACPI table iteration in init() — warn on invalid checksum but do not skip the table, to avoid breaking boot on firmware with slightly incorrect checksums.
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
The base patch referenced ivrs and mcfg modules that don't exist in the source tree, causing build failures. Removed the module declarations, imports, and init calls. MCFG is already handled by pcid (the PCI daemon). IVRS (AMD IOMMU) needs real implementation, not a stub. DMAR iterator fix and Dmar::init() call preserved.
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
The critical fix: local_apic.rs id() now returns (read(0x20) >> 24) for xAPIC mode instead of the raw register value. This was causing wrong APIC IDs on Intel, leading to misrouted IPIs, missed TLB shootdowns, and the page fault during context switch at switch.rs:317.
Also adds:
- Named ICR constants (ICR_INIT_ASSERT, ICR_STARTUP) with bit-layout comments
- Comment documenting x2APIC timeout limitation (cpu_id allocated before timeout check)
- All existing changes preserved (x2APIC MADT type 9, cpuid split, memory alignment, RSDP checksum, ICR pending wait, MADT entry length guard)
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
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