permit excluding certain coreboot roms on releases

release="n" can be set in target.cfg on coreboot targets

script/update/release exports CBMK_RELEASE="y"

script/build/roms skips building a given target if release="n"
in target.cfg *and* CBMK_RELEASE="y"

you could also do the export yourself before running ./build roms,
for example:

export CBMK_RELEASE="y"
./build roms all

this will be used in subsequent revisions, to exclude certain
targets from the next canoeboot release.

Signed-off-by: Leah Rowe <info@minifree.org>
audit2-merge1
Leah Rowe 2024-04-24 05:27:27 +01:00 committed by Leah Rowe
parent 428ebea0d9
commit a1ac872240
4 changed files with 19 additions and 1 deletions

2
build
View File

@ -13,6 +13,8 @@ export LC_ALL=C
. "include/err.sh"
. "include/option.sh"
export CBMK_RELEASE="$cbmk_release"
eval "$(setvars "" option aur_notice tmpdir)"
err="fail"

View File

@ -4,6 +4,13 @@
version=""; versiondate=""; projectname=""; _nogit=""
err="err_"
# if "y": a coreboot target won't be built if target.cfg says release="n"
# (this is used to exclude certain build targets from releases)
cbmk_release=
set | grep CBMK_RELEASE 1>/dev/null 2>/dev/null || cbmk_release="n" || :
[ -z "$cbmk_release" ] && cbmk_release="$CBMK_RELEASE"
[ "$cbmk_release" = "n" ] || [ "$cbmk_release" = "y" ] || cbmk_release="n"
x_() {
[ $# -lt 1 ] || ${@} || $err "Unhandled non-zero exit: $@"; return 0
}

View File

@ -20,7 +20,7 @@ cfgsdir="config/coreboot"
# target.cfg files have to specifically enable [a] payload(s)
pv="payload_grub payload_grub_withseabios payload_seabios payload_memtest t"
pv="${pv} payload_seabios_withgrub payload_seabios_grubonly payload_uboot memtest_bin"
v="romdir cbrom initmode displaymode cbcfg targetdir tree keymaps"
v="romdir cbrom initmode displaymode cbcfg targetdir tree keymaps release"
v="${v} grub_timeout ubdir board grub_scan_disk uboot_config"
eval "$(setvars "n" ${pv})"
eval "$(setvars "" ${v} boards _displaymode _payload _keyboard all targets)"
@ -56,6 +56,13 @@ main()
grub_background="background1280x800.png"
board="${x}"
configure_target
# exclude certain targets from the release
if [ "$release" = "n" ] && [ "$cbmk_release" = "y" ]; then
printf "Skipping target: %s\n" "$x"
continue
fi
build_payloads
build_target_mainboard
[ -d "bin/${board}" ] || continue

View File

@ -9,6 +9,8 @@ set -u -e
eval "$(setvars "" vdir relname src_dirname srcdir _xm target romdir mode)"
export CBMK_RELEASE="y"
main()
{
vdir="release"