Commit Graph

255 Commits

Author SHA1 Message Date
vasilito c22147d673 inputd: fix scheme name input/evdev -> input-evdev
Redox scheme names are flat identifiers; '/' is rejected by
RedoxScheme::new() causing inputd to panic at boot:
  initnsmgr.rs:301: Invalid scheme name: input/evdev

All consumers updated: EvdevProducerHandle (lib.rs), evdevd,
virtio-inputd, intel-thc-hidd, ps2d, usbhidd, i2c-hidd.
Plan doc updated (21 references).

Base fork commit: 4c1fa35c
2026-06-10 10:42:38 +03:00
vasilito 52459b7873 redbear-full: re-enable amdgpu (v6.0 2026, 0.2.3)
The amdgpu recipe's idr_* / ida_* header conflict with linux-kpi is
now resolved (see the preceding commit). Re-enable amdgpu in
redbear-full.toml by changing amdgpu = "ignore" to amdgpu = {} and
add a [package] section to the amdgpu recipe marking the 0.2.3
release and describing the bounded display-glue compile surface
(DCN20 / DCN30 / DCN31 backend files plus the Rust-side init /
connector detection / modeset glue).
2026-06-09 15:08:31 +03:00
vasilito ebeb737f1e sddm: fix theme to maya; fix plasmawayland.desktop Exec to startplasma-wayland 2026-06-09 14:47:41 +03:00
vasilito 4c2402af76 redbear-full: add pipewire + wireplumber packages and D-Bus activation
The redbear-full desktop target now pulls in pipewire and wireplumber
as the audio backend for KDE Plasma (Phonon, KMix, the Plasma audio
widget). This wires up the packages built by the new
local/recipes/libs/pipewire and local/recipes/libs/wireplumber
recipes on top of the existing audiod scheme daemon in the base
package.

Changes:

  * config/redbear-full.toml
    - new [packages] entries for pipewire and wireplumber
    - two new [[files]] init services: 15_pipewire.service and
      16_wireplumber.service (both oneshot_async, depend on
      12_dbus.service)

  * local/recipes/system/redbear-dbus-services/files/
    - new org.freedesktop.PipeWire.service (system bus, runs
      /usr/bin/pipewire) and org.pulseaudio.Server.service
      (system bus, runs /usr/bin/pipewire-pulse)
    - new org.freedesktop.impl.pulseaudio.service (session bus,
      runs /usr/bin/pipewire-pulse) for KDE Phonon / KMix
    - matching .conf policy files for org.freedesktop.PipeWire
      and org.pulseaudio.Server that allow the expected
      Introspectable / Properties / *Manager / *Node / *Link /
      *Client / *Device / *Meter / *Core / *Port send and
      receive patterns

  * config/protected-recipes.toml
    - new [libs] entries for pipewire and wireplumber, so the
      cookbook never silently re-fetches them; sources are
      directly editable in local/sources/

  * recipes/wip/services/{pipewire,wireplumber}
    - replaced the tracked WIP directories with symlinks to
      local/recipes/libs/{pipewire,wireplumber}, per the
      local-over-WIP convention enforced by
      local/scripts/build-redbear.sh

Known build state (documented in the upstream README-redbear.md
files in each source fork):

  * pipewire build reaches ~24/603 C files compiled before
    hitting relibc gaps (sys/prctl.h, sys/mount.h, and a few
    Linux-specific ioctls). The recipe, source fork, and
    Redox-compat shims are in place; the remaining work is
    upstream relibc headers, not PipeWire porting decisions.
  * wireplumber recipe is in place but the build has not been
    attempted yet — wireplumber depends on the pipewire build
    completing first.

The audiod integration (the scheme backend that pipewire would
talk to) is not implemented in this commit. That is the next
gating work item and is tracked in
local/sources/pipewire/README-redbear.md.
2026-06-09 11:45:22 +03:00
vasilito f9a2f28165 config: drop legacy 'inputd -A 2' rootfs invocation (v6.0)
The initfs already starts inputd (in phase 1) and registers the
'scheme input/evdev'. The rootfs 29_activate_console.service was
calling 'inputd -A 2' from minimal.toml, which the v6.0 inputd
binary does not accept (no -A flag; v6.0 inputd is a pure scheme
daemon that registers the single-producer evdev ring buffer).

