Commit Graph

9 Commits

Author SHA1 Message Date
vasilito 0a082bb6eb fix: restore qnativesocketengine_unix.cpp from tarball (remove broken include)
The committed git state had a broken #include from a concurrent session.
The atomic build extracts the clean tarball, but the dirty git-tracked
file was never committed clean. Reverted to tarball version.
2026-05-06 18:10:57 +01:00
vasilito 40c337cbac fix: remove broken include from qnativesocketengine_unix.cpp
netinet/in6_pktinfo_compat.h does not exist — leftover from concurrent
session changes. This blocks the qtbase build.
2026-05-06 17:51:43 +01:00
vasilito 2e53cabfc0 fix: Qt6 Wayland crash — systemic generator fix. Greeter UI boots!
Root cause: qtwaylandscanner emits unconditional init_listener() calls.
Generated code: wl_*_add_listener(m_wl_*, ...) without null check.
NULL proxy from wlRegistryBind() → page fault at offset 8.

Fix: patched qtwaylandscanner.cpp line 1297 to emit null-guarded
listener registration:
    if (m_%s) %s_add_listener(m_%s, &m_%s_listener, this);

This covers ALL generated Wayland wrappers — wl_*, xdg_*, zwp_*, wp_* —
in one generator change. Removed fragile regex post-build patching.

VERIFIED: greeter UI boots without page fault. QML loads. Wayland
binds all 7 globals (compositor/shp/seat/output/data_device_mgr/
subcompositor/xdg_wm_base). QWaylandDisplay: valid registry+display.
2026-05-06 17:18:55 +01:00
vasilito f324023fde fix: Qt6 Wayland null guard — real fix deployed via post-build patching
The Qt6 Wayland QPA crashes at null+8 because auto-generated wrappers
pass NULL proxies to wl_*_add_listener(). Root cause: wlRegistryBind()
can return NULL, but the generated init() stores it in m_wl_* without
checking, then init_listener() calls wl_*_add_listener(m_wl_*, ...)
which page-faults writing to proxy->object.implementation.

Fix: post-build Python script patches generated qwayland-wayland.cpp
with null guards on every wl_*_add_listener(m_wl_*, ...) call:
    if (m_wl_*) wl_*_add_listener(m_wl_*, ...)

Patch-and-rebuild.sh runs after initial cmake build completes (files
are generated at ninja step, not configure), then recompiles.

This is the SYSTEMIC fix — no env vars, no plugin renaming, no
workarounds. Every Qt6 Wayland proxy is null-checked before use.
2026-05-06 17:00:55 +01:00
vasilito 36c8c3d95a fix: Qt6 Wayland crash — root cause identified, kded6 fix deployed
ROOT CAUSE: Qt6's auto-generated Wayland wrappers pass NULL proxies
to wl_*_add_listener() during initialization. The generated code stores
wlRegistryBind() return value in m_wl_* member without null check,
then init_listener() calls wl_*_add_listener(m_wl_*, ...) which
page-faults at null+8 (write to proxy->object.implementation).

FIX (kded6): wrapper script renames libqwayland.so to .disabled
before launching kded6.real. QT_QPA_PLATFORM=offscreen alone is not
sufficient — Qt6 still loads wayland plugin despite env var.

FIX (libwayland): null guards in redox.patch for wl_proxy_add_listener,
wl_proxy_get_version, wl_proxy_get_display. Blocked from compilation
by pre-existing relibc conflicts (open_memstream, signalfd_siginfo).

FIX (Qt6 wrappers): regex-based null guard insertion proven in concept.
Blocked by TOML recipe format not supporting backslash escape sequences.
Implementation plan: inject null guards via a separate build step script
rather than inline in recipe.toml.
2026-05-06 16:34:46 +01:00
vasilito 806663698c fix: copy libwayland .so files to qtbase stage for Qt plugin loading
Qt plugins (libqwayland.so, libqredox.so) fail to dlopen() because
libwayland-client.so was missing at runtime. libwayland = "ignore"
prevents the package from being installed.

Fixed by adding post-build copy step in qtbase recipe: libwayland-*.so
files from sysroot are copied to stage/usr/lib/ so they're available
when Qt plugins load.

