Commit Graph

693 Commits

Author SHA1 Message Date
vasilito 6f12b4e2a8 chore: remove patch leftovers (.orig/.rej) 2026-05-17 13:57:56 +03:00
vasilito 5562ab0aaf fix: x2APIC ICR format + build system durability docs
- Fix LocalX2Apic handler: use local_apic.x2 to select correct ICR
  format (<<32 for x2APIC, <<56 for xAPIC) instead of hardcoded <<32
- Promote x2APIC/xAPIC detection from debug! to info! for bootlog
- Document build system durability in AGENTS.md: cardinal rule,
  two-layer architecture, correct workflow, anti-patterns
2026-05-17 13:57:37 +03:00
vasilito 45e086558e fix: boot process improvements — dependency cycle, INIT_NOTIFY, probing loop, and log spam fixes
- Fix P15-8-init-cycle-detection.patch: replace visiting+error with seen+silent-skip
  to eliminate 11 false-positive 'dependency cycle detected' errors on shared deps
- Fix P0-daemon-fix-init-notify-unwrap.patch: remove eprintln! for missing
  INIT_NOTIFY (expected for oneshot_async services, ~7 daemons affected)
- Fix driver-manager hotplug loop: add PERMANENTLY_SKIPPED static set shared
  between hotplug handler and DriverConfig::probe() to stop infinite re-probing
  of Fatal/NotSupported/deferred-exhausted device+driver pairs (e.g. ided)
- Fix driver-manager log_timeline: suppress repeated EPIPE/ENOENT errors with
  AtomicI32 dedup and AtomicBool one-shot guards for boot timeline JSON
- Add driver-manager SIGTERM handler, ACPI bus registration, --status mode,
  driver reap loop, graceful shutdown, and reduced deferred retries (30→3)
2026-05-17 12:34:02 +03:00
vasilito 1f1a811524 fix: update KWin and Qt6 cross-compile patches for Redox
KWin: add Redox compat for libinput device, wl-socket Unix domain socket\nwrapper, RamFile mmap, tablet mode manager, and CMake fixes for helpers\nand systembell plugins.

Qt6: add Redox compat for qplatformdefs (posix), corelib CMake,\nqtypes.h sizing, native socket engine, and Wayland client buffer\nintegration header.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-15 07:25:45 +01:00
vasilito eb7be84464 fix: update KF6 cross-compile patches for Redox
CMakeLists.txt patches for kf6-attica, kf6-kcmutils, kf6-kcolorscheme,\nkf6-kcompletion, kf6-kconfigwidgets, kf6-kdeclarative, kf6-kiconthemes,\nkf6-kitemmodels, kf6-kitemviews, kf6-kjobwidgets, kf6-ktextwidgets,\nkf6-kwayland, kf6-kxmlgui, kf6-pty, kf6-solid — disable missing dependencies,\nadd Redox compatibility definitions, and fix build errors.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-15 07:24:51 +01:00
vasilito 295a100f10 feat: add Mesa EGL hardware GPU probe with virgl support
P5: Enable PRIME export for GBM dumb buffers so virgl can import scanout\nbuffers via fd-to-handle.

P6: Add redox_probe_device_hw() that opens /scheme/drm/card0, resolves the\nDRI driver via PCI ID lookup (loader_get_driver_for_fd), and initializes the\nhardware path through dri2_load_driver_dri3 with __DRIimageLoaderExtension.\nIncludes fprintf(stderr) debug logging tagged [REDOX-EGL] for tracing the\nHW init sequence. Falls back to software rendering if HW probe fails.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-15 07:24:31 +01:00
vasilito b163f437bf feat: rewrite libdrm ioctl bridge with VirtGPU support
Wire P1/P2 patches into recipe.toml. Source reflects the full ioctl bridge\nrewrite: VirtGPU NR mappings, EXECBUFFER/GET_CAPS special handlers,\nPCI info bridge for drmGetDevice2, and removal of the old per-ioctl C\nhandler functions in favor of unified redox_drm_simple_ioctl() dispatch.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-15 07:24:15 +01:00
vasilito 6a0659ee04 feat: add VirtGPU ioctl bridge and PCI info patches for libdrm
P1: Replaces the old per-ioctl C handlers with a unified dispatch through\nredox_drm_simple_ioctl(), adds VirtGPU NR mappings (MAP, EXECBUFFER,\nGETPARAM, RESOURCE_CREATE, GET_CAPS, etc.), and special handlers for\nEXECBUFFER (inline command buffer) and GET_CAPS (variable response).

