Commit Graph

71 Commits

Author SHA1 Message Date
vasilito 8644e8b6d0 fix(relibc): implement getrlimit defaults + getdtablesize return; add kwin stub; kernel graphical_debug defer 2026-04-27 01:57:14 +01:00
vasilito 70a84cefee Add kwin full source tree, greeter login, zsh, pcid service, and build system improvements 2026-04-26 22:31:07 +01:00
vasilito d4a6b356eb Add cmake stub for qt_internal_add_shaders in qtdeclarative
Qt6ShaderTools cmake function is not available in our cross-compilation
setup. Added -C preload with no-op stub function to allow cmake
configuration to proceed past shader compilation calls.

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

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-25 21:43:48 +01:00
vasilito 752bceb3e9 Enable IPv6 foundation in relibc: inet_pton/ntop, TCP socket options, DNS AAAA
Add three relibc patches (42 total) to close QtNetwork-critical socket gaps:
- P3-inet6-pton-ntop: AF_INET6 address parsing/formatting with RFC 5952
  shorthand, IPv4-mapped suffix support
- P3-tcp-sockopt-forward: forward IPPROTO_TCP getsockopt/setsockopt to
  scheme daemon instead of hitting todo_skip
- P3-dns-aaaa-getaddrinfo-ipv6: AAAA DNS record queries, lookup_host_v6,
  dual-stack getaddrinfo with sockaddr_in6 entries

Also fix P3-tcp-nodelay to use sys_call_wo + from_raw_parts (const) in the
SOL_SOCKET setsockopt fallback — setsockopt sends data to the kernel, not
reads from it.
2026-04-25 21:20:47 +01:00
vasilito 4e27bee9bf Retire base monolith patch in favor of 27 individual P2 patches
The 17,046-line redox.patch monolith is no longer referenced in the base
recipe. All 27 individual P2 patches are now listed explicitly in
recipe.toml with symlinks to local/patches/base/.

Coverage gap closed: ixgbed/src/device.rs was the only file not covered
by any individual patch. Added P2-ixgbed-error-handling.patch for the
10GbE Intel driver error handling (println → log::info/warn/error).

Build verified: CI=1 make r.base completes successfully with the new
patch list. The monolith file is preserved as backup but no longer applied.
2026-04-25 19:38:23 +01:00
vasilito 65acab85bb Split base cumulative patch and add relibc AIO stubs, KDE recipes
Base patch extraction (8 topic-grouped patches from the 17k-line monolith):
- P2-ps2d-improvements: PS/2 controller flush/retry, mouse state machine, named producers
- P2-storage-error-handling: AHCI/IDE/NVMe/VirtIO unwrap/expect removal
- P2-usb-pm-and-drivers: suspend/resume, SCSI enablement, staged port fallback
- P2-network-error-handling: e1000/ixgbe/rtl8139/rtl8168d/virtio-net error propagation
- P2-pcid-cfg-access: PCI config I/O port and ECAM graceful fallbacks
- P2-ihdad-hda-stream: InputStream support, public stream types, Debug derives
- P2-init-acpid-wiring: acpid weak dependency on drivers/hwd/pcid-spawner
- P2-misc-daemon-fixes: audiod/usbhidd/zerod graceful degradation

relibc P3-aio.patch: synchronous POSIX AIO fallback (aio_read, aio_write,
aio_error, aio_return, aio_cancel, aio_suspend, aio_fsync, lio_listio)
for Qt6 QIODevice compatibility. 36 patches total in relibc recipe.

KDE recipes: breeze (widget style, decorations disabled), kde-cli-tools
(kioclient, kreadconfig, etc., kdesu disabled).
2026-04-25 19:10:00 +01:00
vasilito 530eb841db Add relibc fenv and sched POSIX implementations
P3-fenv: x86_64 SSE/x87 inline asm for 10 FP environment functions
(feclearexcept, fegetenv, fegetexceptflag, fegetround, feholdexcept,
feraiseexcept, fesetenv, fesetexceptflag, fesetround, fetestexcept,
feupdateenv) with proper MXCSR and x87 CW register access.