Override the rootfs service with a no-op ('true') that satisfies
the unit dependency chain without re-spawning inputd. The actual
input pipeline (drivers writing Linux evdev, evdevd reading from
the scheme, libinput/KWin consuming /dev/input/eventN) works
without this redundant rootfs invocation.
2026-06-09 11:24:06 +03:00
Vasili a9fa0310aa upower,udisks: implement real D-Bus interfaces for power and disk management 2026-06-09 11:21:43 +03:00
vasilito a63762b083 config: drop *-stub recipe references; add real libudev
Cross-cutting changes tied to the libepoxy/libxcvt/libdisplay-info/
lcms2/libudev stub-removal work:

  - config/protected-recipes.toml [graphics]: add libepoxy, libxcvt,
    libdisplay-info, lcms2 (real Red Bear recipes under local/recipes)
  - config/protected-recipes.toml [libs]: drop the 5 *-stub entries,
    add 'libudev' (renamed from libudev-stub)
  - local/recipes/AGENTS.md catalog: drop the 5 *-stub rows, update
    the 5 real lib rows to reflect the v6.0 2026 fork
  - local/scripts/apply-patches.sh: drop the 5 *-stub symlink
    creation entries; add libudev symlink entry

(The redbear-full.toml package list was already updated to enable
libdisplay-info, libxcvt, lcms2 and add libudev, as part of the
pam-redbear commit that included both changes.)
2026-06-09 10:40:40 +03:00
vasilito 67c59641ff pam-redbear: port minimal PAM to Redox; proxy to redbear-authd 2026-06-09 10:37:32 +03:00
vasilito b7ec7f42e7 config: fix /var/log and /var/run permissions; remove invalid rtcd uid field
- /var/log and /var/run: override base.toml's 0o755 (root-only write) to
  0o1777 (sticky-bit world-writable) so log/run daemons running under
  non-root users (messagebus, etc.) can create files in them.
- 00_rtcd.service: remove invalid uid=0 field. The init service parser
  uses serde(deny_unknown_fields) and only accepts cmd, args, envs,
  inherit_envs, type — uid caused 'unknown field uid' parse error.
2026-06-09 03:31:55 +03:00
vasilito 8e491d74b7 config: redbear-full: evdevd in init, inputd removed 2026-06-09 03:09:19 +03:00
vasilito b681a2fb66 virtio-inputd: review-driven fixes for BLOCKERs and MAJORs (Phase 5.1 hardening)
Two parallel review agents cross-checked the virtio-inputd driver against
the Linux 7.1 reference (drivers/virtio/virtio_input.c, virtio_input.h)
and the proven redox-drm virtio transport. 12 issues were found across
BLOCKER, MAJOR, MINOR, and NIT severity, all fixed in this commit before
runtime testing.

BLOCKERs (would have prevented the driver from working in QEMU):

  1. fill_avail() never wrote avail_idx after pushing the 64 ring
     entries. The device reads avail_ring[avail_idx % size] to discover
     new buffers, so without publishing avail_idx = size, the device
     saw avail_idx = 0 and ignored all initial buffers. Fix: explicit
     'fence(Release); write_avail_idx(self.size)' with a spec citation.

  2. drain() recycled IDs derived from 'last_used_idx - drained_count',
     which is wrong when the used ring wraps and a single drain cycle
     spans more than one full ring revolution. Fix: collect the actual
     drained 'id' values in a stack '[u16; 64]' array during the drain
     loop, then push those exact ids back to the avail ring. The
     doc-comment explains why the derivation is unsafe.

  3. config_read_string() and config_read_bitmap() used
     'self.device_cfg.size()' (the MMIO region size = 40) instead of
     the device-reported config size from offset 2. Fix: use
     'config_read_size()' to read the actual size field.

  4. config/redbear-full.toml: device_id_range was a TOML string
     ('0x1042..=0x107F') but serde's Range<u16> deserializes from a
     sequence, not a string. pcid-spawner would have silently failed
     to load the fragment. Fix: use serde array form
     'device_id_range = [0x1042, 0x107F]'.

