Refresh build infrastructure scripts and cross-tool wrappers
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
Executable
+32
@@ -0,0 +1,32 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
tool_name="${1:?missing tool name}"
|
||||||
|
shift
|
||||||
|
|
||||||
|
script_dir="$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)"
|
||||||
|
root_dir="$(CDPATH= cd -- "${script_dir}/.." && pwd)"
|
||||||
|
target_prefix="${tool_name%-*}"
|
||||||
|
|
||||||
|
candidate_roots=()
|
||||||
|
|
||||||
|
for env_var in REDBEAR_REDOX_SYSROOT COOKBOOK_TOOLCHAIN REDOXER_TOOLCHAIN RUSTUP_TOOLCHAIN; do
|
||||||
|
env_value="${!env_var:-}"
|
||||||
|
if [ -n "${env_value}" ]; then
|
||||||
|
candidate_roots+=("${env_value}")
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
candidate_roots+=("${root_dir}/prefix/${target_prefix}/sysroot")
|
||||||
|
|
||||||
|
for tool_root in "${candidate_roots[@]}"; do
|
||||||
|
tool_path="${tool_root}/bin/${tool_name}"
|
||||||
|
if [ -x "${tool_path}" ]; then
|
||||||
|
exec "${tool_path}" "$@"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
missing_root="${candidate_roots[0]}"
|
||||||
|
echo "error: missing toolchain binary: ${missing_root}/bin/${tool_name}" >&2
|
||||||
|
echo "hint: run 'make prefix' or otherwise populate ${missing_root}" >&2
|
||||||
|
exit 1
|
||||||
@@ -2,15 +2,4 @@
|
|||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
script_dir="$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)"
|
script_dir="$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)"
|
||||||
root_dir="$(CDPATH= cd -- "${script_dir}/.." && pwd)"
|
exec "${script_dir}/redbear-run-tool" "$(basename "$0")" "$@"
|
||||||
|
|
||||||
sysroot="${REDBEAR_REDOX_SYSROOT:-${root_dir}/prefix/x86_64-unknown-redox/sysroot}"
|
|
||||||
tool="${sysroot}/bin/x86_64-unknown-redox-ar"
|
|
||||||
|
|
||||||
if [ ! -x "${tool}" ]; then
|
|
||||||
echo "error: missing toolchain binary: ${tool}" >&2
|
|
||||||
echo "hint: run 'make prefix' or otherwise populate ${sysroot}" >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
exec "${tool}" "$@"
|
|
||||||
|
|||||||
@@ -2,15 +2,4 @@
|
|||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
script_dir="$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)"
|
script_dir="$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)"
|
||||||
root_dir="$(CDPATH= cd -- "${script_dir}/.." && pwd)"
|
exec "${script_dir}/redbear-run-tool" "$(basename "$0")" "$@"
|
||||||
|
|
||||||
sysroot="${REDBEAR_REDOX_SYSROOT:-${root_dir}/prefix/x86_64-unknown-redox/sysroot}"
|
|
||||||
tool="${sysroot}/bin/x86_64-unknown-redox-c++"
|
|
||||||
|
|
||||||
if [ ! -x "${tool}" ]; then
|
|
||||||
echo "error: missing toolchain binary: ${tool}" >&2
|
|
||||||
echo "hint: run 'make prefix' or otherwise populate ${sysroot}" >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
exec "${tool}" "$@"
|
|
||||||
|
|||||||
@@ -2,15 +2,4 @@
|
|||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
script_dir="$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)"
|
script_dir="$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)"
|
||||||
root_dir="$(CDPATH= cd -- "${script_dir}/.." && pwd)"
|
exec "${script_dir}/redbear-run-tool" "$(basename "$0")" "$@"
|
||||||
|
|
||||||
sysroot="${REDBEAR_REDOX_SYSROOT:-${root_dir}/prefix/x86_64-unknown-redox/sysroot}"
|
|
||||||
tool="${sysroot}/bin/x86_64-unknown-redox-gcc"
|
|
||||||
|
|
||||||
if [ ! -x "${tool}" ]; then
|
|
||||||
echo "error: missing toolchain binary: ${tool}" >&2
|
|
||||||
echo "hint: run 'make prefix' or otherwise populate ${sysroot}" >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
exec "${tool}" "$@"
|
|
||||||
|
|||||||
@@ -2,15 +2,4 @@
|
|||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
script_dir="$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)"
|
script_dir="$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)"
|
||||||
root_dir="$(CDPATH= cd -- "${script_dir}/.." && pwd)"
|
exec "${script_dir}/redbear-run-tool" "$(basename "$0")" "$@"
|
||||||
|
|
||||||
sysroot="${REDBEAR_REDOX_SYSROOT:-${root_dir}/prefix/x86_64-unknown-redox/sysroot}"
|
|
||||||
tool="${sysroot}/bin/x86_64-unknown-redox-ld"
|
|
||||||
|
|
||||||
if [ ! -x "${tool}" ]; then
|
|
||||||
echo "error: missing toolchain binary: ${tool}" >&2
|
|
||||||
echo "hint: run 'make prefix' or otherwise populate ${sysroot}" >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
exec "${tool}" "$@"
|
|
||||||
|
|||||||
@@ -2,15 +2,4 @@
|
|||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
script_dir="$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)"
|
script_dir="$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)"
|
||||||
root_dir="$(CDPATH= cd -- "${script_dir}/.." && pwd)"
|
exec "${script_dir}/redbear-run-tool" "$(basename "$0")" "$@"
|
||||||
|
|
||||||
sysroot="${REDBEAR_REDOX_SYSROOT:-${root_dir}/prefix/x86_64-unknown-redox/sysroot}"
|
|
||||||
tool="${sysroot}/bin/x86_64-unknown-redox-ranlib"
|
|
||||||
|
|
||||||
if [ ! -x "${tool}" ]; then
|
|
||||||
echo "error: missing toolchain binary: ${tool}" >&2
|
|
||||||
echo "hint: run 'make prefix' or otherwise populate ${sysroot}" >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
exec "${tool}" "$@"
|
|
||||||
|
|||||||
@@ -22,11 +22,11 @@ usage()
|
|||||||
echo " i686. ARCH is not checked, so you can add a new architecture."
|
echo " i686. ARCH is not checked, so you can add a new architecture."
|
||||||
echo " Defaults to the directory containing the FILESYSTEM_CONFIG file,"
|
echo " Defaults to the directory containing the FILESYSTEM_CONFIG file,"
|
||||||
echo " or x86_64 if no FILESYSTEM_CONFIG is specified."
|
echo " or x86_64 if no FILESYSTEM_CONFIG is specified."
|
||||||
echo " -c CONFIG: The name of the config, e.g. desktop, server or demo."
|
echo " -c CONFIG: The name of the config, e.g. redbear-kde, redbear-full or redbear-minimal."
|
||||||
echo " Determines the name of the image, build/ARCH/CONFIG/harddrive.img"
|
echo " Determines the name of the image, build/ARCH/CONFIG/harddrive.img"
|
||||||
echo " e.g. build/x86_64/desktop/harddrive.img"
|
echo " e.g. build/x86_64/redbear-kde/harddrive.img"
|
||||||
echo " Determines the name of FILESYSTEM_CONFIG if none is specified."
|
echo " Determines the name of FILESYSTEM_CONFIG if none is specified."
|
||||||
echo " Defaults to the basename of FILESYSTEM_CONFIG, or 'desktop'"
|
echo " Defaults to the basename of FILESYSTEM_CONFIG, or 'redbear-kde'"
|
||||||
echo " if FILESYSTEM_CONFIG is not specified."
|
echo " if FILESYSTEM_CONFIG is not specified."
|
||||||
echo " -f FILESYSTEM_CONFIG:"
|
echo " -f FILESYSTEM_CONFIG:"
|
||||||
echo " The config file to use. It can be in any location."
|
echo " The config file to use. It can be in any location."
|
||||||
@@ -37,7 +37,7 @@ usage()
|
|||||||
echo " If you specify both CONFIG and FILESYSTEM_CONFIG, it is not"
|
echo " If you specify both CONFIG and FILESYSTEM_CONFIG, it is not"
|
||||||
echo " necessary that they match, but it is recommended."
|
echo " necessary that they match, but it is recommended."
|
||||||
echo " Examples: ./build.sh -c demo live - make build/x86_64/demo/redbear-live.iso"
|
echo " Examples: ./build.sh -c demo live - make build/x86_64/demo/redbear-live.iso"
|
||||||
echo " ./build.sh -6 qemu - make build/i686/desktop/harddrive.img and"
|
echo " ./build.sh -6 qemu - make build/i686/redbear-kde/harddrive.img and"
|
||||||
echo " and run it in qemu"
|
echo " and run it in qemu"
|
||||||
echo " NOTE: If you do not change ARCH or CONFIG very often, edit mk/config.mk"
|
echo " NOTE: If you do not change ARCH or CONFIG very often, edit mk/config.mk"
|
||||||
echo " and set ARCH and FILESYSTEM_CONFIG. You only need to use this"
|
echo " and set ARCH and FILESYSTEM_CONFIG. You only need to use this"
|
||||||
@@ -50,7 +50,7 @@ if [ "$1" == "-h" ] || [ "$1" == "--help" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
defaultarch="x86_64"
|
defaultarch="x86_64"
|
||||||
defaultname="desktop"
|
defaultname="redbear-kde"
|
||||||
ARCH=""
|
ARCH=""
|
||||||
CONFIG_NAME=""
|
CONFIG_NAME=""
|
||||||
FILESYSTEM_CONFIG=""
|
FILESYSTEM_CONFIG=""
|
||||||
|
|||||||
+4
-2
@@ -16,8 +16,10 @@ PREFIX_BINARY?=1
|
|||||||
PREFIX_USE_UPSTREAM_RUST_COMPILER?=0
|
PREFIX_USE_UPSTREAM_RUST_COMPILER?=0
|
||||||
## Enable to use binary packages (much faster)
|
## Enable to use binary packages (much faster)
|
||||||
REPO_BINARY?=0
|
REPO_BINARY?=0
|
||||||
## Name of the configuration to include in the image name e.g. desktop or server
|
## Name of the configuration to include in the image name e.g. desktop or server.
|
||||||
CONFIG_NAME?=desktop
|
## Red Bear's tracked default desktop target is redbear-kde. Runtime claims remain evidence-qualified
|
||||||
|
## until compositor/session proof is strong enough for broader support language.
|
||||||
|
CONFIG_NAME?=redbear-kde
|
||||||
## Build appstream data for repo
|
## Build appstream data for repo
|
||||||
REPO_APPSTREAM?=0
|
REPO_APPSTREAM?=0
|
||||||
## Ignore errors when building the repo, attempt to build every package
|
## Ignore errors when building the repo, attempt to build every package
|
||||||
|
|||||||
@@ -63,6 +63,8 @@ else
|
|||||||
cp -r "$(PREFIX)/gcc-install/include/c++" "$@.partial/include/c++"
|
cp -r "$(PREFIX)/gcc-install/include/c++" "$@.partial/include/c++"
|
||||||
endif
|
endif
|
||||||
export PATH="$(ROOT)/$@.partial/bin:$$PATH" && \
|
export PATH="$(ROOT)/$@.partial/bin:$$PATH" && \
|
||||||
|
export COOKBOOK_TOOLCHAIN="$(ROOT)/$@.partial" REDBEAR_REDOX_SYSROOT="$(ROOT)/$@.partial" && \
|
||||||
|
export RUSTUP_TOOLCHAIN="$(ROOT)/$@.partial" REDOXER_TOOLCHAIN="$(ROOT)/$@.partial" && \
|
||||||
export CARGO="env -u CARGO cargo" $(PREFIX_CONFIG) && \
|
export CARGO="env -u CARGO cargo" $(PREFIX_CONFIG) && \
|
||||||
$(REPO_BIN) cook relibc
|
$(REPO_BIN) cook relibc
|
||||||
ifneq ($(HOSTED_REDOX),1)
|
ifneq ($(HOSTED_REDOX),1)
|
||||||
|
|||||||
+63
-5
@@ -1,14 +1,67 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# Build Red Bear OS live ISO
|
# Build Red Bear OS live ISO
|
||||||
# Usage: ./scripts/build-iso.sh [CONFIG_NAME] [ARCH]
|
# Usage: ./scripts/build-iso.sh [--upstream] [CONFIG_NAME] [ARCH]
|
||||||
# CONFIG_NAME - build config (default: redbear-live)
|
# CONFIG_NAME - build config (default: redbear-live)
|
||||||
# ARCH - target architecture (default: x86_64)
|
# ARCH - target architecture (default: x86_64)
|
||||||
|
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
CONFIG_NAME="${1:-redbear-live}"
|
CONFIG_NAME="redbear-live"
|
||||||
ARCH="${2:-x86_64}"
|
ARCH="x86_64"
|
||||||
|
ALLOW_UPSTREAM=0
|
||||||
|
|
||||||
|
usage() {
|
||||||
|
cat <<EOF
|
||||||
|
Usage: $(basename "$0") [OPTIONS] [CONFIG_NAME] [ARCH]
|
||||||
|
|
||||||
|
Build a Red Bear OS live ISO.
|
||||||
|
|
||||||
|
Options:
|
||||||
|
--upstream Allow Redox/upstream recipe source refresh during build
|
||||||
|
-h, --help Show this help
|
||||||
|
|
||||||
|
Defaults:
|
||||||
|
CONFIG_NAME=redbear-live
|
||||||
|
ARCH=x86_64
|
||||||
|
EOF
|
||||||
|
}
|
||||||
|
|
||||||
|
POSITIONAL=()
|
||||||
|
while [ $# -gt 0 ]; do
|
||||||
|
case "$1" in
|
||||||
|
--upstream)
|
||||||
|
ALLOW_UPSTREAM=1
|
||||||
|
;;
|
||||||
|
-h|--help)
|
||||||
|
usage
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
--)
|
||||||
|
shift
|
||||||
|
POSITIONAL+=("$@")
|
||||||
|
break
|
||||||
|
;;
|
||||||
|
-*)
|
||||||
|
echo "Unknown option: $1" >&2
|
||||||
|
usage >&2
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
POSITIONAL+=("$1")
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ ${#POSITIONAL[@]} -gt 2 ]; then
|
||||||
|
echo "ERROR: Too many positional arguments" >&2
|
||||||
|
usage >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
[ ${#POSITIONAL[@]} -ge 1 ] && CONFIG_NAME="${POSITIONAL[0]}"
|
||||||
|
[ ${#POSITIONAL[@]} -ge 2 ] && ARCH="${POSITIONAL[1]}"
|
||||||
|
|
||||||
if [ -z "${CI:-}" ] && { [ ! -t 0 ] || [ ! -t 1 ]; }; then
|
if [ -z "${CI:-}" ] && { [ ! -t 0 ] || [ ! -t 1 ]; }; then
|
||||||
export CI=1
|
export CI=1
|
||||||
@@ -17,8 +70,13 @@ fi
|
|||||||
echo "Building Red Bear OS ISO"
|
echo "Building Red Bear OS ISO"
|
||||||
echo " config: ${CONFIG_NAME}"
|
echo " config: ${CONFIG_NAME}"
|
||||||
echo " arch: ${ARCH}"
|
echo " arch: ${ARCH}"
|
||||||
|
if [ "$ALLOW_UPSTREAM" -eq 1 ]; then
|
||||||
make live CONFIG_NAME="${CONFIG_NAME}" ARCH="${ARCH}"
|
echo " upstream recipe refresh: enabled"
|
||||||
|
REPO_OFFLINE=0 COOKBOOK_OFFLINE=false make live CONFIG_NAME="${CONFIG_NAME}" ARCH="${ARCH}"
|
||||||
|
else
|
||||||
|
echo " upstream recipe refresh: disabled (pass --upstream to enable)"
|
||||||
|
REPO_OFFLINE=1 COOKBOOK_OFFLINE=true make live CONFIG_NAME="${CONFIG_NAME}" ARCH="${ARCH}"
|
||||||
|
fi
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
echo "Done: build/${ARCH}/${CONFIG_NAME}.iso"
|
echo "Done: build/${ARCH}/${CONFIG_NAME}.iso"
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
# blake3. Falls back to file-size comparison when no blake3 is recorded.
|
# blake3. Falls back to file-size comparison when no blake3 is recorded.
|
||||||
#
|
#
|
||||||
# Usage:
|
# Usage:
|
||||||
# ./scripts/fetch-all-sources.sh # Fetch for default desktop config
|
# ./scripts/fetch-all-sources.sh # Fetch for the tracked KWin default config
|
||||||
# ./scripts/fetch-all-sources.sh redbear-full # Fetch for a specific config
|
# ./scripts/fetch-all-sources.sh redbear-full # Fetch for a specific config
|
||||||
# ./scripts/fetch-all-sources.sh --all-configs # Fetch for every config
|
# ./scripts/fetch-all-sources.sh --all-configs # Fetch for every config
|
||||||
# ./scripts/fetch-all-sources.sh --recipe kernel # Fetch a single recipe
|
# ./scripts/fetch-all-sources.sh --recipe kernel # Fetch a single recipe
|
||||||
@@ -32,7 +32,7 @@ REPO_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
|
|||||||
cd "$REPO_ROOT"
|
cd "$REPO_ROOT"
|
||||||
|
|
||||||
REPO_BIN="./target/release/repo"
|
REPO_BIN="./target/release/repo"
|
||||||
CONFIG_NAME="${1:-desktop}"
|
CONFIG_NAME="${1:-redbear-kde}"
|
||||||
ACTION="fetch"
|
ACTION="fetch"
|
||||||
|
|
||||||
# ── Colors (disabled when not a terminal) ───────────────────────────
|
# ── Colors (disabled when not a terminal) ───────────────────────────
|
||||||
@@ -58,8 +58,8 @@ usage() {
|
|||||||
echo " --force Force re-download even if checksums match"
|
echo " --force Force re-download even if checksums match"
|
||||||
echo " --help Show this help"
|
echo " --help Show this help"
|
||||||
echo ""
|
echo ""
|
||||||
echo "Configs: desktop, redbear-full, redbear-minimal, server, minimal, wayland, x11"
|
echo "Configs: redbear-kde, redbear-live, redbear-full, redbear-minimal, redbear-wayland"
|
||||||
echo "Default config: desktop"
|
echo "Default config: redbear-kde"
|
||||||
}
|
}
|
||||||
|
|
||||||
ALL_CONFIGS=0
|
ALL_CONFIGS=0
|
||||||
@@ -481,7 +481,7 @@ case "$ACTION" in
|
|||||||
preflight)
|
preflight)
|
||||||
build_repo
|
build_repo
|
||||||
if [ "$ALL_CONFIGS" -eq 1 ]; then
|
if [ "$ALL_CONFIGS" -eq 1 ]; then
|
||||||
for cfg in desktop redbear-full redbear-minimal server minimal wayland x11; do
|
for cfg in redbear-kde redbear-live redbear-full redbear-minimal redbear-wayland; do
|
||||||
preflight_scan "$cfg" || true
|
preflight_scan "$cfg" || true
|
||||||
done
|
done
|
||||||
else
|
else
|
||||||
@@ -491,7 +491,7 @@ case "$ACTION" in
|
|||||||
list)
|
list)
|
||||||
build_repo
|
build_repo
|
||||||
if [ "$ALL_CONFIGS" -eq 1 ]; then
|
if [ "$ALL_CONFIGS" -eq 1 ]; then
|
||||||
for cfg in desktop redbear-full redbear-minimal server minimal wayland x11; do
|
for cfg in redbear-kde redbear-live redbear-full redbear-minimal redbear-wayland; do
|
||||||
list_for_config "$cfg" 2>/dev/null || true
|
list_for_config "$cfg" 2>/dev/null || true
|
||||||
done
|
done
|
||||||
else
|
else
|
||||||
@@ -506,7 +506,7 @@ case "$ACTION" in
|
|||||||
elif [ "$ALL_CONFIGS" -eq 1 ]; then
|
elif [ "$ALL_CONFIGS" -eq 1 ]; then
|
||||||
echo "==> Fetching sources for ALL configs"
|
echo "==> Fetching sources for ALL configs"
|
||||||
echo " This ensures every recipe needed by any config is downloaded."
|
echo " This ensures every recipe needed by any config is downloaded."
|
||||||
for cfg in desktop redbear-full redbear-minimal server minimal wayland x11; do
|
for cfg in redbear-kde redbear-live redbear-full redbear-minimal redbear-wayland; do
|
||||||
fetch_for_config "$cfg" 2>/dev/null || {
|
fetch_for_config "$cfg" 2>/dev/null || {
|
||||||
echo " WARNING: failed to fetch for $cfg (some recipes may not exist)"
|
echo " WARNING: failed to fetch for $cfg (some recipes may not exist)"
|
||||||
echo ""
|
echo ""
|
||||||
|
|||||||
+11
-1
@@ -7,6 +7,7 @@ PROJECT_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
|
|||||||
CONFIG_NAME="redbear-full"
|
CONFIG_NAME="redbear-full"
|
||||||
ARCH="$(uname -m)"
|
ARCH="$(uname -m)"
|
||||||
BUILD=0
|
BUILD=0
|
||||||
|
ALLOW_UPSTREAM=0
|
||||||
QEMU_EXTRA_ARGS=()
|
QEMU_EXTRA_ARGS=()
|
||||||
|
|
||||||
usage() {
|
usage() {
|
||||||
@@ -19,12 +20,14 @@ Options:
|
|||||||
-b, --build Build full OS before running
|
-b, --build Build full OS before running
|
||||||
-c, --config NAME Config name (default: redbear-full)
|
-c, --config NAME Config name (default: redbear-full)
|
||||||
-a, --arch ARCH Target architecture (default: host arch)
|
-a, --arch ARCH Target architecture (default: host arch)
|
||||||
|
--upstream Allow Redox/upstream recipe source refresh during build
|
||||||
-- ARGS Pass remaining args to make qemu (e.g. -- QEMUFLAGS="-m 8G")
|
-- ARGS Pass remaining args to make qemu (e.g. -- QEMUFLAGS="-m 8G")
|
||||||
-h, --help Show this help
|
-h, --help Show this help
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
$(basename "$0") # Run existing image
|
$(basename "$0") # Run existing image
|
||||||
$(basename "$0") --build # Build + run
|
$(basename "$0") --build # Build + run
|
||||||
|
$(basename "$0") --build --upstream # Build + run with upstream source refresh enabled
|
||||||
$(basename "$0") -b -c redbear-minimal # Build minimal + run
|
$(basename "$0") -b -c redbear-minimal # Build minimal + run
|
||||||
$(basename "$0") -- QEMUFLAGS="-m 8G" # Run with 8G RAM
|
$(basename "$0") -- QEMUFLAGS="-m 8G" # Run with 8G RAM
|
||||||
$(basename "$0") -b -- serial=yes # Build + run with serial console
|
$(basename "$0") -b -- serial=yes # Build + run with serial console
|
||||||
@@ -38,6 +41,7 @@ while [ $# -gt 0 ]; do
|
|||||||
-b|--build) BUILD=1 ;;
|
-b|--build) BUILD=1 ;;
|
||||||
-c|--config) CONFIG_NAME="$2"; shift ;;
|
-c|--config) CONFIG_NAME="$2"; shift ;;
|
||||||
-a|--arch) ARCH="$2"; shift ;;
|
-a|--arch) ARCH="$2"; shift ;;
|
||||||
|
--upstream) ALLOW_UPSTREAM=1 ;;
|
||||||
-h|--help) usage ;;
|
-h|--help) usage ;;
|
||||||
--) shift; QEMU_EXTRA_ARGS=("$@"); break ;;
|
--) shift; QEMU_EXTRA_ARGS=("$@"); break ;;
|
||||||
*) echo "Unknown option: $1"; exit 1 ;;
|
*) echo "Unknown option: $1"; exit 1 ;;
|
||||||
@@ -62,7 +66,13 @@ if [ "$BUILD" -eq 1 ]; then
|
|||||||
cargo build --release
|
cargo build --release
|
||||||
|
|
||||||
echo "==> Building Red Bear OS ($CONFIG_NAME, $ARCH)..."
|
echo "==> Building Red Bear OS ($CONFIG_NAME, $ARCH)..."
|
||||||
CI=1 make all "CONFIG_NAME=$CONFIG_NAME" ARCH="$ARCH"
|
if [ "$ALLOW_UPSTREAM" -eq 1 ]; then
|
||||||
|
echo "==> Upstream recipe refresh: enabled"
|
||||||
|
REPO_OFFLINE=0 COOKBOOK_OFFLINE=false CI=1 make all "CONFIG_NAME=$CONFIG_NAME" ARCH="$ARCH"
|
||||||
|
else
|
||||||
|
echo "==> Upstream recipe refresh: disabled (pass --upstream to enable)"
|
||||||
|
REPO_OFFLINE=1 COOKBOOK_OFFLINE=true CI=1 make all "CONFIG_NAME=$CONFIG_NAME" ARCH="$ARCH"
|
||||||
|
fi
|
||||||
echo "==> Build complete."
|
echo "==> Build complete."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user