Commit Graph

13 Commits

Author SHA1 Message Date
vasilito 0ec7bd46bb Phase 3: GPU 3D drivers + Phase 1-2 stability fixes — full rollup
ROLLUP of all Phase 1-3 work on branch 0.3.0, targeting a production-ready
console + full graphical desktop under Intel and Virgl/VirtIO-GPU.

=== Phase 1 — Stability ===
 - fbcond: Enter key handler (scancode 0x1C→\n), display map buffering,
   control-char filter in all 7 keymaps, write_event assert
 - build-redbear.sh: auto-rebuild-prefix when fork timestamps are newer
   than prefix/x86_64-unknown-redox/sysroot (was warning-only). Added
   configurable REDBEAR_SKIP_PREFIX_REBUILD guard.
 - build-redbear.sh: set explicit keymap '-K us' in console activation
 - config/redbear-device-services.toml: remove spurious init.d service
   files for redbear-acmd/ecmd/usbaudiod. These USB device daemons are
   spawned dynamically by pcid-spawner, not as boot-time init services.
   Starting them without args panicked the boot flow.
 - relibc: grantpt/unlockpt/ptsname (then deduplicated against stdlib)
 - userutils: cherry-pick upstream getty commit 2834434 (standard C
   ptsname/grantpt/unlockpt)
 - base fork: Russian (ЙЦУКЕН) keymap + inputd control-char filter
   (K_ESC/K_BKSP/K_ENTER → \0, commit 73e44d81 in submodule/base)

=== Phase 2 — Login & Console ===
 - login.rs: restored to 0.2.5-known-good liner-based prompt
 - redbear-upower: removed tokio full/signal features → protection fault fix
 - redbear-power: excluded temporarily (being fixed in other session)
 - tlc version: updated to 0.3.0

=== Phase 3 — GPU/3D Drivers (commit 0898332f7a) ===
Intel i915: FULLY implemented — real ring buffer + MMIO command
submission via GEM DMA → GGTT → i915 render ring, with hardware
head-pointer polling (2M iterations, 50µs backoff). Zero stubs.

VirtIO GPU/Virgl (VirtioTransport): 11 VIRTGPU ioctls (GETPARAM,
GET_CAPS, RESOURCE_CREATE, RESOURCE_INFO, CONTEXT_INIT, EXECBUFFER,
WAIT, TRANSFER_TO_HOST, TRANSFER_FROM_HOST, MAP, CREATE_BLOB) ported
from Linux 7.1 virtgpu_ioctl.c and virtgpu_vq.c.
 - driver.rs: 8 virgl_* trait methods (default Unsupported)
 - scheme.rs: 11 ioctl constants + 8 wire structures + dispatch
 - virtio/transport.rs: PCI capability discovery, feature negotiation,
   control+cursor virtqueue setup, vring descriptor building
 - virtio/mod.rs: real implementations for all 8 virgl_* methods
 - intel/mod.rs: explicit virgl Unsupported stubs

Other changes from active sessions: Cargo.toml version bumps, linux-kpi
headers, libpciaccess recipe, mesa/recipe.toml, kf6 patches, expat,
driver-manager, redbear-sessiond, redbear-compositor, cub, tlc, and
many other local recipes.
2026-07-09 20:29:28 +03:00
vasilito 832d15bfd2 fix: add remaining symlinks (redoxfs, relibc) for submodule resolution 2026-07-09 15:44:01 +03:00
vasilito 35a9253559 fix: add symlinks for all submodule recipe dirs to resolve sibling fork deps
All submodules (kernel, bootloader, redoxfs, userutils, installer, base)
use path = '../libredox', '../syscall', '../redox-scheme' to reference
sibling forks. When the cookbook copies these to recipes/core/<name>/source/,
Cargo resolves the relative paths from the copy location, not the symlink
target. Added symlinks at the recipe level so all resolutions go through
the same path: recipes/core/<name>/<dep> → local/sources/<dep>.
2026-07-09 15:42:51 +03:00
vasilito 11d3665d7d bootloader: migrate all patches to local fork, switch recipe to path source 2026-07-06 10:11:18 +03: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