MAJORs (silent failure modes or runtime bugs):

  5. activate_queue() had no fence between address writes and
     'queue_enable = 1'. A CPU write buffer may reorder writes to
     distinct MMIO addresses. Fix: explicit 'fence(SeqCst)' with
     a comment citing virtio spec 2.8 and Linux's virtio_wmb.

  6. No 'reset_device()' on error path after partial init. The device
     would be left in ACKNOWLEDGE|DRIVER with no driver active,
     requiring a guest reboot to recover. Fix: wrap init in a closure;
     any error calls 'transport.reset_device()' before propagating.

  7. Drain loop never checked DEVICE_NEEDS_RESET or DEVICE_STATUS_FAILED.
     If the device entered an unrecoverable state, the driver would
     poll forever with stale state. Fix: 'device_in_error_state()' on
     the transport; loop checks it each iteration and exits cleanly.

  8. The abs_count probe used 'config_read_size() == 24', which was
     always false (virtio_input_absinfo is 20 bytes, not 24). The
     count was always logged as 0. Fix: '>= 20' per spec.

MINORs / NITs (hardening, no functional impact):

  9. config_read_absinfo() returned AbsInfo without validating
     device-reported size. Now returns Option<AbsInfo> and validates
     size >= 20.

 10. map_cap_region() missing bounds check: capability range may
     extend past BAR end (QEMU is permissive; bare-metal is not).
     Added 'cap_end > bar_size' check with spec reference.

 11. Legacy device 0x1052 entry in pcid fragment caused spurious
     spawn + log noise. Removed.

 12. notify_queue() error silently dropped with .ok(). Now logs warn
     and continues.

Plan update:

The CONSOLE-TO-KDE-DESKTOP-PLAN.md v5.1 changelog now has a new
'9.1.1 Phase 5.1 review-driven fixes' section documenting all 12
findings with file:line, severity, and fix. Future maintainers can
trace the BLOCKERs back to specific commits to understand the
critical-path safety net this review provided.

Verification: cargo check zero errors, 64 warnings (all unused
keycode constants reserved for Phase 5.2 expansion). The driver
is now ready for runtime testing in QEMU.
2026-06-08 22:43:38 +03:00
vasilito 19a9eecb54 virtio-inputd: implement Phase 5.1 virtio-input driver
Add a real, QEMU-targeted virtio-input driver as a new Red Bear recipe at
local/recipes/drivers/virtio-inputd/. The driver handles virtio-input-host-pci,
virtio-input-keyboard, virtio-input-mouse, and virtio-input-tablet devices and
closes Gap #19 of the v5.0 desktop plan.

The driver:

  * Walks the PCI capability list to find the modern virtio 1.0 capability
    block (common_cfg, notify_cfg, isr_cfg, device_cfg) using MmioRegion
    mappings via redox-driver-sys. Rejects legacy virtio-input (device 0x1052)
    which lacks the modern transport.
  * Negotiates VIRTIO_F_VERSION_1 only (the only required feature).
  * Allocates one event virtqueue (size up to 64) backed by four DMA buffers
    (desc, avail, used, event_buffers) and pre-fills the avail ring.
  * Polls the used ring at 60 Hz, drains completed events, decodes each
    virtio_input_event (8-byte type/code/value), and recycles drained buffers
    back to the avail ring.
  * Translates events to orbclient format and pushes them to inputd via
    ProducerHandle (Orbital path):
      - EV_KEY  -> KeyEvent  (with US-QWERTY character mapping)
      - EV_REL  -> MouseRelativeEvent (REL_X/REL_Y) or ScrollEvent (REL_WHEEL)
      - EV_SYN  -> dropped (inputd multiplexes)
      - Other   -> dropped (Phase 5.2 will add evdevd path)

Probe-time checks:

  * Vendor 0x1AF4, device_id >= 0x1042, revision >= 1
  * Caps include a device_cfg block with virtio type == 18 (virtio_input)

Configuration: a pcid-spawner fragment is added to config/redbear-full.toml
under /etc/pcid.d/virtio-inputd.toml matching class=0x09 vendor=0x1AF4 with
device_id_range 0x1042..=0x107F (and a separate 0x1052 entry that the driver
intentionally rejects).

