Update tracked configs and image helpers

This commit is contained in:
2026-04-20 18:37:35 +01:00
parent 1dbb191a74
commit 2b3b592dab
7 changed files with 154 additions and 46 deletions
+59 -11
View File
@@ -1,7 +1,7 @@
# Red Bear OS Full Configuration # Red Bear OS Full Configuration
# Primary desktop/session target: Wayland + KWin/KDE session surface on Red Bear OS. # Primary desktop/session target: Wayland + KWin/KDE session surface on Red Bear OS.
# Build: make all CONFIG_NAME=redbear-full # Build: make all CONFIG_NAME=redbear-full
# Live: make live CONFIG_NAME=redbear-live-full # Live: make live CONFIG_NAME=redbear-live-full # bare-metal live ISO only
# #
# This is the only active full desktop target. Wayland and KDE package/runtime surfaces are folded # This is the only active full desktop target. Wayland and KDE package/runtime surfaces are folded
# here instead of being split across redbear-wayland and redbear-kde. # here instead of being split across redbear-wayland and redbear-kde.
@@ -91,6 +91,7 @@ wayland-protocols = {}
# Keyboard support # Keyboard support
libxkbcommon = {} libxkbcommon = {}
xkeyboard-config = {}
libevdev = {} libevdev = {}
libinput = {} libinput = {}
@@ -284,6 +285,11 @@ data = ""
directory = true directory = true
mode = 0o755 mode = 0o755
[[files]]
path = "/usr/lib/fonts"
data = "/usr/share/fonts"
symlink = true
[[files]] [[files]]
path = "/usr/bin/redbear-validation-session" path = "/usr/bin/redbear-validation-session"
mode = 0o755 mode = 0o755
@@ -291,6 +297,9 @@ data = """
#!/usr/bin/env sh #!/usr/bin/env sh
export DISPLAY="" export DISPLAY=""
export HOME="${HOME:-/home/root}"
export USER="${USER:-root}"
export LOGNAME="${LOGNAME:-$USER}"
export WAYLAND_DISPLAY="${WAYLAND_DISPLAY:-wayland-0}" export WAYLAND_DISPLAY="${WAYLAND_DISPLAY:-wayland-0}"
export XDG_SESSION_TYPE=wayland export XDG_SESSION_TYPE=wayland
export LIBSEAT_BACKEND=seatd export LIBSEAT_BACKEND=seatd
@@ -308,6 +317,27 @@ if [ -z "${XDG_RUNTIME_DIR:-}" ]; then
fi fi
mkdir -p "$XDG_RUNTIME_DIR" mkdir -p "$XDG_RUNTIME_DIR"
chmod 700 "$XDG_RUNTIME_DIR" 2>/dev/null || true
wait_for_path() {
target="$1"
attempts=0
while [ "$attempts" -lt 30 ]; do
if [ -e "$target" ]; then
return 0
fi
attempts=$((attempts + 1))
sleep 1
done
return 1
}
if ! wait_for_path /run/dbus/system_bus_socket; then
echo "system D-Bus socket did not appear" >&2
exit 1
fi
sleep 2
wait_for_wayland_socket() { wait_for_wayland_socket() {
socket_path="$XDG_RUNTIME_DIR/$WAYLAND_DISPLAY" socket_path="$XDG_RUNTIME_DIR/$WAYLAND_DISPLAY"
@@ -329,16 +359,18 @@ if [ -z "${DBUS_SESSION_BUS_ADDRESS:-}" ]; then
eval "$(dbus-launch --sh-syntax)" eval "$(dbus-launch --sh-syntax)"
fi fi
let validation_request = "/run/redbear-kde-session.validation-request" validation_request="/run/redbear-kde-session.validation-request"
let validation_success = "/run/redbear-kde-session.validation-success" validation_success="/run/redbear-kde-session.validation-success"
if test -f $validation_request if [ -f "$validation_request" ]; then
echo "user=$USER" > $validation_success {
echo "runtime=$XDG_RUNTIME_DIR" >> $validation_success echo "user=$USER"
echo "wayland=$WAYLAND_DISPLAY" >> $validation_success echo "runtime=$XDG_RUNTIME_DIR"
rm -f $validation_request echo "wayland=$WAYLAND_DISPLAY"
} > "$validation_success"
rm -f "$validation_request"
exit 0 exit 0
end fi
dbus-update-activation-environment \ dbus-update-activation-environment \
DBUS_SESSION_BUS_ADDRESS \ DBUS_SESSION_BUS_ADDRESS \
@@ -354,7 +386,12 @@ if [ -d /usr/share/glib-2.0/schemas ]; then
glib-compile-schemas /usr/share/glib-2.0/schemas/ glib-compile-schemas /usr/share/glib-2.0/schemas/
fi fi
kwin_wayland --replace & if [ -n "$KWIN_DRM_DEVICES" ]; then
kwin_wayland_wrapper --drm &
else
echo "redbear-validation-session: using virtual KWin backend (set KWIN_DRM_DEVICES to enable DRM)" >&2
kwin_wayland_wrapper --virtual &
fi
kwin_pid=$! kwin_pid=$!
if ! wait_for_wayland_socket; then if ! wait_for_wayland_socket; then
@@ -452,12 +489,18 @@ export KDE_FULL_SESSION=true
export XDG_CURRENT_DESKTOP=KDE export XDG_CURRENT_DESKTOP=KDE
export LIBSEAT_BACKEND=seatd export LIBSEAT_BACKEND=seatd
export SEATD_SOCK=/run/seatd.sock export SEATD_SOCK=/run/seatd.sock
export QT_PLUGIN_PATH="${QT_PLUGIN_PATH:-/usr/plugins}"
export QT_QPA_PLATFORM_PLUGIN_PATH="${QT_QPA_PLATFORM_PLUGIN_PATH:-/usr/plugins/platforms}"
export QML2_IMPORT_PATH="${QML2_IMPORT_PATH:-/usr/qml}"
export XCURSOR_THEME="${XCURSOR_THEME:-Pop}"
export XKB_CONFIG_ROOT="${XKB_CONFIG_ROOT:-/usr/share/X11/xkb}"
if [ -z "${XDG_RUNTIME_DIR:-}" ]; then if [ -z "${XDG_RUNTIME_DIR:-}" ]; then
export XDG_RUNTIME_DIR="/tmp/run/user/$(id -u)" export XDG_RUNTIME_DIR="/tmp/run/user/$(id -u)"
fi fi
mkdir -p "$XDG_RUNTIME_DIR" mkdir -p "$XDG_RUNTIME_DIR"
chmod 700 "$XDG_RUNTIME_DIR" 2>/dev/null || true
if [ -z "${DBUS_SESSION_BUS_ADDRESS:-}" ]; then if [ -z "${DBUS_SESSION_BUS_ADDRESS:-}" ]; then
eval "$(dbus-launch --sh-syntax)" eval "$(dbus-launch --sh-syntax)"
@@ -490,5 +533,10 @@ dbus-update-activation-environment \
HOME \ HOME \
USER USER
exec kwin_wayland --replace if [ -n "$KWIN_DRM_DEVICES" ]; then
exec kwin_wayland_wrapper --drm
else
echo "redbear-kde-session: using virtual KWin backend (set KWIN_DRM_DEVICES to enable DRM)" >&2
exec kwin_wayland_wrapper --virtual
fi
""" """
+34 -5
View File
@@ -123,7 +123,6 @@ data = ""
directory = true directory = true
mode = 0o755 mode = 0o755
# ── Red Bear OS custom services ─────────────────────────────────────
[[files]] [[files]]
path = "/usr/lib/init.d/12_dbus.service" path = "/usr/lib/init.d/12_dbus.service"
data = """ data = """
@@ -304,7 +303,6 @@ args = ["/scheme/debug/no-preserve", "-J"]
type = "oneshot_async" type = "oneshot_async"
""" """
# KDE session launcher
[[files]] [[files]]
path = "/usr/bin/redbear-kde-session" path = "/usr/bin/redbear-kde-session"
mode = 0o755 mode = 0o755
@@ -312,24 +310,52 @@ data = """
#!/usr/bin/sh #!/usr/bin/sh
export DISPLAY="" export DISPLAY=""
export HOME="${HOME:-/home/root}"
export USER="${USER:-root}"
export LOGNAME="${LOGNAME:-$USER}"
export WAYLAND_DISPLAY="${WAYLAND_DISPLAY:-wayland-0}" export WAYLAND_DISPLAY="${WAYLAND_DISPLAY:-wayland-0}"
export XDG_SESSION_TYPE=wayland export XDG_SESSION_TYPE=wayland
export KDE_FULL_SESSION=true export KDE_FULL_SESSION=true
export XDG_CURRENT_DESKTOP=KDE export XDG_CURRENT_DESKTOP=KDE
export LIBSEAT_BACKEND=seatd export LIBSEAT_BACKEND=seatd
export SEATD_SOCK=/run/seatd.sock export SEATD_SOCK=/run/seatd.sock
export QT_PLUGIN_PATH="${QT_PLUGIN_PATH:-/usr/plugins}"
export QT_QPA_PLATFORM_PLUGIN_PATH="${QT_QPA_PLATFORM_PLUGIN_PATH:-/usr/plugins/platforms}"
export QML2_IMPORT_PATH="${QML2_IMPORT_PATH:-/usr/qml}"
export XCURSOR_THEME="${XCURSOR_THEME:-Pop}"
export XKB_CONFIG_ROOT="${XKB_CONFIG_ROOT:-/usr/share/X11/xkb}"
if [ -z "${XDG_RUNTIME_DIR:-}" ]; then if [ -z "${XDG_RUNTIME_DIR:-}" ]; then
export XDG_RUNTIME_DIR="/tmp/run/user/$(id -u)" export XDG_RUNTIME_DIR="/tmp/run/user/$(id -u)"
fi fi
mkdir -p "$XDG_RUNTIME_DIR" mkdir -p "$XDG_RUNTIME_DIR"
chmod 700 "$XDG_RUNTIME_DIR" 2>/dev/null || true
wait_for_path() {
target="$1"
attempts=0
while [ "$attempts" -lt 30 ]; do
if [ -e "$target" ]; then
return 0
fi
attempts=$((attempts + 1))
sleep 1
done
return 1
}
if ! wait_for_path /run/dbus/system_bus_socket; then
echo "system D-Bus socket did not appear" >&2
exit 1
fi
sleep 2
if [ -z "${DBUS_SESSION_BUS_ADDRESS:-}" ]; then if [ -z "${DBUS_SESSION_BUS_ADDRESS:-}" ]; then
eval "$(dbus-launch --sh-syntax)" eval "$(dbus-launch --sh-syntax)"
fi fi
# Export session environment to D-Bus activation
dbus-update-activation-environment \ dbus-update-activation-environment \
DBUS_SESSION_BUS_ADDRESS \ DBUS_SESSION_BUS_ADDRESS \
DBUS_SESSION_BUS_PID \ DBUS_SESSION_BUS_PID \
@@ -344,6 +370,9 @@ dbus-update-activation-environment \
HOME \ HOME \
USER USER
# Start KWin Wayland compositor if [ -z "${KWIN_DRM_DEVICES:-}" ] && [ -e /scheme/drm/card0 ]; then
exec kwin_wayland --replace export KWIN_DRM_DEVICES=/scheme/drm/card0
fi
exec kwin_wayland_wrapper --drm
""" """
+2 -1
View File
@@ -1,7 +1,8 @@
# Red Bear OS Live Full Configuration # Red Bear OS Live Full Configuration
# Live ISO variant for the primary full desktop/session target. # Live ISO variant for the primary full desktop/session target on real bare metal.
# #
# Build: make live CONFIG_NAME=redbear-live-full # Build: make live CONFIG_NAME=redbear-live-full
# This ISO is for real bare-metal boot/install/recovery, not VM/QEMU use.
include = ["redbear-full.toml"] include = ["redbear-full.toml"]
+2 -1
View File
@@ -1,7 +1,8 @@
# Red Bear OS Mini Live Configuration # Red Bear OS Mini Live Configuration
# Minimal boot-test live ISO variant. # Minimal boot-test live ISO variant for real bare metal.
# #
# Build: make live CONFIG_NAME=redbear-live-mini # Build: make live CONFIG_NAME=redbear-live-mini
# This ISO is for real bare-metal boot/recovery, not VM/QEMU use.
include = ["minimal.toml", "redbear-legacy-base.toml"] include = ["minimal.toml", "redbear-legacy-base.toml"]
+47 -14
View File
@@ -4,14 +4,20 @@
include = ["desktop.toml", "redbear-legacy-base.toml", "redbear-legacy-desktop.toml", "redbear-device-services.toml", "redbear-netctl.toml"] include = ["desktop.toml", "redbear-legacy-base.toml", "redbear-legacy-desktop.toml", "redbear-device-services.toml", "redbear-netctl.toml"]
# Override the default settings here
# General settings
[general] [general]
# Filesystem size in MiB
filesystem_size = 2048 filesystem_size = 2048
# Package settings [users.messagebus]
uid = 100
gid = 100
name = "messagebus"
home = "/nonexistent"
shell = "/usr/bin/false"
[groups.messagebus]
gid = 100
members = ["messagebus"]
[packages] [packages]
redbear-release = {} redbear-release = {}
redbear-hwutils = {} redbear-hwutils = {}
@@ -93,13 +99,15 @@ args = [
type = "oneshot_async" type = "oneshot_async"
""" """
# Replace the legacy desktop-minimal init script with an explicit service unit.
[[files]] [[files]]
path = "/usr/lib/init.d/20_display.service" path = "/usr/lib/init.d/20_display.service"
data = """ data = """
[unit] [unit]
description = "Display session service (Wayland validation)" description = "Display session service (Wayland validation)"
requires_weak = [ requires_weak = [
"12_dbus.service",
"13_redbear-sessiond.service",
"13_seatd.service",
] ]
[service] [service]
@@ -177,6 +185,27 @@ if [ -z "${XDG_RUNTIME_DIR:-}" ]; then
fi fi
mkdir -p "$XDG_RUNTIME_DIR" mkdir -p "$XDG_RUNTIME_DIR"
chmod 700 "$XDG_RUNTIME_DIR" 2>/dev/null || true
wait_for_path() {
target="$1"
attempts=0
while [ "$attempts" -lt 30 ]; do
if [ -e "$target" ]; then
return 0
fi
attempts=$((attempts + 1))
sleep 1
done
return 1
}
if ! wait_for_path /run/dbus/system_bus_socket; then
echo "system D-Bus socket did not appear" >&2
exit 1
fi
sleep 2
wait_for_wayland_socket() { wait_for_wayland_socket() {
socket_path="$XDG_RUNTIME_DIR/$WAYLAND_DISPLAY" socket_path="$XDG_RUNTIME_DIR/$WAYLAND_DISPLAY"
@@ -212,7 +241,14 @@ if [ -d /usr/share/glib-2.0/schemas ]; then
glib-compile-schemas /usr/share/glib-2.0/schemas/ glib-compile-schemas /usr/share/glib-2.0/schemas/
fi fi
kwin_wayland --replace & export XCURSOR_THEME="${XCURSOR_THEME:-Pop}"
export XKB_CONFIG_ROOT="${XKB_CONFIG_ROOT:-/usr/share/X11/xkb}"
if [ -z "${KWIN_DRM_DEVICES:-}" ] && [ -e /scheme/drm/card0 ]; then
export KWIN_DRM_DEVICES=/scheme/drm/card0
fi
kwin_wayland_wrapper --drm &
kwin_pid=$! kwin_pid=$!
if ! wait_for_wayland_socket; then if ! wait_for_wayland_socket; then
@@ -229,8 +265,10 @@ mode = 0o755
data = """ data = """
#!/usr/bin/env ion #!/usr/bin/env ion
# env G_MAIN_POLL_DEBUG=1 G_MESSAGES_DEBUG=all LD_DEBUG=all WEBKIT_DEBUG=all MiniBrowser& export HOME=/home/root
printenv export USER=root
export LOGNAME=root
let session_started = "$HOME/.wayland-session.started" let session_started = "$HOME/.wayland-session.started"
rm -f $session_started rm -f $session_started
echo "started" > $session_started echo "started" > $session_started
@@ -257,11 +295,6 @@ rm -f $bootstrap_ok $bootstrap_log
rm -f $plugin_ok $plugin_err $plugin_log rm -f $plugin_ok $plugin_err $plugin_log
rm -f $smoke_minimal_ok $smoke_offscreen_ok $smoke_wayland_ok rm -f $smoke_minimal_ok $smoke_offscreen_ok $smoke_wayland_ok
rm -f $smoke_minimal_log $smoke_offscreen_log $smoke_wayland_log rm -f $smoke_minimal_log $smoke_offscreen_log $smoke_wayland_log
#wayland-rs_simple_window
#winit-wayland_window
#softbuffer-wayland_animation
#iced-wayland_sctk_lazy
#gtk3-widget-factory
if which qt6-wayland-smoke >/scheme/null if which qt6-wayland-smoke >/scheme/null
if test -f /usr/plugins/platforms/libqminimal.so if test -f /usr/plugins/platforms/libqminimal.so
echo "=== qminimal ELF header (guest) ===" echo "=== qminimal ELF header (guest) ==="
+2 -6
View File
@@ -137,7 +137,6 @@ ensure_relibc_desktop_surface() {
fi fi
} }
# Step 0: Apply local patches
if [ "$APPLY_PATCHES" = "1" ]; then if [ "$APPLY_PATCHES" = "1" ]; then
echo ">>> Applying local patches..." echo ">>> Applying local patches..."
@@ -194,7 +193,6 @@ if [ "$APPLY_PATCHES" = "1" ]; then
echo "" echo ""
fi fi
# Step 1: Build cookbook binary
if [ ! -f "target/release/repo" ]; then if [ ! -f "target/release/repo" ]; then
echo ">>> Building cookbook binary..." echo ">>> Building cookbook binary..."
cargo build --release cargo build --release
@@ -204,7 +202,6 @@ if [ "$CONFIG" = "redbear-full" ] || [ "$CONFIG" = "redbear-live-full" ]; then
ensure_relibc_desktop_surface ensure_relibc_desktop_surface
fi fi
# Step 2: Check firmware
FW_AMD_DIR="$PROJECT_ROOT/local/firmware/amdgpu" FW_AMD_DIR="$PROJECT_ROOT/local/firmware/amdgpu"
if [ "$CONFIG" != "redbear-minimal" ]; then if [ "$CONFIG" != "redbear-minimal" ]; then
if [ -d "$FW_AMD_DIR" ] && [ -n "$(ls -A "$FW_AMD_DIR" 2>/dev/null)" ]; then if [ -d "$FW_AMD_DIR" ] && [ -n "$(ls -A "$FW_AMD_DIR" 2>/dev/null)" ]; then
@@ -218,7 +215,6 @@ if [ "$CONFIG" != "redbear-minimal" ]; then
echo "" echo ""
fi fi
# Step 3: Build
echo ">>> Building Red Bear OS with config: $CONFIG" echo ">>> Building Red Bear OS with config: $CONFIG"
echo ">>> This may take 30-60 minutes on first build..." echo ">>> This may take 30-60 minutes on first build..."
if [ "$ALLOW_UPSTREAM" -eq 1 ]; then if [ "$ALLOW_UPSTREAM" -eq 1 ]; then
@@ -229,7 +225,6 @@ else
REPO_OFFLINE=1 COOKBOOK_OFFLINE=true CI=1 make all "CONFIG_NAME=$CONFIG" "JOBS=$JOBS" REPO_OFFLINE=1 COOKBOOK_OFFLINE=true CI=1 make all "CONFIG_NAME=$CONFIG" "JOBS=$JOBS"
fi fi
# Step 4: Report
ARCH="${ARCH:-$(uname -m)}" ARCH="${ARCH:-$(uname -m)}"
echo "" echo ""
echo "========================================" echo "========================================"
@@ -270,6 +265,7 @@ fi
echo "" echo ""
echo "To build live ISO:" echo "To build live ISO:"
echo " make live CONFIG_NAME=$CONFIG" echo " make live CONFIG_NAME=$CONFIG"
echo " # live .iso outputs are for real bare metal, not VM/QEMU use"
echo "" echo ""
echo "To burn to USB (verify device first!):" echo "To write a real bare-metal image to USB (verify device first!):"
echo " dd if=build/$ARCH/$CONFIG/harddrive.img of=/dev/sdX bs=4M status=progress" echo " dd if=build/$ARCH/$CONFIG/harddrive.img of=/dev/sdX bs=4M status=progress"
+7 -7
View File
@@ -1,10 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# Build Red Bear OS live ISO
# Usage: ./scripts/build-iso.sh [--upstream] [CONFIG_NAME] [ARCH]
# CONFIG_NAME - build config (default: redbear-live)
# ARCH - target architecture (default: x86_64)
set -euo pipefail set -euo pipefail
CONFIG_NAME="redbear-live" CONFIG_NAME="redbear-live"
@@ -15,7 +10,11 @@ usage() {
cat <<EOF cat <<EOF
Usage: $(basename "$0") [OPTIONS] [CONFIG_NAME] [ARCH] Usage: $(basename "$0") [OPTIONS] [CONFIG_NAME] [ARCH]
Build a Red Bear OS live ISO. Build a Red Bear OS live ISO for real bare metal.
Important:
Live .iso outputs are for bare-metal boot/install/recovery workflows.
They are not the virtual/QEMU target surface; use harddrive.img + make qemu for virtualization.
Options: Options:
--upstream Allow Redox/upstream recipe source refresh during build --upstream Allow Redox/upstream recipe source refresh during build
@@ -67,7 +66,7 @@ if [ -z "${CI:-}" ] && { [ ! -t 0 ] || [ ! -t 1 ]; }; then
export CI=1 export CI=1
fi fi
echo "Building Red Bear OS ISO" echo "Building Red Bear OS ISO for real bare metal"
echo " config: ${CONFIG_NAME}" echo " config: ${CONFIG_NAME}"
echo " arch: ${ARCH}" echo " arch: ${ARCH}"
if [ "$ALLOW_UPSTREAM" -eq 1 ]; then if [ "$ALLOW_UPSTREAM" -eq 1 ]; then
@@ -80,3 +79,4 @@ fi
echo "" echo ""
echo "Done: build/${ARCH}/${CONFIG_NAME}.iso" echo "Done: build/${ARCH}/${CONFIG_NAME}.iso"
echo "Note: live .iso outputs are for real bare metal, not VM/QEMU use."