P2: Adds __redox__ blocks to drmParsePciBusInfo, drmParsePciDeviceInfo,\nand drmGetDevice2 using the DRM scheme GET_PCI_INFO ioctl to populate\nPCI device identification without /sys access.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-15 07:23:57 +01:00
vasilito 9a0c912399 fix: correct VirtIO GPU command opcodes and enable virgl feature
Align 2D command opcodes, response opcodes, and 3D command opcodes with\nthe Linux UAPI definitions in include/uapi/linux/virtio_gpu.h. Enable\nVIRTIO_GPU_F_VIRGL feature negotiation during device initialization to\nactivate the virgl 3D rendering path.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-15 07:23:40 +01:00
vasilito ac7c5b1761 fix: align MMIO mappings to page boundaries for VirtIO capabilities
VirtIO capability structures can start at non-page-aligned offsets within\nBARs. The kernel physmap requires page-aligned addresses. Align the physical\naddress down, adjust the size, and apply the page offset to the returned\npointer. Track the original map pointer/size separately for correct unmapping.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-15 07:23:25 +01:00
vasilito fba204e2f5 fix: correct BAR size probing for non-zero base addresses
The previous BAR size calculation used !(inverted & mask) & mask which\nproduces incorrect results when the BAR has a non-zero base address.\nUse lowest-set-bit extraction (masked & (!masked + 1)) to correctly\ncompute the BAR size from the writable bit pattern read back from hardware.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-15 07:23:11 +01:00
vasilito facf0c92e0 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 6860519db4 diag: add full DMA buffer hex dump and descriptor table logging for VirtIO GPU debugging 2026-05-14 10:52:39 +01:00
vasilito 741f144c79 feat: VirtIO GPU driver, libdrm DRM ioctls, KWin/KF6 build fixes, display stack additions
- Add full VirtIO GPU driver with command submission, resource management,
  VirtQueue implementation, and transport layer; includes diagnostic probes
  for resource_create_2d ERR_INVALID_RESOURCE_ID investigation
- Expand libdrm Redox support with DRM ioctl wrappers (ADDFB, RMFB,
  CREATE_DUMB, MAP_DUMB, DESTROY_DUMB, GET_RESOURCES, GET_CONNECTOR,
  GET_CRTC, SET_CRTC, MODE_OBJ_GET_PROPERTIES, etc.) and xf86drm_redox.h
- Add redox-drm scheme handlers for VirtIO GPU-specific DRM ioctls
  (VIRTGPU_RESOURCE_CREATE, VIRTGPU_MAP, VIRTGPU_WAIT, VIRTGPU_INFO, etc.)
- Add display stack recipes: freetype2, lcms2, libdisplay-info, libepoxy,
  libxcvt
- Fix KWin build (recipe.toml expanded, kf6-ksvg added)
- Fix KF6 CMakeLists for cross-compilation (attica, kcmutils, kcolorscheme,
  kcompletion, kconfigwidgets, kdeclarative, kiconthemes, kitemmodels,
  kitemviews, kjobwidgets, ktextwidgets, kwayland, kxmlgui, kpty, solid)
