Ports two pieces of menu work that were stranded on the abandoned
`bootloader-detached-pending` lineage (a divergent full-history upstream-1.0.0
rebase that was never merged into this build branch and never pushed):
- 3d41cf7 "categorized resolution menu": replaces the flat area-sorted grid
selector with a categorized list (4K / 2.5K / FullHD / HD / 1024x768) plus
a "More resolutions" sub-menu (select_obscure) for uncommon modes.
- 9a12ee2 "fix garbled text — pad all console lines to consistent width":
the UEFI text console does not clear old characters when a shorter line
overwrites a longer one at the same position, so menu/countdown/live-mode
lines are padded to fixed widths ({:<50}/{:<70}/{:<40}) and fully
overwritten each frame.
Adapted to this branch's select_mode signature and merged with this branch's
best_resolution() fallback: the initial highlight prefers 1280x720, then the
display's EDID-preferred mode, then the largest available — so hardware native
resolution is not lost by the categorized default.
Verified: cargo check passes for both x86_64-unknown-uefi (--bin) and
x86-unknown-none (--lib). Supersedes the menu work on
bootloader-detached-pending, which is being removed.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Re-adds the TextColor enum + Os::set_text_color (no-op default, VGA fg
override for BIOS, EFI SetAttribute for UEFI) and colors the default-resolution
message green + the autoboot countdown yellow. The countdown + default
1280x720 were already present; only the color mechanism was lost when the
bootloader was rebased to upstream 1.0.0 (the color commits stayed on
bootloader-detached-pending).
Fixes autoboot countdown blocking forever because the default trait impl
calls blocking get_key(). Uses non-destructive key check (INT 16h AH=01h)
with EDX sentinel to detect key availability without EFLAGS access, and
INT 15h AH=86h for 10ms polling intervals.
Bootloader fork was the only Cat 2 fork that didn't get its
+rb suffix updated during the 0.3.0->0.3.1 sync-versions run.
Manual fix applied. Also regenerated its Cargo.lock to match
the new version.
Apply the full Red Bear bootloader patch set:
- P0-gpt-partition-offset
- fix-uefi-alloc-panic
- redox.patch (Makefile/mk and misc fixes)
- P1-bootloader-timeout-and-default-resolution
- P2-live-preload-guard
- P3-uefi-live-image-safe-read
- P4-live-large-iso-boot
- P5-live-preload-cap-1gib
Also switch redoxfs dependency to the local fork path.
Semver pre-release suffix (-rb0.2.5) breaks Cargo's [patch.crates-io]
matching for transitive deps. Build metadata (+rb0.2.5) is semver-
compatible: ^0.9.0 matches 0.9.0+rb0.2.5, patch redirection works,
and the Red Bear suffix is still visible in the version string.
Per local/AGENTS.md \xC2\xA7 "Category 2 - Local forks of upstream packages",
all Cat 2 forks must use the `<upstream-tag>-rb<N>` version convention. The
`-rb1` suffix is a Cargo pre-release identifier that prevents upstream
`<upstream-tag>` from silently substituting for this fork in transitive
dependency resolution.
- The base tag (e.g. 0.9.0 for redox_syscall) tracks upstream
unchanged.
- The `rb1` part records that one Red Bear patch round has been
applied on top of the upstream tag.
This is the initial policy enforcement pass. The branch is
considered unfrozen at this point; once a freeze is declared, future
`-rbN` increments will land on a frozen `0.X.Y` branch per
local/AGENTS.md.
Rust nightly requires -Zunstable-options for custom target JSON specs
(such as x86-unknown-none.json). Without it, the build fails with:
error: error loading target specification: custom targets are
unstable and require `-Zunstable-options`
UEFI already uses the built-in x86_64-unknown-uefi target, so it
didn't need this flag. The kernel recipe already has this fix; the
bootloader BIOS Makefile was missing it.