Compare commits

...

27 Commits

Author SHA1 Message Date
6f1bc4dd00 SHow more commit info 2025-07-29 02:01:52 -04:00
5d434f031d Remove extraneous normalize_and_ref output 2025-07-29 01:58:37 -04:00
25b5623a65 Add temp debug 2025-07-29 01:56:19 -04:00
20477c21ab Add temp debug 2025-07-29 01:54:34 -04:00
8ed85fff2b Add temp debug 2025-07-29 01:52:51 -04:00
ab8f58ca92 Add temp debug 2025-07-29 01:52:36 -04:00
20e11b7419 Add temp debug 2025-07-29 01:49:03 -04:00
11c28c7ab3 Add temp debug 2025-07-29 01:47:28 -04:00
908664b185 Resimplify worktrees 2025-07-29 01:43:53 -04:00
40ce9940ae Debug commit print 2025-07-29 01:15:10 -04:00
64ffeeca17 Fix git object 2025-07-29 01:06:01 -04:00
0106ac7eff Use full name for branch ref 2025-07-29 00:44:49 -04:00
86f5bf7e3f Skip fetch 2025-07-29 00:32:38 -04:00
a18d467c4f Hacky way to show latest commit 2025-07-29 00:25:06 -04:00
3a659b4798 Fix clashing worktrees 2025-07-29 00:05:26 -04:00
7f996e7724 Silence commond debug warning 2025-07-28 23:51:44 -04:00
3688539a90 Return early and add debug output for dependencies 2025-07-28 23:48:14 -04:00
c28d7683d8 Make BUILD_DIR worktree_dir 2025-07-28 23:44:19 -04:00
a5b559c59c Fix parsing in normalize_and_ref() 2025-07-28 23:29:46 -04:00
d22d21148c Implement per-profile modes 2025-07-28 23:24:16 -04:00
2b4dac7ef3 Hide openwrt src dir 2025-07-28 21:38:09 -04:00
498f8a7333 Use a global release object 2025-07-28 21:36:01 -04:00
d28f2e8c31 Only fetch if not checked out 2025-07-28 19:03:17 -04:00
ca3f1e82ed Use git fetch for branches 2025-07-28 19:00:44 -04:00
4b66de068b Refactor worktree code 2025-07-28 18:31:20 -04:00
1e88f1b912 Revert to serial debug 2025-07-28 17:45:51 -04:00
cbe7e0468d Use multicore debug 2025-07-28 01:02:49 -04:00
4 changed files with 269 additions and 246 deletions

1
.gitignore vendored
View File

@@ -1,6 +1,7 @@
src/ src/
bin/ bin/
.vscode/ .vscode/
*.code-workspace
backups/ backups/
.dependencies_source .dependencies_source
.dependencies_ib .dependencies_ib

View File

