From ed0678ae2e9b58b3eb9a7606816e21ad8798192e Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Wed, 24 Apr 2024 05:27:27 +0100 Subject: haswell: only provide NRI-based ROMs in releases release="n" is set in target.cfg on haswell build targets that use mrc.bin script/update/release exports LBMK_RELEASE="y" script/build/roms skips building a given target if release="n" in target.cfg *and* LBMK_RELEASE="y" you could also do the export yourself before running ./build roms, for example: export LBMK_RELEASE="y" ./build roms all This would skip these ROM images. The native haswell raminit is now stable enough in my testing, that I wish to delete the MRC-based targets. This is in line with Libreboot's Binary Blob Reduction Policy, which states: if a blob can be avoided, it should be avoided. The problem is that users often run the inject script in *lbmk* from Git, instead of from the src release archive. I forsee some users running this on modern lbmk with older release images. If the mrc-based target isn't there, the user may use an NRI-based target name, and think it works; they will insert without MRC. I foresaw this ages ago, which is why Caleb and I ensured that the script checks hashes, and hashes are included in releases. Therefore: for the time being, keep the MRC-based configs in lbmk but do not include images for them in releases. This can be done indefinitely, but I'll probably remove those configs entirely at some point. On the following boards, Libreboot now will *only* provide NRI-based ROM images for the following machines: * Dell OptiPlex 9020 SFF * Dell OptiPlex 9020 MT * Lenovo ThinkPad T440p * Lenovo ThinkPad W541/W540 I now recommend exclusive use of NRI-based images, on Haswell hardware. It's stable enough in my testing, and now supports S3. Signed-off-by: Leah Rowe --- build | 2 ++ config/coreboot/dell9020mt_12mb/target.cfg | 1 + config/coreboot/dell9020mtbmrc_12mb/target.cfg | 1 + config/coreboot/dell9020sff_12mb/target.cfg | 1 + config/coreboot/dell9020sffbmrc_12mb/target.cfg | 1 + config/coreboot/t440pbmrc_12mb/target.cfg | 1 + config/coreboot/t440pmrc_12mb/target.cfg | 1 + config/coreboot/w541bmrc_12mb/target.cfg | 1 + config/coreboot/w541mrc_12mb/target.cfg | 1 + include/err.sh | 7 +++++++ script/build/roms | 9 ++++++++- script/update/release | 2 ++ 12 files changed, 27 insertions(+), 1 deletion(-) diff --git a/build b/build index 38d1694c..14353245 100755 --- a/build +++ b/build @@ -13,6 +13,8 @@ export LC_ALL=C . "include/err.sh" . "include/option.sh" +export LBMK_RELEASE="$lbmk_release" + eval "$(setvars "" option aur_notice tmpdir)" err="fail" diff --git a/config/coreboot/dell9020mt_12mb/target.cfg b/config/coreboot/dell9020mt_12mb/target.cfg index e6d3bec6..0da057a9 100644 --- a/config/coreboot/dell9020mt_12mb/target.cfg +++ b/config/coreboot/dell9020mt_12mb/target.cfg @@ -5,3 +5,4 @@ payload_seabios_withgrub="y" payload_seabios_grubonly="y" payload_memtest="y" grub_scan_disk="ahci" +release="n" diff --git a/config/coreboot/dell9020mtbmrc_12mb/target.cfg b/config/coreboot/dell9020mtbmrc_12mb/target.cfg index e6d3bec6..0da057a9 100644 --- a/config/coreboot/dell9020mtbmrc_12mb/target.cfg +++ b/config/coreboot/dell9020mtbmrc_12mb/target.cfg @@ -5,3 +5,4 @@ payload_seabios_withgrub="y" payload_seabios_grubonly="y" payload_memtest="y" grub_scan_disk="ahci" +release="n" diff --git a/config/coreboot/dell9020sff_12mb/target.cfg b/config/coreboot/dell9020sff_12mb/target.cfg index e6d3bec6..0da057a9 100644 --- a/config/coreboot/dell9020sff_12mb/target.cfg +++ b/config/coreboot/dell9020sff_12mb/target.cfg @@ -5,3 +5,4 @@ payload_seabios_withgrub="y" payload_seabios_grubonly="y" payload_memtest="y" grub_scan_disk="ahci" +release="n" diff --git a/config/coreboot/dell9020sffbmrc_12mb/target.cfg b/config/coreboot/dell9020sffbmrc_12mb/target.cfg index e6d3bec6..0da057a9 100644 --- a/config/coreboot/dell9020sffbmrc_12mb/target.cfg +++ b/config/coreboot/dell9020sffbmrc_12mb/target.cfg @@ -5,3 +5,4 @@ payload_seabios_withgrub="y" payload_seabios_grubonly="y" payload_memtest="y" grub_scan_disk="ahci" +release="n" diff --git a/config/coreboot/t440pbmrc_12mb/target.cfg b/config/coreboot/t440pbmrc_12mb/target.cfg index 8688df3f..06f3025c 100644 --- a/config/coreboot/t440pbmrc_12mb/target.cfg +++ b/config/coreboot/t440pbmrc_12mb/target.cfg @@ -5,3 +5,4 @@ payload_grub_withseabios="y" payload_seabios="y" payload_memtest="y" grub_scan_disk="ahci" +release="n" diff --git a/config/coreboot/t440pmrc_12mb/target.cfg b/config/coreboot/t440pmrc_12mb/target.cfg index 8688df3f..06f3025c 100644 --- a/config/coreboot/t440pmrc_12mb/target.cfg +++ b/config/coreboot/t440pmrc_12mb/target.cfg @@ -5,3 +5,4 @@ payload_grub_withseabios="y" payload_seabios="y" payload_memtest="y" grub_scan_disk="ahci" +release="n" diff --git a/config/coreboot/w541bmrc_12mb/target.cfg b/config/coreboot/w541bmrc_12mb/target.cfg index 8688df3f..06f3025c 100644 --- a/config/coreboot/w541bmrc_12mb/target.cfg +++ b/config/coreboot/w541bmrc_12mb/target.cfg @@ -5,3 +5,4 @@ payload_grub_withseabios="y" payload_seabios="y" payload_memtest="y" grub_scan_disk="ahci" +release="n" diff --git a/config/coreboot/w541mrc_12mb/target.cfg b/config/coreboot/w541mrc_12mb/target.cfg index 8688df3f..06f3025c 100644 --- a/config/coreboot/w541mrc_12mb/target.cfg +++ b/config/coreboot/w541mrc_12mb/target.cfg @@ -5,3 +5,4 @@ payload_grub_withseabios="y" payload_seabios="y" payload_memtest="y" grub_scan_disk="ahci" +release="n" diff --git a/include/err.sh b/include/err.sh index 5b66c999..3cadf042 100755 --- a/include/err.sh +++ b/include/err.sh @@ -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) +lbmk_release= +set | grep LBMK_RELEASE 1>/dev/null 2>/dev/null || lbmk_release="n" || : +[ -z "$lbmk_release" ] && lbmk_release="$LBMK_RELEASE" +[ "$lbmk_release" = "n" ] || [ "$lbmk_release" = "y" ] || lbmk_release="n" + x_() { [ $# -lt 1 ] || ${@} || $err "Unhandled non-zero exit: $@"; return 0 } diff --git a/script/build/roms b/script/build/roms index a90e1daa..2510b1fd 100755 --- a/script/build/roms +++ b/script/build/roms @@ -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" ] && [ "$lbmk_release" = "y" ]; then + printf "Skipping target: %s\n" "$x" + continue + fi + build_payloads build_target_mainboard [ -d "bin/${board}" ] || continue diff --git a/script/update/release b/script/update/release index 25ada9da..e8eff300 100755 --- a/script/update/release +++ b/script/update/release @@ -9,6 +9,8 @@ set -u -e eval "$(setvars "" vdir relname src_dirname srcdir _xm target romdir mode)" +export LBMK_RELEASE="y" + main() { vdir="release" -- cgit v1.2.1