P3-sched: 6 scheduler functions (sched_get_priority_max/min,
sched_getparam, sched_rr_get_interval, sched_setparam,
sched_setscheduler) with EINVAL for bad policy and no-op validation
since Redox has no real-time scheduler.
2026-04-25 18:07:46 +01:00
vasilito fdb62413a6 Add login-protocol recipe and system recipe symlinks 2026-04-25 17:38:39 +01:00
vasilito cc0e28d282 Wire 9 missing relibc patches into recipe build list (33 total) 2026-04-25 17:38:06 +01:00
vasilito 7a36312588 Add durability policy, userutils branding patch for Red Bear OS login/issue
Enforce that every source-tree edit must be mirrored to local/patches/
and wired into recipe.toml in the same session. Apply the policy
retroactively to userutils res/issue and res/motd (Redox → Red Bear).
2026-04-25 16:34:45 +01:00
vasilito 296861f1ce Fix mc 100% CPU hang: select() non-epoll timeout and signal.h stdint include
relibc select_epoll() forced timeout=0 when any FD doesn't support epoll
(e.g. TTY on Redox), causing busy-loop. Poll with 100ms interval instead.

Also add stdint.h to signal/cbindgen.toml sys_includes so signalfd_siginfo
struct types (uint32_t, int32_t) resolve without build errors.
2026-04-25 16:31:05 +01:00
vasilito 965141d67c Add kded6 source with pre-generated D-Bus XML and fix CMake prefix path
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-25 14:49:51 +01:00
vasilito da53c400b4 Add kglobalacceld recipe with D-Bus service wiring and config entry
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-25 14:49:39 +01:00
vasilito 9c8de2d919 Enable host Qt DBus tools and sync unistd.h to cross-compiler toolchain
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-25 14:49:26 +01:00
vasilito 3db1953731 Add relibc exec-root-bypass and tcp-nodelay patches
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-25 14:49:15 +01:00
vasilito 38013bbf16 Wire evdevd input devices into udev-shim and enable udev in libinput
Phase 3 input chain wiring:

udev-shim: when scheme:evdev is registered (by evdevd), probe for
event0..event7 devices and create /dev/input/eventN nodes pointing to
scheme:evdev/eventN. This bridges evdevd's evdev devices into the
/dev/input namespace that libinput and compositors expect.

libinput: remove -Dudev=false and add libudev-stub as a dependency.
The libudev-stub recipe provides libudev.so that reads from scheme:udev
(udev-shim), giving libinput a working udev enumeration path instead of
stub functions that return NULL.

Input chain is now: hardware → /scheme/input → evdevd → scheme:evdev →
udev-shim → /dev/input/eventN → libudev-stub → libinput → KWin.
2026-04-25 13:15:12 +01:00
vasilito 843f30ba42 Fix relibc netdb/lookup: use-after-move and unsafe block errors
Upstream relibc netdb DNS lookup has two bugs exposed by Rust 2024 edition
strict unsafe handling:

1. packet_data is moved into Box::via into_boxed_slice() but the retry
   loop tries to call packet_data.as_ptr() on the moved value. Use the
   already-created raw pointer packet_data_ptr instead.

2. close() is a safe function in relibc, so wrapping it in unsafe{}
   triggers unused-unsafe (promoted to error by -D unused-unsafe). Remove
   the unnecessary unsafe blocks around close() calls.

Patch carries in local/patches/relibc/P3-netdb-lookup-retry-fix.patch and
is applied via the relibc recipe patches list.
2026-04-25 12:28:37 +01:00
vasilito dc69317ddf D-Bus Phase 3/4: upgrade sessiond, services, add StatusNotifierWatcher, consolidate configs
- redbear-sessiond: add Manager.Inhibit (pipe FD), CanPowerOff/CanReboot/
  CanSuspend/CanHibernate/CanHybridSleep/CanSleep (return na), PowerOff/
  Reboot/Suspend stubs, GetSessionByPID, ListUsers, ListSeats,
  ListInhibitors, ActivateSession/LockSession/UnlockSession/TerminateSession
- redbear-sessiond: add Session SetIdleHint, SetLockedHint, SetType,
  Terminate methods; wire PauseDevice/ResumeDevice/Lock/Unlock signal
  emission via SignalEmitter injection; add dynamic device enumeration
  scanning /scheme/drm/card* and /dev/input/event* at startup
- redbear-sessiond: replace infinite pending() with stoppable shutdown
  via tokio watch channel + control socket shutdown command
- redbear-upower: add Changed signal emission with 30s periodic polling
  and power state snapshot comparison
- redbear-notifications: add ActionInvoked signal, expand capabilities
  to body + body-markup + actions
- redbear-polkit, redbear-udisks: replace pending() with stoppable
  shutdown via signal handling + watch channel
- Add redbear-statusnotifierwatcher: new session bus service implementing
  org.freedesktop.StatusNotifierWatcher for KDE system tray
- Add D-Bus activation file for StatusNotifierWatcher
- KWin session.cpp: try LogindSession before NoopSession fallback
- Consolidate config profiles: remove obsolete redbear-desktop, redbear-kde,
  redbear-live-*, redbear-minimal-*, redbear-wayland configs; simplify
  to three supported targets (redbear-full, redbear-mini, redbear-grub)