@@ -1,6 +1,6 @@
# openwrtbuilder # openwrtbuilder
Build and deploy OpenWRT images using convenient profiles. Build and deploy OpenWRT images using convenient shell-style device profiles.
## Usage ## Usage
@@ -47,7 +47,7 @@ See `profiles` for example device profile definitions.
## Additional Info ## Additional Info
Did you find `openwrtbuilder` useful? [Buy me a coffee!](https://paypal.me/bryanroessler) Find `openwrtbuilder` useful? [Paypal me a coffee!](https://paypal.me/bryanroessler)
[↓ ↓ ↓ Bitcoin ↓ ↓ ↓](bitcoin:bc1q7wy0kszjavgcrvkxdg7mf3s6rh506rasnhfa4a) [↓ ↓ ↓ Bitcoin ↓ ↓ ↓](bitcoin:bc1q7wy0kszjavgcrvkxdg7mf3s6rh506rasnhfa4a)

View File

@@ -1,5 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# Builds and deploys OpenWRT images # Build and deploy OpenWRT images using convenient shell-style device profiles.
# Copyright 2022-25 Bryan C. Roessler # Copyright 2022-25 Bryan C. Roessler
# Apache 2.0 License # Apache 2.0 License
# See README and profiles for device configuration # See README and profiles for device configuration
@@ -158,161 +158,208 @@ parse_input() {
} }
# @description Install build dependencies on major distros # @description Install build dependencies on major distros
# @arg $1 string Build mode ("source" or "imagebuilder")
install_dependencies() { install_dependencies() {
debug "${FUNCNAME[0]}" debug "${FUNCNAME[0]}"
local mode="$1"
local -a pkg_list local -a pkg_list
local lock_file local lock_file
if ((FROM_SOURCE)); then
lock_file="$BUILD_ROOT/.dependencies_source" # Set appropriate lock file based on mode
else if [[ "$mode" == "source" ]]; then
lock_file="$BUILD_ROOT/.dependencies_ib" lock_file="$BUILD_ROOT/.dependencies_source.lock"
elif [[ "$mode" == "imagebuilder" ]]; then
lock_file="$BUILD_ROOT/.dependencies_ib.lock"
fi fi
if ((FORCE_DEPENDS)) || [[ ! -f $lock_file ]]; then [[ -f $lock_file ]] && debug "$lock_file lock file exists" && return 0
if ((FROM_SOURCE)); then
# For building from source code see:
# https://openwrt.org/docs/guide-developer/toolchain/install-buildsystem
case "$ID" in
fedora|centos)
pkg_list+=(
bzip2
clang # for qosify
diffutils
gcc
gcc-c++
git
llvm15-libs # for qosify
make
ncurses-devel
patch
perl
perl-Data-Dumper
perl-File-Compare
perl-File-Copy
perl-FindBin
perl-IPC-Cmd
perl-JSON-PP
perl-Thread-Queue
perl-Time-Piece
perl-base
python3
python3-devel
python3-pyelftools
python3-setuptools
rsync
swig
tar
unzip
wget
which
) ;;
debian|ubuntu)
pkg_list+=(
build-essential
clang
file
flex
g++
gawk
gcc-multilib
gettext
git
liblzma-dev
libncurses5-dev
libssl-dev
python3-distutils
rsync
patch
unzip
wget
zlib1g-dev
) ;;
arch)
pkg_list+=(
autoconf
automake
base-devel
bash
binutils
bison
bzip2
clang
fakeroot
file
findutils
flex
gawk
gcc
gettext
git
grep
groff
gzip
libelf
libtool
libxslt
m4
make
ncurses
net-snmp
openssl
patch
pkgconf
python
rsync
sed
texinfo
time
unzip
util-linux
wget
which
xz
zlib
) ;;
*) debug "Unsupported OS, skipping dependencies"; return 1 ;;
esac
else
# For Imagebuilder
case "$ID" in
fedora|centos)
pkg_list+=(
@c-development
@development-tools
@development-libs
perl-FindBin
zlib-static
elfutils-libelf-devel
gawk
unzip
file
wget
python3
axel
perl-IPC-Cmd
zstd) ;;
debian|ubuntu)
pkg_list+=(
build-essential
libncurses5-dev
libncursesw5-dev
zlib1g-dev
gawk
git
gettext
libssl-dev
xsltproc
wget
unzip
python
axel
zstd) ;;
*) debug "Unsupported OS for automatic dependency install"; return 1 ;;
esac
fi
pkg_install "${pkg_list[@]}" && echo "${pkg_list[@]}" > "$lock_file" if [[ "$mode" == "source" ]]; then
# For building from source code see:
# https://openwrt.org/docs/guide-developer/toolchain/install-buildsystem
case "$ID" in
fedora|centos)
pkg_list+=(
bzip2
clang # for qosify
diffutils
gcc
gcc-c++
git
llvm15-libs # for qosify
make
ncurses-devel
patch
perl
perl-Data-Dumper
perl-File-Compare
perl-File-Copy
perl-FindBin
perl-IPC-Cmd
perl-JSON-PP
perl-Thread-Queue
perl-Time-Piece
perl-base
python3
python3-devel
python3-pyelftools
python3-setuptools
rsync
swig
tar
unzip
wget
which
) ;;
debian|ubuntu)
pkg_list+=(
build-essential
clang
file
flex
g++
gawk
gcc-multilib
gettext
git
liblzma-dev
libncurses5-dev
libssl-dev
python3-distutils
rsync
patch
unzip
wget
zlib1g-dev
) ;;
arch)
pkg_list+=(
autoconf
automake
base-devel
bash
binutils
bison
bzip2
clang
fakeroot
file
findutils
flex
gawk
gcc
gettext
git
grep
groff
gzip
libelf
libtool
libxslt
m4
make
ncurses
net-snmp
openssl
patch
pkgconf
python
rsync
sed
texinfo
time
unzip
util-linux
wget
which
xz
zlib
) ;;
*) debug "Unsupported OS, skipping dependency install"; return 1 ;;
esac
elif [[ "$mode" == "imagebuilder" ]]; then
# For Imagebuilder
case "$ID" in
fedora|centos)
pkg_list+=(
@c-development
@development-tools
@development-libs
perl-FindBin
zlib-static
elfutils-libelf-devel
gawk
unzip
file
wget
python3
axel
perl-IPC-Cmd
zstd) ;;
debian|ubuntu)
pkg_list+=(
build-essential
libncurses5-dev
libncursesw5-dev
zlib1g-dev
gawk
git
gettext
libssl-dev
xsltproc
wget
unzip
python
axel
zstd) ;;
*) debug "Unsupported OS, skipping dependency install"; return 1 ;;
esac
fi fi
pkg_install "${pkg_list[@]}" && echo "${pkg_list[@]}" > "$lock_file"
}
# @description Normalize release and set worktree reference
# @arg $1 string Raw release input
# @arg $2 string Build mode ("source" or "imagebuilder")
# @returns string Normalized release and reference
normalize_and_ref() {
local input="$1" mode="$2"
local rel ref branch tag
case "$input" in
snapshot|latest|main|master)
rel="snapshot"
ref="main"
;;
v[0-9][0-9].[0-9][0-9].*|[0-9][0-9].[0-9][0-9].*)
# strip optional leading “v”
rel="${input#v}"
if [[ "$mode" == "source" ]]; then
branch="openwrt-${rel%.*}"
tag="v$rel"
if ask_ok "Use branch $branch HEAD (y) or tag $tag (n)?"; then
ref="$branch"
else
ref="$tag"
fi
else
ref="$rel"
fi
;;
*)
if [[ "$mode" == "source" ]]; then
# arbitrary commit-ish allowed
rel="$input"
ref="$input"
else
echo "Error: invalid release '$input'" >&2
exit 1
fi
;;
esac
printf '%s %s' "$rel" "$ref"
} }
# @description Acquires the OpenWRT Image Builder # @description Acquires the OpenWRT Image Builder
@@ -337,17 +384,6 @@ get_imagebuilder() {
done done
} }
add_repos() {
debug "${FUNCNAME[0]}"
if [[ -v P_ARR[repo] ]]; then
if ! grep -q "${P_ARR[repo]}" "$BUILD_DIR/repositories.conf"; then
echo "${P_ARR[repo]}" >> "$BUILD_DIR/repositories.conf"
fi
sed -i '/option check_signature/d' "$BUILD_DIR/repositories.conf"
fi
}
ssh_backup() { ssh_backup() {
debug "${FUNCNAME[0]}" debug "${FUNCNAME[0]}"
local date hostname backup_fname local date hostname backup_fname
@@ -461,84 +497,61 @@ ssh_upgrade() {
# @description Builds OpenWRT from source code using the the default buildbot as base # @description Builds OpenWRT from source code using the the default buildbot as base
# This enables the use of kernel config options in profiles # This enables the use of kernel config options in profiles
# @arg $1 string .config seed URL # @arg $1 string .config seed URL
# @arg $2 string Profile name
# @arg $3 string Worktree ref (commit-ish or branch name)
from_source() { from_source() {
debug "${FUNCNAME[0]}" "$*" debug "${FUNCNAME[0]}" "$*"
local seed_url="$1" local seed_url="$1"
local profile="$2"
local ref="$3"
local src_url="https://github.com/openwrt/openwrt.git" local src_url="https://github.com/openwrt/openwrt.git"
local seed_file="$WORKTREE_DIR/.config" local seed_file="$BUILD_DIR/.config"
local worktree_name; worktree_name="$(basename "$WORKTREE_DIR")" local worktree_meta="$SRC_DIR/.git/worktrees/source-$ref"
local worktree_meta="$SRC_DIR/.git/worktrees/$worktree_name" local pkg config commit seed_file description
local pkg config commit seed_file wt_commit description
local -a make_opts config_opts local -a make_opts config_opts
echo "Building from source is under development" echo "Building from source is under development"
if ((DEBUG)); then # Remove all build directories and worktrees
echo "Profile settings:"
for x in "${!P_ARR[@]}"; do printf "%s=%s\n" "$x" "${P_ARR[$x]}"; done
echo "Environment variables:"
declare -p
fi
if ((RESET)); then if ((RESET)); then
if [[ -d "$WORKTREE_DIR" || -d "$worktree_meta" ]]; then if [[ -d "$BUILD_DIR" || -d "$worktree_meta" ]]; then
execute git -C "$SRC_DIR" worktree remove --force --force "$WORKTREE_DIR" execute git -C "$SRC_DIR" worktree remove --force --force "$BUILD_DIR"
[[ -d "$WORKTREE_DIR" ]] && execute rm -rf "$WORKTREE_DIR" [[ -d "$BUILD_DIR" ]] && execute rm -rf "$BUILD_DIR"
[[ -d "$worktree_meta" ]] && execute rm -rf "$worktree_meta" [[ -d "$worktree_meta" ]] && execute rm -rf "$worktree_meta"
fi fi
[[ -d "$BUILD_DIR" ]] && execute rm -rf "$BUILD_DIR" [[ -d "$BUILD_DIR" ]] && execute rm -rf "$BUILD_DIR"
fi fi
# Update source code # Pull or clone source repo
if [[ ! -d "$SRC_DIR" ]]; then if [[ -d "$SRC_DIR" ]]; then
execute git -C "$SRC_DIR" pull
else
execute mkdir -p "$SRC_DIR" execute mkdir -p "$SRC_DIR"
execute git clone "$src_url" "$SRC_DIR" execute git clone "$src_url" "$SRC_DIR"
fi fi
execute git -C "$SRC_DIR" worktree prune --verbose # Remove existing build dir and add new worktree
execute git -C "$SRC_DIR" pull if [[ -d "$BUILD_DIR" ]]; then
execute rm -rf "$BUILD_DIR"
# Generate commitish for git worktree
case "$RELEASE" in
snapshot) wt_commit="origin/main" ;;
[0-9][0-9].[0-9][0-9].*)
local branch="openwrt-${RELEASE%.*}"
local tag="v$RELEASE"
if ask_ok "Use $branch branch HEAD (y, recommended) or $tag tag (n)?"; then
wt_commit="origin/$branch"
else
wt_commit="$tag"
fi
;;
*)
debug "Passing '$RELEASE' commit-ish to git worktree"
wt_commit="$RELEASE"
;;
esac
# Pull existing or add new git worktree
if [[ -d "$WORKTREE_DIR" && -d "$worktree_meta" ]]; then
execute git -C "$WORKTREE_DIR" checkout "$wt_commit"
execute git -C "$WORKTREE_DIR" pull
else
[[ -d "$WORKTREE_DIR" ]] && execute rm -rf "$WORKTREE_DIR"
[[ -d "$worktree_meta" ]] && execute rm -rf "$worktree_meta"
execute git -C "$SRC_DIR" worktree add --force --force --detach "$WORKTREE_DIR" "$wt_commit"
fi fi
execute git -C "$SRC_DIR" worktree prune --verbose
execute git -C "$SRC_DIR" worktree add "$BUILD_DIR" "$ref"
# Print commit information # Print commit info
commit=$(git -C "$WORKTREE_DIR" rev-parse HEAD) commit=$(git -C "$BUILD_DIR" rev-parse HEAD)
description=$(git -C "$WORKTREE_DIR" describe) description=$(git -C "$BUILD_DIR" describe)
echo "Current commit hash: $commit" echo "Current commit hash: $commit"
echo "Git worktree description: $description" echo "Git worktree description: $description"
((DEBUG)) && git --no-pager -C "$WORKTREE_DIR" log -1 ((DEBUG)) && git --no-pager -C "$BUILD_DIR" log -1
# Enter worktree # Enter worktree
execute pushd "$WORKTREE_DIR" || return 1 execute pushd "$BUILD_DIR" || return 1
# Begin OpenWRT build process
((DEBUG)) && make_opts+=("V=sc")
# Cleanup build environment # Cleanup build environment
((DEBUG)) && make_opts+=("V=sc")
execute make "${make_opts[@]}" "-j1" distclean execute make "${make_opts[@]}" "-j1" distclean
# make clean # compiled output # make clean # compiled output
# make targetclean # compiled output, toolchain # make targetclean # compiled output, toolchain
@@ -602,9 +615,11 @@ from_source() {
echo "$config" >> "$seed_file" echo "$config" >> "$seed_file"
done done
# Make prep # Serial make prep is more reliable
execute make "${make_opts[@]}" "-j1" defconfig execute make "${make_opts[@]}" "-j1" defconfig
execute make "${make_opts[@]}" "-j1" download execute make "${make_opts[@]}" "-j1" download
# make_opts+=("-j$(($(nproc)-1))")
((DEBUG)) && make_opts+=("-j1") || make_opts+=("-j$(($(nproc)-1))") ((DEBUG)) && make_opts+=("-j1") || make_opts+=("-j$(($(nproc)-1))")
# Make image # Make image
@@ -633,7 +648,7 @@ backup() {
local file="$1" dir="$2" local file="$1" dir="$2"
local creation_date base_name backup_file local creation_date base_name backup_file
[[ -f $file ]] || { debug "File not found: $file"; return 1; } [[ -f $file ]] || return 1
[[ -d $dir ]] || execute mkdir -p "$dir" || { debug "Failed to create directory: $dir"; return 1; } [[ -d $dir ]] || execute mkdir -p "$dir" || { debug "Failed to create directory: $dir"; return 1; }
if creation_date=$(stat -c %w "$file" 2>/dev/null || stat -c %y "$file" 2>/dev/null) && \ if creation_date=$(stat -c %w "$file" 2>/dev/null || stat -c %y "$file" 2>/dev/null) && \
@@ -722,8 +737,13 @@ main() {
exit $? exit $?
fi fi
install_dependencies # Remove dependency lock files for --depends
if ((FORCE_DEPENDS)); then
[[ -f "$BUILD_ROOT/.dependencies_source.lock" ]] && rm -f "$BUILD_ROOT/.dependencies_source.lock"
[[ -f "$BUILD_ROOT/.dependencies_ib.lock" ]] && rm -f "$BUILD_ROOT/.dependencies_ib.lock"
fi
# Run selected profiles
for profile in "${PROFILES[@]}"; do for profile in "${PROFILES[@]}"; do
debug "Running profile: $profile" debug "Running profile: $profile"
@@ -733,40 +753,34 @@ main() {
fi fi
# Store profile in P_ARR nameref # Store profile in P_ARR nameref
declare -gn P_ARR="$profile" local -n P_ARR="$profile"
local mode="${P_ARR[mode]:="imagebuilder"}"
((FROM_SOURCE)) && mode="source" # allow cli override
install_dependencies "$mode"
local repo="${P_ARR[repo]:-}"
declare -g FILESYSTEM="${P_ARR[filesystem]:="squashfs"}" declare -g FILESYSTEM="${P_ARR[filesystem]:="squashfs"}"
declare -g TARGET="${P_ARR[target]}" declare -g TARGET="${P_ARR[target]}"
declare -g DEVICE="${P_ARR[device]}" declare -g DEVICE="${P_ARR[device]}"
declare -g PACKAGES="${P_ARR[packages]:-}" declare -g PACKAGES="${P_ARR[packages]:-}"
declare -g RELEASE="${USER_RELEASE:=${P_ARR[release]:=$RELEASE}}"
# normalize RELEASE # pull in USER_RELEASE from args or profile default
case "$RELEASE" in local raw_release="${USER_RELEASE:=${P_ARR[release]:=$RELEASE}}"
snapshot|latest|main|master) RELEASE="snapshot" ;;
v[0-9][0-9].[0-9][0-9].*) RELEASE="${RELEASE#v}" ;;
[0-9][0-9].[0-9][0-9].*) ;;
*)
if ! ((FROM_SOURCE)); then
echo "Error: Invalid release version format"
echo "Use semantic version, tag, or 'snapshot'"
exit 1
fi
;;
esac
declare -g SRC_DIR="$BUILD_ROOT/src/openwrt" # single call to normalize+ref
declare -g WORKTREE_DIR="$BUILD_ROOT/src/$profile/$RELEASE-src" read -r release ref < <(normalize_and_ref "$raw_release" "$mode")
declare -g BUILD_DIR="$BUILD_ROOT/src/$profile/$RELEASE"
declare -g BIN_DIR="$BUILD_ROOT/bin/$profile/$RELEASE"
if [[ "$RELEASE" == "snapshot" ]]; then declare -g SRC_DIR="$BUILD_ROOT/src/.openwrt"
declare -g BUILD_DIR="$BUILD_ROOT/src/$profile/$mode-$ref"
declare -g BIN_DIR="$BUILD_ROOT/bin/$profile/$mode-$ref"
if [[ "$release" == "snapshot" ]]; then
local url_prefix="https://downloads.openwrt.org/snapshots/targets/$TARGET" local url_prefix="https://downloads.openwrt.org/snapshots/targets/$TARGET"
local url_filename="openwrt-imagebuilder-${TARGET//\//-}.Linux-x86_64.tar.zst" local url_filename="openwrt-imagebuilder-${TARGET//\//-}.Linux-x86_64.tar.zst"
local img_fname="openwrt-${TARGET//\//-}-$DEVICE-$FILESYSTEM" local img_fname="openwrt-${TARGET//\//-}-$DEVICE-$FILESYSTEM"
else else
local url_prefix="https://downloads.openwrt.org/releases/$RELEASE/targets/$TARGET" local url_prefix="https://downloads.openwrt.org/releases/$release/targets/$TARGET"
local url_filename="openwrt-imagebuilder-$RELEASE-${TARGET//\//-}.Linux-x86_64.tar.zst" local url_filename="openwrt-imagebuilder-$release-${TARGET//\//-}.Linux-x86_64.tar.zst"
local img_fname="openwrt-$RELEASE-${TARGET//\//-}-$DEVICE-$FILESYSTEM" local img_fname="openwrt-$release-${TARGET//\//-}-$DEVICE-$FILESYSTEM"
fi fi
local ib_url="$url_prefix/$url_filename" local ib_url="$url_prefix/$url_filename"
@@ -775,22 +789,27 @@ main() {
local ib_sha256_file="$BUILD_DIR/sha256sums" local ib_sha256_file="$BUILD_DIR/sha256sums"
local seed_url="$url_prefix/config.buildinfo" local seed_url="$url_prefix/config.buildinfo"
if ((FROM_SOURCE)); then if [[ "$mode" == "source" ]]; then
declare -g SYSUPGRADEIMGGZ="$BIN_DIR/targets/$TARGET/$img_fname-sysupgrade.img.gz" declare -g SYSUPGRADEIMGGZ="$BIN_DIR/targets/$TARGET/$img_fname-sysupgrade.img.gz"
else else
declare -g SYSUPGRADEIMGGZ="$BUILD_DIR/$img_fname-sysupgrade.img.gz" declare -g SYSUPGRADEIMGGZ="$BUILD_DIR/$img_fname-sysupgrade.img.gz"
fi fi
backup "$SYSUPGRADEIMGGZ" "$BACKUP_DIR/$profile/$RELEASE" backup "$SYSUPGRADEIMGGZ" "$BACKUP_DIR/$profile/$mode-$ref"
if ((FROM_SOURCE)); then if [[ "$mode" == "source" ]]; then
from_source "$seed_url" || return $? from_source "$seed_url" "$profile" "$ref" || return $?
else elif [[ "$mode" == "imagebuilder" ]]; then
[[ -d $BUILD_DIR ]] || mkdir -p "$BUILD_DIR" [[ -d $BUILD_DIR ]] || mkdir -p "$BUILD_DIR"
get_imagebuilder "$ib_url" "$ib_file" "$ib_sha256_url" "$ib_sha256_file" && get_imagebuilder "$ib_url" "$ib_file" "$ib_sha256_url" "$ib_sha256_file" &&
verify "$ib_file" "$ib_sha256_file" && verify "$ib_file" "$ib_sha256_file" &&
extract "$ib_file" "$BUILD_DIR" || return $? extract "$ib_file" "$BUILD_DIR" || return $?
add_repos if [[ -v $repo ]]; then
if ! grep -q "$repo" "$BUILD_DIR/repositories.conf"; then
echo "$repo" >> "$BUILD_DIR/repositories.conf"
fi
sed -i '/option check_signature/d' "$BUILD_DIR/repositories.conf"
fi
make_images make_images
# Verify output image for stock builds (in testing) # Verify output image for stock builds (in testing)
if [[ ! -v P_ARR[packages] || -z ${P_ARR[packages]} ]]; then if [[ ! -v P_ARR[packages] || -z ${P_ARR[packages]} ]]; then

View File

@@ -10,6 +10,7 @@ default_packages="luci luci-ssl luci-proto-wireguard luci-app-statistics \
# Current devices # Current devices
declare -Ag r4s=( declare -Ag r4s=(
[mode]="source"
[device]="friendlyarm_nanopi-r4s" [device]="friendlyarm_nanopi-r4s"
[target]="rockchip/armv8" [target]="rockchip/armv8"
[filesystem]="ext4" [filesystem]="ext4"
@@ -24,6 +25,7 @@ declare -Ag r4s=(
) )
declare -Ag ax6000=( declare -Ag ax6000=(
[mode]="imagebuilder"
[device]="xiaomi_redmi-router-ax6000-stock" [device]="xiaomi_redmi-router-ax6000-stock"
[target]="mediatek/filogic" [target]="mediatek/filogic"
[release]="snapshot" [release]="snapshot"
@@ -32,6 +34,7 @@ declare -Ag ax6000=(
) )
declare -Ag ax6000_uboot=( declare -Ag ax6000_uboot=(
[mode]="imagebuilder"
[device]="xiaomi_redmi-router-ax6000-ubootmod" [device]="xiaomi_redmi-router-ax6000-ubootmod"
[target]="mediatek/filogic" [target]="mediatek/filogic"
[release]="snapshot" [release]="snapshot"