Commit Graph

17 Commits

Author SHA1 Message Date
Red Bear OS 3fd4403ecb bootloader: framed centered wordmark, progress bars, color polish
Beautification pass on the text UI (all pure ASCII so it renders identically on
the UEFI Unicode console and the VGA CP437 console, which truncates chars to
bytes):

  - Os::text_columns(): new trait method to query the real console width.
    BIOS returns the VGA width; UEFI queries SimpleTextOutput QueryMode for the
    current mode's columns (both fall back to 80). Enables true centering.
  - draw_header now draws a full-width frame around a centered figlet "RedBear
    OS" wordmark, with a centered version/platform subtitle, in brand red/cyan.
    Falls back to a plain centered name on consoles narrower than the wordmark.
  - Loading progress lines (live / kernel / initfs) gain a fixed-width ASCII
    progress bar next to the MiB counters, and turn green on completion.
  - A centered green "Booting RedBear OS..." closes the loading screen.

Verified: cargo check passes for x86_64-unknown-uefi (--bin) and
x86-unknown-none (--lib).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-25 18:46:31 +09:00
Red Bear OS d7d719775b bootloader: clean per-phase screens + Red Bear branding
Comprehensive fix for overlapping bootloader text. The loader ran three phases
(filesystem, resolution menu, loading) that all wrote to one never-fully-cleared
screen at absolute cursor positions, so they overprinted each other. Most
visibly, the loading phase began printing "live: .../..." exactly where the menu
had left the cursor (the "Autobooting" row), so "live" landed on top of the
countdown. clear_text() also only ran for the 2nd+ video output, so on a single
display the menu was drawn under the header.

Introduce draw_header(os): clear the screen and draw a consistent, branded
"Red Bear OS" title + version/platform + separator. Call it at the start of each
phase so every screen is clean and no phase overprints another:
  - Phase 1 (filesystem / password prompt)
  - Phase 2 (resolution menu, per video output)
  - Phase 3 (kernel/initfs load + optional live preload)

Also:
  - Rebrand user-facing strings: "Redox OS Bootloader" -> "Red Bear OS", and
    the env editor title -> "Red Bear OS Boot Environment Editor". (RedoxFS /
    the RedoxFtw initfs magic are left as-is: those are real format names.)
  - Drop the raw "Hardware descriptor: {:x?}" Debug dump from the UI.
  - Indent all loading-phase progress lines (RedoxFS/live/kernel/initfs) to
    match the header for a consistent layout.

Verified: cargo check passes for x86_64-unknown-uefi (--bin) and
x86-unknown-none (--lib).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-25 18:35:09 +09:00
Red Bear OS 6407d28c26 bootloader: fix duplicate "Autobooting in X seconds" line
The countdown row was derived as list_y - 4, which landed one row too low
(on the "Use Up/Down" line) instead of on the header line printed before the
loop. The in-loop countdown therefore rendered a second "Autobooting in X
seconds" copy directly below the static header, showing the phrase twice.

Capture the header's row with get_text_position() right before printing it, so
the loop updates that exact line in place — one countdown line, no stale copy.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-25 18:25:55 +09:00
Red Bear OS f159a47f1c bootloader: wire categorized resolution menu + UEFI garbled-text fix
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>
2026-07-25 18:15:31 +09:00
Red Bear OS 092784c552 bootloader: restore color boot output (lost on 1.0.0 rebase)
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).
2026-07-16 22:04:18 +09:00
Red Bear OS 6e11964121 uefi: demote expected no-GPT and no-EDID fallbacks from warn to debug 2026-07-16 07:30:29 +09:00
Red Bear OS c78c3a63c0 BIOS: implement get_key_timeout with INT 16h/01h polling + INT 15h/86h delay
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.
2026-07-12 05:02:08 +03:00
Red Bear OS 2f79630b0e Cargo.toml: 1.0.0+rb0.3.0 -> 1.0.0+rb0.3.1
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.
2026-07-12 01:20:43 +03:00
Red Bear OS 6b43b7f9c5 0.3.0: bump local fork lockfile versions to +rb0.3.0 2026-07-06 20:41:30 +03:00
vasilito 62fa9f9a1b 0.3.0: bump version suffix to +rb0.3.0 2026-07-06 19:47:08 +03:00
vasilito ea5b2418e6 redbear: migrate bootloader patches into local fork
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.
2026-07-06 08:03:08 +03:00
Red Bear OS 6c3c312819 fix: use local path deps for redox_syscall 2026-07-05 23:54:34 +03:00
Red Bear OS e7bc6a56dc version: use +rb0.2.5 build metadata instead of -rb0.2.5 pre-release
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.
2026-07-05 09:16:12 +03:00
Red Bear OS db006c0b72 fork: add Red Bear author attribution to Cargo.toml 2026-07-05 08:48:16 +03:00
Red Bear OS 83a34a1515 fork: bump to -rb1 version suffix
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.
2026-07-04 10:07:31 +03:00
Red Bear OS 3cc7ed909c bios: add -Zunstable-options for custom JSON target spec
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.
2026-06-28 04:40:40 +03:00
Red Bear OS 89c68d0738 Red Bear OS bootloader baseline from 0.1.0 pre-patched archive 2026-06-27 09:21:43 +03:00