Verification: cargo check produces 0 errors and 65 warnings, all of which are
unused input-event-codes.h constants reserved for the Phase 5.2 expansion.
Linking the binary requires the Redox cross-toolchain (relibc provides
redox_sys_call_v0); this is provided by the build system, not the host
toolchain.

Plan: this is Phase 5.1 of CONSOLE-TO-KDE-DESKTOP-PLAN.md v5.0. The plan is
updated to v5.1 with: (a) a 'What Changed Since v5.0' section, (b) Gap #19
marked DONE, (c) Phase 5 row marked DONE with sub-task status, (d) Gate E
updated, (e) Input pipeline section updated to reflect the (c) path is now
implemented. Phase 5.2 (evdevd producer path + virtio-snd) is documented as
the next planned work but not yet implemented.
2026-06-08 22:18:00 +03:00
vasilito 788fdeddff configs + quirks.d/25-xhci: R7 audit fixes (boot order race + xHCI typo)
Two findings from the R7 comprehensive review:

1. Boot order race (CRITICAL)
   00_driver_manager.service and 00_acpid.service both have the
   00_ prefix and no explicit dependency. If driver-manager
   enumerates PCI before acpid publishes /scheme/acpi/dmi, every
   device gets empty quirk_flags because
   redox_driver_sys::quirks::dmi::read_dmi_info() returns Err(())
   when the file doesn't exist yet. The OR-accumulation is frozen
   at enumeration time so hotplug won't pick up later-published
   DMI data.

   Fix: add 00_acpid.service to requires_weak for both
   00_driver_manager.service (redbear-device-services.toml) and
   13_iommu.service (redbear-mini.toml + redbear-full.toml).

2. xHCI typo (CRITICAL)
   quirks.d/25-xhci.toml:38 has 'broken_port_pec' which doesn't
   exist in the flag name table. The correct flag is
   'broken_port_ped' (Port Enabled/Disabled, bit 25 in
   XhciControllerQuirkFlags). The typo causes the flag to be
   silently dropped at runtime, leaving Intel ICH6 xHCI
   (vendor=0x8086, device=0x1E31) without the intended
   BROKEN_PORT_PED quirk.

   Fix: corrected typo to 'broken_port_ped'.
2026-06-08 03:43:20 +03:00
vasilito c492e9153b session-launch: set KWIN_DRM_DEVICES default for kde-wayland sessions
On Redox there is no udev-based DRM device enumeration. KWin's DRM
backend relies on m_udev->listGPUs() which returns nothing without udev.
Add a fallback: when no KWIN_DRM_DEVICES is set and the session is
kde-wayland, inject KWIN_DRM_DEVICES=/scheme/drm/card0 so KWin knows
which device to open. This fixes the 'No suitable DRM devices' error
that prevented KWin from starting on Redox.

Added test: build_environment_sets_kwin_drm_devices_default_for_kde_wayland
to verify the fallback is applied correctly.
2026-06-03 13:11:27 +03:00
vasilito 2da7738b76 config: restore redox-drm to enabled (was incorrectly suppressed)
redox-drm = "ignore" was left from earlier GPU-suppression tests.
Restored to active so the DRM/KMS display driver is included in
the full ISO image. Without it, no GPU output or SDDM compositor.
2026-06-02 23:23:00 +03:00
vasilito a39f741d23 drm: VIRGL quality fixes — GETPARAM expansion, set_property clarity, cursor clip
VIRTGPU_GETPARAM: expand from 1 to 8 sub-parameters for Mesa
compatibility. Mesa virgl driver probes CAPSET_QUERY_FIX,
RESOURCE_BLOB, CONTEXT_INIT, SUPPORTED_CAPSET_IDS, and
EXPLICIT_DEBUG_NAME during initialization.

set_property: add doc comment explaining that virtio-gpu has
no per-object property tables — all mode/fb/active changes
flow through atomic commit, not set_property.

cursor_move: replace x.max(0) as u32 / y.max(0) as u32 with
explicit if-else for clarity. Negative coordinates now clamp
to zero at screen edges (same behavior, more readable code).
2026-06-02 17:59:58 +03:00
vasilito 274669d47d config: enable Mesa with Intel iris+crocus Gallium drivers
recipes/libs/mesa/recipe.toml:
- Add iris,crocus to -Dgallium-drivers (was swrast,virgl only)
- Intel iris: Gen8+ (Broadwell through Battlemage)
- Intel crocus: Gen4-7 (i965G through Haswell)