- Update DBUS-INTEGRATION-PLAN.md and DESKTOP-STACK-CURRENT-STATUS.md
  with Phase 3/4 fragility assessment, KWin readiness matrix, and
  completeness gap analysis
2026-04-25 12:01:25 +01:00
vasilito 6d48f80bea Fix IOAPIC/HPET/NMI, PS/2 driver, and remove duplicate VT service entries
- IOAPIC: enable full IOAPIC initialization on AMD/Intel bare metal,
  dual GSI 0/2 timer mapping for platform compatibility, NMI handler
  uses raw COM1 PIO writes to avoid mutex deadlock
- HPET: counter validation, graceful fallback to PIT when HPET missing
- PS/2: fix 0xFE RESEND handling in all MouseState variants, add
  controller flush/self-test retry/aux port test from Linux 7.0
- ACPI: defer AML evaluation to avoid blocking initfs driver spawn
- VT chain: remove duplicate rootfs service files (inputd, vesad,
  fbcond, getty) that were already handled by initfs phase 1 and the
  legacy 30_console script from minimal.toml
- QEMU verified: boots to login prompt, 20 rootfs units (was 26),
  single login prompt (was double), only 1 expected error (wifictl)
2026-04-24 00:57:19 +01:00
vasilito 1cc3b104de Add relibc eventfd MOD patch for init waitpid compatibility
Eventfd now sets correct file mode bits so init's waitpid loop
can poll on eventfd descriptors without spurious EPERM.
2026-04-23 20:29:11 +01:00
vasilito 821f08306d Add P2 daemon hardening patches and wire into base recipe
215 fixes across 33 Rust source files replacing unwrap/expect/panic
with graceful error handling in init, all boot-critical daemons,
and the six graphics driver packages. Fixes inverted scheduler
conditions_met() logic that prevented rootfs from mounting.
2026-04-23 20:27:03 +01:00
vasilito 47a44d794c Fix build system: full commit hash, git clean, remove absent USB BINS from base-initfs
- Use full 40-char commit hash in base recipe.toml so the cookbook's
  caching logic correctly recognizes already-fetched sources (short
  hashes always missed the cache, causing patches to re-apply on top
  of already-patched source).
- Add git clean -fd before git reset --hard in fetch.rs so untracked
  files from previous patch applications are removed before re-patching.
