Update tracked configs and image helpers
This commit is contained in:
+59
-11
@@ -1,7 +1,7 @@
|
||||
# Red Bear OS Full Configuration
|
||||
# Primary desktop/session target: Wayland + KWin/KDE session surface on Red Bear OS.
|
||||
# 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
|
||||
# here instead of being split across redbear-wayland and redbear-kde.
|
||||
@@ -91,6 +91,7 @@ wayland-protocols = {}
|
||||
|
||||
# Keyboard support
|
||||
libxkbcommon = {}
|
||||
xkeyboard-config = {}
|
||||
libevdev = {}
|
||||
libinput = {}
|
||||
|
||||
@@ -284,6 +285,11 @@ data = ""
|
||||
directory = true
|
||||
mode = 0o755
|
||||
|
||||
[[files]]
|
||||
path = "/usr/lib/fonts"
|
||||
data = "/usr/share/fonts"
|
||||
symlink = true
|
||||
|
||||
[[files]]
|
||||
path = "/usr/bin/redbear-validation-session"
|
||||
mode = 0o755
|
||||
@@ -291,6 +297,9 @@ data = """
|
||||
#!/usr/bin/env sh
|
||||
|
||||
export DISPLAY=""
|
||||
export HOME="${HOME:-/home/root}"
|
||||
export USER="${USER:-root}"
|
||||
export LOGNAME="${LOGNAME:-$USER}"
|
||||
export WAYLAND_DISPLAY="${WAYLAND_DISPLAY:-wayland-0}"
|
||||
export XDG_SESSION_TYPE=wayland
|
||||
export LIBSEAT_BACKEND=seatd
|
||||
@@ -308,6 +317,27 @@ if [ -z "${XDG_RUNTIME_DIR:-}" ]; then
|
||||
fi
|
||||
|
||||
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() {
|
||||
socket_path="$XDG_RUNTIME_DIR/$WAYLAND_DISPLAY"
|
||||
@@ -329,16 +359,18 @@ if [ -z "${DBUS_SESSION_BUS_ADDRESS:-}" ]; then
|
||||
eval "$(dbus-launch --sh-syntax)"
|
||||
fi
|
||||
|
||||
let validation_request = "/run/redbear-kde-session.validation-request"
|
||||
let validation_success = "/run/redbear-kde-session.validation-success"
|
||||
validation_request="/run/redbear-kde-session.validation-request"
|
||||
validation_success="/run/redbear-kde-session.validation-success"
|
||||
|
||||
if test -f $validation_request
|
||||
echo "user=$USER" > $validation_success
|
||||
echo "runtime=$XDG_RUNTIME_DIR" >> $validation_success
|
||||
echo "wayland=$WAYLAND_DISPLAY" >> $validation_success
|
||||
rm -f $validation_request
|
||||
if [ -f "$validation_request" ]; then
|
||||
{
|
||||
echo "user=$USER"
|
||||
echo "runtime=$XDG_RUNTIME_DIR"
|
||||
echo "wayland=$WAYLAND_DISPLAY"
|
||||
} > "$validation_success"
|
||||
rm -f "$validation_request"
|
||||
exit 0
|
||||
end
|
||||
fi
|
||||
|
||||
dbus-update-activation-environment \
|
||||
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/
|
||||
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=$!
|
||||
|
||||
if ! wait_for_wayland_socket; then
|
||||
@@ -452,12 +489,18 @@ export KDE_FULL_SESSION=true
|
||||
export XDG_CURRENT_DESKTOP=KDE
|
||||
export LIBSEAT_BACKEND=seatd
|
||||
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
|
||||
export XDG_RUNTIME_DIR="/tmp/run/user/$(id -u)"
|
||||
fi
|
||||
|
||||
mkdir -p "$XDG_RUNTIME_DIR"
|
||||
chmod 700 "$XDG_RUNTIME_DIR" 2>/dev/null || true
|
||||
|
||||
if [ -z "${DBUS_SESSION_BUS_ADDRESS:-}" ]; then
|
||||
eval "$(dbus-launch --sh-syntax)"
|
||||
@@ -490,5 +533,10 @@ dbus-update-activation-environment \
|
||||
HOME \
|
||||
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
@@ -123,7 +123,6 @@ data = ""
|
||||
directory = true
|
||||
mode = 0o755
|
||||
|
||||
# ── Red Bear OS custom services ─────────────────────────────────────
|
||||
[[files]]
|
||||
path = "/usr/lib/init.d/12_dbus.service"
|
||||
data = """
|
||||
@@ -304,7 +303,6 @@ args = ["/scheme/debug/no-preserve", "-J"]
|
||||
type = "oneshot_async"
|
||||
"""
|
||||
|
||||
# KDE session launcher
|
||||
[[files]]
|
||||
path = "/usr/bin/redbear-kde-session"
|
||||
mode = 0o755
|
||||
@@ -312,24 +310,52 @@ data = """
|
||||
#!/usr/bin/sh
|
||||
|
||||
export DISPLAY=""
|
||||
export HOME="${HOME:-/home/root}"
|
||||
export USER="${USER:-root}"
|
||||
export LOGNAME="${LOGNAME:-$USER}"
|
||||
export WAYLAND_DISPLAY="${WAYLAND_DISPLAY:-wayland-0}"
|
||||
export XDG_SESSION_TYPE=wayland
|
||||
export KDE_FULL_SESSION=true
|
||||
export XDG_CURRENT_DESKTOP=KDE
|
||||
export LIBSEAT_BACKEND=seatd
|
||||
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
|
||||
export XDG_RUNTIME_DIR="/tmp/run/user/$(id -u)"
|
||||
fi
|
||||
|
||||
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
|
||||
eval "$(dbus-launch --sh-syntax)"
|
||||
fi
|
||||
|
||||
# Export session environment to D-Bus activation
|
||||
dbus-update-activation-environment \
|
||||
DBUS_SESSION_BUS_ADDRESS \
|
||||
DBUS_SESSION_BUS_PID \
|
||||
@@ -344,6 +370,9 @@ dbus-update-activation-environment \
|
||||
HOME \
|
||||
USER
|
||||
|
||||
# Start KWin Wayland compositor
|
||||
exec kwin_wayland --replace
|
||||
if [ -z "${KWIN_DRM_DEVICES:-}" ] && [ -e /scheme/drm/card0 ]; then
|
||||
export KWIN_DRM_DEVICES=/scheme/drm/card0
|
||||
fi
|
||||
|
||||
exec kwin_wayland_wrapper --drm
|
||||
"""
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
# 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
|
||||
# This ISO is for real bare-metal boot/install/recovery, not VM/QEMU use.
|
||||
|
||||
include = ["redbear-full.toml"]
|
||||
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
# 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
|
||||
# This ISO is for real bare-metal boot/recovery, not VM/QEMU use.
|
||||
|
||||
include = ["minimal.toml", "redbear-legacy-base.toml"]
|
||||
|
||||
|
||||
+47
-14
@@ -4,14 +4,20 @@
|
||||
|
||||
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]
|
||||
# Filesystem size in MiB
|
||||
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]
|
||||
redbear-release = {}
|
||||
redbear-hwutils = {}
|
||||
@@ -93,13 +99,15 @@ args = [
|
||||
type = "oneshot_async"
|
||||
"""
|
||||
|
||||
# Replace the legacy desktop-minimal init script with an explicit service unit.
|
||||
[[files]]
|
||||
path = "/usr/lib/init.d/20_display.service"
|
||||
data = """
|
||||
[unit]
|
||||
description = "Display session service (Wayland validation)"
|
||||
requires_weak = [
|
||||
"12_dbus.service",
|
||||
"13_redbear-sessiond.service",
|
||||
"13_seatd.service",
|
||||
]
|
||||
|
||||
[service]
|
||||
@@ -177,6 +185,27 @@ if [ -z "${XDG_RUNTIME_DIR:-}" ]; then
|
||||
fi
|
||||
|
||||
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() {
|
||||
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/
|
||||
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=$!
|
||||
|
||||
if ! wait_for_wayland_socket; then
|
||||
@@ -229,8 +265,10 @@ mode = 0o755
|
||||
data = """
|
||||
#!/usr/bin/env ion
|
||||
|
||||
# env G_MAIN_POLL_DEBUG=1 G_MESSAGES_DEBUG=all LD_DEBUG=all WEBKIT_DEBUG=all MiniBrowser&
|
||||
printenv
|
||||
export HOME=/home/root
|
||||
export USER=root
|
||||
export LOGNAME=root
|
||||
|
||||
let session_started = "$HOME/.wayland-session.started"
|
||||
rm -f $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 $smoke_minimal_ok $smoke_offscreen_ok $smoke_wayland_ok
|
||||
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 test -f /usr/plugins/platforms/libqminimal.so
|
||||
echo "=== qminimal ELF header (guest) ==="
|
||||
|
||||
@@ -137,7 +137,6 @@ ensure_relibc_desktop_surface() {
|
||||
fi
|
||||
}
|
||||
|
||||
# Step 0: Apply local patches
|
||||
if [ "$APPLY_PATCHES" = "1" ]; then
|
||||
echo ">>> Applying local patches..."
|
||||
|
||||
@@ -194,7 +193,6 @@ if [ "$APPLY_PATCHES" = "1" ]; then
|
||||
echo ""
|
||||
fi
|
||||
|
||||
# Step 1: Build cookbook binary
|
||||
if [ ! -f "target/release/repo" ]; then
|
||||
echo ">>> Building cookbook binary..."
|
||||
cargo build --release
|
||||
@@ -204,7 +202,6 @@ if [ "$CONFIG" = "redbear-full" ] || [ "$CONFIG" = "redbear-live-full" ]; then
|
||||
ensure_relibc_desktop_surface
|
||||
fi
|
||||
|
||||
# Step 2: Check firmware
|
||||
FW_AMD_DIR="$PROJECT_ROOT/local/firmware/amdgpu"
|
||||
if [ "$CONFIG" != "redbear-minimal" ]; 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 ""
|
||||
fi
|
||||
|
||||
# Step 3: Build
|
||||
echo ">>> Building Red Bear OS with config: $CONFIG"
|
||||
echo ">>> This may take 30-60 minutes on first build..."
|
||||
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"
|
||||
fi
|
||||
|
||||
# Step 4: Report
|
||||
ARCH="${ARCH:-$(uname -m)}"
|
||||
echo ""
|
||||
echo "========================================"
|
||||
@@ -270,6 +265,7 @@ fi
|
||||
echo ""
|
||||
echo "To build live ISO:"
|
||||
echo " make live CONFIG_NAME=$CONFIG"
|
||||
echo " # live .iso outputs are for real bare metal, not VM/QEMU use"
|
||||
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"
|
||||
|
||||
@@ -1,10 +1,5 @@
|
||||
#!/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
|
||||
|
||||
CONFIG_NAME="redbear-live"
|
||||
@@ -15,7 +10,11 @@ usage() {
|
||||
cat <<EOF
|
||||
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:
|
||||
--upstream Allow Redox/upstream recipe source refresh during build
|
||||
@@ -67,7 +66,7 @@ if [ -z "${CI:-}" ] && { [ ! -t 0 ] || [ ! -t 1 ]; }; then
|
||||
export CI=1
|
||||
fi
|
||||
|
||||
echo "Building Red Bear OS ISO"
|
||||
echo "Building Red Bear OS ISO for real bare metal"
|
||||
echo " config: ${CONFIG_NAME}"
|
||||
echo " arch: ${ARCH}"
|
||||
if [ "$ALLOW_UPSTREAM" -eq 1 ]; then
|
||||
@@ -80,3 +79,4 @@ fi
|
||||
|
||||
echo ""
|
||||
echo "Done: build/${ARCH}/${CONFIG_NAME}.iso"
|
||||
echo "Note: live .iso outputs are for real bare metal, not VM/QEMU use."
|
||||
|
||||
Reference in New Issue
Block a user