config/redbear-full.toml:
- Change mesa = "ignore" to mesa = {} for desktop target
- Mesa was previously excluded from redbear-full images
2026-06-02 15:17:57 +03:00
vasilito 7686729069 drm: implement syncobj and fence for VIRGL/VirtIO driver
Extract protocol-agnostic FenceTimeline from Intel to shared
src/drivers/fence.rs — atomic-based fence tracking suitable
for Intel, VIRGL, and AMD drivers.

Extract protocol-agnostic SyncobjManager from Intel to shared
src/drivers/syncobj.rs — syncobj create/destroy/signal/reset/
wait/query and sync_file fd export/import.

Wire both into VirtioDriver:
- Add FenceTimeline + SyncobjManager fields
- Implement all 5 GpuDriver syncobj trait methods
  (create, destroy, wait, export_fd, import_fd)
- Track fence seqnos in virgl_submit_3d (allocate
  before submit, signal after completion)

Intel fence.rs and syncobj.rs converted to thin re-export
modules pointing at shared sources — no behavioral change
for Intel driver.

This gives Mesa VIRGL userspace the standard DRM syncobj
API for GPU/compositor synchronization.
2026-06-02 14:33:28 +03:00
vasilito bccc2f7dd1 console: fix login prompt by avoiding oneshot scheduler deadlock
29_activate_console: changed from oneshot back to oneshot_async.
The oneshot type calls child.wait() which blocks the entire init
scheduler. If inputd doesn't drain its control channel promptly,
ControlHandle::write() hangs forever, freezing boot.

30_console: added 'sleep 0.2' before 'exec getty 2' to give
inputd time to process the VT activation before getty opens
/scheme/fbcon/2. Eliminates the race condition without
blocking the init scheduler.
2026-06-02 10:21:05 +03:00
vasilito 556c9ac93d redbear-mini: add sed, nano to text-mode ISO; re-enable mc
mc builds fine after gnulib cross-compile fixes. sed and nano cook
successfully. file and less blocked pending further debugging.
2026-06-02 09:58:55 +03:00
vasilito 6d14a378c3 coretempd: disable MSR fallback, use /scheme/sys/cpu exclusively
Kernel has a use-after-free bug in sys_read triggered by /scheme/sys/msr
access. The probe guard prevents most crashes but the kernel bug can still
trigger during MSR read paths. Removing the MSR fallback eliminates this
crash path entirely. Vendor detection now uses /scheme/sys/cpu only.
2026-06-02 09:22:47 +03:00
vasilito baabf08c22 redbear-full: fix console activation race (oneshot_async->oneshot), suppress amdgpu build, enable SDDM config 2026-06-02 08:30:18 +03:00
vasilito d5636ae1de intel: P0/P1 — LRC context state, MI commands, DDI sequences, pipe scaler
context.rs: proper LRC image population
  Removed context restore inhibit — GPU now saves/restores state on preempt
  Added PDP register initialization in LRC image (4 PDP entries)
  Added FAULT_AND_STREAM_CTL, BB_STATE initialization
  set_pdp_registers() for per-context PPGTT configuration

ring.rs: MI command emission helpers
  emit_bb_start/emit_bb_end: batch buffer chaining
  emit_load_register_imm: LRI for workaround application
  emit_store_data_imm: store-to-memory for fence signaling
  emit_arb_check: preemption point insertion
  emit_semaphore_wait: inter-engine synchronization
  emit_user_interrupt: explicit interrupt generation

display.rs: DDI pre-enable/post-disable sequences
  ddi_pre_enable: DP link retrain + DDI_BUF_CTL enable with pipe routing
  ddi_post_disable: DDI_BUF_CTL, PIPECONF, DSPCNTR disable + pipe update
  Pipe scaler PS_CTRL/PS_WIN_POS/PS_WIN_SIZE programming in set_mode

regs.rs + regs_gen9/gen12/xe2: scaler register trait methods
  ps_ctrl, ps_win_pos, ps_win_size at 0x68180/0x68170/0x68174 per pipe
