Commit Graph

16 Commits

Author SHA1 Message Date
vasilito 89d1306c8d migrate: complete source ownership transition
- Create source symlinks for all 7 core components (kernel, relibc, base,
  bootloader, installer, redoxfs, userutils) pointing at local/sources/
- Create redoxfs and userutils fork repos from frozen 0.1.0 archives
- Fix relibc-tests recipes: replace patch commands with direct fork build
- Archive all 417 patch files to local/archived/patches-2026-06-migration/
- Full AGENTS.md rewrite: remove all 31 remaining stale patch references,
  update DURABILITY POLICY to describe git commit workflow, update WHERE TO
  LOOK table, fix build flow description, replace Recipe Patch Wiring section
  with Recipe Source Configuration
- Zero active patches = [...] arrays remain in any recipe.toml file
- All 13 remaining grep hits for 'patches' are TODO comments in WIP recipes
2026-05-29 22:42:42 +03:00
vasilito a23012cee0 migrate: remove patch system, adopt direct source ownership
BREAKING CHANGE: The patch-based build system is removed.
All Red Bear source now lives in local/sources/<component>/ as git repos.

Changes:
- src/recipe.rs: remove patches field from SourceRecipe::Git/Tar, add Local variant
- src/cook/fetch.rs: delete fetch_apply_patches, validate_patches, normalize_patch,
  fetch_compute_patches_hash, fetch_write_patches_state, fetch_patches_state_stale,
  fetch_validate_patch_symlinks, fetch_is_patches_newer. Simplify fetch and
  fetch_offline. Remove recipe_has_patches. Add Local source handler.
- src/bin/repo.rs: remove validate-patches command and handle_validate_patches
- 70 recipe.toml files: remove patches arrays, convert core recipes to Local source
- 272 .patch symlinks deleted from recipe directories
- integrate-redbear.sh: replace patch symlink logic with source fork validation
- Makefile: replace validate-patches with validate-sources target
- AGENTS.md: remove 369 lines of patch documentation, add source ownership model
- local/docs/PATCH-GOVERNANCE.md: deleted (replaced by SOURCE-OWNERSHIP-MODEL.md)
- local/docs/SOURCE-OWNERSHIP-MODEL.md: new canonical reference
- local/sources/: Red Bear fork repos created (kernel, relibc, base, bootloader,
  installer) from frozen 0.1.0 pre-patched archives
- .gitignore: exclude local/sources/ (separate git repos)
- create-forks.sh: new script for initializing fork repos

