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
+12
View File
@@ -83,10 +83,22 @@ mkdir -p recipes/gpu
symlink "../../local/recipes/gpu/amdgpu" "recipes/gpu/amdgpu"
symlink "../../local/recipes/gpu/redox-drm" "recipes/gpu/redox-drm"
# Library stubs / custom libs
mkdir -p recipes/libs
symlink "../../local/recipes/libs/libepoxy-stub" "recipes/libs/libepoxy-stub"
symlink "../../local/recipes/libs/libudev-stub" "recipes/libs/libudev-stub"
symlink "../../local/recipes/libs/lcms2-stub" "recipes/libs/lcms2-stub"
symlink "../../local/recipes/libs/libdisplay-info-stub" "recipes/libs/libdisplay-info-stub"
symlink "../../local/recipes/libs/libxcvt-stub" "recipes/libs/libxcvt-stub"
# System
mkdir -p recipes/system
symlink "../../local/recipes/system/cub" "recipes/system/cub"
symlink "../../local/recipes/system/evdevd" "recipes/system/evdevd"
symlink "../../local/recipes/system/firmware-loader" "recipes/system/firmware-loader"
symlink "../../local/recipes/system/iommu" "recipes/system/iommu"
symlink "../../local/recipes/system/redbear-hwutils" "recipes/system/redbear-hwutils"
symlink "../../local/recipes/system/redbear-netctl" "recipes/system/redbear-netctl"
symlink "../../local/recipes/system/redbear-meta" "recipes/system/redbear-meta"
symlink "../../local/recipes/system/udev-shim" "recipes/system/udev-shim"
+2 -8
View File
@@ -133,13 +133,6 @@ echo "Root: ${PROJECT_ROOT##*/}"
echo "Tag: $REDBEAR_TAG"
echo ""
section "Ensuring local recipe aliases..."
if [ ! -e "local/recipes/system/rbos-info" ] && [ -d "local/recipes/system/redbear-info" ]; then
symlink "redbear-info" "local/recipes/system/rbos-info"
fi
status "Local recipe aliases ready"
echo ""
section "Ensuring custom recipe symlinks..."
symlink "../../local/recipes/branding/redbear-release" "recipes/branding/redbear-release"
symlink "../../local/recipes/drivers/linux-kpi" "recipes/drivers/linux-kpi"
@@ -148,8 +141,9 @@ symlink "../../local/recipes/gpu/amdgpu" "recipes/gpu/amdgpu"
symlink "../../local/recipes/gpu/redox-drm" "recipes/gpu/redox-drm"
symlink "../../local/recipes/system/evdevd" "recipes/system/evdevd"
symlink "../../local/recipes/system/firmware-loader" "recipes/system/firmware-loader"
symlink "../../local/recipes/system/rbos-info" "recipes/system/rbos-info"
symlink "../../local/recipes/system/redbear-info" "recipes/system/redbear-info"
symlink "../../local/recipes/system/redbear-hwutils" "recipes/system/redbear-hwutils"
symlink "../../local/recipes/system/redbear-netctl" "recipes/system/redbear-netctl"
symlink "../../local/recipes/system/redbear-meta" "recipes/system/redbear-meta"
symlink "../../local/recipes/system/udev-shim" "recipes/system/udev-shim"
symlink "../../local/recipes/core/ext4d" "recipes/core/ext4d"
+72
View File
@@ -0,0 +1,72 @@
#!/usr/bin/env bash
#
# test-iommu-qemu.sh - Launch QEMU with AMD IOMMU device for hardware testing
#
# This wrapper adds the AMD IOMMU device to QEMU for testing IOMMU/vIOMMU
# functionality on AMD hardware. It forwards any additional QEMU flags to the
# make qemu invocation.
#
# Usage:
# ./local/scripts/test-iommu-qemu.sh [--help]
# ./local/scripts/test-iommu-qemu.sh [extra QEMU flags...]
#
# Examples:
# ./local/scripts/test-iommu-qemu.sh # Basic IOMMU test
# ./local/scripts/test-iommu-qemu.sh -display sdl # With SDL display
# ./local/scripts/test-iommu-qemu.sh -m 4G # With 4GB RAM
set -e
# Print usage information
usage() {
cat << USAGE
Usage: $(basename "$0") [options]
Launch QEMU with AMD IOMMU device for hardware testing.
Options:
--help Show this help message
Any additional arguments are passed as extra QEMU flags.
Environment:
QEMUFLAGS Additional flags (prepended to device amd-iommu)
Examples:
$(basename "$0")
$(basename "$0") -display sdl -m 4G
QEMUFLAGS="-smp 8" $(basename "$0")
USAGE
exit 0
}
# Parse --help before anything else
for arg in "$@"; do
case "$arg" in
--help|-h|help)
usage
;;
esac
done
# Trap to handle Ctrl+C gracefully
# Kill any background QEMU process if interrupted
cleanup() {
echo "Interrupted, cleaning up..."
# The make qemu process will be killed by the signal
exit 130
}
trap cleanup SIGINT SIGTERM
# Build QEMUFLAGS with AMD IOMMU device
# Prepend user QEMUFLAGS if set, then add the amd-iommu device
IOMMU_FLAGS="-device amd-iommu"
if [[ -n "${QEMUFLAGS:-}" ]]; then
QEMUFLAGS="${QEMUFLAGS} ${IOMMU_FLAGS} $@"
else
QEMUFLAGS="${IOMMU_FLAGS} $@"
fi
# Launch QEMU via make
exec make qemu QEMUFLAGS="$QEMUFLAGS"