2026-06-01 23:58:13 +03:00
vasilito 7cfef2633e fix: m4 recipe - fix_types.h for cross-compiler header ordering
The cross-compiler's GCC built-in stddef.h is blocked by relibc's
_STDDEF_H guard, causing size_t/off_t/ptrdiff_t to be undefined.
Add fix_types.h with guarded typedefs and force-include via CPPFLAGS.

Also: comprehensive upstream relibc comparison for systematic import.

Remaining: redoxer env overrides CC, injecting broken stdint typedefs
from its toolchain. This needs a redoxer-level fix to clean the
injected flags before passing to build commands.
2026-06-01 18:53:05 +03:00
vasilito a52632f69d fix: bits_pthread cbindgen needs stddef.h for size_t type
The generated bits/pthread.h uses size_t but had no includes.
Also added openat cache vars to m4 recipe for gnulib cross-compilation.
2026-06-01 17:00:53 +03:00
vasilito b167e20899 fix: revert coretempd service type to oneshot_async
coretempd uses syscall::call::write() for init notification, which
sends raw bytes — not an fd transfer via CallFlags::FD that the Scheme
init type expects. Changing to Scheme would cause init to block forever
in call_ro waiting for an fd that never arrives in the expected format.
The oneshot_async + resilience pattern is correct for coretempd.
2026-06-01 09:20:45 +03:00
vasilito 77795cfa18 fix: redbear-mini boot to login prompt + daemon hardening
- 29_activate_console.service: oneshot -> oneshot_async (unblocks init
  scheduler, enabling getty 2 -> login)
- 15_coretempd.service: oneshot_async -> {scheme="coretemp"} (init
  now correctly registers the scheme fd)
- cpufreqd: child-process MSR probe detects QEMU's lack of MSR 0x199
  and gracefully degrades to monitoring-only mode
- coretempd: notification failure is now non-fatal (WARN instead of ?)
- driver-manager: "no match entries" downgraded from warn to debug
  (infrastructure daemons intentionally have no hw match)
2026-06-01 09:02:42 +03:00
vasilito 3431bbfeb2 Fix duplicate atomic_t typedef conflicting with types.h 2026-05-31 05:50:29 +03:00
vasilito daf131d435 P7 login diagnostics, P11 init noise reduction, config layering fix 2026-05-29 19:13:16 +03:00
vasilito c0a93e5cfa Add input driver init services and driver-manager configs
- ps2d: PS/2 keyboard/mouse (init service + driver-manager wildcard match)
- i2c-hidd: I2C HID keyboard/touchpad (init service + driver-manager match)
- intel-thc-hidd: Intel Touch Host Controller HID (init service + PCI match)

Fixes i2c-hidd path: /usr/bin/i2c-hidd (not /usr/lib/drivers/).

These drivers were already built in the base package but were not wired
into the boot process. Modern Intel notebooks typically use either
i8042 EC emulation (PS/2) or I2C HID for keyboard/touchpad.
2026-05-29 15:44:35 +03:00
vasilito bb3ae6e63f feat: Phase 1 - Plan 9 namespace privilege drop + branding
- login.rs: drop privileges via setresugid after authentication
- login.rs: add namespace isolation to password auth path (was missing)
- login.rs: add drm, input schemes to DEFAULT_SCHEMES
- sudo service: rename 00_sudo -> 12_sudo, type daemon (no boot block)
- Branded login screen with figlet RedBear OS v0.2.2 'Liliya'
- Root user kept but not advertised on login screen
- P6-login-privilege-drop.patch generated and wired

Implements Phase 1 of Plan 9 namespace privilege model:
login creates restricted namespace (mkns/setns) then drops
uid/gid to authenticated user before spawning shell.
2026-05-29 09:54:28 +03:00
vasilito 61135b0cce chore: bump OS version to 0.2.2 2026-05-29 09:06:24 +03:00
vasilito 9db9c3bdc9 feat: ISO size reduction, user account, SDDM, PAM, VirtIO fixes, KDE/Qt patches
- Trim redbear-firmware from 1816MB to 143MB (GPU+WiFi only)
- Reduce filesystem_size from 8192 to 2048 MB
- Add unprivileged user account (uid=1000, sudo group)
- Add SDDM display manager recipe with Wayland-only patches
- Add pam-redbear PAM module for authentication
- Fix VirtIO queue timeout (SeqCst fence, remove permanent failure)
- KDE/KWin build fixes (libinput, wayland socket, ramfile, tabletmode)
- Qt6 build fixes (platformdefs, socket engine, Wayland integration)
- KF6 CMake fixes (attica, kcmutils, kcolorscheme, kcompletion, etc.)
- libxml2 build fix, libxkbcommon recipe fix
- Remove gcc-native/binutils-native from desktop ISO
2026-05-29 09:00:55 +03:00
vasilito 845ae99f9d fix graphical boot: DRM scheme detection, ConsoleKit bypass, boot chain deps
Three fixes for the KWin DRM device discovery failure:

