Add runtime tools and Red Bear service wiring

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

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
2026-04-14 10:50:42 +01:00
parent fd60edc823
commit 51f3c21121
62 changed files with 9613 additions and 881 deletions
+55
View File
@@ -13,8 +13,63 @@ filesystem_size = 10240
# Red Bear OS branding (os-release, hostname, motd)
redbear-release = {}
# Native Redox PCI/USB listing tools (lspci, lsusb)
redbear-hwutils = {}
# Redox-native netctl compatibility command
redbear-netctl = {}
# Terminal file manager (Midnight Commander port)
mc = {}
# Package builder (cub -S/-B/-G CLI)
cub = {}
[[files]]
path = "/etc/netctl"
data = ""
directory = true
mode = 0o755
[[files]]
path = "/etc/netctl/examples"
data = ""
directory = true
mode = 0o755
[[files]]
path = "/etc/netctl/examples/wired-dhcp"
data = """
Description='Red Bear wired DHCP profile'
Interface=eth0
Connection=ethernet
IP=dhcp
"""
[[files]]
path = "/etc/netctl/examples/wired-static"
data = """
Description='Red Bear wired static profile'
Interface=eth0
Connection=ethernet
IP=static
Address=('192.168.1.10/24')
Gateway='192.168.1.1'
DNS=('1.1.1.1')
"""
[[files]]
path = "/usr/lib/init.d/12_netctl.service"
data = """
[unit]
description = "Network profile application"
requires_weak = [
"10_smolnetd.service",
"10_dhcpd.service",
]
[service]
cmd = "netctl"
args = ["--boot"]
type = "oneshot"
"""
+229 -10
View File
@@ -1,22 +1,29 @@
# Red Bear OS Full Configuration
# Complete desktop + RBOS branding + ext4 + input drivers
# Note: GPU drivers (redox-driver-sys, linux-kpi, redox-drm, amdgpu)
# are not included because they need custom build templates.
# Build them separately with: ./local/scripts/build-amd.sh
#
# Desktop + RBOS branding + ext4 + input + Wayland + Qt6
# Build: make all CONFIG_NAME=redbear-full
# Live: make live CONFIG_NAME=redbear-full
#
# GPU driver stack (redox-driver-sys, linux-kpi, redox-drm, amdgpu): WIP crates
# need custom template (library-only, cargo install fails). Re-enable when fixed.
# KDE Frameworks + KWin: depend on qtdeclarative/qtwayland. Re-enable when ported.
# libinput/libevdev: WIP meson builds, not yet validated. Re-enable when tested.
# seatd: now builds; DRM lease/runtime validation is still open before enabling broadly.
include = ["desktop.toml"]
[general]
# 2GB filesystem — plenty for full desktop + headroom
filesystem_size = 2048
[packages]
# Red Bear OS branding (os-release, hostname, motd)
redbear-release = {}
# Native Redox PCI/USB listing tools (lspci, lsusb)
redbear-hwutils = {}
# Redox-native netctl compatibility command
redbear-netctl = {}
# Terminal file manager (Midnight Commander port)
mc = {}
@@ -30,12 +37,224 @@ firmware-loader = {}
evdevd = {}
udev-shim = {}
# Package builder (cub -S/-B/-G CLI)
cub = {}
# Diagnostic tool
redbear-info = {}
# RBOS meta-package (dependencies, default config)
redbear-meta = {}
# Process monitor
htop = {}
# Wayland protocol
libwayland = {}
# Keyboard support
libxkbcommon = {}
# Qt6 base (Core+Concurrent+Xml+Gui+Widgets, software rendering)
qtbase = {}
# RBOS meta-package — temporarily disabled (depends on GPU stack via redox-driver-sys)
# redbear-meta = {}
# Workaround: bash fails to cross-compile (upstream mkbuiltins.c issue)
# ion (from minimal) is the default shell anyway
bash = "ignore"
# Firmware directory for AMD/Intel GPU blobs
[[files]]
path = "/usr/firmware/amdgpu"
data = ""
directory = true
mode = 0o755
# ── Neutralize broken legacy scripts from upstream configs ─────────
#
# base.toml and desktop-minimal.toml ship legacy init scripts that use
# "notify <service>" — but "notify" is NOT a keyword in the legacy script
# parser (only "requires_weak" and "nowait" exist). This causes init to
# try executing a binary called "notify" which doesn't exist.
#
# The base source package already ships proper .service/.target files in
# its init.d/ directory. These get installed to /usr/lib/init.d/ during
# the build. We just need to neutralize the conflicting legacy scripts
# so only the proper .service/.target files remain active.
#
# Override each broken legacy script with an empty file. Init will still
# find the .target and .service files from the base package.
# base.toml: "notify ipcd", "notify ptyd", "nowait sudo --daemon"
# → Replaced by 00_base.target → 00_ipcd.service + 00_ptyd.service + 00_sudo.service
[[files]]
path = "/usr/lib/init.d/00_base"
data = ""
# base.toml: "pcid-spawner" (blocking, no keyword)
# → Replaced by 00_pcid-spawner.service (oneshot)
[[files]]
path = "/usr/lib/init.d/00_drivers"
data = ""
# base.toml: "notify smolnetd", "nowait dhcpd"
# → Replaced by 10_net.target → 10_smolnetd.service + 10_dhcpd.service
[[files]]
path = "/usr/lib/init.d/10_net"
data = ""
# desktop-minimal.toml: "notify audiod", "nowait orbital orblogin launcher"
# → audiod: 20_audiod.service (from base package, type=scheme)
# → orbital: needs its own .service file since base doesn't ship one
[[files]]
path = "/usr/lib/init.d/20_orbital"
data = ""
# ── Desktop services (not provided by base package) ────────────────
# Orbital display server + login + launcher
# desktop-minimal.toml had "nowait VT=3 orbital orblogin launcher"
[[files]]
path = "/usr/lib/init.d/20_orbital.service"
data = """
[unit]
description = "Orbital display server"
requires_weak = [
"10_net.target",
]
[service]
cmd = "orbital"
args = ["orblogin", "launcher"]
envs = { VT = "3" }
type = "oneshot_async"
"""
# ── Red Bear OS custom service .service files ──────────────────────
# firmware-loader: scheme daemon serving /scheme/firmware
# Uses SchemeDaemon which requires init to read the pipe (ServiceType::Scheme).
[[files]]
path = "/usr/lib/init.d/05_firmware-loader.service"
data = """
[unit]
description = "Firmware loading scheme"
requires_weak = [
"00_pcid-spawner.service",
]
[service]
cmd = "firmware-loader"
type = { scheme = "firmware" }
"""
# udev-shim: scheme daemon serving /scheme/udev
[[files]]
path = "/usr/lib/init.d/11_udev.service"
data = """
[unit]
description = "udev compatibility shim"
requires_weak = [
"00_pcid-spawner.service",
]
[service]
cmd = "udev-shim"
type = { scheme = "udev" }
"""
# evdevd: self-registers scheme, no INIT_NOTIFY handshake needed
[[files]]
path = "/usr/lib/init.d/10_evdevd.service"
data = """
[unit]
description = "Evdev input daemon"
requires_weak = [
"00_pcid-spawner.service",
]
[service]
cmd = "evdevd"
type = "oneshot_async"
"""
[[files]]
path = "/etc/netctl"
data = ""
directory = true
mode = 0o755
[[files]]
path = "/etc/netctl/examples"
data = ""
directory = true
mode = 0o755
[[files]]
path = "/etc/netctl/examples/wired-dhcp"
data = """
Description='Red Bear wired DHCP profile'
Interface=eth0
Connection=ethernet
IP=dhcp
"""
[[files]]
path = "/etc/netctl/examples/wired-static"
data = """
Description='Red Bear wired static profile'
Interface=eth0
Connection=ethernet
IP=static
Address=('192.168.1.10/24')
Gateway='192.168.1.1'
DNS=('1.1.1.1')
"""
[[files]]
path = "/usr/lib/init.d/12_netctl.service"
data = """
[unit]
description = "Network profile application"
requires_weak = [
"10_smolnetd.service",
"10_dhcpd.service",
]
[service]
cmd = "netctl"
args = ["--boot"]
type = "oneshot"
"""
# desktop-minimal.toml: "inputd -A 2", "nowait getty 2", "nowait getty /scheme/debug/no-preserve -J"
# Neutralize and replace with proper service files
[[files]]
path = "/usr/lib/init.d/30_console"
data = ""
[[files]]
path = "/usr/lib/init.d/30_console.service"
data = """
[unit]
description = "Console terminals"
requires_weak = [
"20_orbital.service",
]
[service]
cmd = "getty"
args = ["2"]
type = "oneshot_async"
"""
[[files]]
path = "/usr/lib/init.d/31_debug_console.service"
data = """
[unit]
description = "Debug console"
requires_weak = [
"20_orbital.service",
]
[service]
cmd = "getty"
args = ["/scheme/debug/no-preserve", "-J"]
type = "oneshot_async"
"""
+294
View File
@@ -0,0 +1,294 @@
# Red Bear OS KDE Plasma Desktop Configuration
# Build: make all CONFIG_NAME=redbear-kde
# Live: make live CONFIG_NAME=redbear-kde
#
# KDE Plasma 6 session with Wayland compositor
# Requires: D-Bus, libinput, Mesa, Qt6, KF6, KWin, plasma-workspace
include = ["desktop.toml"]
[general]
filesystem_size = 4096
[packages]
# Red Bear OS branding
redbear-release = {}
# ext4 filesystem support
ext4d = {}
# Firmware loading
firmware-loader = {}
# Input layer
evdevd = {}
udev-shim = {}
# D-Bus (session + system bus)
dbus = {}
# Wayland protocol
libwayland = {}
wayland-protocols = {}
# Input
libxkbcommon = {}
libevdev = {}
libinput = {}
# Seat management
seatd = {}
# Qt6 stack
qtbase = {}
qtdeclarative = {}
qtsvg = {}
qtwayland = {}
# KF6 Frameworks — Tier 1 (no special deps)
kf6-extra-cmake-modules = {}
kf6-kcoreaddons = {}
kf6-kwidgetsaddons = {}
kf6-kconfig = {}
kf6-ki18n = {}
kf6-kcodecs = {}
kf6-kguiaddons = {}
kf6-kcolorscheme = {}
kf6-kauth = {}
kf6-kitemmodels = {}
kf6-kitemviews = {}
# KF6 Frameworks — Tier 2
kf6-karchive = {}
kf6-kwindowsystem = {}
kf6-knotifications = {}
kf6-kjobwidgets = {}
kf6-kconfigwidgets = {}
# KF6 Frameworks — Tier 3 (needs D-Bus)
kf6-kcrash = {}
kf6-kdbusaddons = {}
kf6-kglobalaccel = {}
kf6-kservice = {}
kf6-kpackage = {}
kf6-kiconthemes = {}
kf6-kxmlgui = {}
kf6-ktextwidgets = {}
kf6-kirigami = {}
kf6-solid = {}
kf6-sonnet = {}
# KF6 Frameworks — Tier 4 (needs kio + kxmlgui)
kf6-kio = {}
kf6-kbookmarks = {}
kf6-kcompletion = {}
kf6-kdeclarative = {}
kf6-kcmutils = {}
plasma-framework = {}
# KDE Plasma
kwin = {}
plasma-workspace = {}
plasma-desktop = {}
breeze = {}
kde-cli-tools = {}
# Graphics
mesa = {}
libdrm = {}
# Workaround: bash fails to cross-compile
bash = "ignore"
# Firmware directory for AMD/Intel GPU blobs
[[files]]
path = "/usr/firmware/amdgpu"
data = ""
directory = true
mode = 0o755
# ── Neutralize broken legacy scripts from upstream configs ─────────
# base.toml uses "notify <service>" which is not a keyword in the legacy
# script parser. Base source package ships proper .service/.target files.
[[files]]
path = "/usr/lib/init.d/00_base"
data = ""
[[files]]
path = "/usr/lib/init.d/00_drivers"
data = ""
[[files]]
path = "/usr/lib/init.d/10_net"
data = ""
[[files]]
path = "/usr/lib/init.d/20_orbital"
data = ""
[[files]]
path = "/usr/lib/init.d/30_console"
data = ""
# ── Red Bear OS custom services ─────────────────────────────────────
[[files]]
path = "/usr/lib/init.d/05_firmware-loader.service"
data = """
[unit]
description = "Firmware loading scheme"
requires_weak = [
"00_pcid-spawner.service",
]
[service]
cmd = "firmware-loader"
type = { scheme = "firmware" }
"""
[[files]]
path = "/usr/lib/init.d/10_evdevd.service"
data = """
[unit]
description = "Evdev input daemon"
requires_weak = [
"00_pcid-spawner.service",
]
[service]
cmd = "evdevd"
type = "oneshot_async"
"""
[[files]]
path = "/usr/lib/init.d/11_udev.service"
data = """
[unit]
description = "udev compatibility shim"
requires_weak = [
"00_pcid-spawner.service",
]
[service]
cmd = "udev-shim"
type = { scheme = "udev" }
"""
[[files]]
path = "/usr/lib/init.d/12_dbus.service"
data = """
[unit]
description = "D-Bus system bus"
requires_weak = [
"00_base.target",
]
[service]
cmd = "dbus-daemon"
args = ["--system"]
type = "oneshot_async"
"""
[[files]]
path = "/usr/lib/init.d/13_seatd.service"
data = """
[unit]
description = "seatd seat management daemon"
requires_weak = [
"12_dbus.service",
]
[service]
cmd = "seatd"
args = ["-l", "info"]
type = "oneshot_async"
"""
[[files]]
path = "/usr/lib/init.d/20_orbital.service"
data = """
[unit]
description = "Orbital display server (KDE session)"
requires_weak = [
"10_net.target",
"12_dbus.service",
"13_seatd.service",
]
[service]
cmd = "orbital"
args = ["orbital-kde"]
envs = { VT = "3" }
type = "oneshot_async"
"""
[[files]]
path = "/usr/lib/init.d/30_console.service"
data = """
[unit]
description = "Console terminals"
requires_weak = [
"20_orbital.service",
]
[service]
cmd = "getty"
args = ["2"]
type = "oneshot_async"
"""
[[files]]
path = "/usr/lib/init.d/31_debug_console.service"
data = """
[unit]
description = "Debug console"
requires_weak = [
"20_orbital.service",
]
[service]
cmd = "getty"
args = ["/scheme/debug/no-preserve", "-J"]
type = "oneshot_async"
"""
# KDE session launcher
[[files]]
path = "/usr/bin/orbital-kde"
mode = 0o755
data = """
#!/usr/bin/env bash
set -ex
export DISPLAY=""
export WAYLAND_DISPLAY=wayland-0
export XDG_RUNTIME_DIR=/tmp/run/user/0
export XDG_SESSION_TYPE=wayland
export KDE_FULL_SESSION=true
export XDG_CURRENT_DESKTOP=KDE
export HOME=/root
export LIBSEAT_BACKEND=seatd
export SEATD_SOCK=/run/seatd.sock
mkdir -p /tmp/run/user/0
mkdir -p /var/lib/dbus
mkdir -p /run/dbus
# Start D-Bus system bus (if not already running)
if [ ! -S /run/dbus/system_bus_socket ]; then
dbus-uuidgen --ensure
dbus-daemon --system --fork
fi
# Start D-Bus session bus
eval $(dbus-launch --sh-syntax)
# Start KWin Wayland compositor
kwin_wayland --replace &
sleep 2
# Start Plasma Shell
plasmashell &
"""
+151 -7
View File
@@ -12,15 +12,159 @@ filesystem_size = 512
# Red Bear OS branding
redbear-release = {}
# Native Redox PCI/USB listing tools (lspci, lsusb)
redbear-hwutils = {}
# Redox-native netctl compatibility command
redbear-netctl = {}
# Terminal file manager
mc = {}
# Package builder
cub = {}
# Diagnostic tool
redbear-info = {}
# Firmware loading
firmware-loader = {}
# ── Neutralize broken legacy scripts from base.toml ─────────────────
# base.toml uses "notify <service>" which is not a keyword in the legacy
# script parser. Base source package already ships proper .service/.target
# files — we just need to suppress the conflicting legacy scripts.
# Input event handling
evdevd = {}
udev-shim = {}
[[files]]
path = "/usr/lib/init.d/00_base"
data = ""
[[files]]
path = "/usr/lib/init.d/00_drivers"
data = ""
[[files]]
path = "/usr/lib/init.d/10_net"
data = ""
# minimal.toml: "inputd -A 2", "nowait getty 2", "nowait getty /scheme/debug/no-preserve -J"
[[files]]
path = "/usr/lib/init.d/30_console"
data = ""
[[files]]
path = "/usr/lib/init.d/30_console.service"
data = """
[unit]
description = "Console terminals"
requires_weak = [
"10_net.target",
]
[service]
cmd = "getty"
args = ["2"]
type = "oneshot_async"
"""
[[files]]
path = "/usr/lib/init.d/31_debug_console.service"
data = """
[unit]
description = "Debug console"
requires_weak = [
"10_net.target",
]
[service]
cmd = "getty"
args = ["/scheme/debug/no-preserve", "-J"]
type = "oneshot_async"
"""
# ── Red Bear OS custom services ─────────────────────────────────────
[[files]]
path = "/usr/lib/init.d/05_firmware-loader.service"
data = """
[unit]
description = "Firmware loading scheme"
requires_weak = [
"00_pcid-spawner.service",
]
[service]
cmd = "firmware-loader"
type = { scheme = "firmware" }
"""
[[files]]
path = "/usr/lib/init.d/11_udev.service"
data = """
[unit]
description = "udev compatibility shim"
requires_weak = [
"00_pcid-spawner.service",
]
[service]
cmd = "udev-shim"
type = { scheme = "udev" }
"""
[[files]]
path = "/usr/lib/init.d/10_evdevd.service"
data = """
[unit]
description = "Evdev input daemon"
requires_weak = [
"00_pcid-spawner.service",
]
[service]
cmd = "evdevd"
type = "oneshot_async"
"""
[[files]]
path = "/etc/netctl"
data = ""
directory = true
mode = 0o755
[[files]]
path = "/etc/netctl/examples"
data = ""
directory = true
mode = 0o755
[[files]]
path = "/etc/netctl/examples/wired-dhcp"
data = """
Description='Red Bear wired DHCP profile'
Interface=eth0
Connection=ethernet
IP=dhcp
"""
[[files]]
path = "/etc/netctl/examples/wired-static"
data = """
Description='Red Bear wired static profile'
Interface=eth0
Connection=ethernet
IP=static
Address=('192.168.1.10/24')
Gateway='192.168.1.1'
DNS=('1.1.1.1')
"""
[[files]]
path = "/usr/lib/init.d/12_netctl.service"
data = """
[unit]
description = "Network profile application"
requires_weak = [
"10_smolnetd.service",
"10_dhcpd.service",
]
[service]
cmd = "netctl"
args = ["--boot"]
type = "oneshot"
"""