- Remove ehcid/ohcid/uhcid from base-initfs BINS list (same fix as
  base recipe, these drivers don't exist in the current upstream).

With these fixes, redbear-live-mini builds and boots to login prompt in QEMU.
2026-04-23 00:35:51 +01:00
vasilito c2c81e4e91 Pin base recipe to rev 463f76b9 and remove absent USB controller BINS
Pin the base source to commit 463f76b9 so that redox.patch and our
P2 patches apply cleanly. Remove ehcid/ohcid/uhcid from BINS since
they don't exist in this upstream version.
2026-04-23 00:04:28 +01:00
vasilito 3054adc5d5 Add ACPI I2C resources scheme endpoint and shared acpi-resource crate
- Add /scheme/acpi/resources/<device> endpoint to acpid for _CRS evaluation
- Extract acpi-resource shared crate (917 lines) with ResourceDescriptor types
- Eliminate duplicate type definitions in 5 consumers (i2c-hidd, dw-acpi-i2cd,
  intel-thc-hidd, i2c-gpio-expanderd, ucsid)
- Add P2-acpi-i2c-resources.patch (48KB) with all source changes
- Update ACPI-I2C-HID-IMPLEMENTATION-PLAN.md to reflect actual codebase state
2026-04-22 22:44:30 +01:00
vasilito d2ac27eeb2 Add verify-overlay-integrity.sh and remove stale rbos-info symlink
Create overlay integrity verification script that checks all recipe symlinks, patch symlinks, circular references, critical local/patches/ files, and config/redbear-*.toml files. Supports --repair (calls apply-patches.sh) and --quiet (CI). Fix config name: redbear-minimal.toml not redbear-mini.toml. Remove stale dangling symlink recipes/system/rbos-info (correct name is redbear-info).
2026-04-22 22:00:52 +01:00
vasilito 78e5d99fb8 acpi-i2c-hid: implement wave 1 boot-path diagnostics and service wiring 2026-04-22 21:31:19 +01:00
vasilito fdc670d852 Add ACPI I2C-HID quirk carriers 2026-04-22 12:41:39 +01:00
vasilito b5ae8b2760 Integrate Red Bear boot and packaging updates 2026-04-22 10:22:09 +01:00
vasilito ad9254e489 Consolidate relibc overlay patch chain
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-21 16:15:17 +01:00
vasilito 19d39068cf Expose USB tools in base runtime surfaces
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-21 16:15:17 +01:00
vasilito 4275949ede Advance KDE, Qt, and Wayland recipe sources 2026-04-20 18:37:35 +01:00
vasilito 3c88e91789 Refine relibc overlay patches and test wiring 2026-04-20 18:37:35 +01:00
vasilito 9880e0a5b2 Advance redbear-full Wayland, greeter, and Qt integration
Consolidate the active desktop path around redbear-full while landing the greeter/session stack and the runtime fixes needed to keep Wayland and KWin bring-up moving forward.
2026-04-19 17:59:58 +01:00
vasilito cd4961f4b6 Simplify relibc test recipe replay 2026-04-19 09:26:57 +01:00
vasilito 967d0f8972 Skip libwayland debug print path on Redox
Avoid a non-essential debug-only formatting dependency in the WIP Redox libwayland build so the verified relibc compatibility slice is not blocked by wl_closure_print diagnostics.

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

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-18 21:36:33 +01:00
vasilito ba360adfbc Consolidate relibc overlay patch chain
Keep the relibc compatibility work in tracked local patch carriers and align the recipe with the full durable patch stack so clean reapply and rebuild paths stay reproducible.

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

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-18 21:36:07 +01:00
vasilito 6566b29a13 Update upstream recipe TOMLs, add orbutils patch and smallvil recipe
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-18 17:59:21 +01:00
vasilito 70567356f6 Wire relibc patch bundle via recipe patches field 2026-04-18 11:21:19 +01:00
vasilito 619fd0f2d1 Fix relibc strtold linkage for C++ consumers
Keep the relibc overlay consistent so the generated stdlib header preserves C linkage for strtold and the existing toolchain can still satisfy stale C++ callers while it is refreshed.

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

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-18 10:36:46 +01:00
vasilito 0997dbbbb5 Update base-initfs and base recipes for hardware detection
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-18 00:48:58 +01:00
vasilito 9d1954e0c4 Add FAT12/16/32 scheme daemon, management tools, and build integration
5-crate Rust workspace implementing full VFAT support: fatd scheme daemon
(FSScheme with open/read/write/mkdir/unlink/rename/fstat), fat-mkfs (create
FAT12/16/32 with labels and cluster size), fat-label (read/write BPB + root-dir
volume labels), fat-check (verify + repair dirty flags, FSInfo, lost clusters,
orphaned LFN). 60 unit tests, 0 unwrap in production code. Included in all 5
redbear configs via redbear-device-services.toml.

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

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-18 00:13:34 +01:00
vasilito 3fb2d55171 Fix WIP grub symlink path depth (3 levels, not 4)
The symlink from recipes/wip/services/grub was using ../../../../local/
which goes above the repo root. Fixed to ../../../local/ which correctly
resolves from recipes/wip/services/ to local/recipes/core/grub.

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

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-17 21:49:39 +01:00
vasilito 4d9e5ed59e Fix GRUB bootloader lookup, eliminate duplicate recipe, harden recipe build
install-grub.sh now searches both recipes/core/bootloader/target and
local/recipes/core/bootloader/target for the Redox bootloader artifact.

The WIP grub recipe (recipes/wip/services/grub) is now a full directory
symlink to local/recipes/core/grub instead of just recipe.toml, ensuring
COOKBOOK_RECIPE resolves to a directory that contains grub.cfg. This also
eliminates the duplicate recipe warning from the cookbook.

The GRUB recipe now fails hard (exit 1) if grub.cfg is missing instead of
just warning.

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

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-17 21:45:38 +01:00
vasilito ee761276de Add GRUB EFI build recipe and chainload configuration
Builds GRUB 2.12 for the host machine (not Redox target) using template=custom.
Produces a 540 KiB standalone PE32+ EFI binary with GPT, FAT, ext2,
chainloader, and utility modules. The grub.cfg chainloads the Redox
bootloader from EFI/REDBEAR/redbear.efi.

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

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-17 21:04:39 +01:00
vasilito a8479bfcf9 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.

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

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-17 14:16:11 +01:00
vasilito fb34e678be 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.

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

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-17 14:03:58 +01:00
vasilito 352bc9340f Update Qt6 recipes and add remaining module stubs
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-17 13:34:18 +01:00
vasilito 1ae63502c1 Advance base patch with acpid and xhcid fixes
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-17 13:33:41 +01:00
vasilito 60170933b0 Add D-Bus session and system services
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-17 13:33:17 +01:00
vasilito 07a9238e06 Add remaining Qt recipe stubs
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-17 00:06:03 +01:00