Build: cargo check passes (5 warnings, 0 errors).
Developer workflow is now: edit local/sources/ → repo cook → test. No patches.
2026-05-29 22:32:36 +03:00
vasilito 520e92cad8 chore: checkpoint before 0.2.3 build system migration 2026-05-29 21:53:11 +03:00
vasilito daf131d435 P7 login diagnostics, P11 init noise reduction, config layering fix 2026-05-29 19:13:16 +03:00
vasilito 328d1abbcd rate-limit scheme error spam to prevent serial log flood 2026-05-28 00:36:17 +03:00
vasilito ff4ff35918 feat: track all source trees in git — full fork offline-first model
Red Bear OS is a full fork. All sources must be available from git clone
with zero network access. Removed gitignore rules that excluded fetched
source trees under recipes/*/source/, local/recipes/kde/*/source/,
local/recipes/qt/*/source/, and vendor source trees.

Build artifacts (target/, build/, source.tar, *.o, *.so) remain excluded.

127291 files added — kernel, relibc, base, bootloader, pkgar, all KDE/Qt
frameworks, mesa, wayland, DRM drivers, and every other recipe source.
2026-05-14 10:55:53 +01:00
vasilito c27a28a0c8 fix: consolidate bootloader patches
Absorb P1-P4 bootloader patches into P5 carrier. Move absorbed
patches to local/patches/bootloader/absorbed/ for reference.
2026-05-11 10:08:39 +01:00
vasilito 94fb198b8a fix: GPT partition offset parsing in bootloader + remove invalid respawn field
Bootloader hardcoded RedoxFS partition offset at 2 MiB, which fails when
efi_partition_size > 1 (redbear-full, redbear-grub use 16 MiB, placing
RedoxFS at LBA 34816 = 17 MiB). Added GPT partition table parser that
scans for Linux filesystem GUID (0FC63DAF) to find the actual offset.

Also removed invalid 'respawn = true' from 31_debug_console.service in
redbear-full.toml — init's service format does not support this field.

Verified: all three ISOs boot in QEMU UEFI and reach login prompt.
2026-05-04 00:46:48 +01:00
vasilito 15d0707e74 feat: USB storage read/write proof + full Red Bear OS tree sync
Add redbear-usb-storage-check in-guest binary that validates USB mass
storage read and write I/O: discovers /scheme/disk/ devices, writes a
test pattern to sector 2048, reads it back, verifies match, restores
original content. Updates test-usb-storage-qemu.sh with write-proof
verification step.

Includes all accumulated Red Bear OS work: kernel patches, relibc
patches, driver infrastructure, DRM/GPU, KDE recipes, firmware,
validation tooling, build system hardening, and documentation.
2026-05-03 23:03:24 +01:00
vasilito 18f6e809a1 fix: bootloader UEFI alloc panic + pkgar staging fallback
Bootloader: alloc_zeroed_page_aligned no longer panics on OVMF
AllocatePages failure. Returns null on error.

Cookbook: pkgar falls back to repo/ dir when target pkgar missing.
Resolves KDE build chain failure.

redbear-full: builds 4.0GB image+ISO, boots without crash.
2026-05-03 14:23:54 +01:00
vasilito 2021bc6d05 boot: real Wayland compositor, Intel DRM Gen8-Gen12, kernel 4GB fix, virtio-gpu driver
Comprehensive boot process improvement across the entire stack:

Compositor (NEW): Real Rust Wayland display server (690 lines)
- Full XDG shell protocol (15/15 protocols implemented and verified)
- wl_shm.format, xdg_wm_base, xdg_surface.get_toplevel support
- wl_buffer.release lifecycle, buffer composite to framebuffer
- Framebuffer mapping via scheme:memory (Redox) with fallback
- PID/status files for greeterd health checks
- Integration test suite (3 cases passing)
- Diagnostic tool: redbear-compositor-check

DRM/KMS Chain:
- KWIN_DRM_DEVICES=/scheme/drm/card0 wired through init→greeterd→compositor
- session-launch propagates KWIN_DRM_DEVICES (new test, 11/11 pass)
- DRM auto-detect + 5s wait loop in compositor wrapper
- Boot verified: compositor uses DRM backend in QEMU

Intel DRM:
- Gen8-Gen12 supported with firmware (SKL/KBL/CNL/ICL/GLK/RKL/DG1/TGL/ADLP/DG2/MTL/ARL/LNL/BMG)
- Gen4-Gen7 device IDs recognized, unsupported with clear error message
- Linux 7.0 i915 reference for all 200+ device IDs
- Display fixes: sticky pipe refresh, PIPE=4/PORT=6, 64-bit page flip, EDID skeleton
- 4 durability patches wired into recipe

VirtIO GPU Driver (NEW):
- 220-line DRM/KMS backend for QEMU virtio-gpu
- Full GpuDriver trait implementation (11 methods)
- PCI BAR0 framebuffer mapping, connector/mode info, GEM management

Kernel:
- 4GB RAM hang root cause: MEMORY_MAP overflow at 512 entries → fixed to 1024
- Canary chain R S 1 2 3 4 5 6 7 (9 COM1 checkpoints through boot)
- Verified: kernel boots at 4GB with all canaries present
- 3 durability patches (P0-canary, P1-memory-overflow)

Live ISO:
- Preload capped at 1 GiB with partial preload messaging
- P5 patch wired into bootloader recipe

Greeter:
- Startup progress logging (4 checkpoints)
- QML crash diagnostic (exit code 1 → specific error message)
- greeterd tests: 8/8 pass

Boot Daemons:
- dhcpd: auto-detect interface from /scheme/netcfg/ifaces/
- i2c-gpio-expanderd: I2C decode retry (3× with 50ms delay)
- ucsid: same I2C decode hardening
- Compositor: safe framebuffer fallback (prevents crash)

Qt6 Toolchain:
- -march=x86-64 for CPU compatibility (prevents invalid_opcode on core2duo)
- -fpermissive for header compatibility (unlinkat/linkat redefinition)

Documentation:
- BOOT-PROCESS-IMPROVEMENT-PLAN.md (comprehensive, 320 lines)
- PROFILE-MATRIX.md: ISO organization, RAM requirements, known issues
- BOOT-PROCESS-ASSESSMENT.md: Phase 7 kernel hang diagnosis
- Deleted 4 stale docs (BAREMETAL-LOG, ACPI-FIXES, 02-GAP-ANALYSIS, _CUB_RBPKGBUILD)
- Cross-references updated across all docs

KWin stubs replaced with real compositor delegation.
redbear-kde-session script created for post-login session launch.
30+ files, 10 patches, 3 binaries, 22 tests, 0 errors.
2026-04-28 06:18:37 +01:00
vasilito 6f5aa6010b Add kwin full source tree, greeter login, zsh, pcid service, and build system improvements 2026-04-26 22:31:07 +01:00
vasilito cdd081c664 Integrate Red Bear boot and packaging updates 2026-04-22 10:22:09 +01:00
vasilito 5eea2a974f Register bootloader patch in recipe.toml
The redox.patch was present and symlinked but never listed in the [source] patches field, so the cookbook never applied it during builds.
2026-04-17 14:16:11 +01:00
vasilito ff1e2363e8 Add bootloader auto-boot countdown with 1280x720 default resolution
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.
2026-04-17 14:03:58 +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