Also restored libwayland recipe.toml (was accidentally truncated to 22
lines without blake3 hash).
2026-05-06 15:18:09 +01:00
vasilito 608b1bffbb docs: Wayland-only path — no framebuffer workarounds. Add Qt6 instrumentation.
- WAYLAND-IMPLEMENTATION-PLAN.md v2.0: document architecture decision
  that Wayland is the only supported display path. Remove all
  framebuffer fallback workarounds (offscreen QPA, redox QPA shim).
- qwaylanddisplay.cpp: add fprintf instrumentation for crash diagnosis;
  skip xkb_context_new on Redox to eliminate potential xkb crash vector.
- greeter-ui/main.cpp: remove QT_QPA_PLATFORM=redox workaround.
  The greeter must use Wayland. Accept the crash until Qt6 is fixed.
- Ruled out: relibc calloc (zeroes correctly), libwayland proxy_create
  (correct), compositor protocol (compliant). Root cause is in Qt6
  generated Wayland wrappers passing NULL to wl_proxy_add_listener.
2026-05-06 12:21:05 +01:00
vasilito ff5a132a9d fix: comprehensive boot hardening — crashes, warnings, sensors, bare-metal PS/2
- firmware-loader: handle missing INIT_NOTIFY gracefully (Option<RawFd>)
- driver-params: suppress ENODEV (19) on missing driver-manager scheme
- compositor: add wl_seat.name + pointer capabilities for Qt6 compat
- greeter: use redox QPA (libqredox.so) instead of broken Qt6 Wayland
- greeter: reduce DRM wait 10s→2s, kded6 offscreen QPA to avoid crash
- thermald: add CPU die temperature via MSR IA32_THERM_STATUS (Linux coretemp)
- pcid: diagnostic MCFG warning with Q35 guidance, address validation
- dhcpd: auto-interface detection (P0-dhcpd-auto-iface.patch wired)
- procmgr: SIGCHLD EPERM→debug (kernel limitation, not a bug)
- ps2d LED: warn→debug on modern hw without real PS/2 controller
- ps2d mouse: 10×1s→3×250ms retry, fast-fail on unknown response
- i2c RON: handle empty response from i2cd when no adapters present
- base recipe: wire 6 new/improved patches
- config: remove INIT_SKIP, enable all 14 previously-suppressed daemons
2026-05-06 11:16:18 +01:00
vasilito f31522130f fix: comprehensive boot warnings and exceptions — fixable silenced, unfixable diagnosed
Build system (5 gaps hardened):
- COOKBOOK_OFFLINE defaults to true (fork-mode)
- normalize_patch handles diff -ruN format
- New 'repo validate-patches' command (25/25 relibc patches)
- 14 patched Qt/Wayland/display recipes added to protected list
- relibc archive regenerated with current patch chain

Boot fixes (fixable):
- Full ISO EFI partition: 16 MiB → 1 MiB (matches mini, BIOS hardcoded 2 MiB offset)
- D-Bus system bus: absolute /usr/bin/dbus-daemon path (was skipped)
- redbear-sessiond: absolute /usr/bin/redbear-sessiond path (was skipped)
- daemon framework: silenced spurious INIT_NOTIFY warnings for oneshot_async services (P0-daemon-silence-init-notify.patch)
- udev-shim: demoted INIT_NOTIFY warning to INFO (expected for oneshot_async)
- relibc: comprehensive named semaphores (sem_open/close/unlink) replacing upstream todo!() stubs
- greeterd: Wayland socket timeout 15s → 30s (compositor DRM wait)
- greeter-ui: built and linked (header guard unification, sem_compat stubs removed)
- mc: un-ignored in both configs, fixed glib/libiconv/pcre2 transitive deps
- greeter config: removed stale keymapd dependency from display/greeter services
- prefix toolchain: relibc headers synced, _RELIBC_STDLIB_H guard unified

Unfixable (diagnosed, upstream):
- i2c-hidd: abort on no-I2C-hardware (QEMU) — process::exit → relibc abort
- kded6/greeter-ui: page fault 0x8 — Qt library null deref
- Thread panics fd != -1 — Rust std library on Redox
- DHCP timeout / eth0 MAC — QEMU user-mode networking
- hwrngd/thermald — no hardware RNG/thermal in VM
- live preload allocation — BIOS memory fragmentation, continues on demand
2026-05-05 20:20:37 +01:00