- Add Qt6 futex support patch
- Add relibc patches: P3 strtold, P3 ld-so search path, P5 DRM ioctl removal
- Add base P4 pcid config scheme patch
- Update driver-manager hotplug/config, PCI config in redox-driver-sys
- Update greeter compositor and KDE session scripts
- Update AGENTS.md with zero-tolerance stubs policy and project knowledge
2026-05-14 10:31:13 +01:00
vasilito ea2f32372c docs: remove GitHub, gitea.redbearos.org is the only git server
Remove origin remote (GitHub). Rename gitea to origin. Update all
AGENTS.md references to remove GitHub mentions.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-11 10:30:53 +01:00
vasilito 80da7bdebd docs: update project knowledge base
Update AGENTS.md with current patch chain state, KWin integration
status, and consolidated patch governance.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-11 10:11:14 +01:00
vasilito 3d1dc59f4d fix: update build system tooling and configuration
Update cookbook fetch.rs for protected recipe handling and atomic
patch application. Update config.mk, device services, and legacy
base configs. Add patch-inclusion-gate script.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-11 10:10:35 +01:00
vasilito 9b0fb0de0c fix: update custom recipe implementations
Update cpufreqd, driver-params, firmware-loader, seatd, redox-drm,
and redox-driver-sys. Add XHCI controller quirk table. Update
redbear-compositor protocol handlers.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-11 10:10:25 +01:00
vasilito f36b6a4582 feat: add display stack dependency recipes
Add lcms2, libdisplay-info, libepoxy, and libxcvt recipes required
by the KWin/Mesa display stack.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-11 10:10:11 +01:00
vasilito 7d96c20b28 feat: add KWin compositor integration with QML-free build
Add P0-disable-qml-quick.patch for building KWin without QML/Quick
dependencies. Update greeter scripts to prefer kwin_wayland. Enable
kwin in redbear-full config.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-11 10:09:58 +01:00
vasilito b9e900cb70 fix: update KF6 cross-compile build configurations
Patch CMakeLists.txt across 15 KF6 packages for Redox cross-compile.
Add kf6-ksvg recipe for KWin dependency chain.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-11 10:09:48 +01:00
vasilito ad927eb352 fix: update Qt cross-compile toolchain and remove absorbed patches
Remove absorbed qtbase include and OpenGL guard patches. Update
toolchain cmake for cross-compile. Fix QtWayland cursor guards.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-11 10:09:34 +01:00
vasilito 76b75d80b4 fix: absorb redundant base daemon and driver patches
Consolidate ~30 absorbed base patches into surviving carriers. Add
new init service files, driver sources, and network/storage modules
for the base recipe. Move absorbed patches to local/patches/base/absorbed/.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-11 10:09:25 +01:00
vasilito 9f4ad484a4 fix: consolidate bootloader patches
Absorb P1-P4 bootloader patches into P5 carrier. Move absorbed
patches to local/patches/bootloader/absorbed/ for reference.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-11 10:08:39 +01:00
vasilito dbd230a6ec fix: consolidate relibc patch chain
Remove absorbed prerequisite patches and fd-event test patch. Add
statvfs constants patch. Update recipe.toml wiring.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-11 10:08:30 +01:00
vasilito 39807ca816 fix: consolidate kernel patch chain
Absorb redundant kernel patches into v2 carriers, remove debug and
suspend patches no longer needed. Wire v2 patches in recipe.toml.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-11 10:08:20 +01:00
vasilito ae7b5f989f docs: retire GitHub contribution language 2026-05-09 01:38:03 +01:00
vasilito a6d3e85588 docs: document Gitea as canonical git host 2026-05-09 01:37:52 +01:00
vasilito 81285f3a12 docs: update local driver-manager execution notes 2026-05-09 01:34:16 +01:00
vasilito 46d76a5287 docs: update public driver-manager handoff language 2026-05-09 01:33:56 +01:00
vasilito 8bf1f7022d fix: update phase0 boot evidence diagnostics 2026-05-09 01:33:45 +01:00
vasilito 65ded583e8 fix: expose driver-manager boot observability 2026-05-09 01:33:34 +01:00
vasilito 533e253e1e fix: pass driver-manager PCI targets to wifi 2026-05-09 01:33:22 +01:00
vasilito ff99ad455b fix: add driver-core removal lifecycle 2026-05-09 01:33:08 +01:00
vasilito c11c7a04df fix: harden driver-manager lifecycle 2026-05-09 01:32:57 +01:00
vasilito 33ab2bbd73 fix: wire driver-manager service ordering 2026-05-09 01:32:44 +01:00
vasilito 815054cf9d docs: -i interactive TUI convention in local/AGENTS.md
All Red Bear desktop apps use -i/--interactive for TUI mode.
Pattern: ratatui 0.30 + termion, feature-gated behind 'tui' feature.
Apps: cub, redbear-info, redbear-netctl.
2026-05-08 12:16:19 +01:00
vasilito 3544d8c5c9 fix: cub -i interactive flag, -S auto-build on Linux 2026-05-08 12:09:51 +01:00
vasilito 261a6c26b3 fix: cub production recipe, serde_derive import, minor cleanup
- recipe: use cargo install for proper binary installation
- aur.rs: serde_derive for explicit derive path
- main.rs: final noconfirm/force flow cleanup
2026-05-08 11:58:36 +01:00
vasilito 5c90afdad8 feat: -i interactive ratatui TUI for redbear-info and redbear-netctl
- redbear-info: -i launches ratatui dashboard (System/Hardware/Network/Integrations/Health tabs)
- redbear-netctl: -i wires existing netctl-console ratatui TUI
- Same -i switch convention as cub
- Feature-gated behind 'tui' feature for both apps
2026-05-08 11:56:55 +01:00
vasilito cb4f56b633 fix: TUI spawns current_exe() instead of hardcoded 'cub' in PATH 2026-05-08 11:48:45 +01:00
vasilito cd07d32597 fix: PKGBUILD shell variable resolver, TUI auto-fetch before build, AurClient Result fix
- resolve_shell_vars(): handles ${var}, $var, ${var%suffix} patterns
- nushell-git ($_pkgname-git) now resolves correctly to nushell-git
- TUI start_build_selected() auto-fetches AUR PKGBUILD if not cached
- Fix AurClient::new() Result handling in app.rs
- 70 tests pass (1 new: resolves_shell_variables)
2026-05-08 11:40:36 +01:00
vasilito 2d9ccec10c fix: TUI always launches CubApp (infallible init), depresolve module, cub binary unified
- lib.rs: removed fallback help screen, always launches ratatui CubApp
- app.rs: CubApp::new() infallible — fallback to /tmp/.cub if HOME missing
- app.rs: AUR client graceful fallback (None on error or AUR_OFFLINE)
- storage.rs: from_root() made pub for fallback store construction
- depresolve.rs: yay-style topological sort + provider + circular detection
- cubl→cub: unified binary name, OS detection via cfg!(target_os)
- 69 tests pass, 0 failures, clean build
2026-05-08 11:23:44 +01:00
vasilito 3622c7b8ec feat: yay-style dependency resolution (topological sort, providers, circular detection)
- depresolve.rs: resolve_build_order() with iterative topological sort
- Provider resolution for virtual packages
- Circular dependency detection and component extraction
- resolve_deps_recursive() for AUR→Redox recursive resolution
- 4 tests: linear, circular, providers, make deps
2026-05-08 11:17:07 +01:00
vasilito 153cca6132 fix: noconfirm auto-selects first AUR match 2026-05-08 11:01:02 +01:00
vasilito d39cdc3fd9 feat: yay-style combined flags (-Sdy, -Sdd, -Sfyu), --noconfirm, -Gp, -Scc
- Combined short flags expand: -Sdy → install --noconfirm
- -Gp prints raw PKGBUILD from AUR
- -Scc cleans all caches including ~/.cub/tmp/
- --noconfirm skips interactive prompts
- Deduplicated flag expansion, added to global flag list
2026-05-08 08:16:50 +01:00
vasilito 92cdfe0605 fix: all cub/cubl operations now use ~/.cub/
- import saves to ~/.cub/recipes/ (primary, not CWD)
- build temp dirs use ~/.cub/tmp/ (not /tmp)
- AUR clone temp dirs use ~/.cub/tmp/
- cub_temp_dir() replaces create_temp_dir()
- removed old create_temp_dir (dead code)
2026-05-08 07:47:05 +01:00
vasilito c46753eaca fix: --import-aur now saves to both CWD and ~/.cub/ 2026-05-08 07:43:13 +01:00
vasilito eaf283af36 fix: extract PKGBUILD build()/package() bodies for Custom templates
- extract_bash_function() extracts bash function bodies by brace-matching
- Custom template now populates build_script from build() body
- Custom template now populates install_script from package() body
- Fixes 'custom builds require prepare/build/install instructions' error
2026-05-08 07:39:37 +01:00
vasilito cbdcd101c1 fix: cubl exact-match AUR search, numbered ambiguity menu, PKGBUILD-not-found handling 2026-05-08 07:32:38 +01:00