1. drm_scheme_ready(): replace head -c 1 with exec 3< open test.
   Reading from a DRM scheme fd blocks because the scheme expects
   ioctl-style request/response, not streaming reads. Use open()
   success as the scheme availability probe instead.

2. ConsoleKitSession::create(): return nullptr immediately.
   The D-Bus isServiceRegistered() call can block indefinitely when
   the bus daemon doesn't fully implement org.freedesktop.DBus.
   With both LogindSession and ConsoleKitSession returning nullptr,
   Session::create() falls through to NoopSession which uses plain
   open() for DRM device access.

3. Boot chain deps: redox-drm depends on driver-manager,
   greeter depends on evdevd (keyboard/mouse ready before login).

Also includes: KF6 CMake build fixes, Qt6 platform patches,
libdrm Redox ioctl shim, and wayland.toml scheme check fix.
2026-05-28 23:19:49 +03:00
vasilito 2d11c98428 fix: add 8 missing recipes to protected-recipes.toml
Missing from initial TOML conversion:
- kf6-ksvg, kf6-pty, kf6-notifyconfig, kf6-parts (KDE frameworks)
- kglobalacceld (KDE global accelerator daemon)
- redbear-keymapd, redbear-ime, redbear-accessibility (input services)

Total protected recipes: 119 (matches original hardcoded list)
2026-05-28 17:54:07 +03:00
vasilito a0244075e7 build system audit: implement Phase 1-3 fixes comprehensively
Phase 1 (Critical):
- Fix broken config includes: redbear-minimal -> redbear-mini in wifi/bt experimental configs
- Fix 05_boot-essential.target dependency: 00_base -> 04_drivers for correct boot ordering
- Fix IOMMU service dependency: 00_base -> 05_boot-essential
- Fix firmware-loader dependency: 00_base -> 05_boot-essential
- Fix messagebus shell: /usr/bin/zsh -> /usr/bin/false (security)
- Add offline gate to fetch-firmware.sh (REPO_OFFLINE=1 blocks network access)
- Add --upstream gate to fetch-all-sources.sh (network access requires explicit opt-in)
- Gate U-Boot wget calls in mk/qemu.mk with REPO_OFFLINE check
- Fix patch-inclusion-gate.sh: rewrite from Python deps to pure shell implementation
- Fix build-redbear.sh: remove direct patch application, let repo fetch handle it atomically

Phase 2 (High):
- Increase redbear-full filesystem_size: 4096 -> 8192 MiB for KDE desktop
- Deprecate redbear-greeter-services.toml (orphaned, not included by any config)
- Add cascade rebuild target to Makefile (make cascade.<package>)
- Gate cargo-update.sh with REDBEAR_ALLOW_UPSTREAM
- Add deprecation notice to apply-patches.sh
- Make protected recipe list data-driven via config/protected-recipes.toml
- Replace 127-entry hardcoded Rust matches! with TOML config file reader

Phase 3 (Medium):
- Fix 5 phantom doc references in local/AGENTS.md (retired/removed docs)
- Fix stale config names: redbear-minimal -> redbear-mini across scripts
- Fix duplicate references in docs/README.md
- Fix run_full.sh and run_mini.sh: hardcoded paths -> relative paths + error handling
2026-05-28 17:24:50 +03:00
vasilito cb50169517 P0-P3 baseline for P4 2026-05-28 15:49:45 +03:00
vasilito 328d1abbcd rate-limit scheme error spam to prevent serial log flood 2026-05-28 00:36:17 +03:00
vasilito 475067ca8b Merge master graphics stack into 0.2.0
- config/redbear-full.toml: take master version with Intel GPU + VirtIO GPU
  pcid configs for automatic redox-drm loading, corrected requires_weak
  targets, removed incorrect default_dependencies=false, improved D-Bus/
  sessiond/seatd dependency chain
- kf6-extra-cmake-modules: minor cmake flag cleanup (remove BUILD_DOC=OFF)

Kept bootprocess redox-drm source (superior: 128-byte EDID with valid
checksum, safe MMIO pipeframe reads with bounds checks). All other
graphics recipes (Mesa, libdrm, Wayland, Qt6, KF6, KDE) already
identical between branches.
2026-05-27 07:33:45 +03:00
vasilito b9de373b31 Merge bootprocess branch overlay into 0.2.0
Restore all bootprocess branch files that were overwritten by later 0.2.0
commits. This overlay brings back the complete boot infrastructure:

- Configs: redbear-full, redbear-mini, redbear-device-services, driver .d files
- Kernel: IRQ affinity, x2APIC, C-states, NUMA (SLIT/SRAT), MCS locks, cpuidle
- Base patches: P0-P55 + new P6 (lived block_size=512) + P57 (fbbootlogd graceful init)
- Driver infra: driver-manager, udev-shim, thermald, cpufreqd, iommu, redox-driver-sys/core
- GPU: redox-drm with improved connector handling
- System: redbear-info, redbear-hwutils phase-timer-check
- Build system: fetch.rs improvements, build-iso.sh, run_full.sh
- Kernel source: new ACPI (SLIT, SRAT), cpuidle, cstate, MCS lock modules

83 files changed, +3966/-1248 lines
2026-05-27 06:47:23 +03:00
vasilito af05babbb2 WIP: recipe patches, expat/libxml2/libmpfr autogen, kf6/qt cmake fixes, new relibc patches 2026-05-26 06:56:30 +03:00
vasilito 0c8be761eb Merge master into 0.2.0 (688 commits, theirs pref for conflicts) 2026-05-21 21:37:43 +03:00
vasilito 6ca3e47383 Add coretempd CPU temperature sensor daemon
New local recipe coretempd reads IA32_THERM_STATUS MSR via the
new sys:msr scheme and exposes per-CPU temperatures via scheme:coretemp.

- Reads IA32_THERM_STATUS (0x19C) and IA32_TEMPERATURE_TARGET (0x1A2)
- Calculates Celsius from digital readout relative to TjMax
- Exposes /scheme/coretemp/ directory with per-CPU temperature files
- Added to redbear-mini.toml (inherited by redbear-full)
- Added 15_coretempd.service init file
2026-05-20 13:46:43 +03:00
vasilito 9233726f58 P0..P71 baseline before fbcond/fbbootlogd init fix 2026-05-20 00:30:18 +03:00
vasilito f6c2eb2a8e feat: ACPI Wave 1 boot-critical hardening (P19) + robust patch generation
- P19-init-startup-hardening: Replace panic-grade expect/unwrap in init
  startup paths (getns, register_scheme_to_ns, setrens, filename parsing)
  with graceful error handling and logging
- P19-acpid-startup-hardening: Replace panic-grade calls in acpid with
  graceful degradation (rxsdt read failure → warn + exit 0, SDT parse →
  error + exit 1, I/O privilege → fatal, scheme registration → fatal,
  setrens → warn + continue, event loop errors → log + continue)
- P18-9-msi-allocation-resilience: Regenerate with git diff -U0 -w format
  for maximum context resilience
- fetch.rs: Change --fuzz=0 to --fuzz=3 for resilient patch application
- AGENTS.md: Document robust patch generation technique as mandatory
- Add P4/P5/P6/P7 patches (estale, dmi, i2c, ps2d hardening)
- Add P21 kernel x2apic SMP fix patch
- Multiple local recipe source improvements (redox-drm, driver-manager,
  driver-acpi, thermald)
- Config updates for redbear-mini and redbear-device-services
- Subsystem assessment document
2026-05-18 14:07:42 +03:00
vasilito cee25393d8 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 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 19c65be7b1 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 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 daa875fc56 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.
2026-05-11 10:10:35 +01:00