summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config/coreboot/coreboot413/patches/0001-cbfstool-Make-use-of-spurious-null-termination.patch56
-rw-r--r--config/coreboot/coreboot413/patches/0002-Fix-cbfstool-build-error-on-GCC-15-host-compiler.patch33
-rw-r--r--config/coreboot/coreboot413/target.cfg4
-rw-r--r--config/coreboot/default/nuke.list19
-rw-r--r--config/coreboot/dell3050micro_vfsp_16mb/target.cfg2
-rw-r--r--config/coreboot/dell7010sff_12mb/target.cfg2
-rw-r--r--config/coreboot/dell780mt_8mb/target.cfg2
-rw-r--r--config/coreboot/dell780mt_truncate_8mb/target.cfg2
-rw-r--r--config/coreboot/dell780usff_8mb/target.cfg2
-rw-r--r--config/coreboot/dell780usff_truncate_8mb/target.cfg2
-rw-r--r--config/coreboot/dell9020mt_nri_12mb/target.cfg2
-rw-r--r--config/coreboot/dell9020sff_nri_12mb/target.cfg2
-rw-r--r--config/coreboot/e4300_4mb/target.cfg2
-rw-r--r--config/coreboot/e5420_6mb/target.cfg2
-rw-r--r--config/coreboot/e5520_6mb/target.cfg2
-rw-r--r--config/coreboot/e5530_12mb/target.cfg2
-rw-r--r--config/coreboot/e6220_10mb/target.cfg2
-rw-r--r--config/coreboot/e6230_12mb/target.cfg4
-rw-r--r--config/coreboot/e6320_10mb/target.cfg2
-rw-r--r--config/coreboot/e6330_12mb/target.cfg2
-rw-r--r--config/coreboot/e6400_4mb/target.cfg2
-rw-r--r--config/coreboot/e6420_10mb/target.cfg2
-rw-r--r--config/coreboot/e6430_12mb/target.cfg2
-rw-r--r--config/coreboot/e6520_10mb/target.cfg2
-rw-r--r--config/coreboot/e6530_12mb/target.cfg2
-rw-r--r--config/coreboot/fam15h/nuke.list1
-rw-r--r--config/coreboot/g43t_am3/target.cfg2
-rw-r--r--config/coreboot/g43t_am3_16mb/target.cfg2
-rw-r--r--config/coreboot/gru_bob/target.cfg2
-rw-r--r--config/coreboot/gru_kevin/target.cfg2
-rw-r--r--config/coreboot/hp2170p_16mb/target.cfg2
-rw-r--r--config/coreboot/hp2560p_8mb/target.cfg2
-rw-r--r--config/coreboot/hp2570p_16mb/target.cfg2
-rw-r--r--config/coreboot/hp8200sff_4mb/target.cfg2
-rw-r--r--config/coreboot/hp8200sff_8mb/target.cfg2
-rw-r--r--config/coreboot/hp820g2_12mb/target.cfg2
-rw-r--r--config/coreboot/hp8300cmt_16mb/target.cfg2
-rw-r--r--config/coreboot/hp8300usdt_16mb/target.cfg2
-rw-r--r--config/coreboot/hp8460pintel_8mb/target.cfg2
-rw-r--r--config/coreboot/hp8470pintel_16mb/target.cfg2
-rw-r--r--config/coreboot/hp9470m_16mb/target.cfg2
-rw-r--r--config/coreboot/kcma_d8_16mb/target.cfg2
-rw-r--r--config/coreboot/kcma_d8_2mb/target.cfg2
-rw-r--r--config/coreboot/kfsn4_dre_1mb/target.cfg2
-rw-r--r--config/coreboot/kfsn4_dre_2mb/target.cfg2
-rw-r--r--config/coreboot/kgpe_d16_16mb/target.cfg2
-rw-r--r--config/coreboot/kgpe_d16_2mb/target.cfg2
-rw-r--r--config/coreboot/macbook11/target.cfg2
-rw-r--r--config/coreboot/macbook11_16mb/target.cfg2
-rw-r--r--config/coreboot/macbook21/target.cfg2
-rw-r--r--config/coreboot/macbook21_16mb/target.cfg2
-rw-r--r--config/coreboot/q45t_am/target.cfg2
-rw-r--r--config/coreboot/qemu_arm64_12mb/target.cfg2
-rw-r--r--config/coreboot/qemu_x86_12mb/target.cfg2
-rw-r--r--config/coreboot/qemu_x86_64_12mb/target.cfg2
-rw-r--r--config/coreboot/r400_16mb/target.cfg2
-rw-r--r--config/coreboot/r400_4mb/target.cfg2
-rw-r--r--config/coreboot/r400_8mb/target.cfg2
-rw-r--r--config/coreboot/r500_4mb/target.cfg2
-rw-r--r--config/coreboot/t1650_12mb/target.cfg2
-rw-r--r--config/coreboot/t1700mt_bmrc_12mb/target.cfg2
-rw-r--r--config/coreboot/t1700sff_bmrc_12mb/target.cfg2
-rw-r--r--config/coreboot/t400_16mb/target.cfg2
-rw-r--r--config/coreboot/t400_4mb/target.cfg2
-rw-r--r--config/coreboot/t400_8mb/target.cfg2
-rw-r--r--config/coreboot/t420_8mb/target.cfg2
-rw-r--r--config/coreboot/t420s_8mb/target.cfg2
-rw-r--r--config/coreboot/t430_12mb/target.cfg2
-rw-r--r--config/coreboot/t440plibremrc_12mb/target.cfg2
-rw-r--r--config/coreboot/t500_16mb/target.cfg2
-rw-r--r--config/coreboot/t500_4mb/target.cfg2
-rw-r--r--config/coreboot/t500_8mb/target.cfg2
-rw-r--r--config/coreboot/t520_8mb/target.cfg2
-rw-r--r--config/coreboot/t530_12mb/target.cfg2
-rw-r--r--config/coreboot/t60_16mb_intelgpu/target.cfg2
-rw-r--r--config/coreboot/t60_intelgpu/target.cfg2
-rw-r--r--config/coreboot/w500_16mb/target.cfg2
-rw-r--r--config/coreboot/w500_4mb/target.cfg2
-rw-r--r--config/coreboot/w500_8mb/target.cfg2
-rw-r--r--config/coreboot/w530_12mb/target.cfg2
-rw-r--r--config/coreboot/w541_12mb/target.cfg2
-rw-r--r--config/coreboot/x200_16mb/target.cfg2
-rw-r--r--config/coreboot/x200_4mb/target.cfg2
-rw-r--r--config/coreboot/x200_8mb/target.cfg2
-rw-r--r--config/coreboot/x220_8mb/target.cfg2
-rw-r--r--config/coreboot/x230_12mb/target.cfg2
-rw-r--r--config/coreboot/x230_16mb/target.cfg2
-rw-r--r--config/coreboot/x230t_12mb/target.cfg2
-rw-r--r--config/coreboot/x230t_16mb/target.cfg2
-rw-r--r--config/coreboot/x301_16mb/target.cfg2
-rw-r--r--config/coreboot/x301_4mb/target.cfg2
-rw-r--r--config/coreboot/x301_8mb/target.cfg2
-rw-r--r--config/coreboot/x60/target.cfg2
-rw-r--r--config/coreboot/x60_16mb/target.cfg2
-rw-r--r--config/data/coreboot/mkhelper.cfg7
-rw-r--r--config/data/pico-serprog/mkhelper.cfg2
-rw-r--r--config/data/stm32-vserprog/mkhelper.cfg2
-rwxr-xr-xconfig/dependencies/debian2
-rw-r--r--config/flashprog/patches/0002-lbmk-hack-add-config-Makefile-options.patch48
-rw-r--r--config/grub/default/config/payload2
-rw-r--r--config/grub/default/patches/0014-kern-coreboot-mmap-Map-to-reserved.patch37
-rw-r--r--config/grub/default/target.cfg2
-rw-r--r--config/grub/nvme/config/payload2
-rw-r--r--config/grub/nvme/patches/0015-kern-coreboot-mmap-Map-to-reserved.patch37
-rw-r--r--config/grub/nvme/target.cfg2
-rw-r--r--config/grub/xhci/config/payload2
-rw-r--r--config/grub/xhci/patches/0026-kern-coreboot-mmap-Map-to-reserved.patch37
-rw-r--r--config/grub/xhci/target.cfg2
-rw-r--r--config/ifd/hp8300usdt/ifdbin4096 -> 4096 bytes
-rw-r--r--config/pcsx-redux/patches/0002-lbmk-hack-add-no-ops-for-config-commands.patch43
-rw-r--r--config/submodule/coreboot/coreboot413/module.list1
-rw-r--r--config/submodule/coreboot/coreboot413/vboot/module.cfg5
-rw-r--r--config/submodule/coreboot/coreboot413/vboot/patches/0001-extract_vmlinuz.c-Fix-the-bounds-check-on-vmlinuz_he.patch178
-rw-r--r--config/submodule/coreboot/default/acpica-unix-20241212.tar.gz/module.cfg4
-rw-r--r--config/submodule/coreboot/default/arm-trusted-firmware/module.cfg4
-rw-r--r--config/submodule/coreboot/default/binutils-2.43.1.tar.xz/module.cfg4
-rw-r--r--config/submodule/coreboot/default/fsp/module.cfg4
-rw-r--r--config/submodule/coreboot/default/gcc-14.2.0.tar.xz/module.cfg4
-rw-r--r--config/submodule/coreboot/default/gmp-6.3.0.tar.xz/module.cfg4
-rw-r--r--config/submodule/coreboot/default/intel-microcode/module.cfg4
-rw-r--r--config/submodule/coreboot/default/libgfxinit/module.cfg4
-rw-r--r--config/submodule/coreboot/default/libhwbase/module.cfg4
-rw-r--r--config/submodule/coreboot/default/mpc-1.3.1.tar.gz/module.cfg4
-rw-r--r--config/submodule/coreboot/default/mpfr-4.2.1.tar.xz/module.cfg4
-rw-r--r--config/submodule/coreboot/default/nasm-2.16.03.tar.bz2/module.cfg4
-rw-r--r--config/submodule/coreboot/default/vboot/module.cfg4
-rw-r--r--config/submodule/coreboot/fam15h/acpica-unix2-20190703.tar.gz/module.cfg4
-rw-r--r--config/submodule/coreboot/fam15h/binutils-2.32.tar.xz/module.cfg4
-rw-r--r--config/submodule/coreboot/fam15h/blobs/module.cfg4
-rw-r--r--config/submodule/coreboot/fam15h/gcc-8.3.0.tar.xz/module.cfg4
-rw-r--r--config/submodule/coreboot/fam15h/gmp-6.1.2.tar.xz/module.cfg4
-rw-r--r--config/submodule/coreboot/fam15h/mpc-1.1.0.tar.gz/module.cfg4
-rw-r--r--config/submodule/coreboot/fam15h/mpfr-4.0.2.tar.xz/module.cfg4
-rw-r--r--config/submodule/coreboot/fam15h/nasm-2.16.03.tar.bz2/module.cfg4
-rw-r--r--config/submodule/coreboot/fam15h/vboot/module.cfg4
-rw-r--r--config/submodule/docs/html/module.cfg4
-rw-r--r--config/submodule/docs/img/module.cfg4
-rw-r--r--config/submodule/grub/default/gnulib/module.cfg4
-rw-r--r--config/submodule/grub/nvme/gnulib/module.cfg4
-rw-r--r--config/submodule/grub/xhci/gnulib/module.cfg4
-rw-r--r--config/submodule/pcsx-redux/uC-sdk/module.cfg4
-rw-r--r--config/submodule/pico-sdk/tinyusb/module.cfg4
-rw-r--r--config/submodule/stm32-vserprog/libopencm3/module.cfg4
-rw-r--r--config/vendor/3050micro/pkg.cfg3
-rw-r--r--config/vendor/e6400/pkg.cfg1
-rw-r--r--config/vendor/haswell/pkg.cfg1
-rw-r--r--config/vendor/hp2170p/pkg.cfg3
-rw-r--r--config/vendor/hp2560p/pkg.cfg3
-rw-r--r--config/vendor/hp2570p/pkg.cfg3
-rw-r--r--config/vendor/hp8200sff/pkg.cfg1
-rw-r--r--config/vendor/hp820g2/pkg.cfg5
-rw-r--r--config/vendor/hp8460pintel/pkg.cfg3
-rw-r--r--config/vendor/hp8470pintel/pkg.cfg3
-rw-r--r--config/vendor/hp8560w/pkg.cfg3
-rw-r--r--config/vendor/hp9470m/pkg.cfg3
-rw-r--r--config/vendor/ivybridge/pkg.cfg1
-rw-r--r--config/vendor/sandybridge/pkg.cfg1
-rw-r--r--config/vendor/t1650/pkg.cfg2
-rw-r--r--config/vendor/t1700/pkg.cfg2
-rw-r--r--config/vendor/t480/pkg.cfg4
-rw-r--r--config/vendor/t480s/pkg.cfg5
-rw-r--r--include/get.sh162
-rw-r--r--include/git.sh145
-rw-r--r--include/init.sh245
-rw-r--r--include/inject.sh541
-rw-r--r--include/lib.sh155
-rw-r--r--include/mrc.sh44
-rw-r--r--include/release.sh88
-rw-r--r--include/rom.sh170
-rw-r--r--include/tree.sh343
-rw-r--r--include/vendor.sh402
-rwxr-xr-xmk417
172 files changed, 1762 insertions, 1821 deletions
diff --git a/config/coreboot/coreboot413/patches/0001-cbfstool-Make-use-of-spurious-null-termination.patch b/config/coreboot/coreboot413/patches/0001-cbfstool-Make-use-of-spurious-null-termination.patch
deleted file mode 100644
index dfc684e1..00000000
--- a/config/coreboot/coreboot413/patches/0001-cbfstool-Make-use-of-spurious-null-termination.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-From f22f408956bf02609a96b7d72fb3321da159bfc6 Mon Sep 17 00:00:00 2001
-From: Nico Huber <nico.huber@secunet.com>
-Date: Tue, 22 Jun 2021 13:49:44 +0000
-Subject: [PATCH 1/1] cbfstool: Make use of spurious null-termination
-
-The null-termination of `filetypes` was added after the code was
-written, obviously resulting in NULL dereferences. As some more
-code has grown around the termination, it's hard to revert the
-regression, so let's update the code that still used the array
-length.
-
-This fixes commit 7f5f9331d1 (util/cbfstool: fix buffer over-read)
-which actually did fix something, but only one path while it broke
-two others. We should be careful with fixes, they can always break
-something else. Especially when a dumb tool triggered the patching
-it seems likely that fewer people looked into related code.
-
-Change-Id: If2ece1f5ad62952ed2e57769702e318ba5468f0c
-Signed-off-by: Nico Huber <nico.huber@secunet.com>
-Reviewed-on: https://review.coreboot.org/c/coreboot/+/55763
-Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
-Reviewed-by: Julius Werner <jwerner@chromium.org>
----
- util/cbfstool/common.c | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/util/cbfstool/common.c b/util/cbfstool/common.c
-index e2ed38ffc4..539d0baccf 100644
---- a/util/cbfstool/common.c
-+++ b/util/cbfstool/common.c
-@@ -168,10 +168,10 @@ void print_supported_architectures(void)
-
- void print_supported_filetypes(void)
- {
-- int i, number = ARRAY_SIZE(filetypes);
-+ int i;
-
-- for (i=0; i<number; i++) {
-- printf(" %s%c", filetypes[i].name, (i==(number-1))?'\n':',');
-+ for (i=0; filetypes[i].name; i++) {
-+ printf(" %s%c", filetypes[i].name, filetypes[i + 1].name ? ',' : '\n');
- if ((i%8) == 7)
- printf("\n");
- }
-@@ -180,7 +180,7 @@ void print_supported_filetypes(void)
- uint64_t intfiletype(const char *name)
- {
- size_t i;
-- for (i = 0; i < (sizeof(filetypes) / sizeof(struct typedesc_t)); i++)
-+ for (i = 0; filetypes[i].name; i++)
- if (strcmp(filetypes[i].name, name) == 0)
- return filetypes[i].type;
- return -1;
---
-2.39.2
-
diff --git a/config/coreboot/coreboot413/patches/0002-Fix-cbfstool-build-error-on-GCC-15-host-compiler.patch b/config/coreboot/coreboot413/patches/0002-Fix-cbfstool-build-error-on-GCC-15-host-compiler.patch
deleted file mode 100644
index 9b7b8c5b..00000000
--- a/config/coreboot/coreboot413/patches/0002-Fix-cbfstool-build-error-on-GCC-15-host-compiler.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 06e8d7a9db4efe1dc2b7e5865b801a5518b38fbd Mon Sep 17 00:00:00 2001
-From: Alper Nebi Yasak <alpernebiyasak@gmail.com>
-Date: Tue, 29 Apr 2025 17:31:13 +0300
-Subject: [PATCH 1/1] Fix cbfstool build error on GCC 15 host compiler
-
-GCC 15 now considers the unterminated-string-initialization warning as
-part of -Werror by default. Coreboot compiles host utilities with the
-system compiler, which results in getting this error in some files.
-
-Mark a hexadecimal translation table in cbfstool code as "nonstring" to
-avoid the warning-turned-error.
-
-Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
----
- util/cbfstool/common.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/util/cbfstool/common.c b/util/cbfstool/common.c
-index 539d0baccf..f6fe647503 100644
---- a/util/cbfstool/common.c
-+++ b/util/cbfstool/common.c
-@@ -188,7 +188,7 @@ uint64_t intfiletype(const char *name)
-
- char *bintohex(uint8_t *data, size_t len)
- {
-- static const char translate[16] = "0123456789abcdef";
-+ static const char translate[16] __attribute__((__nonstring__)) = "0123456789abcdef";
-
- char *result = malloc(len * 2 + 1);
- if (result == NULL)
---
-2.39.5
-
diff --git a/config/coreboot/coreboot413/target.cfg b/config/coreboot/coreboot413/target.cfg
deleted file mode 100644
index a0aae341..00000000
--- a/config/coreboot/coreboot413/target.cfg
+++ /dev/null
@@ -1,4 +0,0 @@
-# SPDX-License-Identifier: GPL-3.0-or-later
-
-tree="coreboot413"
-rev="5c186c6777c9438ff4681929c9c25c98dee28bef"
diff --git a/config/coreboot/default/nuke.list b/config/coreboot/default/nuke.list
new file mode 100644
index 00000000..7e5ba3b5
--- /dev/null
+++ b/config/coreboot/default/nuke.list
@@ -0,0 +1,19 @@
+3rdparty/fsp/EagleStreamFspBinPkg
+3rdparty/fsp/AlderLakeFspBinPkg
+3rdparty/fsp/MeteorLakeFspBinPkg
+3rdparty/fsp/IceLakeFspBinPkg
+3rdparty/fsp/AmberLakeFspBinPkg
+3rdparty/fsp/DenvertonNSFspBinPkg
+3rdparty/fsp/TigerLakeFspBinPkg
+3rdparty/fsp/CedarIslandFspBinPkg
+3rdparty/fsp/ElkhartLakeFspBinPkg
+3rdparty/fsp/CometLakeFspBinPkg
+3rdparty/fsp/WhitleyFspBinPkg
+3rdparty/fsp/ArrowLakeFspBinPkg
+3rdparty/fsp/IdavilleFspBinPkg
+3rdparty/fsp/BraswellFspBinPkg
+3rdparty/fsp/CoffeeLakeFspBinPkg
+3rdparty/fsp/RaptorLakeFspBinPkg
+3rdparty/fsp/ApolloLakeFspBinPkg
+3rdparty/fsp/SkylakeFspBinPkg
+3rdparty/vboot/tests
diff --git a/config/coreboot/dell3050micro_vfsp_16mb/target.cfg b/config/coreboot/dell3050micro_vfsp_16mb/target.cfg
index f86065a1..e100fbed 100644
--- a/config/coreboot/dell3050micro_vfsp_16mb/target.cfg
+++ b/config/coreboot/dell3050micro_vfsp_16mb/target.cfg
@@ -10,4 +10,4 @@ grubtree="xhci"
vcfg="3050micro"
build_depend="seabios/default grub/xhci memtest86plus u-boot/amd64coreboot"
IFD_platform="sklkbl"
-payload_uboot_amd64="y"
+payload_uboot="amd64"
diff --git a/config/coreboot/dell7010sff_12mb/target.cfg b/config/coreboot/dell7010sff_12mb/target.cfg
index de6a8af8..34865f86 100644
--- a/config/coreboot/dell7010sff_12mb/target.cfg
+++ b/config/coreboot/dell7010sff_12mb/target.cfg
@@ -9,4 +9,4 @@ grub_scan_disk="nvme ahci"
grubtree="nvme"
vcfg="t1650"
build_depend="seabios/default grub/nvme memtest86plus u-boot/amd64coreboot"
-payload_uboot_amd64="y"
+payload_uboot="amd64"
diff --git a/config/coreboot/dell780mt_8mb/target.cfg b/config/coreboot/dell780mt_8mb/target.cfg
index 45b8ea0b..a58de7bd 100644
--- a/config/coreboot/dell780mt_8mb/target.cfg
+++ b/config/coreboot/dell780mt_8mb/target.cfg
@@ -8,4 +8,4 @@ payload_memtest="y"
grub_scan_disk="nvme ahci ata"
grubtree="nvme"
build_depend="seabios/default grub/nvme memtest86plus u-boot/amd64coreboot"
-payload_uboot_amd64="y"
+payload_uboot="amd64"
diff --git a/config/coreboot/dell780mt_truncate_8mb/target.cfg b/config/coreboot/dell780mt_truncate_8mb/target.cfg
index 45b8ea0b..a58de7bd 100644
--- a/config/coreboot/dell780mt_truncate_8mb/target.cfg
+++ b/config/coreboot/dell780mt_truncate_8mb/target.cfg
@@ -8,4 +8,4 @@ payload_memtest="y"
grub_scan_disk="nvme ahci ata"
grubtree="nvme"
build_depend="seabios/default grub/nvme memtest86plus u-boot/amd64coreboot"
-payload_uboot_amd64="y"
+payload_uboot="amd64"
diff --git a/config/coreboot/dell780usff_8mb/target.cfg b/config/coreboot/dell780usff_8mb/target.cfg
index 45b8ea0b..a58de7bd 100644
--- a/config/coreboot/dell780usff_8mb/target.cfg
+++ b/config/coreboot/dell780usff_8mb/target.cfg
@@ -8,4 +8,4 @@ payload_memtest="y"
grub_scan_disk="nvme ahci ata"
grubtree="nvme"
build_depend="seabios/default grub/nvme memtest86plus u-boot/amd64coreboot"
-payload_uboot_amd64="y"
+payload_uboot="amd64"
diff --git a/config/coreboot/dell780usff_truncate_8mb/target.cfg b/config/coreboot/dell780usff_truncate_8mb/target.cfg
index 45b8ea0b..a58de7bd 100644
--- a/config/coreboot/dell780usff_truncate_8mb/target.cfg
+++ b/config/coreboot/dell780usff_truncate_8mb/target.cfg
@@ -8,4 +8,4 @@ payload_memtest="y"
grub_scan_disk="nvme ahci ata"
grubtree="nvme"
build_depend="seabios/default grub/nvme memtest86plus u-boot/amd64coreboot"
-payload_uboot_amd64="y"
+payload_uboot="amd64"
diff --git a/config/coreboot/dell9020mt_nri_12mb/target.cfg b/config/coreboot/dell9020mt_nri_12mb/target.cfg
index 96fbb9e3..7c26ae5e 100644
--- a/config/coreboot/dell9020mt_nri_12mb/target.cfg
+++ b/config/coreboot/dell9020mt_nri_12mb/target.cfg
@@ -9,4 +9,4 @@ grub_scan_disk="nvme ahci"
grubtree="xhci"
vcfg="haswell"
build_depend="seabios/default grub/xhci memtest86plus u-boot/amd64coreboot"
-payload_uboot_amd64="y"
+payload_uboot="amd64"
diff --git a/config/coreboot/dell9020sff_nri_12mb/target.cfg b/config/coreboot/dell9020sff_nri_12mb/target.cfg
index 96fbb9e3..7c26ae5e 100644
--- a/config/coreboot/dell9020sff_nri_12mb/target.cfg
+++ b/config/coreboot/dell9020sff_nri_12mb/target.cfg
@@ -9,4 +9,4 @@ grub_scan_disk="nvme ahci"
grubtree="xhci"
vcfg="haswell"
build_depend="seabios/default grub/xhci memtest86plus u-boot/amd64coreboot"
-payload_uboot_amd64="y"
+payload_uboot="amd64"
diff --git a/config/coreboot/e4300_4mb/target.cfg b/config/coreboot/e4300_4mb/target.cfg
index 53a597b6..f4d81d19 100644
--- a/config/coreboot/e4300_4mb/target.cfg
+++ b/config/coreboot/e4300_4mb/target.cfg
@@ -6,4 +6,4 @@ payload_seabios="y"
payload_grub="y"
payload_memtest="y"
grub_scan_disk="ahci"
-payload_uboot_amd64="y"
+payload_uboot="amd64"
diff --git a/config/coreboot/e5420_6mb/target.cfg b/config/coreboot/e5420_6mb/target.cfg
index 333030ce..d7510b96 100644
--- a/config/coreboot/e5420_6mb/target.cfg
+++ b/config/coreboot/e5420_6mb/target.cfg
@@ -7,4 +7,4 @@ payload_grub="y"
payload_memtest="y"
grub_scan_disk="ahci"
vcfg="sandybridge"
-payload_uboot_amd64="y"
+payload_uboot="amd64"
diff --git a/config/coreboot/e5520_6mb/target.cfg b/config/coreboot/e5520_6mb/target.cfg
index 333030ce..d7510b96 100644
--- a/config/coreboot/e5520_6mb/target.cfg
+++ b/config/coreboot/e5520_6mb/target.cfg
@@ -7,4 +7,4 @@ payload_grub="y"
payload_memtest="y"
grub_scan_disk="ahci"
vcfg="sandybridge"
-payload_uboot_amd64="y"
+payload_uboot="amd64"
diff --git a/config/coreboot/e5530_12mb/target.cfg b/config/coreboot/e5530_12mb/target.cfg
index 6cbab731..595ad782 100644
--- a/config/coreboot/e5530_12mb/target.cfg
+++ b/config/coreboot/e5530_12mb/target.cfg
@@ -7,4 +7,4 @@ payload_grub="y"
payload_memtest="y"
grub_scan_disk="ahci"
vcfg="ivybridge"
-payload_uboot_amd64="y"
+payload_uboot="amd64"
diff --git a/config/coreboot/e6220_10mb/target.cfg b/config/coreboot/e6220_10mb/target.cfg
index 333030ce..d7510b96 100644
--- a/config/coreboot/e6220_10mb/target.cfg
+++ b/config/coreboot/e6220_10mb/target.cfg
@@ -7,4 +7,4 @@ payload_grub="y"
payload_memtest="y"
grub_scan_disk="ahci"
vcfg="sandybridge"
-payload_uboot_amd64="y"
+payload_uboot="amd64"
diff --git a/config/coreboot/e6230_12mb/target.cfg b/config/coreboot/e6230_12mb/target.cfg
index b491fdc8..42eca05e 100644
--- a/config/coreboot/e6230_12mb/target.cfg
+++ b/config/coreboot/e6230_12mb/target.cfg
@@ -7,5 +7,5 @@ payload_grub="y"
payload_memtest="y"
grub_scan_disk="ahci"
vcfg="ivybridge"
-payload_uboot_amd64="y"
-payload_uboot_amd64="y"
+payload_uboot="amd64"
+payload_uboot="amd64"
diff --git a/config/coreboot/e6320_10mb/target.cfg b/config/coreboot/e6320_10mb/target.cfg
index 333030ce..d7510b96 100644
--- a/config/coreboot/e6320_10mb/target.cfg
+++ b/config/coreboot/e6320_10mb/target.cfg
@@ -7,4 +7,4 @@ payload_grub="y"
payload_memtest="y"
grub_scan_disk="ahci"
vcfg="sandybridge"
-payload_uboot_amd64="y"
+payload_uboot="amd64"
diff --git a/config/coreboot/e6330_12mb/target.cfg b/config/coreboot/e6330_12mb/target.cfg
index 6cbab731..595ad782 100644
--- a/config/coreboot/e6330_12mb/target.cfg
+++ b/config/coreboot/e6330_12mb/target.cfg
@@ -7,4 +7,4 @@ payload_grub="y"
payload_memtest="y"
grub_scan_disk="ahci"
vcfg="ivybridge"
-payload_uboot_amd64="y"
+payload_uboot="amd64"
diff --git a/config/coreboot/e6400_4mb/target.cfg b/config/coreboot/e6400_4mb/target.cfg
index b999b10c..f7500e97 100644
--- a/config/coreboot/e6400_4mb/target.cfg
+++ b/config/coreboot/e6400_4mb/target.cfg
@@ -7,4 +7,4 @@ payload_grub="y"
payload_memtest="y"
grub_scan_disk="ahci"
vcfg="e6400"
-payload_uboot_amd64="y"
+payload_uboot="amd64"
diff --git a/config/coreboot/e6420_10mb/target.cfg b/config/coreboot/e6420_10mb/target.cfg
index 333030ce..d7510b96 100644
--- a/config/coreboot/e6420_10mb/target.cfg
+++ b/config/coreboot/e6420_10mb/target.cfg
@@ -7,4 +7,4 @@ payload_grub="y"
payload_memtest="y"
grub_scan_disk="ahci"
vcfg="sandybridge"
-payload_uboot_amd64="y"
+payload_uboot="amd64"
diff --git a/config/coreboot/e6430_12mb/target.cfg b/config/coreboot/e6430_12mb/target.cfg
index 6cbab731..595ad782 100644
--- a/config/coreboot/e6430_12mb/target.cfg
+++ b/config/coreboot/e6430_12mb/target.cfg
@@ -7,4 +7,4 @@ payload_grub="y"
payload_memtest="y"
grub_scan_disk="ahci"
vcfg="ivybridge"
-payload_uboot_amd64="y"
+payload_uboot="amd64"
diff --git a/config/coreboot/e6520_10mb/target.cfg b/config/coreboot/e6520_10mb/target.cfg
index 333030ce..d7510b96 100644
--- a/config/coreboot/e6520_10mb/target.cfg
+++ b/config/coreboot/e6520_10mb/target.cfg
@@ -7,4 +7,4 @@ payload_grub="y"
payload_memtest="y"
grub_scan_disk="ahci"
vcfg="sandybridge"
-payload_uboot_amd64="y"
+payload_uboot="amd64"
diff --git a/config/coreboot/e6530_12mb/target.cfg b/config/coreboot/e6530_12mb/target.cfg
index 6cbab731..595ad782 100644
--- a/config/coreboot/e6530_12mb/target.cfg
+++ b/config/coreboot/e6530_12mb/target.cfg
@@ -7,4 +7,4 @@ payload_grub="y"
payload_memtest="y"
grub_scan_disk="ahci"
vcfg="ivybridge"
-payload_uboot_amd64="y"
+payload_uboot="amd64"
diff --git a/config/coreboot/fam15h/nuke.list b/config/coreboot/fam15h/nuke.list
new file mode 100644
index 00000000..8ca7a4cf
--- /dev/null
+++ b/config/coreboot/fam15h/nuke.list
@@ -0,0 +1 @@
+3rdparty/vboot/tests
diff --git a/config/coreboot/g43t_am3/target.cfg b/config/coreboot/g43t_am3/target.cfg
index 3379b716..357eee9a 100644
--- a/config/coreboot/g43t_am3/target.cfg
+++ b/config/coreboot/g43t_am3/target.cfg
@@ -6,4 +6,4 @@ payload_seabios="y"
payload_memtest="y"
grubtree="nvme"
build_depend="seabios/default grub/nvme memtest86plus u-boot/amd64coreboot"
-payload_uboot_amd64="y"
+payload_uboot="amd64"
diff --git a/config/coreboot/g43t_am3_16mb/target.cfg b/config/coreboot/g43t_am3_16mb/target.cfg
index f2f0a52d..a097a3e8 100644
--- a/config/coreboot/g43t_am3_16mb/target.cfg
+++ b/config/coreboot/g43t_am3_16mb/target.cfg
@@ -7,4 +7,4 @@ payload_memtest="y"
release="n"
grubtree="nvme"
build_depend="seabios/default grub/nvme memtest86plus u-boot/amd64coreboot"
-payload_uboot_amd64="y"
+payload_uboot="amd64"
diff --git a/config/coreboot/gru_bob/target.cfg b/config/coreboot/gru_bob/target.cfg
index e5866cb7..dda11b5f 100644
--- a/config/coreboot/gru_bob/target.cfg
+++ b/config/coreboot/gru_bob/target.cfg
@@ -2,5 +2,5 @@
tree="default"
xarch="aarch64-elf arm-eabi"
-payload_uboot="y"
+payload_uboot="arm64"
build_depend="u-boot/gru_bob"
diff --git a/config/coreboot/gru_kevin/target.cfg b/config/coreboot/gru_kevin/target.cfg
index 81a93f27..26fd442b 100644
--- a/config/coreboot/gru_kevin/target.cfg
+++ b/config/coreboot/gru_kevin/target.cfg
@@ -2,5 +2,5 @@
tree="default"
xarch="aarch64-elf arm-eabi"
-payload_uboot="y"
+payload_uboot="arm64"
build_depend="u-boot/gru_kevin"
diff --git a/config/coreboot/hp2170p_16mb/target.cfg b/config/coreboot/hp2170p_16mb/target.cfg
index e1cffa41..d6868831 100644
--- a/config/coreboot/hp2170p_16mb/target.cfg
+++ b/config/coreboot/hp2170p_16mb/target.cfg
@@ -7,4 +7,4 @@ payload_grub="y"
payload_memtest="y"
grub_scan_disk="ahci"
vcfg="hp2170p"
-payload_uboot_amd64="y"
+payload_uboot="amd64"
diff --git a/config/coreboot/hp2560p_8mb/target.cfg b/config/coreboot/hp2560p_8mb/target.cfg
index 5715390e..fce385d9 100644
--- a/config/coreboot/hp2560p_8mb/target.cfg
+++ b/config/coreboot/hp2560p_8mb/target.cfg
@@ -7,4 +7,4 @@ payload_grub="y"
payload_memtest="y"
grub_scan_disk="ahci"
vcfg="hp2560p"
-payload_uboot_amd64="y"
+payload_uboot="amd64"
diff --git a/config/coreboot/hp2570p_16mb/target.cfg b/config/coreboot/hp2570p_16mb/target.cfg
index fb5d41e1..26c80f5f 100644
--- a/config/coreboot/hp2570p_16mb/target.cfg
+++ b/config/coreboot/hp2570p_16mb/target.cfg
@@ -7,4 +7,4 @@ payload_grub="y"
payload_memtest="y"
grub_scan_disk="ahci"
vcfg="hp2570p"
-payload_uboot_amd64="y"
+payload_uboot="amd64"
diff --git a/config/coreboot/hp8200sff_4mb/target.cfg b/config/coreboot/hp8200sff_4mb/target.cfg
index 521ba0ec..76effd9f 100644
--- a/config/coreboot/hp8200sff_4mb/target.cfg
+++ b/config/coreboot/hp8200sff_4mb/target.cfg
@@ -9,4 +9,4 @@ grub_scan_disk="nvme ahci"
grubtree="nvme"
vcfg="hp8200sff"
build_depend="seabios/default grub/nvme memtest86plus u-boot/amd64coreboot"
-payload_uboot_amd64="y"
+payload_uboot="amd64"
diff --git a/config/coreboot/hp8200sff_8mb/target.cfg b/config/coreboot/hp8200sff_8mb/target.cfg
index 521ba0ec..76effd9f 100644
--- a/config/coreboot/hp8200sff_8mb/target.cfg
+++ b/config/coreboot/hp8200sff_8mb/target.cfg
@@ -9,4 +9,4 @@ grub_scan_disk="nvme ahci"
grubtree="nvme"
vcfg="hp8200sff"
build_depend="seabios/default grub/nvme memtest86plus u-boot/amd64coreboot"
-payload_uboot_amd64="y"
+payload_uboot="amd64"
diff --git a/config/coreboot/hp820g2_12mb/target.cfg b/config/coreboot/hp820g2_12mb/target.cfg
index 7fe45119..66d0433e 100644
--- a/config/coreboot/hp820g2_12mb/target.cfg
+++ b/config/coreboot/hp820g2_12mb/target.cfg
@@ -9,4 +9,4 @@ grub_scan_disk="nvme ahci"
grubtree="xhci"
vcfg="hp820g2"
build_depend="seabios/default grub/xhci memtest86plus u-boot/amd64coreboot"
-payload_uboot_amd64="y"
+payload_uboot="amd64"
diff --git a/config/coreboot/hp8300cmt_16mb/target.cfg b/config/coreboot/hp8300cmt_16mb/target.cfg
index 5bd323c9..f3fb43a7 100644
--- a/config/coreboot/hp8300cmt_16mb/target.cfg
+++ b/config/coreboot/hp8300cmt_16mb/target.cfg
@@ -9,4 +9,4 @@ grub_scan_disk="nvme ahci"
grubtree="nvme"
vcfg="ivybridge"
build_depend="seabios/default grub/nvme memtest86plus u-boot/amd64coreboot"
-payload_uboot_amd64="y"
+payload_uboot="amd64"
diff --git a/config/coreboot/hp8300usdt_16mb/target.cfg b/config/coreboot/hp8300usdt_16mb/target.cfg
index 6cbab731..595ad782 100644
--- a/config/coreboot/hp8300usdt_16mb/target.cfg
+++ b/config/coreboot/hp8300usdt_16mb/target.cfg
@@ -7,4 +7,4 @@ payload_grub="y"
payload_memtest="y"
grub_scan_disk="ahci"
vcfg="ivybridge"
-payload_uboot_amd64="y"
+payload_uboot="amd64"
diff --git a/config/coreboot/hp8460pintel_8mb/target.cfg b/config/coreboot/hp8460pintel_8mb/target.cfg
index d6179420..255bfac7 100644
--- a/config/coreboot/hp8460pintel_8mb/target.cfg
+++ b/config/coreboot/hp8460pintel_8mb/target.cfg
@@ -7,4 +7,4 @@ payload_grub="y"
payload_memtest="y"
grub_scan_disk="ahci"
vcfg="hp8460pintel"
-payload_uboot_amd64="y"
+payload_uboot="amd64"
diff --git a/config/coreboot/hp8470pintel_16mb/target.cfg b/config/coreboot/hp8470pintel_16mb/target.cfg
index 65828b25..01b2ed5b 100644
--- a/config/coreboot/hp8470pintel_16mb/target.cfg
+++ b/config/coreboot/hp8470pintel_16mb/target.cfg
@@ -7,4 +7,4 @@ payload_grub="y"
payload_memtest="y"
grub_scan_disk="ahci"
vcfg="hp8470pintel"
-payload_uboot_amd64="y"
+payload_uboot="amd64"
diff --git a/config/coreboot/hp9470m_16mb/target.cfg b/config/coreboot/hp9470m_16mb/target.cfg
index e4dbdc93..6ebd81c5 100644
--- a/config/coreboot/hp9470m_16mb/target.cfg
+++ b/config/coreboot/hp9470m_16mb/target.cfg
@@ -7,4 +7,4 @@ payload_grub="y"
payload_memtest="y"
grub_scan_disk="ahci"
vcfg="hp9470m"
-payload_uboot_amd64="y"
+payload_uboot="amd64"
diff --git a/config/coreboot/kcma_d8_16mb/target.cfg b/config/coreboot/kcma_d8_16mb/target.cfg
index 112c101f..75955f7e 100644
--- a/config/coreboot/kcma_d8_16mb/target.cfg
+++ b/config/coreboot/kcma_d8_16mb/target.cfg
@@ -9,4 +9,4 @@ xlang="c"
grub_scan_disk="nvme ahci"
grubtree="nvme"
build_depend="seabios/default grub/nvme memtest86plus u-boot/amd64coreboot"
-payload_uboot_amd64="y"
+payload_uboot="amd64"
diff --git a/config/coreboot/kcma_d8_2mb/target.cfg b/config/coreboot/kcma_d8_2mb/target.cfg
index 112c101f..75955f7e 100644
--- a/config/coreboot/kcma_d8_2mb/target.cfg
+++ b/config/coreboot/kcma_d8_2mb/target.cfg
@@ -9,4 +9,4 @@ xlang="c"
grub_scan_disk="nvme ahci"
grubtree="nvme"
build_depend="seabios/default grub/nvme memtest86plus u-boot/amd64coreboot"
-payload_uboot_amd64="y"
+payload_uboot="amd64"
diff --git a/config/coreboot/kfsn4_dre_1mb/target.cfg b/config/coreboot/kfsn4_dre_1mb/target.cfg
index a87ac1ad..c4536856 100644
--- a/config/coreboot/kfsn4_dre_1mb/target.cfg
+++ b/config/coreboot/kfsn4_dre_1mb/target.cfg
@@ -6,4 +6,4 @@ payload_seabios="y"
payload_memtest="y"
xlang="c"
build_depend="seabios/default memtest86plus u-boot/amd64coreboot"
-payload_uboot_amd64="y"
+payload_uboot="amd64"
diff --git a/config/coreboot/kfsn4_dre_2mb/target.cfg b/config/coreboot/kfsn4_dre_2mb/target.cfg
index 17021b47..f942604b 100644
--- a/config/coreboot/kfsn4_dre_2mb/target.cfg
+++ b/config/coreboot/kfsn4_dre_2mb/target.cfg
@@ -6,4 +6,4 @@ payload_seabios="y"
payload_grub="y"
payload_memtest="y"
xlang="c"
-payload_uboot_amd64="y"
+payload_uboot="amd64"
diff --git a/config/coreboot/kgpe_d16_16mb/target.cfg b/config/coreboot/kgpe_d16_16mb/target.cfg
index 112c101f..75955f7e 100644
--- a/config/coreboot/kgpe_d16_16mb/target.cfg
+++ b/config/coreboot/kgpe_d16_16mb/target.cfg
@@ -9,4 +9,4 @@ xlang="c"
grub_scan_disk="nvme ahci"
grubtree="nvme"
build_depend="seabios/default grub/nvme memtest86plus u-boot/amd64coreboot"
-payload_uboot_amd64="y"
+payload_uboot="amd64"
diff --git a/config/coreboot/kgpe_d16_2mb/target.cfg b/config/coreboot/kgpe_d16_2mb/target.cfg
index 112c101f..75955f7e 100644
--- a/config/coreboot/kgpe_d16_2mb/target.cfg
+++ b/config/coreboot/kgpe_d16_2mb/target.cfg
@@ -9,4 +9,4 @@ xlang="c"
grub_scan_disk="nvme ahci"
grubtree="nvme"
build_depend="seabios/default grub/nvme memtest86plus u-boot/amd64coreboot"
-payload_uboot_amd64="y"
+payload_uboot="amd64"
diff --git a/config/coreboot/macbook11/target.cfg b/config/coreboot/macbook11/target.cfg
index c1e3a3c6..f41e3fe9 100644
--- a/config/coreboot/macbook11/target.cfg
+++ b/config/coreboot/macbook11/target.cfg
@@ -6,4 +6,4 @@ payload_seabios="y"
payload_grub="y"
grub_scan_disk="ahci"
build_depend="seabios/default grub/default u-boot/i386coreboot"
-payload_uboot_i386="y"
+payload_uboot="i386"
diff --git a/config/coreboot/macbook11_16mb/target.cfg b/config/coreboot/macbook11_16mb/target.cfg
index e0d1afbf..ff2498eb 100644
--- a/config/coreboot/macbook11_16mb/target.cfg
+++ b/config/coreboot/macbook11_16mb/target.cfg
@@ -6,4 +6,4 @@ payload_seabios="y"
payload_grub="y"
scan_scan_disk="ahci"
build_depend="seabios/default grub/default u-boot/i386coreboot"
-payload_uboot_i386="y"
+payload_uboot="i386"
diff --git a/config/coreboot/macbook21/target.cfg b/config/coreboot/macbook21/target.cfg
index 53a597b6..f4d81d19 100644
--- a/config/coreboot/macbook21/target.cfg
+++ b/config/coreboot/macbook21/target.cfg
@@ -6,4 +6,4 @@ payload_seabios="y"
payload_grub="y"
payload_memtest="y"
grub_scan_disk="ahci"
-payload_uboot_amd64="y"
+payload_uboot="amd64"
diff --git a/config/coreboot/macbook21_16mb/target.cfg b/config/coreboot/macbook21_16mb/target.cfg
index 53a597b6..f4d81d19 100644
--- a/config/coreboot/macbook21_16mb/target.cfg
+++ b/config/coreboot/macbook21_16mb/target.cfg
@@ -6,4 +6,4 @@ payload_seabios="y"
payload_grub="y"
payload_memtest="y"
grub_scan_disk="ahci"
-payload_uboot_amd64="y"
+payload_uboot="amd64"
diff --git a/config/coreboot/q45t_am/target.cfg b/config/coreboot/q45t_am/target.cfg
index 3379b716..357eee9a 100644
--- a/config/coreboot/q45t_am/target.cfg
+++ b/config/coreboot/q45t_am/target.cfg
@@ -6,4 +6,4 @@ payload_seabios="y"
payload_memtest="y"
grubtree="nvme"
build_depend="seabios/default grub/nvme memtest86plus u-boot/amd64coreboot"
-payload_uboot_amd64="y"
+payload_uboot="amd64"
diff --git a/config/coreboot/qemu_arm64_12mb/target.cfg b/config/coreboot/qemu_arm64_12mb/target.cfg
index 5d8f0db2..2ea9482f 100644
--- a/config/coreboot/qemu_arm64_12mb/target.cfg
+++ b/config/coreboot/qemu_arm64_12mb/target.cfg
@@ -2,5 +2,5 @@
tree="default"
xarch="aarch64-elf arm-eabi"
-payload_uboot="y"
+payload_uboot="arm64"
build_depend="u-boot/qemu_arm64_12mb"
diff --git a/config/coreboot/qemu_x86_12mb/target.cfg b/config/coreboot/qemu_x86_12mb/target.cfg
index 2074beca..476a98cb 100644
--- a/config/coreboot/qemu_x86_12mb/target.cfg
+++ b/config/coreboot/qemu_x86_12mb/target.cfg
@@ -6,4 +6,4 @@ payload_grub="y"
payload_seabios="y"
payload_memtest="y"
build_depend="seabios/default grub/default memtest86plus u-boot/i386coreboot"
-payload_uboot_i386="y"
+payload_uboot="i386"
diff --git a/config/coreboot/qemu_x86_64_12mb/target.cfg b/config/coreboot/qemu_x86_64_12mb/target.cfg
index 7855bd6f..61ae6299 100644
--- a/config/coreboot/qemu_x86_64_12mb/target.cfg
+++ b/config/coreboot/qemu_x86_64_12mb/target.cfg
@@ -5,4 +5,4 @@ xarch="i386-elf"
payload_grub="y"
payload_seabios="y"
payload_memtest="y"
-payload_uboot_amd64="y"
+payload_uboot="amd64"
diff --git a/config/coreboot/r400_16mb/target.cfg b/config/coreboot/r400_16mb/target.cfg
index 53a597b6..f4d81d19 100644
--- a/config/coreboot/r400_16mb/target.cfg
+++ b/config/coreboot/r400_16mb/target.cfg
@@ -6,4 +6,4 @@ payload_seabios="y"
payload_grub="y"
payload_memtest="y"
grub_scan_disk="ahci"
-payload_uboot_amd64="y"
+payload_uboot="amd64"
diff --git a/config/coreboot/r400_4mb/target.cfg b/config/coreboot/r400_4mb/target.cfg
index 53a597b6..f4d81d19 100644
--- a/config/coreboot/r400_4mb/target.cfg
+++ b/config/coreboot/r400_4mb/target.cfg
@@ -6,4 +6,4 @@ payload_seabios="y"
payload_grub="y"
payload_memtest="y"
grub_scan_disk="ahci"
-payload_uboot_amd64="y"
+payload_uboot="amd64"
diff --git a/config/coreboot/r400_8mb/target.cfg b/config/coreboot/r400_8mb/target.cfg
index ef878ea1..23bfb335 100644
--- a/config/coreboot/r400_8mb/target.cfg
+++ b/config/coreboot/r400_8mb/target.cfg
@@ -5,4 +5,4 @@ xarch="i386-elf"
payload_seabios="y"
payload_grub="y"
payload_memtest="y"
-payload_uboot_amd64="y"
+payload_uboot="amd64"
diff --git a/config/coreboot/r500_4mb/target.cfg b/config/coreboot/r500_4mb/target.cfg
index 53a597b6..f4d81d19 100644
--- a/config/coreboot/r500_4mb/target.cfg
+++ b/config/coreboot/r500_4mb/target.cfg
@@ -6,4 +6,4 @@ payload_seabios="y"
payload_grub="y"
payload_memtest="y"
grub_scan_disk="ahci"
-payload_uboot_amd64="y"
+payload_uboot="amd64"
diff --git a/config/coreboot/t1650_12mb/target.cfg b/config/coreboot/t1650_12mb/target.cfg
index de6a8af8..34865f86 100644
--- a/config/coreboot/t1650_12mb/target.cfg
+++ b/config/coreboot/t1650_12mb/target.cfg
@@ -9,4 +9,4 @@ grub_scan_disk="nvme ahci"
grubtree="nvme"
vcfg="t1650"
build_depend="seabios/default grub/nvme memtest86plus u-boot/amd64coreboot"
-payload_uboot_amd64="y"
+payload_uboot="amd64"
diff --git a/config/coreboot/t1700mt_bmrc_12mb/target.cfg b/config/coreboot/t1700mt_bmrc_12mb/target.cfg
index 06de408c..5fd0d500 100644
--- a/config/coreboot/t1700mt_bmrc_12mb/target.cfg
+++ b/config/coreboot/t1700mt_bmrc_12mb/target.cfg
@@ -9,4 +9,4 @@ grub_scan_disk="nvme ahci"
grubtree="xhci"
vcfg="t1700"
build_depend="seabios/default grub/xhci memtest86plus u-boot/amd64coreboot"
-payload_uboot_amd64="y"
+payload_uboot="amd64"
diff --git a/config/coreboot/t1700sff_bmrc_12mb/target.cfg b/config/coreboot/t1700sff_bmrc_12mb/target.cfg
index 06de408c..5fd0d500 100644
--- a/config/coreboot/t1700sff_bmrc_12mb/target.cfg
+++ b/config/coreboot/t1700sff_bmrc_12mb/target.cfg
@@ -9,4 +9,4 @@ grub_scan_disk="nvme ahci"
grubtree="xhci"
vcfg="t1700"
build_depend="seabios/default grub/xhci memtest86plus u-boot/amd64coreboot"
-payload_uboot_amd64="y"
+payload_uboot="amd64"
diff --git a/config/coreboot/t400_16mb/target.cfg b/config/coreboot/t400_16mb/target.cfg
index 53a597b6..f4d81d19 100644
--- a/config/coreboot/t400_16mb/target.cfg
+++ b/config/coreboot/t400_16mb/target.cfg
@@ -6,4 +6,4 @@ payload_seabios="y"
payload_grub="y"
payload_memtest="y"
grub_scan_disk="ahci"
-payload_uboot_amd64="y"
+payload_uboot="amd64"
diff --git a/config/coreboot/t400_4mb/target.cfg b/config/coreboot/t400_4mb/target.cfg
index 53a597b6..f4d81d19 100644
--- a/config/coreboot/t400_4mb/target.cfg
+++ b/config/coreboot/t400_4mb/target.cfg
@@ -6,4 +6,4 @@ payload_seabios="y"
payload_grub="y"
payload_memtest="y"
grub_scan_disk="ahci"
-payload_uboot_amd64="y"
+payload_uboot="amd64"
diff --git a/config/coreboot/t400_8mb/target.cfg b/config/coreboot/t400_8mb/target.cfg
index 53a597b6..f4d81d19 100644
--- a/config/coreboot/t400_8mb/target.cfg
+++ b/config/coreboot/t400_8mb/target.cfg
@@ -6,4 +6,4 @@ payload_seabios="y"
payload_grub="y"
payload_memtest="y"
grub_scan_disk="ahci"
-payload_uboot_amd64="y"
+payload_uboot="amd64"
diff --git a/config/coreboot/t420_8mb/target.cfg b/config/coreboot/t420_8mb/target.cfg
index 333030ce..d7510b96 100644
--- a/config/coreboot/t420_8mb/target.cfg
+++ b/config/coreboot/t420_8mb/target.cfg
@@ -7,4 +7,4 @@ payload_grub="y"
payload_memtest="y"
grub_scan_disk="ahci"
vcfg="sandybridge"
-payload_uboot_amd64="y"
+payload_uboot="amd64"
diff --git a/config/coreboot/t420s_8mb/target.cfg b/config/coreboot/t420s_8mb/target.cfg
index 333030ce..d7510b96 100644
--- a/config/coreboot/t420s_8mb/target.cfg
+++ b/config/coreboot/t420s_8mb/target.cfg
@@ -7,4 +7,4 @@ payload_grub="y"
payload_memtest="y"
grub_scan_disk="ahci"
vcfg="sandybridge"
-payload_uboot_amd64="y"
+payload_uboot="amd64"
diff --git a/config/coreboot/t430_12mb/target.cfg b/config/coreboot/t430_12mb/target.cfg
index 6cbab731..595ad782 100644
--- a/config/coreboot/t430_12mb/target.cfg
+++ b/config/coreboot/t430_12mb/target.cfg
@@ -7,4 +7,4 @@ payload_grub="y"
payload_memtest="y"
grub_scan_disk="ahci"
vcfg="ivybridge"
-payload_uboot_amd64="y"
+payload_uboot="amd64"
diff --git a/config/coreboot/t440plibremrc_12mb/target.cfg b/config/coreboot/t440plibremrc_12mb/target.cfg
index 96fbb9e3..7c26ae5e 100644
--- a/config/coreboot/t440plibremrc_12mb/target.cfg
+++ b/config/coreboot/t440plibremrc_12mb/target.cfg
@@ -9,4 +9,4 @@ grub_scan_disk="nvme ahci"
grubtree="xhci"
vcfg="haswell"
build_depend="seabios/default grub/xhci memtest86plus u-boot/amd64coreboot"
-payload_uboot_amd64="y"
+payload_uboot="amd64"
diff --git a/config/coreboot/t500_16mb/target.cfg b/config/coreboot/t500_16mb/target.cfg
index 53a597b6..f4d81d19 100644
--- a/config/coreboot/t500_16mb/target.cfg
+++ b/config/coreboot/t500_16mb/target.cfg
@@ -6,4 +6,4 @@ payload_seabios="y"
payload_grub="y"
payload_memtest="y"
grub_scan_disk="ahci"
-payload_uboot_amd64="y"
+payload_uboot="amd64"
diff --git a/config/coreboot/t500_4mb/target.cfg b/config/coreboot/t500_4mb/target.cfg
index 53a597b6..f4d81d19 100644
--- a/config/coreboot/t500_4mb/target.cfg
+++ b/config/coreboot/t500_4mb/target.cfg
@@ -6,4 +6,4 @@ payload_seabios="y"
payload_grub="y"
payload_memtest="y"
grub_scan_disk="ahci"
-payload_uboot_amd64="y"
+payload_uboot="amd64"
diff --git a/config/coreboot/t500_8mb/target.cfg b/config/coreboot/t500_8mb/target.cfg
index 53a597b6..f4d81d19 100644
--- a/config/coreboot/t500_8mb/target.cfg
+++ b/config/coreboot/t500_8mb/target.cfg
@@ -6,4 +6,4 @@ payload_seabios="y"
payload_grub="y"
payload_memtest="y"
grub_scan_disk="ahci"
-payload_uboot_amd64="y"
+payload_uboot="amd64"
diff --git a/config/coreboot/t520_8mb/target.cfg b/config/coreboot/t520_8mb/target.cfg
index 333030ce..d7510b96 100644
--- a/config/coreboot/t520_8mb/target.cfg
+++ b/config/coreboot/t520_8mb/target.cfg
@@ -7,4 +7,4 @@ payload_grub="y"
payload_memtest="y"
grub_scan_disk="ahci"
vcfg="sandybridge"
-payload_uboot_amd64="y"
+payload_uboot="amd64"
diff --git a/config/coreboot/t530_12mb/target.cfg b/config/coreboot/t530_12mb/target.cfg
index 6cbab731..595ad782 100644
--- a/config/coreboot/t530_12mb/target.cfg
+++ b/config/coreboot/t530_12mb/target.cfg
@@ -7,4 +7,4 @@ payload_grub="y"
payload_memtest="y"
grub_scan_disk="ahci"
vcfg="ivybridge"
-payload_uboot_amd64="y"
+payload_uboot="amd64"
diff --git a/config/coreboot/t60_16mb_intelgpu/target.cfg b/config/coreboot/t60_16mb_intelgpu/target.cfg
index c1e3a3c6..f41e3fe9 100644
--- a/config/coreboot/t60_16mb_intelgpu/target.cfg
+++ b/config/coreboot/t60_16mb_intelgpu/target.cfg
@@ -6,4 +6,4 @@ payload_seabios="y"
payload_grub="y"
grub_scan_disk="ahci"
build_depend="seabios/default grub/default u-boot/i386coreboot"
-payload_uboot_i386="y"
+payload_uboot="i386"
diff --git a/config/coreboot/t60_intelgpu/target.cfg b/config/coreboot/t60_intelgpu/target.cfg
index c1e3a3c6..f41e3fe9 100644
--- a/config/coreboot/t60_intelgpu/target.cfg
+++ b/config/coreboot/t60_intelgpu/target.cfg
@@ -6,4 +6,4 @@ payload_seabios="y"
payload_grub="y"
grub_scan_disk="ahci"
build_depend="seabios/default grub/default u-boot/i386coreboot"
-payload_uboot_i386="y"
+payload_uboot="i386"
diff --git a/config/coreboot/w500_16mb/target.cfg b/config/coreboot/w500_16mb/target.cfg
index 53a597b6..f4d81d19 100644
--- a/config/coreboot/w500_16mb/target.cfg
+++ b/config/coreboot/w500_16mb/target.cfg
@@ -6,4 +6,4 @@ payload_seabios="y"
payload_grub="y"
payload_memtest="y"
grub_scan_disk="ahci"
-payload_uboot_amd64="y"
+payload_uboot="amd64"
diff --git a/config/coreboot/w500_4mb/target.cfg b/config/coreboot/w500_4mb/target.cfg
index 53a597b6..f4d81d19 100644
--- a/config/coreboot/w500_4mb/target.cfg
+++ b/config/coreboot/w500_4mb/target.cfg
@@ -6,4 +6,4 @@ payload_seabios="y"
payload_grub="y"
payload_memtest="y"
grub_scan_disk="ahci"
-payload_uboot_amd64="y"
+payload_uboot="amd64"
diff --git a/config/coreboot/w500_8mb/target.cfg b/config/coreboot/w500_8mb/target.cfg
index 53a597b6..f4d81d19 100644
--- a/config/coreboot/w500_8mb/target.cfg
+++ b/config/coreboot/w500_8mb/target.cfg
@@ -6,4 +6,4 @@ payload_seabios="y"
payload_grub="y"
payload_memtest="y"
grub_scan_disk="ahci"
-payload_uboot_amd64="y"
+payload_uboot="amd64"
diff --git a/config/coreboot/w530_12mb/target.cfg b/config/coreboot/w530_12mb/target.cfg
index 6cbab731..595ad782 100644
--- a/config/coreboot/w530_12mb/target.cfg
+++ b/config/coreboot/w530_12mb/target.cfg
@@ -7,4 +7,4 @@ payload_grub="y"
payload_memtest="y"
grub_scan_disk="ahci"
vcfg="ivybridge"
-payload_uboot_amd64="y"
+payload_uboot="amd64"
diff --git a/config/coreboot/w541_12mb/target.cfg b/config/coreboot/w541_12mb/target.cfg
index 96fbb9e3..7c26ae5e 100644
--- a/config/coreboot/w541_12mb/target.cfg
+++ b/config/coreboot/w541_12mb/target.cfg
@@ -9,4 +9,4 @@ grub_scan_disk="nvme ahci"
grubtree="xhci"
vcfg="haswell"
build_depend="seabios/default grub/xhci memtest86plus u-boot/amd64coreboot"
-payload_uboot_amd64="y"
+payload_uboot="amd64"
diff --git a/config/coreboot/x200_16mb/target.cfg b/config/coreboot/x200_16mb/target.cfg
index 53a597b6..f4d81d19 100644
--- a/config/coreboot/x200_16mb/target.cfg
+++ b/config/coreboot/x200_16mb/target.cfg
@@ -6,4 +6,4 @@ payload_seabios="y"
payload_grub="y"
payload_memtest="y"
grub_scan_disk="ahci"
-payload_uboot_amd64="y"
+payload_uboot="amd64"
diff --git a/config/coreboot/x200_4mb/target.cfg b/config/coreboot/x200_4mb/target.cfg
index 53a597b6..f4d81d19 100644
--- a/config/coreboot/x200_4mb/target.cfg
+++ b/config/coreboot/x200_4mb/target.cfg
@@ -6,4 +6,4 @@ payload_seabios="y"
payload_grub="y"
payload_memtest="y"
grub_scan_disk="ahci"
-payload_uboot_amd64="y"
+payload_uboot="amd64"
diff --git a/config/coreboot/x200_8mb/target.cfg b/config/coreboot/x200_8mb/target.cfg
index 53a597b6..f4d81d19 100644
--- a/config/coreboot/x200_8mb/target.cfg
+++ b/config/coreboot/x200_8mb/target.cfg
@@ -6,4 +6,4 @@ payload_seabios="y"
payload_grub="y"
payload_memtest="y"
grub_scan_disk="ahci"
-payload_uboot_amd64="y"
+payload_uboot="amd64"
diff --git a/config/coreboot/x220_8mb/target.cfg b/config/coreboot/x220_8mb/target.cfg
index 333030ce..d7510b96 100644
--- a/config/coreboot/x220_8mb/target.cfg
+++ b/config/coreboot/x220_8mb/target.cfg
@@ -7,4 +7,4 @@ payload_grub="y"
payload_memtest="y"
grub_scan_disk="ahci"
vcfg="sandybridge"
-payload_uboot_amd64="y"
+payload_uboot="amd64"
diff --git a/config/coreboot/x230_12mb/target.cfg b/config/coreboot/x230_12mb/target.cfg
index 6cbab731..595ad782 100644
--- a/config/coreboot/x230_12mb/target.cfg
+++ b/config/coreboot/x230_12mb/target.cfg
@@ -7,4 +7,4 @@ payload_grub="y"
payload_memtest="y"
grub_scan_disk="ahci"
vcfg="ivybridge"
-payload_uboot_amd64="y"
+payload_uboot="amd64"
diff --git a/config/coreboot/x230_16mb/target.cfg b/config/coreboot/x230_16mb/target.cfg
index 6cbab731..595ad782 100644
--- a/config/coreboot/x230_16mb/target.cfg
+++ b/config/coreboot/x230_16mb/target.cfg
@@ -7,4 +7,4 @@ payload_grub="y"
payload_memtest="y"
grub_scan_disk="ahci"
vcfg="ivybridge"
-payload_uboot_amd64="y"
+payload_uboot="amd64"
diff --git a/config/coreboot/x230t_12mb/target.cfg b/config/coreboot/x230t_12mb/target.cfg
index 6cbab731..595ad782 100644
--- a/config/coreboot/x230t_12mb/target.cfg
+++ b/config/coreboot/x230t_12mb/target.cfg
@@ -7,4 +7,4 @@ payload_grub="y"
payload_memtest="y"
grub_scan_disk="ahci"
vcfg="ivybridge"
-payload_uboot_amd64="y"
+payload_uboot="amd64"
diff --git a/config/coreboot/x230t_16mb/target.cfg b/config/coreboot/x230t_16mb/target.cfg
index 6cbab731..595ad782 100644
--- a/config/coreboot/x230t_16mb/target.cfg
+++ b/config/coreboot/x230t_16mb/target.cfg
@@ -7,4 +7,4 @@ payload_grub="y"
payload_memtest="y"
grub_scan_disk="ahci"
vcfg="ivybridge"
-payload_uboot_amd64="y"
+payload_uboot="amd64"
diff --git a/config/coreboot/x301_16mb/target.cfg b/config/coreboot/x301_16mb/target.cfg
index 4d4a4c25..31e9f759 100644
--- a/config/coreboot/x301_16mb/target.cfg
+++ b/config/coreboot/x301_16mb/target.cfg
@@ -7,4 +7,4 @@ payload_grub="y"
payload_memtest="y"
release="n"
grub_scan_disk="ahci"
-payload_uboot_amd64="y"
+payload_uboot="amd64"
diff --git a/config/coreboot/x301_4mb/target.cfg b/config/coreboot/x301_4mb/target.cfg
index 4d4a4c25..31e9f759 100644
--- a/config/coreboot/x301_4mb/target.cfg
+++ b/config/coreboot/x301_4mb/target.cfg
@@ -7,4 +7,4 @@ payload_grub="y"
payload_memtest="y"
release="n"
grub_scan_disk="ahci"
-payload_uboot_amd64="y"
+payload_uboot="amd64"
diff --git a/config/coreboot/x301_8mb/target.cfg b/config/coreboot/x301_8mb/target.cfg
index 4d4a4c25..31e9f759 100644
--- a/config/coreboot/x301_8mb/target.cfg
+++ b/config/coreboot/x301_8mb/target.cfg
@@ -7,4 +7,4 @@ payload_grub="y"
payload_memtest="y"
release="n"
grub_scan_disk="ahci"
-payload_uboot_amd64="y"
+payload_uboot="amd64"
diff --git a/config/coreboot/x60/target.cfg b/config/coreboot/x60/target.cfg
index c1e3a3c6..f41e3fe9 100644
--- a/config/coreboot/x60/target.cfg
+++ b/config/coreboot/x60/target.cfg
@@ -6,4 +6,4 @@ payload_seabios="y"
payload_grub="y"
grub_scan_disk="ahci"
build_depend="seabios/default grub/default u-boot/i386coreboot"
-payload_uboot_i386="y"
+payload_uboot="i386"
diff --git a/config/coreboot/x60_16mb/target.cfg b/config/coreboot/x60_16mb/target.cfg
index c1e3a3c6..f41e3fe9 100644
--- a/config/coreboot/x60_16mb/target.cfg
+++ b/config/coreboot/x60_16mb/target.cfg
@@ -6,4 +6,4 @@ payload_seabios="y"
payload_grub="y"
grub_scan_disk="ahci"
build_depend="seabios/default grub/default u-boot/i386coreboot"
-payload_uboot_i386="y"
+payload_uboot="i386"
diff --git a/config/data/coreboot/mkhelper.cfg b/config/data/coreboot/mkhelper.cfg
index c993fbd4..da9015f1 100644
--- a/config/data/coreboot/mkhelper.cfg
+++ b/config/data/coreboot/mkhelper.cfg
@@ -5,13 +5,12 @@ build_depend="seabios/default grub/default memtest86plus u-boot/amd64coreboot"
seavgabiosrom="elf/seabios/default/libgfxinit/vgabios.bin"
-pv="payload_uboot payload_seabios payload_memtest payload_grub"
-pv="$pv payload_uboot_i386 payload_uboot_amd64 payload_grubsea"
+pv="payload_seabios payload_memtest payload_grub payload_grubsea"
v="initmode ubootelf grub_scan_disk uboot_config grubtree grubelf pname"
-v="$v displaymode tmprom newrom"
+v="$v displaymode tmprom newrom payload_uboot"
eval `setvars "n" $pv`
eval `setvars "" $v`
-premake="mkvendorfiles"
+premake="corebootpremake"
mkhelper="mkcorebootbin"
postmake="mkcoreboottar"
diff --git a/config/data/pico-serprog/mkhelper.cfg b/config/data/pico-serprog/mkhelper.cfg
index 8e902bda..982c365b 100644
--- a/config/data/pico-serprog/mkhelper.cfg
+++ b/config/data/pico-serprog/mkhelper.cfg
@@ -4,4 +4,4 @@ sersrc="src/pico-serprog"
serx="$sersrc/build/pico_serprog.uf2"
picosdk="src/pico-sdk"
serdir="$picosdk/src/boards/include/boards"
-premake="mkserprog pico"
+premake="$dry eval fx_ \"buildser pico\" x_ basename -as .h \"\$serdir/\"*.h"
diff --git a/config/data/stm32-vserprog/mkhelper.cfg b/config/data/stm32-vserprog/mkhelper.cfg
index 907e890f..bb2189a6 100644
--- a/config/data/stm32-vserprog/mkhelper.cfg
+++ b/config/data/stm32-vserprog/mkhelper.cfg
@@ -3,4 +3,4 @@
sersrc="src/stm32-vserprog"
serx="$sersrc/stm32-vserprog.hex"
serdir="$sersrc/boards"
-mkhelper="mkserprog stm32"
+mkhelper="$dry eval fx_ \"buildser stm32\" x_ basename -as .h \"\$serdir/\"*.h"
diff --git a/config/dependencies/debian b/config/dependencies/debian
index 992fb690..d4c26ee0 100755
--- a/config/dependencies/debian
+++ b/config/dependencies/debian
@@ -14,5 +14,5 @@ libusb-dev lz4 lzma lzma-alone m4 nasm openssl p7zip p7zip-full parted pciutils
perl pkg-config python3 python3-distutils-extra python3-pkg-resources python3-pycryptodome \
python3-pyelftools python3-setuptools python-is-python3 sharutils swig unar \
unifont unifont-bin unzip uuid-dev wget xfonts-unifont zlib1g-dev ccache \
-g++-mipsel-linux-gnu make genisoimage mtools \
+g++-mipsel-linux-gnu make genisoimage mtools libx86-1 libx86-dev \
"
diff --git a/config/flashprog/patches/0002-lbmk-hack-add-config-Makefile-options.patch b/config/flashprog/patches/0002-lbmk-hack-add-config-Makefile-options.patch
new file mode 100644
index 00000000..d2702d23
--- /dev/null
+++ b/config/flashprog/patches/0002-lbmk-hack-add-config-Makefile-options.patch
@@ -0,0 +1,48 @@
+From b7a4d2907d3358173510aa6e31af08afe4969b38 Mon Sep 17 00:00:00 2001
+From: Leah Rowe <leah@libreboot.org>
+Date: Thu, 22 May 2025 11:25:42 +0100
+Subject: [PATCH 1/1] lbmk hack: add config Makefile options
+
+this prevents a build error when running the
+-u, -m, -s, -l and -n options in lbmk without
+argument.
+
+this makes no functional changes to flashprog.
+
+Signed-off-by: Leah Rowe <leah@libreboot.org>
+---
+ Makefile | 18 +++++++++++++++++-
+ 1 file changed, 17 insertions(+), 1 deletion(-)
+
+diff --git a/Makefile b/Makefile
+index 12adf61..701f842 100644
+--- a/Makefile
++++ b/Makefile
+@@ -1113,7 +1113,23 @@ libpayload: clean
+ gitconfig:
+ ./util/getrevision.sh -c 2>/dev/null && ./util/git-hooks/install.sh
+
+-.PHONY: all install clean distclean config branch tag versioninfo _export export tarball libpayload gitconfig
++oldconfig:
++ :
++
++menuconfig:
++ :
++
++savedefconfig:
++ :
++
++olddefconfig:
++ :
++
++nconfig:
++ :
++
++
++.PHONY: all install clean distclean config branch tag versioninfo _export export tarball libpayload gitconfig oldconfig menuconfig savedefconfig olddefconfig nconfig
+
+ # Disable implicit suffixes and built-in rules (for performance and profit)
+ .SUFFIXES:
+--
+2.39.5
+
diff --git a/config/grub/default/config/payload b/config/grub/default/config/payload
index 3f134f1d..3d84413e 100644
--- a/config/grub/default/config/payload
+++ b/config/grub/default/config/payload
@@ -184,7 +184,7 @@ menuentry 'Load Operating System (incl. fully encrypted disks) [o]' --hotkey='o
# using * is slow on some machines, but we use it here,
# just once. in so doing, we find every lvm volume
for vol in (*); do
- if regexp ^lvm/ $vol; then
+ if regexp ^\\(lvm/ $vol; then
lvmvol="${lvmvol} ${vol}"
try_bootcfg "${vol}"
fi
diff --git a/config/grub/default/patches/0014-kern-coreboot-mmap-Map-to-reserved.patch b/config/grub/default/patches/0014-kern-coreboot-mmap-Map-to-reserved.patch
new file mode 100644
index 00000000..5d93ac1d
--- /dev/null
+++ b/config/grub/default/patches/0014-kern-coreboot-mmap-Map-to-reserved.patch
@@ -0,0 +1,37 @@
+From d675307bfcac2f9e05ed119c5b5af3de48e56fb9 Mon Sep 17 00:00:00 2001
+From: Paul Menzel <pmenzel@molgen.mpg.de>
+Date: Mon, 17 May 2021 10:24:36 +0200
+Subject: [PATCH] kern/coreboot/mmap: Map to reserved
+
+https://git.savannah.gnu.org/cgit/grub.git/commit/?id=6de9ee86bf9ae50967413e6a73b5dfd13e5ffb50
+
+Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
+---
+ grub-core/kern/coreboot/mmap.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/grub-core/kern/coreboot/mmap.c b/grub-core/kern/coreboot/mmap.c
+index caf8f7cef..2fc316e8d 100644
+--- a/grub-core/kern/coreboot/mmap.c
++++ b/grub-core/kern/coreboot/mmap.c
+@@ -59,7 +59,7 @@ iterate_linuxbios_table (grub_linuxbios_table_item_t table_item, void *data)
+ /* Multiboot mmaps match with the coreboot mmap
+ definition. Therefore, we can just pass type
+ through. */
+- mem_region->type,
++ (mem_region->type >= 13) ? 2 : mem_region->type,
+ ctx->hook_data))
+ return 1;
+ if (start < 0xa0000)
+@@ -81,7 +81,7 @@ iterate_linuxbios_table (grub_linuxbios_table_item_t table_item, void *data)
+ /* Multiboot mmaps match with the coreboot mmap
+ definition. Therefore, we can just pass type
+ through. */
+- mem_region->type,
++ (mem_region->type >= 13) ? 2 : mem_region->type,
+ ctx->hook_data))
+ return 1;
+ }
+--
+2.31.1
+
diff --git a/config/grub/default/target.cfg b/config/grub/default/target.cfg
index a9dab736..f5cc85f1 100644
--- a/config/grub/default/target.cfg
+++ b/config/grub/default/target.cfg
@@ -1,4 +1,4 @@
# SPDX-License-Identifier: GPL-3.0-or-later
tree="default"
-rev="a4da71dafeea519b034beb159dfe80c486c2107c"
+rev="73d1c959ea3417e9309ba8c6102d7d6dc7c94259"
diff --git a/config/grub/nvme/config/payload b/config/grub/nvme/config/payload
index 22dd8fe1..4f3de36e 100644
--- a/config/grub/nvme/config/payload
+++ b/config/grub/nvme/config/payload
@@ -196,7 +196,7 @@ menuentry 'Load Operating System (incl. fully encrypted disks) [o]' --hotkey='o
# using * is slow on some machines, but we use it here,
# just once. in so doing, we find every lvm volume
for vol in (*); do
- if regexp ^lvm/ $vol; then
+ if regexp ^\\(lvm/ $vol; then
lvmvol="${lvmvol} ${vol}"
try_bootcfg "${vol}"
fi
diff --git a/config/grub/nvme/patches/0015-kern-coreboot-mmap-Map-to-reserved.patch b/config/grub/nvme/patches/0015-kern-coreboot-mmap-Map-to-reserved.patch
new file mode 100644
index 00000000..5d93ac1d
--- /dev/null
+++ b/config/grub/nvme/patches/0015-kern-coreboot-mmap-Map-to-reserved.patch
@@ -0,0 +1,37 @@
+From d675307bfcac2f9e05ed119c5b5af3de48e56fb9 Mon Sep 17 00:00:00 2001
+From: Paul Menzel <pmenzel@molgen.mpg.de>
+Date: Mon, 17 May 2021 10:24:36 +0200
+Subject: [PATCH] kern/coreboot/mmap: Map to reserved
+
+https://git.savannah.gnu.org/cgit/grub.git/commit/?id=6de9ee86bf9ae50967413e6a73b5dfd13e5ffb50
+
+Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
+---
+ grub-core/kern/coreboot/mmap.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/grub-core/kern/coreboot/mmap.c b/grub-core/kern/coreboot/mmap.c
+index caf8f7cef..2fc316e8d 100644
+--- a/grub-core/kern/coreboot/mmap.c
++++ b/grub-core/kern/coreboot/mmap.c
+@@ -59,7 +59,7 @@ iterate_linuxbios_table (grub_linuxbios_table_item_t table_item, void *data)
+ /* Multiboot mmaps match with the coreboot mmap
+ definition. Therefore, we can just pass type
+ through. */
+- mem_region->type,
++ (mem_region->type >= 13) ? 2 : mem_region->type,
+ ctx->hook_data))
+ return 1;
+ if (start < 0xa0000)
+@@ -81,7 +81,7 @@ iterate_linuxbios_table (grub_linuxbios_table_item_t table_item, void *data)
+ /* Multiboot mmaps match with the coreboot mmap
+ definition. Therefore, we can just pass type
+ through. */
+- mem_region->type,
++ (mem_region->type >= 13) ? 2 : mem_region->type,
+ ctx->hook_data))
+ return 1;
+ }
+--
+2.31.1
+
diff --git a/config/grub/nvme/target.cfg b/config/grub/nvme/target.cfg
index aa86509f..7e473f19 100644
--- a/config/grub/nvme/target.cfg
+++ b/config/grub/nvme/target.cfg
@@ -1,4 +1,4 @@
# SPDX-License-Identifier: GPL-3.0-or-later
tree="nvme"
-rev="a4da71dafeea519b034beb159dfe80c486c2107c"
+rev="73d1c959ea3417e9309ba8c6102d7d6dc7c94259"
diff --git a/config/grub/xhci/config/payload b/config/grub/xhci/config/payload
index d1f81fd3..9db22fe2 100644
--- a/config/grub/xhci/config/payload
+++ b/config/grub/xhci/config/payload
@@ -197,7 +197,7 @@ menuentry 'Load Operating System (incl. fully encrypted disks) [o]' --hotkey='o
# using * is slow on some machines, but we use it here,
# just once. in so doing, we find every lvm volume
for vol in (*); do
- if regexp ^lvm/ $vol; then
+ if regexp ^\\(lvm/ $vol; then
lvmvol="${lvmvol} ${vol}"
try_bootcfg "${vol}"
fi
diff --git a/config/grub/xhci/patches/0026-kern-coreboot-mmap-Map-to-reserved.patch b/config/grub/xhci/patches/0026-kern-coreboot-mmap-Map-to-reserved.patch
new file mode 100644
index 00000000..5d93ac1d
--- /dev/null
+++ b/config/grub/xhci/patches/0026-kern-coreboot-mmap-Map-to-reserved.patch
@@ -0,0 +1,37 @@
+From d675307bfcac2f9e05ed119c5b5af3de48e56fb9 Mon Sep 17 00:00:00 2001
+From: Paul Menzel <pmenzel@molgen.mpg.de>
+Date: Mon, 17 May 2021 10:24:36 +0200
+Subject: [PATCH] kern/coreboot/mmap: Map to reserved
+
+https://git.savannah.gnu.org/cgit/grub.git/commit/?id=6de9ee86bf9ae50967413e6a73b5dfd13e5ffb50
+
+Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
+---
+ grub-core/kern/coreboot/mmap.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/grub-core/kern/coreboot/mmap.c b/grub-core/kern/coreboot/mmap.c
+index caf8f7cef..2fc316e8d 100644
+--- a/grub-core/kern/coreboot/mmap.c
++++ b/grub-core/kern/coreboot/mmap.c
+@@ -59,7 +59,7 @@ iterate_linuxbios_table (grub_linuxbios_table_item_t table_item, void *data)
+ /* Multiboot mmaps match with the coreboot mmap
+ definition. Therefore, we can just pass type
+ through. */
+- mem_region->type,
++ (mem_region->type >= 13) ? 2 : mem_region->type,
+ ctx->hook_data))
+ return 1;
+ if (start < 0xa0000)
+@@ -81,7 +81,7 @@ iterate_linuxbios_table (grub_linuxbios_table_item_t table_item, void *data)
+ /* Multiboot mmaps match with the coreboot mmap
+ definition. Therefore, we can just pass type
+ through. */
+- mem_region->type,
++ (mem_region->type >= 13) ? 2 : mem_region->type,
+ ctx->hook_data))
+ return 1;
+ }
+--
+2.31.1
+
diff --git a/config/grub/xhci/target.cfg b/config/grub/xhci/target.cfg
index 5727e70b..0b90065b 100644
--- a/config/grub/xhci/target.cfg
+++ b/config/grub/xhci/target.cfg
@@ -1,4 +1,4 @@
# SPDX-License-Identifier: GPL-3.0-or-later
tree="xhci"
-rev="a4da71dafeea519b034beb159dfe80c486c2107c"
+rev="73d1c959ea3417e9309ba8c6102d7d6dc7c94259"
diff --git a/config/ifd/hp8300usdt/ifd b/config/ifd/hp8300usdt/ifd
index 3b81b704..282a8abb 100644
--- a/config/ifd/hp8300usdt/ifd
+++ b/config/ifd/hp8300usdt/ifd
Binary files differ
diff --git a/config/pcsx-redux/patches/0002-lbmk-hack-add-no-ops-for-config-commands.patch b/config/pcsx-redux/patches/0002-lbmk-hack-add-no-ops-for-config-commands.patch
new file mode 100644
index 00000000..1a495d60
--- /dev/null
+++ b/config/pcsx-redux/patches/0002-lbmk-hack-add-no-ops-for-config-commands.patch
@@ -0,0 +1,43 @@
+From e4cd98fb5e3baf8260a3692cab745dea925b0764 Mon Sep 17 00:00:00 2001
+From: Leah Rowe <leah@libreboot.org>
+Date: Thu, 22 May 2025 11:29:37 +0100
+Subject: [PATCH 1/1] lbmk hack: add no-ops for config commands
+
+./mk -u, -m, -s, -l and -n cause errors without
+arguments, because pcsx-redux's makefile doesn't
+have them. additionally, i use my own makefile here,
+so that only the openbios is compiled.
+
+add these so that lbmk doesn't crash during tests.
+
+Signed-off-by: Leah Rowe <leah@libreboot.org>
+---
+ lbmkbofhmakefile | 15 +++++++++++++++
+ 1 file changed, 15 insertions(+)
+
+diff --git a/lbmkbofhmakefile b/lbmkbofhmakefile
+index fe2e36d2..e0e2a11e 100644
+--- a/lbmkbofhmakefile
++++ b/lbmkbofhmakefile
+@@ -14,3 +14,18 @@ clean:
+
+ distclean:
+ make -C src/mips/openbios clean
++
++oldconfig:
++ :
++
++menuconfig:
++ :
++
++savedefconfig:
++ :
++
++olddefconfig:
++ :
++
++nconfig:
++ :
+--
+2.39.5
+
diff --git a/config/submodule/coreboot/coreboot413/module.list b/config/submodule/coreboot/coreboot413/module.list
deleted file mode 100644
index 08e76de0..00000000
--- a/config/submodule/coreboot/coreboot413/module.list
+++ /dev/null
@@ -1 +0,0 @@
-3rdparty/vboot
diff --git a/config/submodule/coreboot/coreboot413/vboot/module.cfg b/config/submodule/coreboot/coreboot413/vboot/module.cfg
deleted file mode 100644
index 79c98870..00000000
--- a/config/submodule/coreboot/coreboot413/vboot/module.cfg
+++ /dev/null
@@ -1,5 +0,0 @@
-# SPDX-License-Identifier: GPL-3.0-or-later
-
-subrepo="https://review.coreboot.org/vboot.git"
-subrepo_bkup="https://github.com/coreboot/vboot"
-subhash="4c523ed10f25de872ac0513ebd6ca53d3970b9de"
diff --git a/config/submodule/coreboot/coreboot413/vboot/patches/0001-extract_vmlinuz.c-Fix-the-bounds-check-on-vmlinuz_he.patch b/config/submodule/coreboot/coreboot413/vboot/patches/0001-extract_vmlinuz.c-Fix-the-bounds-check-on-vmlinuz_he.patch
deleted file mode 100644
index 1ac41de6..00000000
--- a/config/submodule/coreboot/coreboot413/vboot/patches/0001-extract_vmlinuz.c-Fix-the-bounds-check-on-vmlinuz_he.patch
+++ /dev/null
@@ -1,178 +0,0 @@
-From 195f61375aeec9eec16604ec59f6eda2e6058cc1 Mon Sep 17 00:00:00 2001
-From: "Luke T. Shumaker" <lukeshu@lukeshu.com>
-Date: Thu, 30 May 2024 14:08:33 -0600
-Subject: [PATCH 1/1] extract_vmlinuz.c: Fix the bounds check on
- vmlinuz_header_{offset,size}
-
-The check on vmlinuz_header_offset and vmlinuz_header_size is obviously
-wrong:
-
- if (!vmlinuz_header_size ||
- kpart_data + vmlinuz_header_offset + vmlinuz_header_size >
- kpart_data) {
- return 1;
- }
-
-`kpart_data + some_unsigned_values` can obviously never be `> kpart_data`,
-unless something has overflowed! And `vmlinuz_header_offset` hasn't even
-been set yet (besides being initialized to zero)!
-
-GCC will deduce that if the check didn't cause the function to bail, then
-vmlinuz_header_size (a uint32_t) must be "negative"; that is: in the range
-[2GiB,4GiB).
-
-On platforms where size_t is 32-bits, this is *especially* broken.
-memcpy's size argument must be in the range [0,2GiB). Because GCC has
-proved that vmlinuz_header_size is higher than that, it will fail to
-compile:
-
- host/lib/extract_vmlinuz.c:67:9: error: 'memcpy' specified bound between 2147483648 and 4294967295 exceeds maximum object size 2147483647 [-Werror=stringop-overflow=]
-
-So, fix the check.
-
-I can now say that what I suspect the original author meant to write would
-be the following patch, if `vmlinuz_header_offset` were already set:
-
- -kpart_data + vmlinuz_header_offset + vmlinuz_header_size > kpart_data
- +now + vmlinuz_header_offset + vmlinuz_header_size > kpart_size
-
-This hypothesis is supported by `now` not getting incremented by
-`kblob_size` the way it is for the keyblock and preamble sizes.
-
-However, we can also see that even this "corrected" bounds check is
-insufficient: it does not detect the vmlinuz_header overflowing into
-kblob_data.
-
-OK, so let's describe the fix:
-
-Have a `*vmlinuz_header` pointer instead of a
-`uint64_t vmlinuz_header_offset`, to be more similar to all the other
-regions. With this change, the correct check becomes a simple
-
- vmlinuz_header + vmlinuz_header_size > kblob_data
-
-While we're at it, make some changes that could have helped avoid this in
-the first place:
-
- - Add comments.
- - Calculate the vmlinuz_header offset right away, instead of waiting.
- - Go ahead and increment `now` by `kblob_size`, to increase regularity.
-
-Change-Id: I5c03e49070b6dd2e04459566ef7dd129d27736e4
----
- host/lib/extract_vmlinuz.c | 72 +++++++++++++++++++++++++++-----------
- 1 file changed, 51 insertions(+), 21 deletions(-)
-
-diff --git a/host/lib/extract_vmlinuz.c b/host/lib/extract_vmlinuz.c
-index 4ccfcf33..d2c09443 100644
---- a/host/lib/extract_vmlinuz.c
-+++ b/host/lib/extract_vmlinuz.c
-@@ -15,16 +15,44 @@
-
- int ExtractVmlinuz(void *kpart_data, size_t kpart_size,
- void **vmlinuz_out, size_t *vmlinuz_size) {
-+ // We're going to be extracting `vmlinuz_header` and
-+ // `kblob_data`, and returning the concatenation of them.
-+ //
-+ // kpart_data = +-[kpart_size]------------------------------------+
-+ // | |
-+ // keyblock = | +-[keyblock->keyblock_size]-------------------+ |
-+ // | | struct vb2_keyblock keyblock | |
-+ // | | char [] ...data... | |
-+ // | +---------------------------------------------+ |
-+ // | |
-+ // preamble = | +-[preamble->preamble_size]-------------------+ |
-+ // | | struct vb2_kernel_preamble preamble | |
-+ // | | char [] ...data... | |
-+ // | | char [] vmlinuz_header | |
-+ // | | char [] ...data... | |
-+ // | +---------------------------------------------+ |
-+ // | |
-+ // kblob_data= | +-[preamble->body_signature.data_size]--------+ |
-+ // | | char [] ...data... | |
-+ // | +---------------------------------------------+ |
-+ // | |
-+ // +-------------------------------------------------+
-+
- size_t now = 0;
-+ // The 3 sections of kpart_data.
-+ struct vb2_keyblock *keyblock = NULL;
- struct vb2_kernel_preamble *preamble = NULL;
- uint8_t *kblob_data = NULL;
- uint32_t kblob_size = 0;
-+ // vmlinuz_header
-+ uint8_t *vmlinuz_header = NULL;
- uint32_t vmlinuz_header_size = 0;
-- uint64_t vmlinuz_header_address = 0;
-- uint64_t vmlinuz_header_offset = 0;
-+ // The concatenated result.
- void *vmlinuz = NULL;
-
-- struct vb2_keyblock *keyblock = (struct vb2_keyblock *)kpart_data;
-+ // Isolate the 3 sections of kpart_data.
-+
-+ keyblock = (struct vb2_keyblock *)kpart_data;
- now += keyblock->keyblock_size;
- if (now > kpart_size)
- return 1;
-@@ -36,37 +64,39 @@ int ExtractVmlinuz(void *kpart_data, size_t kpart_size,
-
- kblob_data = kpart_data + now;
- kblob_size = preamble->body_signature.data_size;
--
-- if (!kblob_data || (now + kblob_size) > kpart_size)
-+ now += kblob_size;
-+ if (now > kpart_size)
- return 1;
-
-+ // Find `vmlinuz_header` within `preamble`.
-+
- if (preamble->header_version_minor > 0) {
-- vmlinuz_header_address = preamble->vmlinuz_header_address;
-+ // calculate the vmlinuz_header offset from
-+ // the beginning of the kpart_data. The kblob doesn't
-+ // include the body_load_offset, but does include
-+ // the keyblock and preamble sections.
-+ size_t vmlinuz_header_offset =
-+ preamble->vmlinuz_header_address -
-+ preamble->body_load_address +
-+ keyblock->keyblock_size +
-+ preamble->preamble_size;
-+
-+ vmlinuz_header = kpart_data + vmlinuz_header_offset;
- vmlinuz_header_size = preamble->vmlinuz_header_size;
- }
-
-- if (!vmlinuz_header_size ||
-- kpart_data + vmlinuz_header_offset + vmlinuz_header_size >
-- kpart_data) {
-+ if (!vmlinuz_header ||
-+ !vmlinuz_header_size ||
-+ vmlinuz_header + vmlinuz_header_size > kblob_data) {
- return 1;
- }
-
-- // calculate the vmlinuz_header offset from
-- // the beginning of the kpart_data. The kblob doesn't
-- // include the body_load_offset, but does include
-- // the keyblock and preamble sections.
-- vmlinuz_header_offset = vmlinuz_header_address -
-- preamble->body_load_address +
-- keyblock->keyblock_size +
-- preamble->preamble_size;
-+ // Concatenate and return.
-
- vmlinuz = malloc(vmlinuz_header_size + kblob_size);
- if (vmlinuz == NULL)
- return 1;
--
-- memcpy(vmlinuz, kpart_data + vmlinuz_header_offset,
-- vmlinuz_header_size);
--
-+ memcpy(vmlinuz, vmlinuz_header, vmlinuz_header_size);
- memcpy(vmlinuz + vmlinuz_header_size, kblob_data, kblob_size);
-
- *vmlinuz_out = vmlinuz;
---
-2.45.1
-
diff --git a/config/submodule/coreboot/default/acpica-unix-20241212.tar.gz/module.cfg b/config/submodule/coreboot/default/acpica-unix-20241212.tar.gz/module.cfg
index 30baf001..27508216 100644
--- a/config/submodule/coreboot/default/acpica-unix-20241212.tar.gz/module.cfg
+++ b/config/submodule/coreboot/default/acpica-unix-20241212.tar.gz/module.cfg
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: GPL-3.0-or-later
-subfile="https://www.mirrorservice.org/sites/libreboot.org/release/misc/acpica/acpica-unix-20241212.tar.gz"
-subfile_bkup="https://mirror.math.princeton.edu/pub/libreboot/misc/acpica/acpica-unix-20241212.tar.gz"
+subcurl="https://www.mirrorservice.org/sites/libreboot.org/release/misc/acpica/acpica-unix-20241212.tar.gz"
+subcurl_bkup="https://mirror.math.princeton.edu/pub/libreboot/misc/acpica/acpica-unix-20241212.tar.gz"
subhash="daa4243f927451ac18c337cf17c27849e68329b3f7eb25b8c3379fda9c6a484201b73d4ffccab89a0ae22cc5e432f141ba149015a003834b0515bdb3d4efe0a8"
diff --git a/config/submodule/coreboot/default/arm-trusted-firmware/module.cfg b/config/submodule/coreboot/default/arm-trusted-firmware/module.cfg
index 911f3fa9..953997c7 100644
--- a/config/submodule/coreboot/default/arm-trusted-firmware/module.cfg
+++ b/config/submodule/coreboot/default/arm-trusted-firmware/module.cfg
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: GPL-3.0-or-later
-subrepo="https://review.coreboot.org/arm-trusted-firmware.git"
-subrepo_bkup="https://github.com/coreboot/arm-trusted-firmware"
+subgit="https://review.coreboot.org/arm-trusted-firmware.git"
+subgit_bkup="https://github.com/coreboot/arm-trusted-firmware"
subhash="57ac3f74b34a3303f03deee264a1f2247c68008d"
diff --git a/config/submodule/coreboot/default/binutils-2.43.1.tar.xz/module.cfg b/config/submodule/coreboot/default/binutils-2.43.1.tar.xz/module.cfg
index 1e16b92a..de0d349c 100644
--- a/config/submodule/coreboot/default/binutils-2.43.1.tar.xz/module.cfg
+++ b/config/submodule/coreboot/default/binutils-2.43.1.tar.xz/module.cfg
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: GPL-3.0-or-later
-subfile="https://www.mirrorservice.org/sites/ftp.gnu.org/gnu/binutils/binutils-2.43.1.tar.xz"
-subfile_bkup="https://ftp.nluug.nl/pub/gnu/binutils/binutils-2.43.1.tar.xz"
+subcurl="https://www.mirrorservice.org/sites/ftp.gnu.org/gnu/binutils/binutils-2.43.1.tar.xz"
+subcurl_bkup="https://ftp.nluug.nl/pub/gnu/binutils/binutils-2.43.1.tar.xz"
subhash="20977ad17729141a2c26d358628f44a0944b84dcfefdec2ba029c2d02f40dfc41cc91c0631044560d2bd6f9a51e1f15846b4b311befbe14f1239f14ff7d57824"
diff --git a/config/submodule/coreboot/default/fsp/module.cfg b/config/submodule/coreboot/default/fsp/module.cfg
index 2b39812b..98e57efe 100644
--- a/config/submodule/coreboot/default/fsp/module.cfg
+++ b/config/submodule/coreboot/default/fsp/module.cfg
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: GPL-3.0-or-later
-subrepo="https://review.coreboot.org/fsp.git"
-subrepo_bkup="https://github.com/coreboot/fsp"
+subgit="https://review.coreboot.org/fsp.git"
+subgit_bkup="https://github.com/coreboot/fsp"
subhash="86c9111639d357e0f369c14248097b119112a71c"
diff --git a/config/submodule/coreboot/default/gcc-14.2.0.tar.xz/module.cfg b/config/submodule/coreboot/default/gcc-14.2.0.tar.xz/module.cfg
index 4ef88d1d..e637ba03 100644
--- a/config/submodule/coreboot/default/gcc-14.2.0.tar.xz/module.cfg
+++ b/config/submodule/coreboot/default/gcc-14.2.0.tar.xz/module.cfg
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: GPL-3.0-or-later
-subfile="https://www.mirrorservice.org/sites/ftp.gnu.org/gnu/gcc/gcc-14.2.0/gcc-14.2.0.tar.xz"
-subfile_bkup="https://ftp.nluug.nl/pub/gnu/gcc/gcc-14.2.0/gcc-14.2.0.tar.xz"
+subcurl="https://www.mirrorservice.org/sites/ftp.gnu.org/gnu/gcc/gcc-14.2.0/gcc-14.2.0.tar.xz"
+subcurl_bkup="https://ftp.nluug.nl/pub/gnu/gcc/gcc-14.2.0/gcc-14.2.0.tar.xz"
subhash="932bdef0cda94bacedf452ab17f103c0cb511ff2cec55e9112fc0328cbf1d803b42595728ea7b200e0a057c03e85626f937012e49a7515bc5dd256b2bf4bc396"
diff --git a/config/submodule/coreboot/default/gmp-6.3.0.tar.xz/module.cfg b/config/submodule/coreboot/default/gmp-6.3.0.tar.xz/module.cfg
index 46b55c01..90466fed 100644
--- a/config/submodule/coreboot/default/gmp-6.3.0.tar.xz/module.cfg
+++ b/config/submodule/coreboot/default/gmp-6.3.0.tar.xz/module.cfg
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: GPL-3.0-or-later
-subfile="https://www.mirrorservice.org/sites/ftp.gnu.org/gnu/gmp/gmp-6.3.0.tar.xz"
-subfile_bkup="https://ftp.nluug.nl/pub/gnu/gmp/gmp-6.3.0.tar.xz"
+subcurl="https://www.mirrorservice.org/sites/ftp.gnu.org/gnu/gmp/gmp-6.3.0.tar.xz"
+subcurl_bkup="https://ftp.nluug.nl/pub/gnu/gmp/gmp-6.3.0.tar.xz"
subhash="e85a0dab5195889948a3462189f0e0598d331d3457612e2d3350799dba2e244316d256f8161df5219538eb003e4b5343f989aaa00f96321559063ed8c8f29fd2"
diff --git a/config/submodule/coreboot/default/intel-microcode/module.cfg b/config/submodule/coreboot/default/intel-microcode/module.cfg
index 0ae50bd0..2af752fa 100644
--- a/config/submodule/coreboot/default/intel-microcode/module.cfg
+++ b/config/submodule/coreboot/default/intel-microcode/module.cfg
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: GPL-3.0-or-later
-subrepo="https://review.coreboot.org/intel-microcode.git"
-subrepo_bkup="https://github.com/coreboot/intel-microcode"
+subgit="https://review.coreboot.org/intel-microcode.git"
+subgit_bkup="https://github.com/coreboot/intel-microcode"
subhash="8a62de41c011615d749f8e72bb906dddc72e56a8"
diff --git a/config/submodule/coreboot/default/libgfxinit/module.cfg b/config/submodule/coreboot/default/libgfxinit/module.cfg
index 93383129..87589128 100644
--- a/config/submodule/coreboot/default/libgfxinit/module.cfg
+++ b/config/submodule/coreboot/default/libgfxinit/module.cfg
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: GPL-3.0-or-later
-subrepo="https://review.coreboot.org/libgfxinit.git"
-subrepo_bkup="https://github.com/coreboot/libgfxinit"
+subgit="https://review.coreboot.org/libgfxinit.git"
+subgit_bkup="https://github.com/coreboot/libgfxinit"
subhash="17cfc92f402493979783585b6581efbd98c0cf07"
diff --git a/config/submodule/coreboot/default/libhwbase/module.cfg b/config/submodule/coreboot/default/libhwbase/module.cfg
index 4995e70f..f09b123f 100644
--- a/config/submodule/coreboot/default/libhwbase/module.cfg
+++ b/config/submodule/coreboot/default/libhwbase/module.cfg
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: GPL-3.0-or-later
-subrepo="https://review.coreboot.org/libhwbase.git"
-subrepo_bkup="https://github.com/coreboot/libhwbase"
+subgit="https://review.coreboot.org/libhwbase.git"
+subgit_bkup="https://github.com/coreboot/libhwbase"
subhash="584629b9f4771b7618951cec57df2ca3af9c6981"
diff --git a/config/submodule/coreboot/default/mpc-1.3.1.tar.gz/module.cfg b/config/submodule/coreboot/default/mpc-1.3.1.tar.gz/module.cfg
index 9b6cc57a..9a1ec4cb 100644
--- a/config/submodule/coreboot/default/mpc-1.3.1.tar.gz/module.cfg
+++ b/config/submodule/coreboot/default/mpc-1.3.1.tar.gz/module.cfg
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: GPL-3.0-or-later
-subfile="https://www.mirrorservice.org/sites/ftp.gnu.org/gnu/mpc/mpc-1.3.1.tar.gz"
-subfile_bkup="https://ftp.nluug.nl/pub/gnu/mpc/mpc-1.3.1.tar.gz"
+subcurl="https://www.mirrorservice.org/sites/ftp.gnu.org/gnu/mpc/mpc-1.3.1.tar.gz"
+subcurl_bkup="https://ftp.nluug.nl/pub/gnu/mpc/mpc-1.3.1.tar.gz"
subhash="4bab4ef6076f8c5dfdc99d810b51108ced61ea2942ba0c1c932d624360a5473df20d32b300fc76f2ba4aa2a97e1f275c9fd494a1ba9f07c4cb2ad7ceaeb1ae97"
diff --git a/config/submodule/coreboot/default/mpfr-4.2.1.tar.xz/module.cfg b/config/submodule/coreboot/default/mpfr-4.2.1.tar.xz/module.cfg
index 93cc1a05..4ff30620 100644
--- a/config/submodule/coreboot/default/mpfr-4.2.1.tar.xz/module.cfg
+++ b/config/submodule/coreboot/default/mpfr-4.2.1.tar.xz/module.cfg
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: GPL-3.0-or-later
-subfile="https://www.mirrorservice.org/sites/ftp.gnu.org/gnu/mpfr/mpfr-4.2.1.tar.xz"
-subfile_bkup="https://ftp.nluug.nl/pub/gnu/mpfr/mpfr-4.2.1.tar.xz"
+subcurl="https://www.mirrorservice.org/sites/ftp.gnu.org/gnu/mpfr/mpfr-4.2.1.tar.xz"
+subcurl_bkup="https://ftp.nluug.nl/pub/gnu/mpfr/mpfr-4.2.1.tar.xz"
subhash="bc68c0d755d5446403644833ecbb07e37360beca45f474297b5d5c40926df1efc3e2067eecffdf253f946288bcca39ca89b0613f545d46a9e767d1d4cf358475"
diff --git a/config/submodule/coreboot/default/nasm-2.16.03.tar.bz2/module.cfg b/config/submodule/coreboot/default/nasm-2.16.03.tar.bz2/module.cfg
index 3895e2ef..bc486e80 100644
--- a/config/submodule/coreboot/default/nasm-2.16.03.tar.bz2/module.cfg
+++ b/config/submodule/coreboot/default/nasm-2.16.03.tar.bz2/module.cfg
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: GPL-3.0-or-later
-subfile="https://www.nasm.us/pub/nasm/releasebuilds/2.16.03/nasm-2.16.03.tar.bz2"
-subfile_bkup="https://www.mirrorservice.org/sites/distfiles.macports.org/nasm/nasm-2.16.03.tar.bz2"
+subcurl="https://www.nasm.us/pub/nasm/releasebuilds/2.16.03/nasm-2.16.03.tar.bz2"
+subcurl_bkup="https://www.mirrorservice.org/sites/distfiles.macports.org/nasm/nasm-2.16.03.tar.bz2"
subhash="f28445d368debdf44219cc57df33800a8c0e49186cd60836d4adfec7700d53b801d34aa9fc9bfda74169843f33a1e8b465e11292582eb968bb9c3a26f54dd172"
diff --git a/config/submodule/coreboot/default/vboot/module.cfg b/config/submodule/coreboot/default/vboot/module.cfg
index d13a1b29..8b4e15de 100644
--- a/config/submodule/coreboot/default/vboot/module.cfg
+++ b/config/submodule/coreboot/default/vboot/module.cfg
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: GPL-3.0-or-later
-subrepo="https://review.coreboot.org/vboot.git"
-subrepo_bkup="https://github.com/coreboot/vboot"
+subgit="https://review.coreboot.org/vboot.git"
+subgit_bkup="https://github.com/coreboot/vboot"
subhash="3f94e2c7ed58c4e67d6e7dc6052ec615dbbb9bb4"
diff --git a/config/submodule/coreboot/fam15h/acpica-unix2-20190703.tar.gz/module.cfg b/config/submodule/coreboot/fam15h/acpica-unix2-20190703.tar.gz/module.cfg
index 50e6989e..b8365f7c 100644
--- a/config/submodule/coreboot/fam15h/acpica-unix2-20190703.tar.gz/module.cfg
+++ b/config/submodule/coreboot/fam15h/acpica-unix2-20190703.tar.gz/module.cfg
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: GPL-3.0-or-later
-subfile="https://www.mirrorservice.org/sites/libreboot.org/release/misc/acpica/acpica-unix2-20190703.tar.gz"
-subfile_bkup="https://mirror.math.princeton.edu/pub/libreboot/misc/acpica/acpica-unix2-20190703.tar.gz"
+subcurl="https://www.mirrorservice.org/sites/libreboot.org/release/misc/acpica/acpica-unix2-20190703.tar.gz"
+subcurl_bkup="https://mirror.math.princeton.edu/pub/libreboot/misc/acpica/acpica-unix2-20190703.tar.gz"
subhash="8445a6d354ce3bcbfb5159f4ec0312b1e910c0b1b2033a2300f892e4ac580abab4e3f5b4ded379f0036299359d307330511ab7053678cfd9031d7df4c365f555"
diff --git a/config/submodule/coreboot/fam15h/binutils-2.32.tar.xz/module.cfg b/config/submodule/coreboot/fam15h/binutils-2.32.tar.xz/module.cfg
index 6e86543f..3f03f64e 100644
--- a/config/submodule/coreboot/fam15h/binutils-2.32.tar.xz/module.cfg
+++ b/config/submodule/coreboot/fam15h/binutils-2.32.tar.xz/module.cfg
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: GPL-3.0-or-later
-subfile="https://www.mirrorservice.org/sites/ftp.gnu.org/gnu/binutils/binutils-2.32.tar.xz"
-subfile_bkup="https://ftp.nluug.nl/pub/gnu/binutils/binutils-2.32.tar.xz"
+subcurl="https://www.mirrorservice.org/sites/ftp.gnu.org/gnu/binutils/binutils-2.32.tar.xz"
+subcurl_bkup="https://ftp.nluug.nl/pub/gnu/binutils/binutils-2.32.tar.xz"
subhash="d326408f12a03d9a61a9de56584c2af12f81c2e50d2d7e835d51565df8314df01575724afa1e43bd0db45cfc9916b41519b67dfce03232aa4978704492a6994a"
diff --git a/config/submodule/coreboot/fam15h/blobs/module.cfg b/config/submodule/coreboot/fam15h/blobs/module.cfg
index f649cab2..3c34302c 100644
--- a/config/submodule/coreboot/fam15h/blobs/module.cfg
+++ b/config/submodule/coreboot/fam15h/blobs/module.cfg
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: GPL-3.0-or-later
-subrepo="https://review.coreboot.org/blobs.git"
-subrepo_bkup="https://github.com/coreboot/blobs"
+subgit="https://review.coreboot.org/blobs.git"
+subgit_bkup="https://github.com/coreboot/blobs"
subhash="034b27818450428f70aa9316c8bd0d65bacd8ee8"
diff --git a/config/submodule/coreboot/fam15h/gcc-8.3.0.tar.xz/module.cfg b/config/submodule/coreboot/fam15h/gcc-8.3.0.tar.xz/module.cfg
index 1a111581..ce21c98b 100644
--- a/config/submodule/coreboot/fam15h/gcc-8.3.0.tar.xz/module.cfg
+++ b/config/submodule/coreboot/fam15h/gcc-8.3.0.tar.xz/module.cfg
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: GPL-3.0-or-later
-subfile="https://www.mirrorservice.org/sites/ftp.gnu.org/gnu/gcc/gcc-8.3.0/gcc-8.3.0.tar.xz"
-subfile_bkup="https://ftp.nluug.nl/pub/gnu/gcc/gcc-8.3.0/gcc-8.3.0.tar.xz"
+subcurl="https://www.mirrorservice.org/sites/ftp.gnu.org/gnu/gcc/gcc-8.3.0/gcc-8.3.0.tar.xz"
+subcurl_bkup="https://ftp.nluug.nl/pub/gnu/gcc/gcc-8.3.0/gcc-8.3.0.tar.xz"
subhash="1811337ae3add9680cec64968a2509d085b6dc5b6783fc1e8c295e3e47416196fd1a3ad8dfe7e10be2276b4f62c357659ce2902f239f60a8648548231b4b5802"
diff --git a/config/submodule/coreboot/fam15h/gmp-6.1.2.tar.xz/module.cfg b/config/submodule/coreboot/fam15h/gmp-6.1.2.tar.xz/module.cfg
index 08926b6a..a46b9b7c 100644
--- a/config/submodule/coreboot/fam15h/gmp-6.1.2.tar.xz/module.cfg
+++ b/config/submodule/coreboot/fam15h/gmp-6.1.2.tar.xz/module.cfg
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: GPL-3.0-or-later
-subfile="https://www.mirrorservice.org/sites/ftp.gnu.org/gnu/gmp/gmp-6.1.2.tar.xz"
-subfile_bkup="https://ftp.nluug.nl/pub/gnu/gmp/gmp-6.1.2.tar.xz"
+subcurl="https://www.mirrorservice.org/sites/ftp.gnu.org/gnu/gmp/gmp-6.1.2.tar.xz"
+subcurl_bkup="https://ftp.nluug.nl/pub/gnu/gmp/gmp-6.1.2.tar.xz"
subhash="9f098281c0593b76ee174b722936952671fab1dae353ce3ed436a31fe2bc9d542eca752353f6645b7077c1f395ab4fdd355c58e08e2a801368f1375690eee2c6"
diff --git a/config/submodule/coreboot/fam15h/mpc-1.1.0.tar.gz/module.cfg b/config/submodule/coreboot/fam15h/mpc-1.1.0.tar.gz/module.cfg
index 89cfabc7..13a66a87 100644
--- a/config/submodule/coreboot/fam15h/mpc-1.1.0.tar.gz/module.cfg
+++ b/config/submodule/coreboot/fam15h/mpc-1.1.0.tar.gz/module.cfg
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: GPL-3.0-or-later
-subfile="https://www.mirrorservice.org/sites/ftp.gnu.org/gnu/mpc/mpc-1.1.0.tar.gz"
-subfile_bkup="https://ftp.nluug.nl/pub/gnu/mpc/mpc-1.1.0.tar.gz"
+subcurl="https://www.mirrorservice.org/sites/ftp.gnu.org/gnu/mpc/mpc-1.1.0.tar.gz"
+subcurl_bkup="https://ftp.nluug.nl/pub/gnu/mpc/mpc-1.1.0.tar.gz"
subhash="72d657958b07c7812dc9c7cbae093118ce0e454c68a585bfb0e2fa559f1bf7c5f49b93906f580ab3f1073e5b595d23c6494d4d76b765d16dde857a18dd239628"
diff --git a/config/submodule/coreboot/fam15h/mpfr-4.0.2.tar.xz/module.cfg b/config/submodule/coreboot/fam15h/mpfr-4.0.2.tar.xz/module.cfg
index c6ebf4de..f2a4f0fe 100644
--- a/config/submodule/coreboot/fam15h/mpfr-4.0.2.tar.xz/module.cfg
+++ b/config/submodule/coreboot/fam15h/mpfr-4.0.2.tar.xz/module.cfg
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: GPL-3.0-or-later
-subfile="https://www.mirrorservice.org/sites/ftp.gnu.org/gnu/mpfr/mpfr-4.0.2.tar.xz"
-subfile_bkup="https://ftp.nluug.nl/pub/gnu/mpfr/mpfr-4.0.2.tar.xz"
+subcurl="https://www.mirrorservice.org/sites/ftp.gnu.org/gnu/mpfr/mpfr-4.0.2.tar.xz"
+subcurl_bkup="https://ftp.nluug.nl/pub/gnu/mpfr/mpfr-4.0.2.tar.xz"
subhash="d583555d08863bf36c89b289ae26bae353d9a31f08ee3894520992d2c26e5683c4c9c193d7ad139632f71c0a476d85ea76182702a98bf08dde7b6f65a54f8b88"
diff --git a/config/submodule/coreboot/fam15h/nasm-2.16.03.tar.bz2/module.cfg b/config/submodule/coreboot/fam15h/nasm-2.16.03.tar.bz2/module.cfg
index 3895e2ef..bc486e80 100644
--- a/config/submodule/coreboot/fam15h/nasm-2.16.03.tar.bz2/module.cfg
+++ b/config/submodule/coreboot/fam15h/nasm-2.16.03.tar.bz2/module.cfg
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: GPL-3.0-or-later
-subfile="https://www.nasm.us/pub/nasm/releasebuilds/2.16.03/nasm-2.16.03.tar.bz2"
-subfile_bkup="https://www.mirrorservice.org/sites/distfiles.macports.org/nasm/nasm-2.16.03.tar.bz2"
+subcurl="https://www.nasm.us/pub/nasm/releasebuilds/2.16.03/nasm-2.16.03.tar.bz2"
+subcurl_bkup="https://www.mirrorservice.org/sites/distfiles.macports.org/nasm/nasm-2.16.03.tar.bz2"
subhash="f28445d368debdf44219cc57df33800a8c0e49186cd60836d4adfec7700d53b801d34aa9fc9bfda74169843f33a1e8b465e11292582eb968bb9c3a26f54dd172"
diff --git a/config/submodule/coreboot/fam15h/vboot/module.cfg b/config/submodule/coreboot/fam15h/vboot/module.cfg
index b0897e4f..a3a8f21b 100644
--- a/config/submodule/coreboot/fam15h/vboot/module.cfg
+++ b/config/submodule/coreboot/fam15h/vboot/module.cfg
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: GPL-3.0-or-later
-subrepo="https://review.coreboot.org/vboot.git"
-subrepo_bkup="https://github.com/coreboot/vboot"
+subgit="https://review.coreboot.org/vboot.git"
+subgit_bkup="https://github.com/coreboot/vboot"
subhash="ecdca931ae0637d1a9498f64862939bd5bb99e0b"
diff --git a/config/submodule/docs/html/module.cfg b/config/submodule/docs/html/module.cfg
index 6c6dab9a..58bec732 100644
--- a/config/submodule/docs/html/module.cfg
+++ b/config/submodule/docs/html/module.cfg
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: GPL-3.0-or-later
subhash="47c993cba483ff23a4c7b866c6cedcc905e9a2bd"
-subrepo="https://codeberg.org/libreboot/lbwww"
-subrepo_bkup="https://git.disroot.org/libreboot/lbwww"
+subgit="https://codeberg.org/libreboot/lbwww"
+subgit_bkup="https://git.disroot.org/libreboot/lbwww"
diff --git a/config/submodule/docs/img/module.cfg b/config/submodule/docs/img/module.cfg
index 32317ff9..8a176668 100644
--- a/config/submodule/docs/img/module.cfg
+++ b/config/submodule/docs/img/module.cfg
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: GPL-3.0-or-later
subhash="68863fd7491f1358fb920d8ad558de35fcfec769"
-subrepo="https://codeberg.org/libreboot/lbwww-img"
-subrepo_bkup="https://git.disroot.org/libreboot/lbwww-img"
+subgit="https://codeberg.org/libreboot/lbwww-img"
+subgit_bkup="https://git.disroot.org/libreboot/lbwww-img"
diff --git a/config/submodule/grub/default/gnulib/module.cfg b/config/submodule/grub/default/gnulib/module.cfg
index eaf40b24..eb5aa2b6 100644
--- a/config/submodule/grub/default/gnulib/module.cfg
+++ b/config/submodule/grub/default/gnulib/module.cfg
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: GPL-3.0-or-later
-subrepo="https://codeberg.org/libreboot/gnulib"
-subrepo_bkup="git://git.sv.gnu.org/gnulib" # ALWAYS slow. only use as backup!
+subgit="https://codeberg.org/libreboot/gnulib"
+subgit_bkup="git://git.sv.gnu.org/gnulib" # ALWAYS slow. only use as backup!
subhash="9f48fb992a3d7e96610c4ce8be969cff2d61a01b"
diff --git a/config/submodule/grub/nvme/gnulib/module.cfg b/config/submodule/grub/nvme/gnulib/module.cfg
index eaf40b24..eb5aa2b6 100644
--- a/config/submodule/grub/nvme/gnulib/module.cfg
+++ b/config/submodule/grub/nvme/gnulib/module.cfg
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: GPL-3.0-or-later
-subrepo="https://codeberg.org/libreboot/gnulib"
-subrepo_bkup="git://git.sv.gnu.org/gnulib" # ALWAYS slow. only use as backup!
+subgit="https://codeberg.org/libreboot/gnulib"
+subgit_bkup="git://git.sv.gnu.org/gnulib" # ALWAYS slow. only use as backup!
subhash="9f48fb992a3d7e96610c4ce8be969cff2d61a01b"
diff --git a/config/submodule/grub/xhci/gnulib/module.cfg b/config/submodule/grub/xhci/gnulib/module.cfg
index eaf40b24..eb5aa2b6 100644
--- a/config/submodule/grub/xhci/gnulib/module.cfg
+++ b/config/submodule/grub/xhci/gnulib/module.cfg
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: GPL-3.0-or-later
-subrepo="https://codeberg.org/libreboot/gnulib"
-subrepo_bkup="git://git.sv.gnu.org/gnulib" # ALWAYS slow. only use as backup!
+subgit="https://codeberg.org/libreboot/gnulib"
+subgit_bkup="git://git.sv.gnu.org/gnulib" # ALWAYS slow. only use as backup!
subhash="9f48fb992a3d7e96610c4ce8be969cff2d61a01b"
diff --git a/config/submodule/pcsx-redux/uC-sdk/module.cfg b/config/submodule/pcsx-redux/uC-sdk/module.cfg
index f8f44850..75f68204 100644
--- a/config/submodule/pcsx-redux/uC-sdk/module.cfg
+++ b/config/submodule/pcsx-redux/uC-sdk/module.cfg
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: GPL-3.0-or-later
subhash="7c6f1973a16893cf1f0868af6f8e60a028b933ad"
-subrepo="https://github.com/grumpycoders/uC-sdk.git"
-subrepo_bkup="https://codeberg.org/vimuser/uC-sdk"
+subgit="https://github.com/grumpycoders/uC-sdk.git"
+subgit_bkup="https://codeberg.org/vimuser/uC-sdk"
diff --git a/config/submodule/pico-sdk/tinyusb/module.cfg b/config/submodule/pico-sdk/tinyusb/module.cfg
index 988d68ba..981e5305 100644
--- a/config/submodule/pico-sdk/tinyusb/module.cfg
+++ b/config/submodule/pico-sdk/tinyusb/module.cfg
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: GPL-3.0-or-later
subhash="86c416d4c0fb38432460b3e11b08b9de76941bf5"
-subrepo="https://codeberg.org/libreboot/tinyusb"
-subrepo_bkup="https://github.com/hathach/tinyusb.git"
+subgit="https://codeberg.org/libreboot/tinyusb"
+subgit_bkup="https://github.com/hathach/tinyusb.git"
diff --git a/config/submodule/stm32-vserprog/libopencm3/module.cfg b/config/submodule/stm32-vserprog/libopencm3/module.cfg
index 069020cc..3ac90162 100644
--- a/config/submodule/stm32-vserprog/libopencm3/module.cfg
+++ b/config/submodule/stm32-vserprog/libopencm3/module.cfg
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: GPL-3.0-or-later
subhash="458250dc6147dc807eec9e4d5a6caf38a699ecb1"
-subrepo="https://codeberg.org/libreboot/libopencm3"
-subrepo_bkup="https://github.com/libopencm3/libopencm3"
+subgit="https://codeberg.org/libreboot/libopencm3"
+subgit_bkup="https://github.com/libopencm3/libopencm3"
diff --git a/config/vendor/3050micro/pkg.cfg b/config/vendor/3050micro/pkg.cfg
index 497a27a6..45ba55d1 100644
--- a/config/vendor/3050micro/pkg.cfg
+++ b/config/vendor/3050micro/pkg.cfg
@@ -3,6 +3,7 @@
DL_hash="976bbb1e625f64df276d8343757d910c88b8a781f953bc2c41a7dd15184ec70d55f8081de2a0aaa83cddb8e73bdc2df6288fde6e0897e4928c48ca4bb30bea2d"
DL_url="https://download.asrock.com/BIOS/1151/H110M-DGS(7.30)ROM.zip"
DL_url_bkup="https://web.archive.org/web/20230822134231/https://download.asrock.com/BIOS/1151/H110M-DGS(7.30)ROM.zip"
+ME_bin_hash="3231ddb79be81f0a631926fc0e533ee7bce2d10032d7d45e56ae8a9894bcf9b4ca0b4f6fd3bc4daa185a464e771e0bf3d1b771a3180739b6896cec911758145b"
# for Fsp.fd, we don't rely on a download. Instead,
# we copy from coreboot.git. The file is defined
@@ -10,6 +11,8 @@ DL_url_bkup="https://web.archive.org/web/20230822134231/https://download.asrock.
# and inserted to CBFS with names CONFIG_FSP_S_CBFS and CONFIG_FSP_M_CBFS
#
FSPFD_hash="c500166a8553a80ba8db8b8185a896e0ae1562ea3c139e07acd9e7937baf8110ba743cc79b69db09a5f39c076d1d22bc45045223975f46aea2034ba82a6b0360"
+FSPM_bin_hash="b15712a53f4d16f36b384beb6dbb716c0b0924751d6ca1e229cd4b8c03aef9eda025c235af247e53dac94d94b79559623974d0d21c7f97e125d8ecc2c86bf03f"
+FSPS_bin_hash="64ac9f93e43efddc35931e168d6594c2b39fb5a0da863d22f2d000d7eacc0692b07ce89389cbb1c5b95ff9b2bba508c538e37d0e644fcab7b2cada773da65ce6"
# We will use deguard to disable the Intel Boot Guard:
ME11bootguard="y"
diff --git a/config/vendor/e6400/pkg.cfg b/config/vendor/e6400/pkg.cfg
index c5962480..21d1e69d 100644
--- a/config/vendor/e6400/pkg.cfg
+++ b/config/vendor/e6400/pkg.cfg
@@ -1,6 +1,7 @@
# SPDX-License-Identifier: GPL-3.0-or-later
E6400_VGA_DL_hash="6217d5fce2291d15bb0649fd2faaeb78e4c48962b07a2bea6af60466bfdc5f233af0d077c2c6e71dd96047bdbb1f612324cef0a5e728ba9a9ec5c69a4022cd8d"
+E6400_VGA_bin_hash="24fb3d934afca13bd2b43ec958aa2f69654e0f8ee2dd6ca910350a738dea22cfd7f69626093e047566b27c0dd9f3595beeacaad7812fc7f6a13970e49e7b60f3"
E6400_VGA_DL_url="https://dl.dell.com/FOLDER01530530M/1/E6400A34.exe"
E6400_VGA_DL_url_bkup="https://web.archive.org/web/20230506014903/https://dl.dell.com/FOLDER01530530M/1/E6400A34.exe"
E6400_VGA_offset="274451"
diff --git a/config/vendor/haswell/pkg.cfg b/config/vendor/haswell/pkg.cfg
index e9722a11..401736b5 100644
--- a/config/vendor/haswell/pkg.cfg
+++ b/config/vendor/haswell/pkg.cfg
@@ -1,5 +1,6 @@
# SPDX-License-Identifier: GPL-3.0-or-later
DL_hash="f3d79aec805c8b0094a4081be76b3a22d329c479ad18210449b7acc3236ccfc4a2103eaa7c5b79a4872bfd699eede047efd46dfb06dc8f47e3216fc254612998"
+ME_bin_hash="8629caded7efd2aa234cc378b7118f0d300402537b8aff6aa3d9b895c6b14590a79cb02d1db7a91de36d36f5612386fc99ddcb57c9d78b1e75b5864e68763de1"
DL_url="https://download.lenovo.com/pccbbs/mobiles/glrg22ww.exe"
DL_url_bkup="https://web.archive.org/web/20211120031520/https://download.lenovo.com/pccbbs/mobiles/glrg22ww.exe"
diff --git a/config/vendor/hp2170p/pkg.cfg b/config/vendor/hp2170p/pkg.cfg
index 77cbd08b..192bcf41 100644
--- a/config/vendor/hp2170p/pkg.cfg
+++ b/config/vendor/hp2170p/pkg.cfg
@@ -1,8 +1,11 @@
# SPDX-License-Identifier: GPL-3.0-or-later
DL_hash="4dc908050c91c1227645c900ddee88652937540af4ba222b0239b7f459f260cdf6e5e8113ac14e5543d00cf53abdd6c7bd23e61f690de1ce45a3709a30cbb91c"
+ME_bin_hash="672240d231a723ea7fac112262fdc28884c43a5be9b231dfae838c7a1edc86140da38983079d23ab5ac8e6c74611b65da4872ecbab3ec979c680d3f526eb91ed"
DL_url="https://download.lenovo.com/pccbbs/mobiles/g1rg24ww.exe"
DL_url_bkup="https://web.archive.org/web/20210706183911/https://download.lenovo.com/pccbbs/mobiles/g1rg24ww.exe"
EC_hash="940e533b6a276c13a6e46a93795ca84b19877b05e82c0c1795b7fea9cbea63c28e606ef994352fc77c4fdfb2e0c31c5edeefa98b989e1990364dfc6417b25460"
EC_url="https://ftp.hp.com/pub/softpaq/sp96001-96500/sp96088.exe"
EC_url_bkup="https://web.archive.org/web/20230909164345/https://ftp.hp.com/pub/softpaq/sp96001-96500/sp96088.exe"
+EC_FW1_hash="44a27359e8e2ecfae910a754617d5ee947d6bba976f2eb53114a97c71b64813da7ab4223749706c9bbcaf1e752c190834ee3b41c297c191b3cac200814e02938"
+EC_FW2_hash="09c5b8bab6f258a0303ac502b4900cd4277bd6c43bfd2ef0030df6e918ef3300d04d2979373f8b05f77d1eae1c27ebd01856426b8eed6f215e1fcaed68e0977e"
diff --git a/config/vendor/hp2560p/pkg.cfg b/config/vendor/hp2560p/pkg.cfg
index f7c7cd14..52b9394d 100644
--- a/config/vendor/hp2560p/pkg.cfg
+++ b/config/vendor/hp2560p/pkg.cfg
@@ -1,8 +1,11 @@
# SPDX-License-Identifier: GPL-3.0-or-later
DL_hash="81c9917938c4a2a4f128c976250451931efd0f25b51ff34f058ddacb8eec27272691371864a683ec7abcb924fea32592d061584c7b2571a5d3e84eb870281cc3"
+ME_bin_hash="6a7eb169a01581682a2ecf4b284c1689eb7746cc80aa16ea1ce35d1a1c47a92664b5240defd62535e9707c3f3d42abfb62da3254b97e569de178099f7683c858"
DL_url="https://download.lenovo.com/ibmdl/pub/pc/pccbbs/mobiles/83rf46ww.exe"
DL_url_bkup="https://web.archive.org/web/20220202201637/https://download.lenovo.com/ibmdl/pub/pc/pccbbs/mobiles/83rf46ww.exe"
EC_hash="a602cc7627c569bc423a5857cf506fbc3bcd68cb6b43a7c1b99d12a569b4107c412748cf49605ef4d5b930eb14b6815c4d1b1dc20145fe9d707e445fc201cea2"
EC_url="https://ftp.hp.com/pub/softpaq/sp85501-86000/sp85526.exe"
EC_url_bkup="https://web.archive.org/web/20230416125725/https://ftp.hp.com/pub/softpaq/sp85501-86000/sp85526.exe"
+EC_FW1_hash="44a27359e8e2ecfae910a754617d5ee947d6bba976f2eb53114a97c71b64813da7ab4223749706c9bbcaf1e752c190834ee3b41c297c191b3cac200814e02938"
+EC_FW2_hash="a05c1eb5433f43e035327d0ae74e9dbd09ecb45f00be656e477ebd5b505ca21bae820e90c29483c4c641591fdd2aebb6b6ea0ecfb879b506bc1a657c01a21bd2"
diff --git a/config/vendor/hp2570p/pkg.cfg b/config/vendor/hp2570p/pkg.cfg
index 9f1a85aa..1df49d73 100644
--- a/config/vendor/hp2570p/pkg.cfg
+++ b/config/vendor/hp2570p/pkg.cfg
@@ -1,8 +1,11 @@
# SPDX-License-Identifier: GPL-3.0-or-later
DL_hash="4dc908050c91c1227645c900ddee88652937540af4ba222b0239b7f459f260cdf6e5e8113ac14e5543d00cf53abdd6c7bd23e61f690de1ce45a3709a30cbb91c"
+ME_bin_hash="672240d231a723ea7fac112262fdc28884c43a5be9b231dfae838c7a1edc86140da38983079d23ab5ac8e6c74611b65da4872ecbab3ec979c680d3f526eb91ed"
DL_url="https://download.lenovo.com/pccbbs/mobiles/g1rg24ww.exe"
DL_url_bkup="https://web.archive.org/web/20210706183911/https://download.lenovo.com/pccbbs/mobiles/g1rg24ww.exe"
EC_hash="61ed284bdf938c5f36ad3267263fb3963a6608339425bc41aaef3ab0cd98f07c998d816b0233735ca35dc6cb771257da3f09a40d5cfc96bb6388b4366348275e"
EC_url="https://ftp.hp.com/pub/softpaq/sp96001-96500/sp96085.exe"
EC_url_bkup="https://web.archive.org/web/20230610174558/https://ftp.hp.com/pub/softpaq/sp96001-96500/sp96085.exe"
+EC_FW1_hash="44a27359e8e2ecfae910a754617d5ee947d6bba976f2eb53114a97c71b64813da7ab4223749706c9bbcaf1e752c190834ee3b41c297c191b3cac200814e02938"
+EC_FW2_hash="d4afcad4960253af674f1dcd3a5a044444b7fcfbaa2a993f976997966b579a80d8a1c58b0ed0a47d862312ad81e433834bb1992c79f69d858d8c00e8cd62e1fb"
diff --git a/config/vendor/hp8200sff/pkg.cfg b/config/vendor/hp8200sff/pkg.cfg
index 9d0a34de..dba0b354 100644
--- a/config/vendor/hp8200sff/pkg.cfg
+++ b/config/vendor/hp8200sff/pkg.cfg
@@ -1,5 +1,6 @@
# SPDX-License-Identifier: GPL-3.0-or-later
DL_hash="8fcb691bf84dc1feefc3c84f7cc59eadaabb200477bb3ecba1b050f23f133b0a8c2539015a523f676544c2dff64599bcba7e844e8c31757b90d70bb4485b5664"
+ME_bin_hash="732954bd288a7d7de3b779032476e2bd5a6f64b6971ff3053434d49ab55fd514db9f224e83883215646e50eecf4ecbdb69a65d5957d241e1146424053dd3ba91"
DL_url="https://ftp.ext.hp.com/pub/softpaq/sp96001-96500/sp96026.exe"
DL_url_bkup="https://web.archive.org/web/20220708171920/https://ftp.ext.hp.com/pub/softpaq/sp96001-96500/sp96026.exe"
diff --git a/config/vendor/hp820g2/pkg.cfg b/config/vendor/hp820g2/pkg.cfg
index 89303ad3..4a2fdbb3 100644
--- a/config/vendor/hp820g2/pkg.cfg
+++ b/config/vendor/hp820g2/pkg.cfg
@@ -1,11 +1,14 @@
# SPDX-License-Identifier: GPL-3.0-or-later
DL_hash="1ac05a3e4f46426eeb77f89c4aca25ed1ad64479d8fcba6a3ab63a944512bacbc5d148cc7b9c4ff4b8c90a1fb1de4776e46f14aca8021900e0df37246aa0b717"
+ME_bin_hash="ca754e2fd09eb48bc14b2d1b19d3fa3ed1df2297cff2b7d9b68e9002812e745a59a8ca921f26834ae84c0076c64d8dfab75ce113b50e4badafbfb8ab6c14ad2b"
DL_url="https://download.lenovo.com/pccbbs/mobiles/n10rg50w.exe"
DL_url_bkup="https://download.lenovo.com/pccbbs/mobiles/n10rg50w.exe"
MRC_url="https://dl.google.com/dl/edgedl/chromeos/recovery/chromeos_13904.77.0_samus_recovery_stable-channel_mp-v3.bin.zip"
MRC_url_bkup="https://web.archive.org/web/20220310155922/https://dl.google.com/dl/edgedl/chromeos/recovery/chromeos_13904.77.0_samus_recovery_stable-channel_mp-v3.bin.zip"
MRC_hash="3ff1599c52539f0707a07a8664a84ce51cd3fed1569df4bb7aa6722fc8dec0af1754250333b6ca1a9794d970a4de7b29a5cf2499f5b61e4c3eab64d1314aaea9"
MRC_board="samus"
-MRC_refcode_cbtree="coreboot413"
+MRC_refcode_cbtree="fam15h"
MRC_refcode_gbe="131253"
+MRC_bin_hash="cade33e8664fb92ebb6ce0c92b572f587f047b2832babb6bd30eb221dba76b08d578e189ba1f89cdb4c956aecd092ebd7443adbc30cf3800452b906967cedc11"
+REF_bin_hash="7efa3bdc48d548924b4c57bbadc99a7add91ac8c5eb7f8f98874c2f8583ca0e71e99997186aaf2714c8ca56593e12c80c1aa9e727a462ef9d2c36963042e7d56"
diff --git a/config/vendor/hp8460pintel/pkg.cfg b/config/vendor/hp8460pintel/pkg.cfg
index 1e1da34e..1140e5c9 100644
--- a/config/vendor/hp8460pintel/pkg.cfg
+++ b/config/vendor/hp8460pintel/pkg.cfg
@@ -1,8 +1,11 @@
# SPDX-License-Identifier: GPL-3.0-or-later
DL_hash="81c9917938c4a2a4f128c976250451931efd0f25b51ff34f058ddacb8eec27272691371864a683ec7abcb924fea32592d061584c7b2571a5d3e84eb870281cc3"
+ME_bin_hash="6a7eb169a01581682a2ecf4b284c1689eb7746cc80aa16ea1ce35d1a1c47a92664b5240defd62535e9707c3f3d42abfb62da3254b97e569de178099f7683c858"
DL_url="https://download.lenovo.com/ibmdl/pub/pc/pccbbs/mobiles/83rf46ww.exe"
DL_url_bkup="https://web.archive.org/web/20220202201637/https://download.lenovo.com/ibmdl/pub/pc/pccbbs/mobiles/83rf46ww.exe"
EC_hash="9be5511d7ba07a376583cbd0b7fa4d7dff87ebc94b78d489fd62a14cb7f61eac99670e6a10ce374fe8e3c4bdafabbd1edce7774c3a482c15c2d4207b74ea49ed"
EC_url="https://ftp.hp.com/pub/softpaq/sp85501-86000/sp85528.exe"
EC_url_bkup="https://web.archive.org/web/20211231004901/https://ftp.ext.hp.com/pub/softpaq/sp85501-86000/sp85528.exe"
+EC_FW1_hash="44a27359e8e2ecfae910a754617d5ee947d6bba976f2eb53114a97c71b64813da7ab4223749706c9bbcaf1e752c190834ee3b41c297c191b3cac200814e02938"
+EC_FW2_hash="8eba6e0087e42a2f552de3367639b376501d31e8ae1629846496c3eb46ed7d2f9b46531dc245cc2ce5f4a91047fe84a37b350864cdc37530148f456818c0133e"
diff --git a/config/vendor/hp8470pintel/pkg.cfg b/config/vendor/hp8470pintel/pkg.cfg
index 1170f56b..db0b6e69 100644
--- a/config/vendor/hp8470pintel/pkg.cfg
+++ b/config/vendor/hp8470pintel/pkg.cfg
@@ -1,8 +1,11 @@
# SPDX-License-Identifier: GPL-3.0-or-later
DL_hash="4dc908050c91c1227645c900ddee88652937540af4ba222b0239b7f459f260cdf6e5e8113ac14e5543d00cf53abdd6c7bd23e61f690de1ce45a3709a30cbb91c"
+ME_bin_hash="672240d231a723ea7fac112262fdc28884c43a5be9b231dfae838c7a1edc86140da38983079d23ab5ac8e6c74611b65da4872ecbab3ec979c680d3f526eb91ed"
DL_url="https://download.lenovo.com/pccbbs/mobiles/g1rg24ww.exe"
DL_url_bkup="https://web.archive.org/web/20210706183911/https://download.lenovo.com/pccbbs/mobiles/g1rg24ww.exe"
EC_hash="b95c9cf909ed537fb448e2be69eddcb57459efbaf0a979a73cd2bce90a7014b110f4dbbeecfd596c072636396b8f20c229c59ffe34e45500ce9edb000c6ccaf9"
EC_url="https://ftp.hp.com/pub/softpaq/sp77501-78000/sp77818.exe"
EC_url_bkup="https://web.archive.org/web/20230909173821/https://ftp.hp.com/pub/softpaq/sp77501-78000/sp77818.exe"
+EC_FW1_hash="44a27359e8e2ecfae910a754617d5ee947d6bba976f2eb53114a97c71b64813da7ab4223749706c9bbcaf1e752c190834ee3b41c297c191b3cac200814e02938"
+EC_FW2_hash="d7a44b682b1dae7f3cbcc34646b3dd80895a7e2132ab0292b3d42ccf54a9fa447773f7e8e914b0c427adaaad8aa54224e7e146dc72280cf04093956727f41a03"
diff --git a/config/vendor/hp8560w/pkg.cfg b/config/vendor/hp8560w/pkg.cfg
index 629d96d1..224b448c 100644
--- a/config/vendor/hp8560w/pkg.cfg
+++ b/config/vendor/hp8560w/pkg.cfg
@@ -1,8 +1,11 @@
# SPDX-License-Identifier: GPL-3.0-or-later
DL_hash="81c9917938c4a2a4f128c976250451931efd0f25b51ff34f058ddacb8eec27272691371864a683ec7abcb924fea32592d061584c7b2571a5d3e84eb870281cc3"
+ME_bin_hash="6a7eb169a01581682a2ecf4b284c1689eb7746cc80aa16ea1ce35d1a1c47a92664b5240defd62535e9707c3f3d42abfb62da3254b97e569de178099f7683c858"
DL_url="https://download.lenovo.com/ibmdl/pub/pc/pccbbs/mobiles/83rf46ww.exe"
DL_url_bkup="https://web.archive.org/web/20220202201637/https://download.lenovo.com/ibmdl/pub/pc/pccbbs/mobiles/83rf46ww.exe"
EC_hash="8e2bc5dca1a1cf0cfc1ac9df74eb6fda333f8ae560019f8182a49d3a716d72938f6cde4aa5ee56942def08207d3ef95706653bd238768fd029da43e9a4fbcc67"
EC_url="https://ftp.hp.com/pub/softpaq/sp78001-78500/sp78085.exe"
EC_url_bkup="https://web.archive.org/web/20230402085323/https://ftp.hp.com/pub/softpaq/sp78001-78500/sp78085.exe"
+EC_FW1_hash="44a27359e8e2ecfae910a754617d5ee947d6bba976f2eb53114a97c71b64813da7ab4223749706c9bbcaf1e752c190834ee3b41c297c191b3cac200814e02938"
+EC_FW2_hash="82882406167e7df8ff90d2ea8d93adee59c3e8eb034b6dfcd0ff70cadf8ab3e5acee7262dd344560e118d00b010ed13c18539b042dae0b4b4e6a2c09402aadc4"
diff --git a/config/vendor/hp9470m/pkg.cfg b/config/vendor/hp9470m/pkg.cfg
index 9cdb8143..46f1349b 100644
--- a/config/vendor/hp9470m/pkg.cfg
+++ b/config/vendor/hp9470m/pkg.cfg
@@ -1,8 +1,11 @@
# SPDX-License-Identifier: GPL-3.0-or-later
DL_hash="4dc908050c91c1227645c900ddee88652937540af4ba222b0239b7f459f260cdf6e5e8113ac14e5543d00cf53abdd6c7bd23e61f690de1ce45a3709a30cbb91c"
+ME_bin_hash="672240d231a723ea7fac112262fdc28884c43a5be9b231dfae838c7a1edc86140da38983079d23ab5ac8e6c74611b65da4872ecbab3ec979c680d3f526eb91ed"
DL_url="https://download.lenovo.com/pccbbs/mobiles/g1rg24ww.exe"
DL_url_bkup="https://web.archive.org/web/20210706183911/https://download.lenovo.com/pccbbs/mobiles/g1rg24ww.exe"
EC_hash="563422bf5420da18b89439f28a38ea28a175f0ad3588f0f5ea39b08dfdd14c8d513cbf11c2125ec3869fc3b7222c7dc3d111415185ea9b73f41410b1b57f13bd"
EC_url="https://ftp.hp.com/pub/softpaq/sp96001-96500/sp96090.exe"
EC_url_bkup="http://web.archive.org/web/20220504072602/https://ftp.ext.hp.com/pub/softpaq/sp96001-96500/sp96090.exe"
+EC_FW1_hash="44a27359e8e2ecfae910a754617d5ee947d6bba976f2eb53114a97c71b64813da7ab4223749706c9bbcaf1e752c190834ee3b41c297c191b3cac200814e02938"
+EC_FW2_hash="0d7b446fda5e5cde9570b6df15e4c0ad6b9fad6b425f498669d91bccb4a4bb9a8d22d20f4adb9f116e38df6db3519aae14a6d8fd8cb3075c93ce7c5ae0d8eacb"
diff --git a/config/vendor/ivybridge/pkg.cfg b/config/vendor/ivybridge/pkg.cfg
index d9b2200b..3b3d1091 100644
--- a/config/vendor/ivybridge/pkg.cfg
+++ b/config/vendor/ivybridge/pkg.cfg
@@ -1,5 +1,6 @@
# SPDX-License-Identifier: GPL-3.0-or-later
DL_hash="4dc908050c91c1227645c900ddee88652937540af4ba222b0239b7f459f260cdf6e5e8113ac14e5543d00cf53abdd6c7bd23e61f690de1ce45a3709a30cbb91c"
+ME_bin_hash="672240d231a723ea7fac112262fdc28884c43a5be9b231dfae838c7a1edc86140da38983079d23ab5ac8e6c74611b65da4872ecbab3ec979c680d3f526eb91ed"
DL_url="https://download.lenovo.com/pccbbs/mobiles/g1rg24ww.exe"
DL_url_bkup="https://web.archive.org/web/20210706183911/https://download.lenovo.com/pccbbs/mobiles/g1rg24ww.exe"
diff --git a/config/vendor/sandybridge/pkg.cfg b/config/vendor/sandybridge/pkg.cfg
index bb022043..c243413f 100644
--- a/config/vendor/sandybridge/pkg.cfg
+++ b/config/vendor/sandybridge/pkg.cfg
@@ -1,5 +1,6 @@
# SPDX-License-Identifier: GPL-3.0-or-later
DL_hash="81c9917938c4a2a4f128c976250451931efd0f25b51ff34f058ddacb8eec27272691371864a683ec7abcb924fea32592d061584c7b2571a5d3e84eb870281cc3"
+ME_bin_hash="6a7eb169a01581682a2ecf4b284c1689eb7746cc80aa16ea1ce35d1a1c47a92664b5240defd62535e9707c3f3d42abfb62da3254b97e569de178099f7683c858"
DL_url="https://download.lenovo.com/ibmdl/pub/pc/pccbbs/mobiles/83rf46ww.exe"
DL_url_bkup="https://web.archive.org/web/20220202201637/https://download.lenovo.com/ibmdl/pub/pc/pccbbs/mobiles/83rf46ww.exe"
diff --git a/config/vendor/t1650/pkg.cfg b/config/vendor/t1650/pkg.cfg
index f994b942..47303884 100644
--- a/config/vendor/t1650/pkg.cfg
+++ b/config/vendor/t1650/pkg.cfg
@@ -1,8 +1,10 @@
# SPDX-License-Identifier: GPL-3.0-or-later
DL_hash="4dc908050c91c1227645c900ddee88652937540af4ba222b0239b7f459f260cdf6e5e8113ac14e5543d00cf53abdd6c7bd23e61f690de1ce45a3709a30cbb91c"
+ME_bin_hash="672240d231a723ea7fac112262fdc28884c43a5be9b231dfae838c7a1edc86140da38983079d23ab5ac8e6c74611b65da4872ecbab3ec979c680d3f526eb91ed"
DL_url="https://download.lenovo.com/pccbbs/mobiles/g1rg24ww.exe"
DL_url_bkup="https://web.archive.org/web/20210706183911/https://download.lenovo.com/pccbbs/mobiles/g1rg24ww.exe"
SCH5545EC_DL_url="https://dl.dell.com/FOLDER05065992M/1/T1650A28.exe"
SCH5545EC_DL_url_bkup="https://web.archive.org/web/20230811151654/https://dl.dell.com/FOLDER05065992M/1/T1650A28.exe"
SCH5545EC_DL_hash="18261d0f7f27e9de3b0b5a25019b9a934ef1a61cd3f0140e34f38553695e91e671e227a8fa962774edceab5c7804d13ed9fe1c518c5643c7c8f15632f903a6c4"
+SCH5545EC_bin_hash="51d9540f73c60ba5e245a8a98c2215d477d3bad9759f1dae94a4fe63652421d8552406817c2482dd6ee3bb55d942bbc0315eab54095544d7956e73112e2d8483"
diff --git a/config/vendor/t1700/pkg.cfg b/config/vendor/t1700/pkg.cfg
index cc100683..979dd7bf 100644
--- a/config/vendor/t1700/pkg.cfg
+++ b/config/vendor/t1700/pkg.cfg
@@ -1,9 +1,11 @@
# SPDX-License-Identifier: GPL-3.0-or-later
DL_hash="f3d79aec805c8b0094a4081be76b3a22d329c479ad18210449b7acc3236ccfc4a2103eaa7c5b79a4872bfd699eede047efd46dfb06dc8f47e3216fc254612998"
+ME_bin_hash="8629caded7efd2aa234cc378b7118f0d300402537b8aff6aa3d9b895c6b14590a79cb02d1db7a91de36d36f5612386fc99ddcb57c9d78b1e75b5864e68763de1"
DL_url="https://download.lenovo.com/pccbbs/mobiles/glrg22ww.exe"
DL_url_bkup="https://web.archive.org/web/20211120031520/https://download.lenovo.com/pccbbs/mobiles/glrg22ww.exe"
MRC_url="https://dl.google.com/dl/edgedl/chromeos/recovery/chromeos_13904.77.0_samus_recovery_stable-channel_mp-v3.bin.zip"
MRC_url_bkup="https://web.archive.org/web/20220310155922/https://dl.google.com/dl/edgedl/chromeos/recovery/chromeos_13904.77.0_samus_recovery_stable-channel_mp-v3.bin.zip"
MRC_hash="3ff1599c52539f0707a07a8664a84ce51cd3fed1569df4bb7aa6722fc8dec0af1754250333b6ca1a9794d970a4de7b29a5cf2499f5b61e4c3eab64d1314aaea9"
+MRC_bin_hash="cade33e8664fb92ebb6ce0c92b572f587f047b2832babb6bd30eb221dba76b08d578e189ba1f89cdb4c956aecd092ebd7443adbc30cf3800452b906967cedc11"
MRC_board="samus"
diff --git a/config/vendor/t480/pkg.cfg b/config/vendor/t480/pkg.cfg
index 3071f83d..90c31b75 100644
--- a/config/vendor/t480/pkg.cfg
+++ b/config/vendor/t480/pkg.cfg
@@ -2,6 +2,7 @@
# ME firmware (deguard will be used)
DL_hash="df735a24242792bf4150f30bf0bd4fdbdc0fb6bf0f897ea533df32567be8e084006d692fb6351677f8cc976878c5018667901dbd407b0a77805754f7c101497c"
+ME_bin_hash="fad8bcd2ea2ae9d1a2a1e223f499f15ada0787feb600eab3201669f82b7ade0741194fa86448eff57d7f68c8ebbfc1bf266b4d68aca509ee48db258902a805e7"
DL_url="https://dl.dell.com/FOLDER04573471M/1/Inspiron_5468_1.3.0.exe"
DL_url_bkup="https://web.archive.org/web/20241110222323/https://dl.dell.com/FOLDER04573471M/1/Inspiron_5468_1.3.0.exe"
@@ -11,6 +12,8 @@ DL_url_bkup="https://web.archive.org/web/20241110222323/https://dl.dell.com/FOLD
# and inserted to CBFS with names CONFIG_FSP_S_CBFS and CONFIG_FSP_M_CBFS
#
FSPFD_hash="c500166a8553a80ba8db8b8185a896e0ae1562ea3c139e07acd9e7937baf8110ba743cc79b69db09a5f39c076d1d22bc45045223975f46aea2034ba82a6b0360"
+FSPM_bin_hash="b15712a53f4d16f36b384beb6dbb716c0b0924751d6ca1e229cd4b8c03aef9eda025c235af247e53dac94d94b79559623974d0d21c7f97e125d8ecc2c86bf03f"
+FSPS_bin_hash="64ac9f93e43efddc35931e168d6594c2b39fb5a0da863d22f2d000d7eacc0692b07ce89389cbb1c5b95ff9b2bba508c538e37d0e644fcab7b2cada773da65ce6"
# We will use deguard to disable the Intel Boot Guard:
ME11bootguard="y"
@@ -27,3 +30,4 @@ TBFW_url="https://download.lenovo.com/pccbbs/mobiles/n24th13w.exe"
TBFW_url_bkup="https://web.archive.org/web/20241004165955/https://download.lenovo.com/pccbbs/mobiles/n24th13w.exe"
TBFW_hash="906d916e8ae77e6d146c67c3113cd904e735a7f28cb2fc37e2284758ead5cda8dd4025c1c741fac9162b1eb01cff08fc39a0d4e79c5cec0515f1d3e6447d1323"
TBFW_size=1048576 # size in bytes, when padding, matching TBFW's flash IC
+TBFW_bin_hash="15aea269e79d92fe651fe613e30febee5459786169f647e5f321b7382892cf2b8fc61aa1afb8a04d0369b71579de54763272ba144673fbfadfefeb384d45c293"
diff --git a/config/vendor/t480s/pkg.cfg b/config/vendor/t480s/pkg.cfg
index a9e3e48b..4c1eeaf1 100644
--- a/config/vendor/t480s/pkg.cfg
+++ b/config/vendor/t480s/pkg.cfg
@@ -1,6 +1,8 @@
# SPDX-License-Identifier: GPL-3.0-or-later
+# ME firmware (deguard will be used)
DL_hash="df735a24242792bf4150f30bf0bd4fdbdc0fb6bf0f897ea533df32567be8e084006d692fb6351677f8cc976878c5018667901dbd407b0a77805754f7c101497c"
+ME_bin_hash="1c77371187ef64e719debc75f606c78fc063b8a84f2704f3fa45e9e4d8a9bccec50420d262bbfbc0dd1695e038698b10113a1bc532a33b943321cd0811e40786"
DL_url="https://dl.dell.com/FOLDER04573471M/1/Inspiron_5468_1.3.0.exe"
DL_url_bkup="https://web.archive.org/web/20241110222323/https://dl.dell.com/FOLDER04573471M/1/Inspiron_5468_1.3.0.exe"
@@ -10,6 +12,8 @@ DL_url_bkup="https://web.archive.org/web/20241110222323/https://dl.dell.com/FOLD
# and inserted to CBFS with names CONFIG_FSP_S_CBFS and CONFIG_FSP_M_CBFS
#
FSPFD_hash="c500166a8553a80ba8db8b8185a896e0ae1562ea3c139e07acd9e7937baf8110ba743cc79b69db09a5f39c076d1d22bc45045223975f46aea2034ba82a6b0360"
+FSPM_bin_hash="b15712a53f4d16f36b384beb6dbb716c0b0924751d6ca1e229cd4b8c03aef9eda025c235af247e53dac94d94b79559623974d0d21c7f97e125d8ecc2c86bf03f"
+FSPS_bin_hash="64ac9f93e43efddc35931e168d6594c2b39fb5a0da863d22f2d000d7eacc0692b07ce89389cbb1c5b95ff9b2bba508c538e37d0e644fcab7b2cada773da65ce6"
# We will use deguard to disable the Intel Boot Guard:
ME11bootguard="y"
@@ -26,3 +30,4 @@ TBFW_url="https://download.lenovo.com/pccbbs/mobiles/n22th11w.exe"
TBFW_url_bkup="https://web.archive.org/web/20230319003752/https://download.lenovo.com/pccbbs/mobiles/n22th11w.exe"
TBFW_hash="ef8ec0a41d7faaa0ce514cfb6f8e7e10669c878eff69fbe1b821443b6218f5b31e1b910c8abceecf38d4b11a6e552d90f277c96c7a9c512d605c8b8aea9c1c0c"
TBFW_size=1048576 # size in bytes, when padding, matching TBFW's flash IC
+TBFW_bin_hash="41672f3ccdbf7a39ffd7d94c5cfb16efd2911be7b980feaa88b0f33777bd679eafdb97019a9c7b1d32cf76297ba0cb81d5b36072f6be96cec2834011249984db"
diff --git a/include/get.sh b/include/get.sh
new file mode 100644
index 00000000..a3328454
--- /dev/null
+++ b/include/get.sh
@@ -0,0 +1,162 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
+# Copyright (c) 2020-2021,2023-2025 Leah Rowe <leah@libreboot.org>
+# Copyright (c) 2022 Caleb La Grange <thonkpeasant@protonmail.com>
+
+eval "`setvars "" loc url bkup_url subcurl subhash subgit subgit_bkup \
+ depend subcurl_bkup repofail`"
+
+tmpgit="$xbloc/gitclone"
+tmpgitcache="$XBMK_CACHE/tmpgit"
+
+fetch_targets()
+{
+ [ -d "src/$project/$tree" ] || git_prep "$url" "$bkup_url" \
+ "$xbmkpwd/$configdir/$tree/patches" "src/$project/$tree" submod; :
+}
+
+fetch_project()
+{
+ eval "`setvars "" xtree`"
+ eval "`setcfg "config/git/$project/pkg.cfg"`"
+
+ chkvars url bkup_url && [ -n "$xtree" ] && x_ ./mk -f coreboot "$xtree"
+ [ -z "$depend" ] || for d in $depend ; do
+ x_ ./mk -f $d
+ done
+ clone_project
+}
+
+clone_project()
+{
+ loc="$XBMK_CACHE/clone/$project" && singletree "$project" && \
+ loc="src/$project"
+
+ e "$loc" d missing && remkdir "${tmpgit%/*}" && git_prep \
+ "$url" "$bkup_url" "$xbmkpwd/config/$project/patches" "$loc"; :
+}
+
+git_prep()
+{
+ printf "Creating code directory, src/%s/%s\n" "$project" "$tree"
+
+ _patchdir="$3"
+ _loc="$4" # $1 and $2 are gitrepo and gitrepo_backup
+
+ chkvars rev
+ xbget git "$1" "$2" "$tmpgit" "$rev" "$_patchdir"
+ if singletree "$project" || [ $# -gt 4 ]; then
+ dx_ fetch_submodule "$mdir/module.list"
+ fi
+
+ [ "$_loc" = "${_loc%/*}" ] || x_ mkdir -p "${_loc%/*}"
+ x_ mv "$tmpgit" "$_loc"
+}
+
+fetch_submodule()
+{
+ mcfgdir="$mdir/${1##*/}"; eval \
+ "`setvars "" subhash subgit subgit_bkup subcurl subcurl_bkup st`"
+ eval "`setcfg "$mcfgdir/module.cfg" 0`"
+
+ for xt in git curl; do
+ _seval="if [ -n \"\$sub$xt\" ] || [ -n \"\$sub${xt}_bkup\" ]"
+ eval "$_seval; then st=\"\$st \$xt\"; fi"
+ done
+
+ st="${st# }" && [ "$st" = "git curl" ] && err "$mdir: git+curl defined"
+ [ -z "$st" ] && return 0 # subgit/subcurl not defined
+ chkvars "sub${st}" "sub${st}_bkup" "subhash"
+
+ [ "$st" = "git" ] && x_ rm -Rf "$tmpgit/$1"
+ eval xbget "$st" "\$sub$st" "\$sub${st}_bkup" "$tmpgit/$1" \
+ "$subhash" "$mdir/${1##*/}/patches"
+}
+
+xbget()
+{
+ [ "$1" = "curl" ] || [ "$1" = "copy" ] || [ "$1" = "git" ] || \
+ err "Bad dlop (arg 1): xbget $*"
+
+ echk="f" && [ "$1" = "git" ] && echk="d"
+
+ for url in "$2" "$3"; do
+ [ -n "$url" ] || err "empty URL given in: xbget $*"
+ try_file "$url" "$@" || continue
+ eval "[ -$echk \"$4\" ] || continue"
+ return 0 # successful download/copy
+ done
+ err "$1 $2 $3 $4: not downloaded"; :
+}
+
+try_file()
+{
+ cached="file/$6" && [ "$2" = "git" ] && cached="clone/${3##*/}" && \
+ cached="${cached%.git}" # always the main repo as basis for naming,
+ # in case the backup has another name
+ cached="$XBMK_CACHE/$cached"
+ x_ mkdir -p "${5%/*}" "${cached%/*}"
+
+ echk="d" && [ "$2" != "git" ] && echk="f" && \
+ bad_checksum "$6" "$cached" 2>/dev/null && x_ rm -f "$cached"
+
+ evalchk="[ -$echk \"$cached\" ] || " && [ "$2" = "git" ] && evalchk=""
+ eval "${evalchk}try_$2 \"\$cached\" \"\$@\" || return 1"
+ [ "$2" != "git" ] && [ -f "$5" ] && \
+ bad_checksum "$6" "$5" 2>/dev/null && x_ cp "$cached" "$5"
+ eval "[ -$echk \"$cached\" ] || return 1"
+
+ if [ "$2" = "git" ]; then
+ [ -d "$5" ] || tmpclone "$cached" "$5" "$6" "$7" || \
+ err "Can't clone final repo in command: try_file $*"; :
+ else
+ bad_checksum "$6" "$cached" && x_ rm -f "$cached" && return 1
+ [ "$cached" != "$5" ] && x_ cp "$cached" "$5"
+ bad_checksum "$6" "$5" && x_ rm -f "$5" && return 1; :
+ fi
+
+ eval "[ -$echk \"$5\" ] || return 1"
+}
+
+try_curl()
+{
+ _ua="Mozilla/5.0 (Windows NT 10.0; rv:91.0) Gecko/20100101 Firefox/91.0"
+ ( x_ curl --location --retry 3 -A "$_ua" "$2" -o "$1" ) || \
+ ( x_ wget --tries 3 -U "$_ua" "$2" -O "$1" ) || return 1; :
+}
+
+try_copy()
+{
+ e "$2" f missing && return 1; :
+ ( x_ cp "$2" "$1" ) || return 1; :
+}
+
+try_git()
+{
+ gitdest="`findpath "$1"`" || err "Can't get readpath for '$1'"
+ x_ rm -Rf "$tmpgitcache"
+
+ [ -d "$gitdest" ] || ( x_ git clone "$2" "$tmpgitcache" ) || return 1
+ [ -d "$gitdest" ] || x_ mkdir -p "${gitdest%/*}"
+ [ -d "$gitdest" ] || x_ mv "$tmpgitcache" "$gitdest"
+
+ ( x_ git -C "$gitdest" remote remove main ) || :
+ ( x_ git -C "$gitdest" remote remove backup ) || :
+ x_ git -C "$gitdest" remote add main "$4"
+ x_ git -C "$gitdest" remote add backup "$5"
+ ( x_ git -C "$gitdest" pull --all ) || :; :
+}
+
+bad_checksum()
+{
+ e "$2" f missing && return 0
+ csum="$(x_ sha512sum "$2" | awk '{print $1}')" || err "!sha512 '$2' $1"
+ [ "$csum" = "$1" ] && return 1; x_ rm -f "$2"
+ printf "BAD SHA512 %s, '%s'; need '%s'\n" "$csum" "$2" "$1" 1>&2
+}
+
+tmpclone()
+{
+ ( x_ git clone "$1" "$2" ) || return 1
+ ( x_ git -C "$2" reset --hard "$3" ) || return 1
+ ( fx_ "eval x_ git -C \"$2\" am" find "$4" -type f ) || return 1; :
+}
diff --git a/include/git.sh b/include/git.sh
deleted file mode 100644
index 37f5bbae..00000000
--- a/include/git.sh
+++ /dev/null
@@ -1,145 +0,0 @@
-# SPDX-License-Identifier: GPL-3.0-or-later
-# Copyright (c) 2020-2021,2023-2025 Leah Rowe <leah@libreboot.org>
-# Copyright (c) 2022 Caleb La Grange <thonkpeasant@protonmail.com>
-
-eval "`setvars "" loc url bkup_url subfile subhash subrepo subrepo_bkup \
- depend subfile_bkup repofail`"
-
-tmpgit="$xbmklocal/gitclone"
-
-fetch_targets()
-{
- e "src/$project/$tree" d && return 0
-
- printf "Creating %s tree %s\n" "$project" "$tree"
- git_prep "$loc" "$loc" "$xbmkpwd/$configdir/$tree/patches" \
- "src/$project/$tree" with_submodules
- nuke "$project/$tree" "$project/$tree"
-}
-
-fetch_project()
-{
- eval "`setvars "" xtree`"
- eval "`setcfg "config/git/$project/pkg.cfg"`"
-
- chkvars url
-
- [ -n "$xtree" ] && x_ ./mk -f coreboot "$xtree"
- [ -z "$depend" ] || for d in $depend ; do
- printf "'%s' needs '%s'; grabbing '%s'\n" "$project" "$d" "$d"
- x_ ./mk -f $d
- done
- clone_project
-
- for x in config/git/*; do
- [ -d "$x" ] && nuke "${x##*/}" "src/${x##*/}" 2>/dev/null; :
- done; :
-}
-
-clone_project()
-{
- loc="$XBMK_CACHE/repo/$project" && singletree "$project" && \
- loc="src/$project"
- printf "Downloading project '%s' to '%s'\n" "$project" "$loc"
-
- e "$loc" d missing && remkdir "${tmpgit%/*}" && git_prep \
- "$url" "$bkup_url" "$xbmkpwd/config/$project/patches" "$loc"; :
-}
-
-git_prep()
-{
- _patchdir="$3"
- _loc="$4" # $1 and $2 are gitrepo and gitrepo_backup
-
- chkvars rev
- tmpclone "$1" "$2" "$tmpgit" "$rev" "$_patchdir"
- if singletree "$project" || [ $# -gt 4 ]; then
- [ -f "$mdir/module.list" ] && while read -r msrcdir; do
- fetch_submodule "$msrcdir"
- done < "$mdir/module.list"; :
- fi
-
- [ "$_loc" != "$XBMK_CACHE/repo/$project" ] && \
- [ "$XBMK_RELEASE" = "y" ] && rmgit "$tmpgit"
-
- [ "$_loc" = "${_loc%/*}" ] || x_ mkdir -p "${_loc%/*}"
- mv "$tmpgit" "$_loc" || $err "git_prep: !mv $tmpgit $_loc"
-}
-
-# return 0 if project is single-tree, otherwise 1
-# e.g. coreboot is multi-tree, so 1
-singletree()
-{
- for targetfile in "config/${1}/"*/target.cfg; do
- [ -e "$targetfile" ] && [ -f "$targetfile" ] && return 1; :
- done; :
-}
-
-fetch_submodule()
-{
- mcfgdir="$mdir/${1##*/}"; eval \
- "`setvars "" subhash subrepo subrepo_bkup subfile subfile_bkup st`"
- [ ! -f "$mcfgdir/module.cfg" ] || . "$mcfgdir/module.cfg" || \
- $err "! . $mcfgdir/module.cfg"
-
- for xt in repo file; do
- _seval="if [ -n \"\$sub$xt\" ] || [ -n \"\$sub${xt}_bkup\" ]"
- eval "$_seval; then st=\"\$st \$xt\"; fi"
- done
- st="${st# }" && [ "$st" = "repo file" ] && $err "$mdir: repo+file"
-
- [ -z "$st" ] && return 0 # subrepo/subfile not defined
- chkvars "sub${st}" "sub${st}_bkup" "subhash"
-
- [ "$st" = "file" ] && xbmkget "$subfile" "$subfile_bkup" \
- "$tmpgit/$1" "$subhash" && return 0
- rm -Rf "$tmpgit/$1" || $err "!rm '$mdir' '$1'"
- tmpclone "$subrepo" "$subrepo_bkup" "$tmpgit/$1" "$subhash" \
- "$mdir/${1##*/}/patches"
-}
-
-tmpclone()
-{
- livepull="n" && [ "$repofail" = "y" ] && \
- printf "Cached clone failed; trying online.\n" 1>&2 && livepull="y"
-
- repofail="n"
-
- [ $# -lt 6 ] || rm -Rf "$3" || $err "git retry: !rm $3 ($1)"
- repodir="$XBMK_CACHE/repo/${1##*/}" && [ $# -gt 5 ] && repodir="$3"
- mkdir -p "$XBMK_CACHE/repo" || $err "!rmdir $XBMK_CACHE/repo"
-
- if [ "$livepull" = "y" ] && [ ! -d "$repodir" ]; then
- git clone "$1" "$repodir" || git clone $2 "$repodir" || \
- $err "!clone $1 $2 $repodir $4 $5" #
- elif [ -d "$repodir" ] && [ $# -lt 6 ]; then
- git -C "$repodir" pull || sleep 3 || git -C "$repodir" pull \
- || sleep 3 || git -C "$repodir" pull || :
- fi
- (
- [ $# -gt 5 ] || git clone "$repodir" "$3" || $err "!clone $repodir $3"
- git -C "$3" reset --hard "$4" || $err "!reset $1 $2 $3 $4 $5"
- git_am_patches "$3" "$5"
- ) || repofail="y"
-
- [ "$repofail" = "y" ] && [ $# -lt 6 ] && tmpclone "$@" retry
- [ "$repofail" = "y" ] && $err "!clone $1 $2 $3 $4 $5"; :
-}
-
-git_am_patches()
-{
- for p in "$2/"*; do
- [ -L "$p" ] && continue
- [ -e "$p" ] || continue
- [ -d "$p" ] && git_am_patches "$1" "$p" && continue
- [ ! -f "$p" ] || git -C "$1" am "$p" || $err "$1 $2: !am $p"
- done; :
-}
-
-nuke()
-{
- e "config/${1%/}/nuke.list" f missing || while read -r nukefile; do
- rmf="src/${2%/}/$nukefile" && [ -L "$rmf" ] && continue
- e "$rmf" e missing || rm -Rf "$rmf" || $err "!rm $rmf, ${2%/}"
- done < "config/${1%/}/nuke.list"; :
-}
diff --git a/include/init.sh b/include/init.sh
index 3f813ea7..bc5a62b6 100644
--- a/include/init.sh
+++ b/include/init.sh
@@ -12,62 +12,126 @@ projectsite="https://libreboot.org/"
[ -z "${PATH+x}" ] && \
export PATH="/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games"
-xbmkpath="$PATH"
-
-err="err_"
eval "`setvars "" _nogit board reinstall versiondate aur_notice configdir \
- datadir version xbmkpwd relname xbmkpwd xbmktmp python pyver xbmklocal`"
+ datadir version xbmkpwd relname xbmkpwd xbtmp python pyver xbloc \
+ xbmklock cvxbmk cvchk xbmkpath`"
xbmk_init()
{
- xbmkpwd="`pwd`" || $err "Cannot generate PWD"
- xbmklocal="$xbmkpwd/tmp"
+ xbmkpwd="`pwd`" || err "Cannot generate PWD"
+ xbloc="$xbmkpwd/tmp"
+ xbmklock="$xbmkpwd/lock"
export PWD="$xbmkpwd"
- if [ $# -gt 0 ] && [ "$1" = "dependencies" ]; then
- install_packages "$@" || exit 1
- exit 0
- fi
+ [ $# -gt 0 ] && [ "$1" = "dependencies" ] && x_ xbmkpkg "$@" && exit 0
- id -u 1>/dev/null 2>/dev/null || $err "suid check failed (id -u)"
- [ "$(id -u)" != "0" ] || $err "this command as root is not permitted"
+ id -u 1>/dev/null 2>/dev/null || err "suid check failed (id -u)"
+ [ "$(id -u)" != "0" ] || err "this command as root is not permitted"
- for init_cmd in set_pyver set_env set_version git_init create_tmpdir \
- lock create_pathdirs child_exec; do
+ for init_cmd in get_version set_env set_threads git_init child_exec; do
xbmk_$init_cmd "$@" || break
done
}
-install_packages()
+xbmkpkg()
{
- [ $# -lt 2 ] && $err "fewer than two arguments"
+ [ $# -lt 2 ] && err "fewer than two arguments"
[ $# -gt 2 ] && reinstall="$3"
eval "`setcfg "config/dependencies/$2"`"
chkvars pkg_add pkglist
- $pkg_add $pkglist || $err "Cannot install packages"
+ x_ $pkg_add $pkglist
[ -n "$aur_notice" ] && \
printf "You need AUR packages: %s\n" "$aur_notice" 1>&2; :
}
-setcfg()
+xbmk_get_version()
{
- [ $# -gt 1 ] && printf "e \"%s\" f missing && return %s;\n" "$1" "$2"
- [ $# -gt 1 ] || \
- printf "e \"%s\" f not && %s \"Missing config\";\n" "$1" "$err"
- printf ". \"%s\" || %s \"Could not read config\";\n" "$1" "$err"
+ [ ! -f ".version" ] || read -r version < ".version" || err
+ [ ! -f ".versiondate" ] || read -r versiondate < ".versiondate" || err
+ [ ! -f ".version" ] || chkvars version
+ [ ! -f ".versiondate" ] || chkvars versiondate
+
+ [ ! -e ".git" ] && [ ! -f ".version" ] && version="unknown"
+ [ ! -e ".git" ] && [ ! -f ".versiondate" ] && versiondate="1716415872"
+
+ [ -n "$version" ] && relname="$projectname-$version"; :
}
-chkvars()
+xbmk_set_env()
{
- for var in "$@"; do
- eval "[ -n \"\${$var+x}\" ] || \$err \"$var unset\""
- eval "[ -n \"\$$var\" ] || \$err \"$var unset\""
- done; :
+ is_child="n"
+
+ xbmkpath="$PATH"
+
+ # unify all temporary files/directories in a single TMPDIR
+ [ -z "${TMPDIR+x}" ] || [ "${TMPDIR%_*}" = "/tmp/xbmk" ] || \
+ unset TMPDIR
+ [ -n "${TMPDIR+x}" ] && export TMPDIR="$TMPDIR" && xbtmp="$TMPDIR"
+ [ -z "${TMPDIR+x}" ] || is_child="y" # child instance, so return
+
+ if [ "$is_child" = "y" ]; then
+ [ -z "${XBMK_CACHE+x}" ] && err "XBMK_CACHE unset on child"
+ [ -z "${XBMK_THREADS+x}" ] && xbmk_set_threads
+ e "lock" f missing && err "lock file absent on child"
+ return 1
+ fi
+
+ [ -f "$xbmklock" ] && err "'$xbmklock' exists. Is a build running?"
+ touch "$xbmklock" || err "cannot create '$xbmklock'"; :
+
+ # parent instance of xbmk, so don't return. set up TMPDIR
+ export TMPDIR="/tmp"
+ export TMPDIR="$(mktemp -d -t xbmk_XXXXXXXX)"
+ xbtmp="$TMPDIR"
+
+ export XBMK_CACHE="$xbmkpwd/cache"
+ [ -L "$XBMK_CACHE" ] && [ "$XBMK_CACHE" = "$xbmkpwd/cache" ] && \
+ err "cachedir '$xbmkpwd/cache' is a symlink"
+ [ ! -e "$XBMK_CACHE" ] || \
+ [ -d "$XBMK_CACHE" ] || err "cachedir '$XBMK_CACHE' is a file"; :
+
+ export PATH="$XBMK_CACHE/xbmkpath:$XBMK_CACHE/gnupath:$PATH"
+ xbmkpath="$PATH"
+
+ # 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)
+ [ -z "${XBMK_RELEASE+x}" ] && export XBMK_RELEASE="n"
+ [ "$XBMK_RELEASE" = "Y" ] && export XBMK_RELEASE="y"
+ [ "$XBMK_RELEASE" = "y" ] || export XBMK_RELEASE="n"
+
+ xbmk_set_version
+ export LOCALVERSION="-$projectname-${version%%-*}"
+
+ remkdir "$xbtmp" "$xbloc" "$XBMK_CACHE/gnupath" "$XBMK_CACHE/xbmkpath"
+
+ xbmk_set_pyver
+}
+
+xbmk_set_threads()
+{
+ [ -z "${XBMK_THREADS+x}" ] && export XBMK_THREADS=1
+ expr "X$XBMK_THREADS" : "X-\{0,1\}[0123456789][0123456789]*$" \
+ 1>/dev/null 2>/dev/null || export XBMK_THREADS=1
+}
+
+xbmk_set_version()
+{
+ version_="$version"
+ [ ! -e ".git" ] || version="$(git describe --tags HEAD 2>&1)" || \
+ version="git-$(git rev-parse HEAD 2>&1)" || version="$version_"
+ versiondate_="$versiondate"
+ [ ! -e ".git" ] || versiondate="$(git show --no-patch --no-notes \
+ --pretty='%ct' HEAD)" || versiondate="$versiondate_"
+
+ chkvars version versiondate
+ update_xbmkver "."
+
+ relname="$projectname-$version"
}
xbmk_set_pyver()
@@ -78,13 +142,18 @@ xbmk_set_pyver()
pyver="2" && [ "$python" = "python3" ] && pyver="3"
pybin "$python" 1>/dev/null || pyver=""
[ -z "$pyver" ] || "`pybin "$python"`" -c "$pyv" 1>/dev/null \
- 2>/dev/null || $err "Cannot detect host Python version."
- if [ -n "$pyver" ]; then
- pyver="$("$(pybin "$python")" -c "$pyv" | awk '{print $1}')"
- pyver="${pyver#(}"
- pyver="${pyver%,}"
- fi
- [ "${pyver%%.*}" = "3" ] || $err "Bad python version (must by 3.x)"; :
+ 2>/dev/null || err "Cannot detect host Python version."
+ [ -n "$pyver" ] && \
+ pyver="$("$(pybin "$python")" -c "$pyv" | awk '{print $1}')" && \
+ pyver="${pyver#(}" && pyver="${pyver%,}"
+ [ "${pyver%%.*}" = "3" ] || err "Bad python version (must by 3.x)"
+
+ (
+ # set up python v3.x in PATH, in case it's not set up correctly.
+ # see code above that detected the correct python3 command.
+ x_ cd "$XBMK_CACHE/xbmkpath"
+ x_ ln -s "`pybin "$python"`" python
+ ) || err "Can't set up python symlink in $XBMK_CACHE/xbmkpath"; :
}
# Use direct path, to prevent a hang if Python is using a virtual environment,
@@ -101,8 +170,7 @@ pybin()
# ideally, don't rely on PATH or hardcoded paths if python venv.
# use the *real*, direct executable linked to by the venv symlink
if [ $venv -gt 0 ] && [ -L "`command -v "$1" 2>/dev/null`" ]; then
- # realpath isn't posix, but available mostly universally
- pypath="$(realpath \
+ pypath="$(findpath \
"$(command -v "$1" 2>/dev/null)" 2>/dev/null || :)"
[ -e "$pypath" ] && [ ! -d "$pypath" ] && \
[ -x "$pypath" ] && printf "%s\n" "$pypath" && return 0; :
@@ -113,61 +181,20 @@ pybin()
[ -e "$pypath/$1" ] && [ ! -d "$pypath/$1" ] && \
[ -x "$pypath/$1" ] && printf "%s/%s\n" "$pypath" "$1" && \
return 0
- done
- [ $venv -gt 0 ] && return 1
+ done && return 1
# Defer to normal command -v if not a venv
command -v "$1" 2>/dev/null || return 1
}
-xbmk_set_env()
-{
- # XBMK_CACHE is a directory, for caching downloads and git repon
- [ -z "${XBMK_CACHE+x}" ] && export XBMK_CACHE="$xbmkpwd/cache"
- [ -z "$XBMK_CACHE" ] && export XBMK_CACHE="$xbmkpwd/cache"
- [ -L "$XBMK_CACHE" ] && [ "$XBMK_CACHE" = "$xbmkpwd/cache" ] && \
- $err "cachedir '$xbmkpwd/cache' is a symlink"
- [ -L "$XBMK_CACHE" ] && export XBMK_CACHE="$xbmkpwd/cache"
- [ -f "$XBMK_CACHE" ] && $err "cachedir '$XBMK_CACHE' is a file"; :
-
- # 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)
- [ -z "${XBMK_RELEASE+x}" ] && export XBMK_RELEASE="n"
- [ "$XBMK_RELEASE" = "y" ] || export XBMK_RELEASE="n"
-
- [ -z "${XBMK_THREADS+x}" ] && export XBMK_THREADS=1
- expr "X$XBMK_THREADS" : "X-\{0,1\}[0123456789][0123456789]*$" \
- 1>/dev/null 2>/dev/null || export XBMK_THREADS=1; :
-}
-
-xbmk_set_version()
-{
- [ ! -f ".version" ] || read -r version < ".version" || :; :
- [ ! -f ".versiondate" ] || read -r versiondate < ".versiondate" || :; :
-
- [ -e ".git" ] || [ -f ".version" ] || printf "unknown\n" > ".version" \
- || $err "Cannot generate unknown .version file"
- [ -e ".git" ] || [ -f ".versiondate" ] || printf "1716415872\n" > \
- ".versiondate" || $err "Can't generate unknown versiondate file"; :
-
- version_="$version"
- [ ! -e ".git" ] || version="$(git describe --tags HEAD 2>&1)" || \
- version="git-$(git rev-parse HEAD 2>&1)" || version="$version_"
- versiondate_="$versiondate"
- [ ! -e ".git" ] || versiondate="$(git show --no-patch --no-notes \
- --pretty='%ct' HEAD)" || versiondate="$versiondate_"
-
- chkvars version versiondate
- printf "%s\n" "$version" > ".version" || $err "can't save version"
- printf "%s\n" "$versiondate" > ".versiondate" || $err "can't save date"
-
- relname="$projectname-$version"
- export LOCALVERSION="-$projectname-${version%%-*}"
-}
-
xbmk_git_init()
{
- [ -L ".git" ] && return 1
+ for gitarg in "--global user.name" "--global user.email"; do
+ gitcmd="git config $gitarg"; $gitcmd 1>/dev/null 2>/dev/null \
+ || err "Run this first: $gitcmd \"your ${gitcmd##*.}\""
+ done
+
+ [ -L ".git" ] && err "'$xbmkpwd/.git' is a symlink"
[ -e ".git" ] && return 0
eval "`setvars "$(date -Rud @$versiondate)" cdate _nogit`"
@@ -176,59 +203,15 @@ xbmk_git_init()
x_ git commit -m "$projectname $version" --date "$cdate" \
--author="xbmk <xbmk@example.com>" 1>/dev/null 2>/dev/null
x_ git tag -a "$version" -m "$projectname $version" 1>/dev/null \
- 2>/dev/null
-
- for gitarg in "--global user.name" "--global user.email"; do
- gitcmd="git config $gitarg"; $gitcmd || $err \
- "Please run this first: $gitcmd \"your ${gitcmd##*.}\""
- done
-}
-
-xbmk_create_tmpdir()
-{
- x_ mkdir -p "$xbmklocal"
-
- # unify all temporary files/directories in a single TMPDIR
- [ -z "${TMPDIR+x}" ] || [ "${TMPDIR%_*}" = "/tmp/xbmk" ] || \
- unset TMPDIR
- [ -n "${TMPDIR+x}" ] && export TMPDIR="$TMPDIR" && xbmktmp="$TMPDIR"
- [ -z "${TMPDIR+x}" ] || return 1 # child instance, so return
-
- # parent instance of xbmk, so don't return. set up TMPDIR
- export TMPDIR="/tmp"
- export TMPDIR="$(mktemp -d -t xbmk_XXXXXXXX)"
- xbmktmp="$TMPDIR"
-
- # /tmp might be a tmpfs, so for large files we use ./tmp,
- # not to be confused with xbmktmp (xbmktmp points to /tmp)
- remkdir "$xbmktmp" "$xbmklocal"
-}
-
-xbmk_lock()
-{
- [ -f "lock" ] && $err "$xbmkpwd/lock exists. Is a build running?"
- touch lock || $err "cannot create 'lock' file"; :
-}
-
-xbmk_create_pathdirs()
-{
- x_ rm -Rf "$XBMK_CACHE/xbmkpath" "$XBMK_CACHE/gnupath"
- x_ mkdir -p "$XBMK_CACHE/gnupath" "$XBMK_CACHE/xbmkpath"
- export PATH="$XBMK_CACHE/xbmkpath:$XBMK_CACHE/gnupath:$PATH"
- (
- # set up python v3.x in PATH, in case it's not set up correctly.
- # see code above that detected the correct python3 command.
- cd "$XBMK_CACHE/xbmkpath" || $err "can't cd $XBMK_CACHE/xbmkpath"
- x_ ln -s "`pybin "$python"`" python
- ) || $err "Can't set up python symlink in $XBMK_CACHE/xbmkpath"; :
+ 2>/dev/null; :
}
xbmk_child_exec()
{
xbmk_rval=0
( x_ ./mk "$@" ) || xbmk_rval=1
- rm -Rf "$xbmklocal" "$xbmktmp" || xbmk_rval=1
- rm -f lock || xbmk_rval=1
+ ( x_ rm -Rf "$xbloc" "$xbtmp" ) || xbmk_rval=1
+ ( x_ rm -f "$xbmklock" ) || xbmk_rval=1
exit $xbmk_rval
}
diff --git a/include/inject.sh b/include/inject.sh
index 9bfda2db..795b2c70 100644
--- a/include/inject.sh
+++ b/include/inject.sh
@@ -3,304 +3,25 @@
# Copyright (c) 2022 Ferass El Hafidi <vitali64pmemail@protonmail.com>
# Copyright (c) 2023-2025 Leah Rowe <leah@libreboot.org>
-e6400_unpack="$xbmkpwd/src/bios_extract/dell_inspiron_1100_unpacker.py"
-me7updateparser="$xbmkpwd/util/me7_update_parser/me7_update_parser.py"
-pfs_extract="$xbmkpwd/src/biosutilities/Dell_PFS_Extract.py"
-uefiextract="$xbmkpwd/elf/uefitool/uefiextract"
-vendir="vendorfiles"
-appdir="$vendir/app"
cbcfgsdir="config/coreboot"
-hashfiles="vendorhashes blobhashes" # blobhashes for backwards compatibility
-dontflash="!!! AN ERROR OCCURED! Please DO NOT flash if injection failed. !!!"
-vfix="DO_NOT_FLASH_YET._FIRST,_INJECT_FILES_VIA_INSTRUCTIONS_ON_LIBREBOOT.ORG_"
-vguide="https://libreboot.org/docs/install/ivy_has_common.html"
-tmpromdel="$xbmklocal/DO_NOT_FLASH"
+tmpromdel="$XBMK_CACHE/DO_NOT_FLASH"
nvm="util/nvmutil/nvm"
-ifdtool="elf/ifdtool/default/ifdtool"
+ifdtool="elf/coreboot/default/ifdtool"
-cvchk="CONFIG_HAVE_MRC CONFIG_HAVE_ME_BIN CONFIG_KBC1126_FIRMWARE \
- CONFIG_VGA_BIOS_FILE CONFIG_INCLUDE_SMSC_SCH5545_EC_FW \
- CONFIG_LENOVO_TBFW_BIN CONFIG_FSP_M_FILE CONFIG_FSP_S_FILE"
+cv="CONFIG_GBE_BIN_PATH"
+[ -n "$cvxbmk" ] && cv="$cv $cvxbmk"
+[ -n "$cvchk" ] && cv="$cv $cvchk"
-cv="CONFIG_ME_BIN_PATH CONFIG_SMSC_SCH5545_EC_FW_FILE CONFIG_KBC1126_FW1 \
- CONFIG_KBC1126_FW2 CONFIG_KBC1126_FW1_OFFSET CONFIG_KBC1126_FW2_OFFSET \
- CONFIG_VGA_BIOS_ID CONFIG_BOARD_DELL_E6400 CONFIG_FSP_S_CBFS \
- CONFIG_HAVE_REFCODE_BLOB CONFIG_REFCODE_BLOB_FILE CONFIG_GBE_BIN_PATH \
- CONFIG_IFD_BIN_PATH CONFIG_FSP_FD_PATH CONFIG_MRC_FILE CONFIG_FSP_M_CBFS \
- CONFIG_FSP_USE_REPO CONFIG_FSP_FULL_FD $cvchk"
-
-eval "`setvars "" has_hashes EC_hash DL_hash DL_url_bkup MRC_refcode_gbe vcfg \
- E6400_VGA_DL_hash E6400_VGA_DL_url E6400_VGA_DL_url_bkup E6400_VGA_offset \
- E6400_VGA_romname SCH5545EC_DL_url_bkup SCH5545EC_DL_hash _dest tree \
- mecleaner kbc1126_ec_dump MRC_refcode_cbtree new_mac _dl SCH5545EC_DL_url \
- archive EC_url boarddir rom cbdir DL_url nukemode cbfstoolref FSPFD_hash \
- _7ztest ME11bootguard ME11delta ME11version ME11sku ME11pch tmpromdir \
- IFD_platform ifdprefix cdir sdir _me _metmp mfs TBFW_url_bkup TBFW_url \
- TBFW_hash TBFW_size hashfile xromsize xchanged EC_url_bkup need_files \
- vfile cbcfg $cv`"
-
-download()
-{
- [ $# -gt 0 ] || $err "No argument given"
- export PATH="$PATH:/sbin"
- board="$1" && readcfg && readkconfig && bootstrap && getfiles; :
-}
-
-readkconfig()
-{
- x_ rm -f "$xbmktmp/cbcfg"
- cbcfg="`check_defconfig "$boarddir"`" || for cbc in $cv; do
- grep "$cbc" "$cbcfg" 1>>"$xbmktmp/cbcfg" 2>/dev/null || :
- done
- eval "`setcfg "$xbmktmp/cbcfg" 1`"
-
- for c in $cvchk; do
- eval "[ \"\${$c}\" = \"/dev/null\" ] && continue"
- eval "[ -z \"\${$c}\" ] && continue"
- eval "`setcfg "$vfile"`"
- return 0
- done
- return 1
-}
-
-bootstrap()
-{
- x_ ./mk -f coreboot ${cbdir##*/}
- mk -b uefitool biosutilities bios_extract
- [ -d "${kbc1126_ec_dump%/*}" ] && x_ make -C "$cbdir/util/kbc1126"
- [ -n "$MRC_refcode_cbtree" ] && \
- cbfstoolref="elf/cbfstool/$MRC_refcode_cbtree/cbfstool" && \
- x_ ./mk -d coreboot "$MRC_refcode_cbtree"; :
-}
-
-getfiles()
-{
- [ -z "$CONFIG_HAVE_ME_BIN" ] || fetch intel_me "$DL_url" \
- "$DL_url_bkup" "$DL_hash" "$CONFIG_ME_BIN_PATH"
- [ -z "$CONFIG_INCLUDE_SMSC_SCH5545_EC_FW" ] || fetch sch5545ec \
- "$SCH5545EC_DL_url" "$SCH5545EC_DL_url_bkup" "$SCH5545EC_DL_hash" \
- "$CONFIG_SMSC_SCH5545_EC_FW_FILE"
- [ -z "$CONFIG_KBC1126_FIRMWARE" ] || fetch kbc1126ec "$EC_url" \
- "$EC_url_bkup" "$EC_hash" "$CONFIG_KBC1126_FW1"
- [ -z "$CONFIG_VGA_BIOS_FILE" ] || fetch e6400vga "$E6400_VGA_DL_url" \
- "$E6400_VGA_DL_url_bkup" "$E6400_VGA_DL_hash" "$CONFIG_VGA_BIOS_FILE"
- [ -z "$CONFIG_HAVE_MRC" ] || fetch "mrc" "$MRC_url" "$MRC_url_bkup" \
- "$MRC_hash" "$CONFIG_MRC_FILE"
- [ -n "$CONFIG_REFCODE_BLOB_FILE" ] && fetch "refcode" "$MRC_url" \
- "$MRC_url_bkup" "$MRC_hash" "$CONFIG_REFCODE_BLOB_FILE"
- [ -z "$CONFIG_LENOVO_TBFW_BIN" ] || fetch "tbfw" "$TBFW_url" \
- "$TBFW_url_bkup" "$TBFW_hash" "$CONFIG_LENOVO_TBFW_BIN"
- #
- # in the future, we might have libre fsp-s and then fsp-m.
- # therefore, handle them separately, in case one of them is libre; if
- # one of them was, the path wouldn't be set.
- #
- [ -z "$CONFIG_FSP_M_FILE" ] || fetch "fsp" "$CONFIG_FSP_FD_PATH" \
- "$CONFIG_FSP_FD_PATH" "$FSPFD_hash" "$CONFIG_FSP_M_FILE" copy
- [ -z "$CONFIG_FSP_S_FILE" ] || fetch "fsp" "$CONFIG_FSP_FD_PATH" \
- "$CONFIG_FSP_FD_PATH" "$FSPFD_hash" "$CONFIG_FSP_S_FILE" copy; :
-}
-
-fetch()
-{
- dl_type="$1"
- dl="$2"
- dl_bkup="$3"
- dlsum="$4"
- _dest="${5##*../}"
-
- [ "$5" = "/dev/null" ] && return 0
- _dl="$XBMK_CACHE/file/$dlsum"
- # HACK: if grabbing fsp from coreboot, fix the path for lbmk
- [ "$dl_type" = "fsp" ] && for _cdl in dl dl_bkup; do
- eval "$_cdl=\"\${$_cdl##*../}\"; _cdp=\"\$$_cdl\""
- [ -f "$_cdp" ] || _cdp="$cbdir/$_cdp"
- [ -f "$_cdp" ] && eval "$_cdl=\"$_cdp\""
- done; :
-
- dlop="curl" && [ $# -gt 5 ] && dlop="$6"
- xbmkget "$dl" "$dl_bkup" "$_dl" "$dlsum" "$dlop"
-
- rm -Rf "${_dl}_extracted" || $err "!rm ${_ul}_extracted. $dontflash"
- e "$_dest" f && return 0
-
- x_ mkdir -p "${_dest%/*}"
- remkdir "$appdir"
- extract_archive "$_dl" "$appdir" "$dl_type" || \
- [ "$dl_type" = "e6400vga" ] || $err "$_dest $dl_type: !extract"
-
- eval "extract_$dl_type"
- set -u -e
- e "$_dest" f missing && $err "!extract_$dl_type. $dontflash"; :
-}
-
-extract_intel_me()
-{
- e "$mecleaner" f not && $err "$cbdir: me_cleaner missing. $dontflash"
-
- cdir="$xbmkpwd/$appdir"
- _me="$xbmkpwd/$_dest"
- _metmp="$xbmklocal/me.bin"
-
- mfs="" && [ "$ME11bootguard" = "y" ] && mfs="--whitelist MFS" && \
- chkvars ME11delta ME11version ME11sku ME11pch
- [ "$ME11bootguard" = "y" ] && x_ ./mk -f deguard
-
- extract_intel_me_bruteforce
- if [ "$ME11bootguard" = "y" ]; then
- apply_me11_deguard_mod
- else
- mv "$_metmp" "$_me" || $err "!mv $_metmp $_me - $dontflash"
- fi
-}
-
-extract_intel_me_bruteforce()
-{
- [ $# -gt 0 ] && cdir="$1"
- e "$_metmp" f && return 0
-
- [ -z "$sdir" ] && sdir="$(mktemp -d)"
- x_ mkdir -p "$sdir"
-
- set +u +e
- (
- [ "${cdir#/a}" != "$cdir" ] && cdir="${cdir#/}"
- cd "$cdir" || $err "extract_intel_me: !cd \"$cdir\" - $dontflash"
- for i in *; do
- e "$_metmp" f && break
- [ -L "$i" ] && continue
- if [ -f "$i" ]; then
- _r="-r" && [ -n "$mfs" ] && _r=""
- "$mecleaner" $mfs $_r -t -O "$sdir/vendorfile" \
- -M "$_metmp" "$i" && break
- "$mecleaner" $mfs $_r -t -O "$_metmp" "$i" && break
- "$me7updateparser" -O "$_metmp" "$i" && break
- _7ztest="${_7ztest}a"
- extract_archive "$i" "$_7ztest" || continue
- extract_intel_me_bruteforce "$cdir/$_7ztest"
- elif [ -d "$i" ]; then
- extract_intel_me_bruteforce "$cdir/$i"
- else
- continue
- fi
- cdir="$1"; [ "${cdir#/a}" != "$cdir" ] && cdir="${cdir#/}"
- cd "$cdir" || :
- done
- ) || :
- rm -Rf "$sdir" || $err "extract_intel_me: !rm -Rf $sdir - $dontflash"
-}
-
-apply_me11_deguard_mod()
-{
- (
- x_ cd src/deguard/
- x_ ./finalimage.py --delta "data/delta/$ME11delta" \
- --version "$ME11version" \
- --pch "$ME11pch" --sku "$ME11sku" --fake-fpfs data/fpfs/zero \
- --input "$_metmp" --output "$_me"
- ) || $err "Error running deguard for $_me - $dontflash"
-}
-
-extract_archive()
-{
- [ $# -gt 2 ] && [ "$3" = "fsp" ] && x_ python \
- "$cbdir/3rdparty/fsp/Tools/SplitFspBin.py" split -f "$1" -o "$2" \
- -n "Fsp.fd" && return 0
-
- innoextract "$1" -d "$2" || python "$pfs_extract" "$1" -e || 7z x \
- "$1" -o"$2" || unar "$1" -o "$2" || unzip "$1" -d "$2" || return 1
-
- [ ! -d "${_dl}_extracted" ] || x_ cp -R "${_dl}_extracted" "$2"; :
-}
-
-extract_kbc1126ec()
-{
- x_ e "$kbc1126_ec_dump" f
- (
- x_ cd "$appdir/"
- mv Rompaq/68*.BIN ec.bin || :
- if [ ! -f "ec.bin" ]; then
- unar -D ROM.CAB Rom.bin || unar -D Rom.CAB Rom.bin || \
- unar -D 68*.CAB Rom.bin || $err "kbc1126 unar failed"
- x_ mv Rom.bin ec.bin
- fi
- x_ e ec.bin f && x_ "$kbc1126_ec_dump" ec.bin
- ) || $err "$board: can't extract kbc1126 ec firmware - $dontflash"
-
- x_ e "$appdir/ec.bin.fw1" f && x_ e "$appdir/ec.bin.fw2" f
- x_ cp "$appdir/"ec.bin.fw* "${_dest%/*}/"
-}
-
-extract_e6400vga()
-{
- set +u +e
- chkvars E6400_VGA_offset E6400_VGA_romname
- tail -c +$E6400_VGA_offset "$_dl" | gunzip > "$appdir/bios.bin" || :
- (
- x_ cd "$appdir"
- x_ e "bios.bin" f
- "$e6400_unpack" bios.bin || printf "TODO: fix dell extract util\n"
- ) || $err "can't extract e6400 vga rom - $dontflosh"
- x_ cp "$appdir/$E6400_VGA_romname" "$_dest"
-}
-
-extract_sch5545ec()
-{
- # full system ROM (UEFI), to extract with UEFIExtract:
- _bios="${_dl}_extracted/Firmware/1 $dlsum -- 1 System BIOS vA.28.bin"
- # this is the SCH5545 firmware, inside of the extracted UEFI ROM:
- _sch5545ec_fw="$_bios.dump/4 7A9354D9-0468-444A-81CE-0BF617D890DF"
- _sch5545ec_fw="$_sch5545ec_fw/54 D386BEB8-4B54-4E69-94F5-06091F67E0D3"
- _sch5545ec_fw="$_sch5545ec_fw/0 Raw section/body.bin" # <-- this!
-
- "$uefiextract" "$_bios" || $err "sch5545 !extract - $dontflash"
- x_ cp "$_sch5545ec_fw" "$_dest"
-}
-
-# Lenovo ThunderBolt firmware updates:
-# https://pcsupport.lenovo.com/us/en/products/laptops-and-netbooks/thinkpad-t-series-laptops/thinkpad-t480-type-20l5-20l6/20l5/solutions/ht508988
-extract_tbfw()
-{
- chkvars TBFW_size
- fe_ copy_tbfw "$appdir" -type f -name "TBT.bin"
- [ -f "$_dest" ] || $err "$board: Could not extract tbfw"; :
-}
-
-copy_tbfw()
-{
- [ -f "$1" ] || return 0
- [ -L "$1" ] && return 0
-
- x_ dd if=/dev/null of="$1" bs=1 seek=$TBFW_size
- x_ mv "$1" "$_dest"
-
- return 1
-}
-
-extract_fsp()
-{
- x_ cp "$appdir/"Fsp_*.fd "${_dest%/*}"
-}
-
-fail_inject()
-{
- [ -L "$tmpromdel" ] || [ ! -d "$tmpromdel" ] || \
- rm -Rf "$tmpromdel" || :
- printf "\n\n%s\n\n" "$dontflash" 1>&2
- printf "WARNING: File '%s' was NOT modified.\n\n" "$archive" 1>&2
- printf "Please MAKE SURE vendor files are inserted before flashing\n\n"
- err_ "$1"
-}
+eval "`setvars "" archive boarddir IFD_platform ifdprefix tree new_mac \
+ tmpromdir board xchanged $cv`"
inject()
{
- need_files="n"
- err="fail_inject"
remkdir "$tmpromdel"
set +u +e
- [ $# -lt 1 ] && $err "No options specified. - $dontflash"
- eval "`setvars "" nukemode new_mac xchanged`"
+ [ $# -lt 1 ] && err "No options specified"
+ eval "`setvars "" nuke new_mac xchanged`"
archive="$1";
new_mac="xx:xx:xx:xx:xx:xx"
@@ -308,248 +29,120 @@ inject()
[ $# -gt 1 ] && case "$2" in
nuke)
new_mac=""
- nukemode="nuke" ;;
+ nuke="nuke" ;;
setmac)
[ $# -gt 2 ] && new_mac="$3" && \
- [ -z "$new_mac" ] && $err "Empty MAC address specified" ;;
- *) $err "Unrecognised inject mode: '$2'"
+ [ -z "$new_mac" ] && err "Empty MAC address specified" ;;
+ *)
+ err "Unrecognised inject mode: '$2'"
esac
[ "$new_mac" = "keep" ] && new_mac=""
- [ -n "$new_mac" ] && [ "$new_mac" != "restore" ] && \
- x_ make -C util/nvmutil clean && x_ make -C util/nvmutil
+ check_release
+ check_target && patch_release
- check_release "$archive" || $err "'$archive' is not a release archive"
+ [ "$xchanged" = "y" ] && remktar
- readcfg && need_files="y"
- if [ "$need_files" = "y" ] || [ -n "$new_mac" ]; then
- [ "$nukemode" != "nuke" ] && [ "$need_files" = "y" ] && \
- x_ ./mk download "$board"
- patch_release_roms
- fi
+ xnot=" NOT" && [ "$xchanged" = "y" ] && xnot=""
+ printf "\n'%s' was%s modified\n" "$archive" "$xnot" 1>&2
- xtype="patched" && [ "$nukemode" = "nuke" ] && xtype="nuked"
- [ "$xchanged" != "y" ] && printf "\n'%s' *NOT* modified.\n" "$archive"
- [ "$xchanged" = "y" ] && printf "\n'%s' %s.\n" "$archive" "$xtype"; :
+ x_ rm -Rf "$tmpromdel"
}
check_release()
{
- [ -L "$archive" ] && $err "'$archive' is a symlink. $dontflash"
- e "$archive" f missing && return 1
+ [ -L "$archive" ] && err "'$archive' is a symlink"
+ e "$archive" f missing && err "'$archive' missing"
- archivename="`basename "$archive"`"
- [ -z "$archivename" ] && $err "Can't determine archive name. $dontflash"
+ archivename="`basename "$archive"`" || err "Can't get '$archive' name"
+ [ -z "$archivename" ] && err "Can't determine archive name"
case "$archivename" in
*_src.tar.xz)
- $err "'$archive' is a src archive, silly!" ;;
+ err "'$archive' is a src archive, silly!" ;;
grub_*|seagrub_*|custom_*|seauboot_*|seabios_withgrub_*)
- return 1 ;;
+ err "'$archive' is a ROM image (it must be a tarball)" ;;
*.tar.xz) _stripped_prefix="${archivename#*_}"
board="${_stripped_prefix%.tar.xz}" ;;
- *) $err "'$archive': could not detect board type - $dontflash"
+ *)
+ err "'$archive': could not detect board type" ;;
esac; :
}
-readcfg()
+check_target()
{
- if [ "$board" = "serprog_rp2040" ] || [ "$board" = "serprog_stm32" ] \
- || [ "$board" = "serprog_pico" ]; then
- return 1
- fi
+ [ "$board" = "${board#serprog_}" ] || return 1
boarddir="$cbcfgsdir/$board"
eval "`setcfg "$boarddir/target.cfg"`"
chkvars tree && x_ ./mk -d coreboot "$tree"
- [ -z "$vcfg" ] && return 1
-
- vfile="config/vendor/$vcfg/pkg.cfg"
- [ -L "$vfile" ] && $err "'$archive', '$board': $vfile is a symlink"
- [ -f "$vfile" ] || $err "'$archive', '$board': $vfile doesn't exist"
-
- cbdir="src/coreboot/$tree"
- cbfstool="elf/cbfstool/$tree/cbfstool"
- rmodtool="elf/cbfstool/$tree/rmodtool"
- mecleaner="$xbmkpwd/$cbdir/util/me_cleaner/me_cleaner.py"
- kbc1126_ec_dump="$xbmkpwd/$cbdir/util/kbc1126/kbc1126_ec_dump"
- cbfstool="elf/cbfstool/$tree/cbfstool"
- ifdtool="elf/ifdtool/$tree/ifdtool"
+ ifdtool="elf/coreboot/$tree/ifdtool"
[ -n "$IFD_platform" ] && ifdprefix="-p $IFD_platform"; :
}
-patch_release_roms()
+patch_release()
{
+ [ "$nuke" = "nuke" ] || x_ ./mk download "$board"
+
has_hashes="n"
- tmpromdir="$xbmklocal/DO_NOT_FLASH/bin/$board"
+ tmpromdir="$tmpromdel/bin/$board"
remkdir "${tmpromdir%"/bin/$board"}"
x_ tar -xf "$archive" -C "${tmpromdir%"/bin/$board"}"
- for _hashes in $hashfiles; do
- [ "$need_files" = "y" ] || break
- e "$tmpromdir/$_hashes" f && has_hashes="y" && \
- hashfile="$_hashes" && break; :
+ for _hashes in "vendorhashes" "blobhashes"; do
+ e "$tmpromdir/$_hashes" f && \
+ has_hashes="y" && hashfile="$_hashes" && break; :
done
- if readkconfig; then
- fe_ prep_rom "$tmpromdir" -maxdepth 1 -type f -name "*.rom"
- [ "$nukemode" != "nuke" ] || \
- printf "Make sure you inserted vendor files: %s\n" \
- "$vguide" > "$tmpromdir/README.md" || :
- else
- printf "Skipping vendorfiles on '%s'\n" "$archive" 1>&2
- need_files="n"
- fi
-
- (
- [ "$need_files" = "y" ] || exit 0
- cd "$tmpromdir" || $err "patch '$archive': can't cd $tmpromdir"
- # NOTE: For compatibility with older rom releases, defer to sha1
- if [ "$has_hashes" = "y" ] && [ "$nukemode" != "nuke" ]; then
- sha512sum --status -c "$hashfile" || \
- x_ sha1sum --status -c "$hashfile"
- x_ rm -f "$hashfile"
- fi
- ) || $err "'$archive' -> Can't verify vendor hashes. $dontflash"
-
- [ -z "$new_mac" ] || modify_mac || printf "\nGbE not defined\n" 1>&2
-
- [ "$xchanged" = "y" ] || rm -Rf "$tmpromdel" || :
- [ "$xchanged" = "y" ] || return 0
-
- (
- x_ cd "${tmpromdir%"/bin/$board"}"
- mkrom_tarball "bin/$board"
- ) || $err "Cannot re-generate '$archive' - $dontflash"
-
- mv "${tmpromdir%"/bin/$board"}/bin/${relname}_${board}.tar.xz" \
- "$archive" || $err "'$archive' -> Can't overwrite - $dontflash"; :
-}
-
-prep_rom()
-{
- _xrom="$1"
- _xromname="${1##*/}"
- _xromnew="${_xrom%/*}/${_xromname#"$vfix"}"
- [ "$nukemode" = "nuke" ] && _xromnew="${_xrom%/*}/$vfix${_xrom##*/}"
-
- e "$_xrom" f missing && return 0
- [ -z "${_xromname#"$vfix"}" ] && $err "$_xromname / $vfix: name match"
-
- # Remove the prefix and 1-byte pad
- if [ "$nukemode" != "nuke" ] && \
- [ "${_xromname#"$vfix"}" != "$_xromname" ]; then
- xromsize="$(expr $(stat -c '%s' "$_xrom") - 1)" || $err "!int"
- [ $xromsize -lt 524288 ] && $err "too small, $xromsize: $_xrom"
-
- x_ dd if="$_xrom" of="$_xromnew" bs=$xromsize count=1
- rm -f "$_xrom" || $err "Can't rm $_xrom - $dontflash"
+ readkconfig || exit 0
- _xrom="$_xromnew"
- fi
-
- [ "$nukemode" = "nuke" ] && mksha512sum "$_xrom" "vendorhashes"
-
- patch_rom "$_xrom" || return 1 # if break return, can still change MAC
- [ "$nukemode" != "nuke" ] && return 0
-
- # Rename the file, prefixing a warning saying not to flash
- cat "$_xrom" config/data/coreboot/0 > "$_xromnew" || $err "!pad $_xrom"
- x_ rm -f "$_xrom"
+ [ -n "$new_mac" ] && [ -n "$CONFIG_GBE_BIN_PATH" ] && modify_mac; :
}
-patch_rom()
+readkconfig()
{
- rom="$1"
-
- if [ "$has_hashes" != "y" ] && [ "$nukemode" != "nuke" ]; then
- printf "'%s' has no hash file. Skipping.\n" "$archive" 1>&2
- return 1
- elif [ "$has_hashes" = "y" ] && [ "$nukemode" = "nuke" ]; then
- printf "'%s' has a hash file. Skipping nuke.\n" "$archive" 1>&2
- return 1
- fi
-
- [ -n "$CONFIG_HAVE_REFCODE_BLOB" ] && insert "fallback/refcode" \
- "$CONFIG_REFCODE_BLOB_FILE" "stage"
- [ "$CONFIG_HAVE_MRC" = "y" ] && insert "mrc.bin" "$CONFIG_MRC_FILE" \
- "mrc" "0xfffa0000"
- [ "$CONFIG_HAVE_ME_BIN" = "y" ] && insert IFD "$CONFIG_ME_BIN_PATH" me
- [ "$CONFIG_KBC1126_FIRMWARE" = "y" ] && insert ecfw1.bin \
- "$CONFIG_KBC1126_FW1" raw "$CONFIG_KBC1126_FW1_OFFSET" && insert \
- ecfw2.bin "$CONFIG_KBC1126_FW2" raw "$CONFIG_KBC1126_FW2_OFFSET"
- [ -n "$CONFIG_VGA_BIOS_FILE" ] && [ -n "$CONFIG_VGA_BIOS_ID" ] && \
- insert "pci$CONFIG_VGA_BIOS_ID.rom" "$CONFIG_VGA_BIOS_FILE" optionrom
- [ "$CONFIG_INCLUDE_SMSC_SCH5545_EC_FW" = "y" ] && \
- [ -n "$CONFIG_SMSC_SCH5545_EC_FW_FILE" ] && \
- insert sch5545_ecfw.bin "$CONFIG_SMSC_SCH5545_EC_FW_FILE" raw
- [ -z "$CONFIG_FSP_USE_REPO" ] && [ -z "$CONFIG_FSP_FULL_FD" ] && \
- [ -n "$CONFIG_FSP_M_FILE" ] && \
- insert "$CONFIG_FSP_M_CBFS" "$CONFIG_FSP_M_FILE" fsp --xip
- [ -z "$CONFIG_FSP_USE_REPO" ] && [ -z "$CONFIG_FSP_FULL_FD" ] && \
- [ -n "$CONFIG_FSP_S_FILE" ] && \
- insert "$CONFIG_FSP_S_CBFS" "$CONFIG_FSP_S_FILE" fsp
-
- printf "ROM image successfully patched: %s\n" "$rom"
- xchanged="y"
+ x_ rm -f "$xbtmp/cbcfg"
+ fx_ scankconfig x_ find "$boarddir/config" -type f
+ eval "`setcfg "$xbtmp/cbcfg" 1`"
+ setvfile "$@" || return 1; :
}
-insert()
+scankconfig()
{
- [ "$2" = "/dev/null" ] && return 0
-
- cbfsname="$1"
- _dest="${2##*../}"
- _t="$3"
-
- _offset=""
-
- if [ "$_t" = "fsp" ] && [ $# -gt 3 ]; then
- _offset="$4"
- elif [ $# -gt 3 ] && _offset="-b $4" && [ -z "$4" ]; then
- $err "insert $*, $rom: offset given but empty (undefined)"
- fi
-
- [ "$nukemode" = "nuke" ] || x_ e "$_dest" f
-
- if [ "$cbfsname" = "IFD" ]; then
- [ "$nukemode" = "nuke" ] || "$ifdtool" $ifdprefix -i \
- $_t:$_dest "$rom" -O "$rom" || \
- $err "failed: insert '$_t' '$_dest' on '$rom'"
- [ "$nukemode" != "nuke" ] || "$ifdtool" $ifdprefix --nuke $_t \
- "$rom" -O "$rom" || $err "$rom: !nuke IFD/$_t"
- elif [ "$nukemode" = "nuke" ]; then
- x_ "$cbfstool" "$rom" remove -n "$cbfsname"
- elif [ "$_t" = "stage" ]; then # the only stage we handle is refcode
- x_ rm -f "$xbmklocal/refcode"
- "$rmodtool" -i "$_dest" -o "$xbmklocal/refcode" || "!reloc ref"
- "$cbfstool" "$rom" add-stage -f "$xbmklocal/refcode" \
- -n "$cbfsname" -t stage || $err "$rom: !add ref"
- else
- "$cbfstool" "$rom" add -f "$_dest" -n "$cbfsname" \
- -t $_t $_offset || $err "$rom !add $_t ($_dest)"
- fi
- xchanged="y"; :
+ for cbc in $cv; do
+ grep "$cbc" "$1" 1>>"$xbtmp/cbcfg" 2>/dev/null || :
+ done
}
modify_mac()
{
- [ -n "$CONFIG_GBE_BIN_PATH" ] || return 1
-
- x_ cp "${CONFIG_GBE_BIN_PATH##*../}" "$xbmklocal/gbe"
+ x_ cp "${CONFIG_GBE_BIN_PATH##*../}" "$xbloc/gbe"
[ -n "$new_mac" ] && [ "$new_mac" != "restore" ] && \
- x_ "$nvm" "$xbmklocal/gbe" setmac "$new_mac"
+ x_ make -C util/nvmutil clean && x_ make -C util/nvmutil && \
+ x_ "$nvm" "$xbloc/gbe" setmac "$new_mac"
- fe_ newmac "$tmpromdir" -maxdepth 1 -type f -name "*.rom"
+ fx_ newmac x_ find "$tmpromdir" -maxdepth 1 -type f -name "*.rom"
- printf "\nGbE NVM written to '%s':\n" "$archive"
- x_ "$nvm" "$xbmklocal/gbe" dump | grep -v "bytes read from file" || :
+ printf "\nThe following GbE NVM data will be written:\n"
+ x_ "$nvm" "$xbloc/gbe" dump | grep -v "bytes read from file" || :
}
newmac()
{
e "$1" f && xchanged="y" && x_ \
- "$ifdtool" $ifdprefix -i GbE:"$xbmklocal/gbe" "$1" -O "$1"; :
+ "$ifdtool" $ifdprefix -i GbE:"$xbloc/gbe" "$1" -O "$1"; :
+}
+
+remktar()
+{
+ (
+ x_ cd "${tmpromdir%"/bin/$board"}"
+ printf "Re-building tar archive (please wait)\n"
+ mkrom_tarball "bin/$board" 1>/dev/null
+ ) || err "Cannot re-generate '$archive'"
+
+ mv "${tmpromdir%"/bin/$board"}/bin/${relname}_${board}.tar.xz" \
+ "$archive" || err "'$archive' -> Can't overwrite"; :
}
diff --git a/include/lib.sh b/include/lib.sh
index d58716c3..b40772fa 100644
--- a/include/lib.sh
+++ b/include/lib.sh
@@ -4,8 +4,8 @@
# Copyright (c) 2020-2025 Leah Rowe <leah@libreboot.org>
# Copyright (c) 2025 Alper Nebi Yasak <alpernebiyasak@gmail.com>
-cbfstool="elf/cbfstool/default/cbfstool"
-rmodtool="elf/cbfstool/default/rmodtool"
+cbfstool="elf/coreboot/default/cbfstool"
+rmodtool="elf/coreboot/default/rmodtool"
remkdir()
{
@@ -15,75 +15,22 @@ remkdir()
mkrom_tarball()
{
- printf "%s\n" "$version" > "$1/.version" || $err "$1 !version"
- printf "%s\n" "$versiondate" > "$1/.versiondate" || $err "$1 !vdate"
-
+ update_xbmkver "$1"
mktarball "$1" "${1%/*}/${relname}_${1##*/}.tar.xz"
x_ rm -Rf "$1"
}
-mktarball()
-{
- printf "Creating tar archive '%s' from directory '%s'\n" "$2" "$1"
- [ "${2%/*}" = "$2" ] || x_ mkdir -p "${2%/*}"
- x_ tar -c "$1" | xz -T$XBMK_THREADS -9e > "$2" || $err "mktarball2, $1"
-}
-
-mksha512sum()
-{
- (
- [ "${1%/*}" != "$1" ] && x_ cd "${1%/*}"
- sha512sum ./"${1##*/}" >> "$2" || $err "!sha512sum \"$1\" > \"$2\""
- ) || $err "failed to create tarball checksum"
-}
-
-rmgit()
+update_xbmkver()
{
- x_ find "$1" -name ".git" -exec rm -Rf {} +
- x_ find "$1" -name ".gitmodules" -exec rm -Rf {} +
+ printf "%s\n" "$version" > "$1/.version" || err "$1 !version"; :
+ printf "%s\n" "$versiondate" > "$1/.versiondate" || err "$1 !vdate"; :
}
-# can grab from the internet, or copy locally.
-# if copying locally, it can only copy a file.
-xbmkget()
-{
- _ua="Mozilla/5.0 (Windows NT 10.0; rv:91.0) Gecko/20100101 Firefox/91.0"
-
- _dlop="curl" && [ $# -gt 4 ] && _dlop="$5"
- cached="$XBMK_CACHE/file/$4"
- dl_fail="n" # 1 url, 2 url backup, 3 destination, 4 checksum
- bad_checksum "$4" "$cached" 2>/dev/null && dl_fail="y"
- [ "$dl_fail" = "n" ] && e "$3" f && return 0
- x_ mkdir -p "${3%/*}" "$XBMK_CACHE/file"
- for url in "$1" "$2"; do
- [ "$dl_fail" = "n" ] && break
- [ -z "$url" ] && continue
- rm -f "$cached" || $err "!rm -f '$cached'"
- if [ "$_dlop" = "curl" ]; then
- curl --location --retry 3 -A "$_ua" "$url" \
- -o "$cached" || wget --tries 3 -U "$_ua" "$url" \
- -O "$cached" || continue
- elif [ "$_dlop" = "copy" ]; then
- [ -L "$url" ] && \
- printf "dl %s %s %s %s: '%s' is a symlink\n" \
- "$1" "$2" "$3" "$4" "$url" 1>&2 && continue
- [ ! -f "$url" ] && \
- printf "dl %s %s %s %s: '%s' not a file\n" \
- "$1" "$2" "$3" "$4" "$url" 1>&2 && continue
- cp "$url" "$cached" || continue
- else
- $err "$1 $2 $3 $4: Unsupported dlop type: '$_dlop'"
- fi
- bad_checksum "$4" "$cached" || dl_fail="n"
- done
- [ "$dl_fail" = "y" ] && $err "$1 $2 $3 $4: not downloaded"
- [ "$cached" = "$3" ] || x_ cp "$cached" "$3"; :
-}
-
-bad_checksum()
+mktarball()
{
- [ "$(sha512sum "$2" | awk '{print $1}')" != "$1" ] || return 1
- printf "Bad checksum for file: %s\n" "$2" 1>&2; rm -f "$2" || :; :
+ printf "Creating tar archive '%s' from directory '%s'\n" "$2" "$1"
+ [ "${2%/*}" = "$2" ] || x_ mkdir -p "${2%/*}"
+ x_ tar -c "$1" | xz -T$XBMK_THREADS -9e > "$2" || err "mktarball2, $1"
}
e()
@@ -97,67 +44,81 @@ e()
printf "%s %s\n" "$1" "$es2" 1>&2
}
-mk()
-{
- mk_flag="$1" || $err "No argument given"
- shift 1 && for mk_arg in "$@"; do
- x_ ./mk $mk_flag $mk_arg
- done; :
-}
-
-check_defconfig()
-{
- [ -d "$1" ] || $err "Target '$1' not defined."
- for x in "$1"/config/*; do
- [ -f "$x" ] && printf "%s\n" "$x" && return 1
- done; :
-}
-
setvars()
{
_setvars=""
if [ $# -lt 2 ]; then
- printf "\$err \"setvars: too few args\\n\""
+ printf "err \"setvars: too few args\\n\""
return 0
fi
val="$1"
shift 1
- for var in "$@"; do
- _setvars="$var=\"$val\"; $_setvars"
+ while [ $# -gt 0 ]; do
+ printf "%s=\"%s\"\n" "$1" "$val"
+ shift 1
done
- printf "%s\n" "${_setvars% }"
}
-fe_()
+setcfg()
{
- find_ex "x_" "$@"
+ [ $# -gt 1 ] && printf "e \"%s\" f missing && return %s;\n" "$1" "$2"
+ [ $# -gt 1 ] || \
+ printf "e \"%s\" f not && err \"Missing config\";\n" "$1"
+ printf ". \"%s\" || err \"Could not read config\";\n" "$1"
}
-fx_()
+chkvars()
{
- find_ex "" "$@"
+ while [ $# -gt 0 ]; do
+ eval "[ -n \"\${$1+x}\" ] || err \"$1 unset\""
+ eval "[ -n \"\$$1\" ] || err \"$1 unset\"; shift 1; :"
+ done; :
}
-find_ex()
+# return 0 if project is single-tree, otherwise 1
+# e.g. coreboot is multi-tree, so 1
+singletree()
+{
+ ( fx_ "eval exit 1 && err" find "config/$1/"*/ -type f \
+ -name "target.cfg" ) || return 1; :
+}
+
+findpath()
+{
+ [ $# -gt 0 ] || err "findpath: No arguments provided"
+ while [ $# -gt 0 ]; do
+ found="`readlink -f "$1" 2>/dev/null`" || return 1; :
+ [ -n "$found" ] || found="`realpath "$1" 2>/dev/null`" || \
+ return 1; :
+ printf "%s\n" "$found"
+ shift 1
+ done
+}
+
+fx_()
{
- errx="$1" && shift 1
fd="`mktemp`" && x_ rm -f "$fd" && x_ touch "$fd"
xx="$1" && shift 1
- $errx find "$@" 2>/dev/null | sort > "$fd" || \
- $err "!find $(echo "$@") > \"$fd\""
- while read -r fx; do
- "$xx" "$fx" || break; :
- done < "$fd"
+ "$@" 2>/dev/null | sort 1>"$fd" 2>/dev/null || err "FATAL: !sort fx_"
+ dx_ "$xx" "$fd" || break
x_ rm -f "$fd"
}
+dx_()
+{
+ [ ! -f "$2" ] || while read -r fx; do
+ $1 "$fx" || return 1; :
+ done < "$2" || err "dx_ $*: cannot read '$2'"; :
+}
+
x_()
{
- [ $# -lt 1 ] || "$@" || $err "Unhandled error for: $(echo "$@")"; :
+ [ $# -lt 1 ] || [ -n "$1" ] || err "Empty first arg: x_ $(echo "$@")"
+ [ $# -lt 1 ] || "$@" || err "Unhandled error for: $(echo "$@")"; :
}
-err_()
+err()
{
- printf "ERROR %s: %s\n" "$0" "$1" 1>&2
+ [ $# -lt 1 ] || printf "ERROR %s: %s\n" "$0" "$1" 1>&2 || :
exit 1
}
diff --git a/include/mrc.sh b/include/mrc.sh
index eaf39dcb..775831f8 100644
--- a/include/mrc.sh
+++ b/include/mrc.sh
@@ -1,43 +1,32 @@
# SPDX-License-Identifier: GPL-2.0-only
# Logic based on util/chromeos/crosfirmware.sh in coreboot cfc26ce278.
-# Modifications in this version are Copyright 2021, 2023 and 2024 Leah Rowe.
+# Modifications in this version are Copyright 2021,2023-2025 Leah Rowe.
# Original copyright detailed in repo: https://review.coreboot.org/coreboot/
eval "`setvars "" MRC_url MRC_url_bkup MRC_hash MRC_board SHELLBALL`"
-extract_mrc()
-{
- extract_shellball
-
- "$cbfstool" "$appdir/"bios.bin extract -n mrc.bin \
- -f "$_dest" -r RO_SECTION || $err "extract_mrc: !$cbfstool $_dest"
-
- [ -n "$CONFIG_REFCODE_BLOB_FILE" ] && extract_refcode extra; :
-}
-
extract_refcode()
{
- _refdest="${CONFIG_REFCODE_BLOB_FILE##*../}"
- e "$_refdest" f && return 0
-
- [ $# -lt 1 ] && extract_shellball
+ extract_mrc
- # cbfstool changed the attributes scheme for stage files,
- # incompatible with older versions before coreboot 4.14,
- # so we need coreboot 4.13 cbfstool for certain refcode files
+ # cbfstool after coreboot 4.13 changed the stage file attribute scheme,
+ # and refcode is extracted from an image using the old scheme. we use
+ # cbfstool from coreboot 4.11_branch, the tree used by ASUS KGPE-D16
chkvars cbfstoolref
- mkdir -p "${_refdest%/*}" || $err "ref: !mkdir -p ${_refdest%/*}"
+ x_ mkdir -p "${_pre_dest%/*}"
x_ "$cbfstoolref" "$appdir/bios.bin" extract \
- -m x86 -n fallback/refcode -f "$_refdest" -r RO_SECTION
+ -m x86 -n fallback/refcode -f "$appdir/ref" -r RO_SECTION
# enable the Intel GbE device, if told by offset MRC_refcode_gbe
[ -z "$MRC_refcode_gbe" ] || x_ dd if="config/ifd/hp820g2/1.bin" \
- of="$_refdest" bs=1 seek=$MRC_refcode_gbe count=1 conv=notrunc; :
+ of="$appdir/ref" bs=1 seek=$MRC_refcode_gbe count=1 conv=notrunc; :
+
+ x_ mv "$appdir/ref" "$_pre_dest"
}
-extract_shellball()
+extract_mrc()
{
chkvars "MRC_board" "CONFIG_MRC_FILE"
SHELLBALL="chromeos-firmwareupdate-$MRC_board"
@@ -46,7 +35,10 @@ extract_shellball()
x_ cd "$appdir"
extract_partition "${MRC_url##*/}"
extract_archive "$SHELLBALL" .
- ) || $err "mrc download/extract failure"; :
+ ) || err "mrc download/extract failure"
+
+ x_ "$cbfstool" "$appdir/"bios.bin extract -n mrc.bin \
+ -f "${_pre_dest%/*}/mrc.bin" -r RO_SECTION
}
extract_partition()
@@ -58,9 +50,9 @@ extract_partition()
START=$(( $( echo $ROOTP | cut -f2 -d\ | tr -d "B" ) ))
SIZE=$(( $( echo $ROOTP | cut -f4 -d\ | tr -d "B" ) ))
- dd if="${1%.zip}" of="root-a.ext2" bs=1024 skip=$(( $START / 1024 )) \
- count=$(( $SIZE / 1024 )) || $err "ex dd ${1%.zip}, root-a.ext2"
+ x_ dd if="${1%.zip}" of="root-a.ext2" bs=1024 skip=$(( $START / 1024 )) \
+ count=$(( $SIZE / 1024 ))
printf "cd /usr/sbin\ndump chromeos-firmwareupdate %s\nquit" \
- "$SHELLBALL" | debugfs "root-a.ext2" || $err "!extract shellball"
+ "$SHELLBALL" | debugfs "root-a.ext2" || err "!extract shellball"
}
diff --git a/include/release.sh b/include/release.sh
new file mode 100644
index 00000000..912687dc
--- /dev/null
+++ b/include/release.sh
@@ -0,0 +1,88 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
+# Copyright (c) 2023-2025 Leah Rowe <leah@libreboot.org>
+
+eval "`setvars "" reldir reldest vdir rsrc relmode`"
+
+release()
+{
+ export XBMK_RELEASE="y"
+
+ reldir="release"
+
+ while getopts d:m: option; do
+ [ -z "$OPTARG" ] && err "empty argument not allowed"
+ case "$option" in
+ d) reldir="$OPTARG" ;;
+ m) relmode="$OPTARG" ;;
+ *) err "invalid option '-$option'" ;;
+ esac
+ done
+
+ reldest="$reldir/$version"
+ [ -e "$reldest" ] && \
+ err "already exists: \"$reldest\""
+
+ vdir="$XBMK_CACHE/relpwd/${xbtmp##*/}/$version"
+ rsrc="$vdir/${relname}_src"
+
+ remkdir "$vdir"
+ x_ git clone . "$rsrc"
+ update_xbmkver "$rsrc"
+
+ prep_release src
+ prep_release tarball
+ [ "$relmode" = "src" ] || prep_release bin
+ x_ rm -Rf "$rsrc"
+
+ x_ mkdir -p "$reldir"
+ x_ mv "$vdir" "$reldir"
+ x_ rm -Rf "${vdir%"/$version"}"
+
+ printf "\n\nDONE! Check release files under %s\n" "$reldest"
+}
+
+prep_release()
+{
+ x_ touch "$rsrc/lock"
+ (
+ [ "$1" = "tarball" ] || x_ cd "$rsrc"
+ prep_release_$1
+ ) || err "can't prep release $1"
+}
+
+prep_release_src()
+{
+ x_ ./mk -f
+ fx_ "x_ rm -Rf" x_ find . -name ".git"
+ fx_ "x_ rm -Rf" x_ find . -name ".gitmodules"
+ ( fx_ nuke x_ find config -type f -name "nuke.list" ) || err; :
+}
+
+nuke()
+{
+ r="$rsrc/src/${1#config/}"
+ [ -d "${r%/*}" ] && x_ cd "${r%/*}" && \
+ dx_ "eval [ -L \"\$fx\" ] || x_ rm -Rf" "$rsrc/$1"; :
+}
+
+prep_release_tarball()
+{
+ git log --graph --pretty=format:'%Cred%h%Creset %s %Creset' \
+ --abbrev-commit > "$rsrc/CHANGELOG" || err "!log $rsrc"
+ x_ rm -f "$rsrc/lock"
+ x_ rm -Rf "$rsrc/cache" "$rsrc/tmp"
+ (
+ x_ cd "${rsrc%/*}"
+ x_ mktarball "${rsrc##*/}" "${rsrc##*/}.tar.xz"
+ ) || err "can't create src tarball"; :
+}
+
+prep_release_bin()
+{
+ x_ ./mk -d coreboot
+ fx_ "x_ ./mk -b" printf \
+ "coreboot\npico-serprog\nstm32-vserprog\npcsx-redux\n"
+
+ fx_ mkrom_tarball x_ find bin -maxdepth 1 -type d -name "serprog_*"
+ x_ mv bin ../roms
+}
diff --git a/include/rom.sh b/include/rom.sh
index f74912af..c1b78c75 100644
--- a/include/rom.sh
+++ b/include/rom.sh
@@ -7,35 +7,27 @@
grubdata="config/data/grub"
-mkserprog()
+buildser()
{
- [ "$_f" = "-d" ] && return 0 # dry run
- basename -as .h "$serdir/"*.h > "$xbmktmp/ser" || \
- $err "!mk $1 $xbmktmp"
-
- while read -r sertarget; do
- [ "$1" = "pico" ] && x_ cmake -DPICO_BOARD="$sertarget" \
- -DPICO_SDK_PATH="$picosdk" -B "$sersrc/build" "$sersrc" \
- && x_ cmake --build "$sersrc/build"
- [ "$1" = "stm32" ] && x_ make -C "$sersrc" \
- libopencm3-just-make BOARD=$sertarget && x_ make -C \
- "$sersrc" BOARD=$sertarget
- x_ mkdir -p "bin/serprog_$1"
- x_ mv "$serx" "bin/serprog_$1/serprog_$sertarget.${serx##*.}"
- done < "$xbmktmp/ser"
-
- [ "$XBMK_RELEASE" = "y" ] && mkrom_tarball "bin/serprog_$1"; :
+ [ "$1" = "pico" ] && x_ cmake -DPICO_BOARD="$2" \
+ -DPICO_SDK_PATH="$picosdk" -B "$sersrc/build" "$sersrc" && \
+ x_ cmake --build "$sersrc/build"
+ [ "$1" = "stm32" ] && x_ make -C "$sersrc" libopencm3-just-make \
+ BOARD=$2 && x_ make -C "$sersrc" BOARD=$2
+ x_ mkdir -p "bin/serprog_$1"
+ x_ mv "$serx" "bin/serprog_$1/serprog_$2.${serx##*.}"
}
copyps1bios()
{
- x_ rm -Rf bin/playstation
- x_ mkdir -p bin/playstation
+ [ "$dry" = ":" ] && return 0; :
+
+ remkdir "bin/playstation"
x_ cp src/pcsx-redux/src/mips/openbios/openbios.bin bin/playstation
printf "MIT License\n\nCopyright (c) 2019-2024 PCSX-Redux authors\n\n" \
- > bin/playstation/COPYING.txt || $err "!pcsx-redux copyright"
- cat config/snippet/mit >>bin/playstation/COPYING.txt || $err "!pcsx MIT"
+ > bin/playstation/COPYING.txt || err "!pcsx-redux copyright"
+ cat config/snippet/mit >>bin/playstation/COPYING.txt || err "!pcsx MIT"
}
mkpayload_grub()
@@ -51,75 +43,61 @@ mkpayload_grub()
"/boot/grub/grub.cfg=$grubdata/memdisk.cfg"; :
}
-mkvendorfiles()
+corebootpremake()
{
- [ -z "$mode" ] && $dry cook_coreboot_config
- check_coreboot_utils "$tree"
+ [ -n "$mode" ] || [ ! -f "$srcdir/.config" ] || $dry printf \
+ "CONFIG_CCACHE=y\n" >> "$srcdir/.config" || err "$srcdir: !cook"; :
+ fx_ check_coreboot_util printf "cbfstool\nifdtool\n"
printf "%s\n" "${version%%-*}" > "$srcdir/.coreboot-version" || \
- $err "!mk $srcdir .coreboot-version"
+ err "!mk $srcdir .coreboot-version"
[ -z "$mode" ] && [ "$target" != "$tree" ] && \
x_ ./mk download "$target"; :
}
-cook_coreboot_config()
-{
- [ -f "$srcdir/.config" ] || return 0
- printf "CONFIG_CCACHE=y\n" >> "$srcdir/.config" || \
- $err "$srcdir/.config: Could not enable ccache"
- make -C "$srcdir" oldconfig || $err "Could not cook $srcdir/.config"; :
-}
-
-check_coreboot_utils()
+check_coreboot_util()
{
- for util in cbfstool ifdtool; do
- [ "$badhash" = "y" ] && x_ rm -f "elf/$util/$1/$util"
- e "elf/$util/$1/$util" f && continue
-
- utilelfdir="elf/$util/$1"
- utilsrcdir="src/coreboot/$1/util/$util"
-
- utilmode="" && [ -n "$mode" ] && utilmode="clean"
- x_ make -C "$utilsrcdir" $utilmode -j$XBMK_THREADS $makeargs
- if [ -z "$mode" ] && [ ! -f "$utilelfdir/$util" ]; then
- x_ mkdir -p "$utilelfdir"
- x_ cp "$utilsrcdir/$util" "$utilelfdir"
- [ "$util" = "cbfstool" ] || continue
- x_ cp "$utilsrcdir/rmodtool" "$utilelfdir"
- elif [ -n "$mode" ]; then
- x_ rm -Rf "$utilelfdir"
- fi; :
- done; :
+ [ "$badhash" = "y" ] && x_ rm -f "elf/coreboot/$tree/$1"
+ e "elf/coreboot/$tree/$1" f && return 0
+
+ utilelfdir="elf/coreboot/$tree"
+ utilsrcdir="src/coreboot/$tree/util/$1"
+
+ utilmode="" && [ -n "$mode" ] && utilmode="clean"
+ x_ make -C "$utilsrcdir" $utilmode -j$XBMK_THREADS $makeargs
+ [ -n "$mode" ] && x_ rm -Rf "$utilelfdir" && return 0
+ [ -z "$mode" ] || return 0
+ [ -f "$utilelfdir/$1" ] && return 0
+
+ x_ mkdir -p "$utilelfdir"
+ x_ cp "$utilsrcdir/$1" "$utilelfdir"
+ [ "$1" = "cbfstool" ] || return 0
+ x_ cp "$utilsrcdir/rmodtool" "$utilelfdir"
}
mkcorebootbin()
{
[ "$target" = "$tree" ] && return 0
- tmprom="$xbmktmp/coreboot.rom"
+ tmprom="$xbtmp/coreboot.rom"
$dry x_ cp "$srcdir/build/coreboot.rom" "$tmprom"
initmode="${defconfig##*/}"
displaymode="${initmode##*_}"
[ "$displaymode" = "$initmode" ] && displaymode="" # "normal" config
initmode="${initmode%%_*}"
- cbfstool="elf/cbfstool/$tree/cbfstool"
+ cbfstool="elf/coreboot/$tree/cbfstool"
- [ "$payload_uboot_i386" = "y" ] && \
- [ "$payload_uboot_amd64" = "y" ] && \
- $err "'$target' enables 32- and 64-bit x86 U-Boot"
+ [ -z "$payload_uboot" ] || [ "$payload_uboot" = "amd64" ] || \
+ [ "$payload_uboot" = "i386" ] || [ "$payload_uboot" = "arm64" ] \
+ || err "'$target' defines bad u-boot type '$payload_uboot'"
- if [ "$payload_uboot_i386" = "y" ] || \
- [ "$payload_uboot_amd64" = "y" ]; then
- printf "'%s' has x86 U-Boot; assuming SeaBIOS=y\n" \
- "$target" 1>&2
+ [ -z "$payload_uboot" ] || [ "$payload_uboot" = "arm64" ] || \
payload_seabios="y"
- fi
[ -n "$uboot_config" ] || uboot_config="default"
- [ "$payload_uboot" = "y" ] || payload_seabios="y"
[ "$payload_grub" = "y" ] && payload_seabios="y"
- [ "$payload_seabios" = "y" ] && [ "$payload_uboot" = "y" ] && \
- $dry $err "$target: U-Boot(arm64) and SeaBIOS/GRUB both enabled."
+ [ "$payload_seabios" = "y" ] && [ "$payload_uboot" = "arm64" ] && \
+ $dry err "$target: U-Boot(arm64) and SeaBIOS/GRUB both enabled."
[ -z "$grub_scan_disk" ] && grub_scan_disk="nvme ahci ata"
@@ -136,7 +114,8 @@ mkcorebootbin()
if $dry grep "CONFIG_PAYLOAD_NONE=y" "$defconfig"; then
[ "$payload_seabios" = "y" ] && pname="seabios" && \
$dry add_seabios
- [ "$payload_uboot" = "y" ] && pname="uboot" && $dry add_uboot
+ [ "$payload_uboot" = "arm64" ] && pname="uboot" && \
+ $dry add_uboot; :
else
pname="custom"
$dry cprom
@@ -145,10 +124,8 @@ mkcorebootbin()
add_seabios()
{
- if [ "$payload_uboot_i386" = "y" ] || \
- [ "$payload_uboot_amd64" = "y" ]; then
- $dry add_uboot
- fi
+ [ -z "$payload_uboot" ] || [ "$payload_uboot" = "arm64" ] || \
+ $dry add_uboot
_seabioself="elf/seabios/default/$initmode/bios.bin.elf"
_seaname="fallback/payload" && [ "$payload_grubsea" = "y" ] && \
@@ -169,7 +146,7 @@ add_seabios()
[ "$payload_grub" = "y" ] && add_grub
[ "$payload_grubsea" != "y" ] && cprom
- [ "$payload_uboot_amd64" = "y" ] && [ "$displaymode" != "txtmode" ] && \
+ [ "$payload_uboot" = "amd64" ] && [ "$displaymode" != "txtmode" ] && \
[ "$initmode" != "normal" ] && [ "$payload_grubsea" != "y" ] && \
pname="seauboot" && cprom "seauboot"
[ "$payload_grub" = "y" ] && pname="seagrub" && mkseagrub; :
@@ -181,8 +158,8 @@ add_grub()
_grubname="fallback/payload"
cbfs "$tmprom" "$grubelf" "$_grubname"
printf "set grub_scan_disk=\"%s\"\n" "$grub_scan_disk" \
- > "$xbmktmp/tmpcfg" || $err "$target: !insert scandisk"
- cbfs "$tmprom" "$xbmktmp/tmpcfg" scan.cfg raw
+ > "$xbtmp/tmpcfg" || err "$target: !insert scandisk"
+ cbfs "$tmprom" "$xbtmp/tmpcfg" scan.cfg raw
[ "$initmode" != "normal" ] && [ "$displaymode" != "txtmode" ] && \
cbfs "$tmprom" "$grubdata/background/background1280x800.png" \
"background.png" raw; :
@@ -193,9 +170,7 @@ mkseagrub()
[ "$payload_grubsea" = "y" ] && pname="grub"
[ "$payload_grubsea" = "y" ] || \
cbfs "$tmprom" "$grubdata/bootorder" bootorder raw
- for keymap in config/data/grub/keymap/*.gkb; do
- [ -f "$keymap" ] && cprom "${keymap##*/}"; :
- done; :
+ fx_ cprom x_ find "$grubdata/keymap" -type f -name "*.gkb"
}
add_uboot()
@@ -218,14 +193,13 @@ add_uboot()
ubpath="fallback/payload"
ubtarget="$target"
# override for x86/x86_64 targets:
- if [ "$payload_uboot_i386" = "y" ] || \
- [ "$payload_uboot_amd64" = "y" ]; then
+ if [ -n "$payload_uboot" ] && [ "$payload_uboot" != "arm64" ]; then
ubcbfsargs="-l 0x1110000 -e 0x1110000" # 64-bit and 32-bit
# on 64-bit, 0x1120000 is the SPL, and stub before that
ubpath="img/u-boot" # 64-bit
ubtarget="amd64coreboot"
- [ "$payload_uboot_i386" = "y" ] && ubpath="u-boot" # 32-bit
- [ "$payload_uboot_i386" = "y" ] && ubtarget="i386coreboot"; :
+ [ "$payload_uboot" = "i386" ] && ubpath="u-boot" # 32-bit
+ [ "$payload_uboot" = "i386" ] && ubtarget="i386coreboot"; :
fi
ubdir="elf/u-boot/$ubtarget/$uboot_config"
@@ -234,8 +208,8 @@ add_uboot()
ubootelf="$ubdir/u-boot.elf" && [ ! -f "$ubootelf" ] && \
ubootelf="$ubdir/u-boot"
# override for x86/x86_64 targets:
- [ "$payload_uboot_i386" = "y" ] && ubootelf="$ubdir/u-boot-dtb.bin"
- [ "$payload_uboot_amd64" = "y" ] && \
+ [ "$payload_uboot" = "i386" ] && ubootelf="$ubdir/u-boot-dtb.bin"
+ [ "$payload_uboot" = "amd64" ] && \
ubootelf="$ubdir/u-boot-x86-with-spl.bin" # EFI-compatible
cbfs "$tmprom" "$ubootelf" "$ubpath" $ubcbfsargs
@@ -244,16 +218,25 @@ add_uboot()
cprom()
{
- newrom="bin/$target/${pname}_${target}_$initmode.rom"
+ cpcmd="cp"
+
+ tmpnew=""; newrom="bin/$target/${pname}_${target}_$initmode.rom"
[ -n "$displaymode" ] && newrom="${newrom%.rom}_$displaymode.rom"
- [ $# -gt 0 ] && [ "$1" != "seauboot" ] && \
- newrom="${newrom%.rom}_${1%.gkb}.rom"
+ [ $# -gt 0 ] && [ "${1%.gkb}" != "$1" ] && tmpnew="${1##*/}" && \
+ newrom="${newrom%.rom}_${tmpnew%.gkb}.rom"
- x_ mkdir -p "bin/$target"
- x_ cp "$tmprom" "$newrom" && [ $# -gt 0 ] && [ "$1" != "seauboot" ] && \
- cbfs "$newrom" "config/data/grub/keymap/$1" keymap.gkb raw
+ irom="$tmprom"
+ [ $# -lt 1 ] || irom="`mktemp`" || err "!mk irom, $(echo "$@")"
+ [ $# -gt 0 ] && x_ cp "$tmprom" "$irom" && cpcmd="mv"
+
+ [ $# -gt 0 ] && [ "${1%.gkb}" != "$1" ] && \
+ cbfs "$irom" "$grubdata/keymap/$tmpnew" keymap.gkb raw
[ $# -gt 0 ] && [ "$1" = "seauboot" ] && \
- cbfs "$newrom" "config/data/grub/bootorder_uboot" bootorder raw; :
+ cbfs "$irom" "$grubdata/bootorder_uboot" bootorder raw; :
+
+ printf "Creating new %s image: '%s'\n" "$projectname" "$newrom"
+ x_ mkdir -p "bin/$target"
+ x_ $cpcmd "$irom" "$newrom"
}
cbfs()
@@ -270,10 +253,7 @@ cbfs()
mkcoreboottar()
{
- [ "$target" = "$tree" ] && return 0
- [ "$XBMK_RELEASE" = "y" ] || return 0
- [ "$release" != "n" ] || return 0
-
- $dry mkrom_tarball "bin/$target"
- $dry x_ ./mk inject "bin/${relname}_${target}.tar.xz" nuke; :
+ [ "$target" != "$tree" ] && [ "$XBMK_RELEASE" = "y" ] && \
+ [ "$release" != "n" ] && $dry mkrom_tarball "bin/$target" && \
+ $dry x_ ./mk inject "bin/${relname}_${target}.tar.xz" nuke; :
}
diff --git a/include/tree.sh b/include/tree.sh
new file mode 100644
index 00000000..85f97101
--- /dev/null
+++ b/include/tree.sh
@@ -0,0 +1,343 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
+# Copyright (c) 2022-2023 Alper Nebi Yasak <alpernebiyasak@gmail.com>
+# Copyright (c) 2022 Ferass El Hafidi <vitali64pmemail@protonmail.com>
+# Copyright (c) 2023-2025 Leah Rowe <leah@libreboot.org>
+
+eval "`setvars "" xarch srcdir premake gnatdir xlang mode makeargs elfdir cmd \
+ project target target_dir targets xtree _f release bootstrapargs mkhelper \
+ autoconfargs listfile autogenargs btype rev build_depend gccdir cmakedir \
+ defconfig postmake mkhelpercfg dry dest_dir mdir cleanargs gccver gccfull \
+ gnatver gnatfull do_make badhash tree`"
+
+trees()
+{
+ flags="f:b:m:u:c:x:s:l:n:d:"
+
+ while getopts $flags option; do
+ [ -n "$_f" ] && err "only one flag is permitted"
+ _f="$1"
+
+ case "$_f" in
+ -d) dry=":" ;;
+ -b) : ;;
+ -u) mode="oldconfig" ;;
+ -m) mode="menuconfig" ;;
+ -c) mode="distclean" ;;
+ -x) mode="crossgcc-clean" ;;
+ -f)
+ do_make="n"
+ dry=":" ;;
+ -s) mode="savedefconfig" ;;
+ -l) mode="olddefconfig" ;;
+ -n) mode="nconfig" ;;
+ *) err "invalid option '-$option'" ;;
+ esac
+
+ if [ -z "${OPTARG+x}" ]; then
+ shift 1
+ break
+ fi
+
+ project="${OPTARG#src/}"
+ project="${project#config/git/}"
+ shift 2
+ done
+ [ -z "$_f" ] && err "missing flag ($flags)"
+ [ -z "$project" ] && fx_ "x_ ./mk $_f" x_ ls -1 config/git && return 1
+
+ [ -f "config/git/$project/pkg.cfg" ] || \
+ err "config/git/$project/pkg.cfg missing"
+
+ for d in "elf" "config/data" "config" "src"; do
+ eval "${d#*/}dir=\"$d/$project\""
+ done
+ dest_dir="$elfdir"
+
+ listfile="$datadir/build.list"
+ [ -f "$listfile" ] || listfile="" # optional on all projects
+
+ mkhelpercfg="$datadir/mkhelper.cfg"
+ if e "$mkhelpercfg" f missing; then
+ mkhelpercfg="$xbtmp/mkhelper.cfg"
+ x_ touch "$mkhelpercfg"
+ fi
+
+ targets="$*"
+ cmd="build_targets $targets"
+ singletree "$project" && cmd="build_project"
+
+ remkdir "${tmpgit%/*}"
+}
+
+build_project()
+{
+ configure_project "$configdir" || return 0
+ [ ! -f "$listfile" ] || $dry elfcheck || return 0
+
+ [ "$mode" = "distclean" ] && mode="clean"
+ run_make_command || return 0
+
+ [ -n "$mode" ] || $dry copy_elf; :
+}
+
+build_targets()
+{
+ [ -d "$configdir" ] || err "directory, $configdir, does not exist"
+ [ $# -gt 0 ] || targets="$(ls -1 "$configdir")" || err "!o $configdir"
+
+ for x in $targets; do
+ unset CROSS_COMPILE
+ export PATH="$xbmkpath"
+ [ "$x" = "list" ] && x_ ls -1 "config/$project" && \
+ listfile="" && break
+
+ target="$x"
+ printf "'make %s', '%s', '%s'\n" "$mode" "$project" "$target"
+ x_ handle_defconfig
+
+ [ -n "$mode" ] || x_ $postmake
+ done; :
+}
+
+handle_defconfig()
+{
+ target_dir="$configdir/$target"
+
+ [ -f "CHANGELOG" ] || fetch_project "$project"
+ configure_project "$target_dir" || return 0
+
+ chkvars tree
+ srcdir="src/$project/$tree"
+
+ [ "$mode" = "${mode%clean}" ] && [ ! -d "$srcdir" ] && return 0
+
+ [ -z "$mode" ] && for _xarch in $xarch; do
+ $dry check_cross_compiler "$_xarch"
+ done; :
+
+ for y in "$target_dir/config"/*; do
+ [ "$_f" = "-d" ] || [ -f "$y" ] || continue
+ [ "$_f" = "-d" ] || defconfig="$y"
+
+ [ -n "$mode" ] || check_defconfig || continue
+ handle_makefile
+ [ -n "$mode" ] || $dry copy_elf
+ done; :
+}
+
+configure_project()
+{
+ eval "`setvars "" cleanargs build_depend autoconfargs xtree postmake \
+ makeargs btype mkhelper bootstrapargs premake release xlang xarch \
+ badhash`"
+ _tcfg="$1/target.cfg"
+ [ -f "$_tcfg" ] || btype="auto"
+ e "$datadir/mkhelper.cfg" f && eval "`setcfg "$datadir/mkhelper.cfg"`"
+
+ while e "$_tcfg" f || [ "$cmd" != "build_project" ]; do
+ eval "`setvars "" rev tree`"
+ eval "`setcfg "$_tcfg"`"
+ printf "Loading %s config: %s\n" "$project" "$_tcfg"
+
+ [ "$_f" = "-d" ] && build_depend="" # dry run
+ [ "$cmd" = "build_project" ] && break
+ [ "$do_make" != "n" ] && break
+
+ [ "${_tcfg%/*/target.cfg}" = "${_tcfg%"/$tree/target.cfg"}" ] \
+ && break
+ _tcfg="${_tcfg%/*/target.cfg}/$tree/target.cfg"
+ done
+ [ "$XBMK_RELEASE" = "y" ] && [ "$release" = "n" ] && return 1
+ [ -z "$btype" ] || [ "${mode%config}" = "$mode" ] || return 1
+ [ -z "$mode" ] && $dry build_dependencies
+
+ mdir="$xbmkpwd/config/submodule/$project"
+ [ -n "$tree" ] && mdir="$mdir/$tree"
+ [ -f "CHANGELOG" ] || check_project_hashes
+
+ if [ "$do_make" = "n" ]; then
+ [ -f "CHANGELOG" ] || fetch_${cmd#build_}
+ return 1
+ fi
+ x_ ./mk -f "$project" "$target"
+}
+
+build_dependencies()
+{
+ for bd in $build_depend; do
+ bd_p="${bd%%/*}"
+ bd_t="${bd##*/}"
+ [ -z "$bd_p" ] && $dry err "$project/$tree: !bd '$bd'"
+ [ "${bd##*/}" = "$bd" ] && bd_t=""
+ [ -z "$bd_p" ] || $dry x_ ./mk -b $bd_p $bd_t; :
+ done; :
+}
+
+check_project_hashes()
+{
+ old_pjhash="" && x_ mkdir -p "$XBMK_CACHE/hash"
+ [ ! -f "$XBMK_CACHE/hash/$project$tree" ] || \
+ read -r old_pjhash < "$XBMK_CACHE/hash/$project$tree" || \
+ err "old_pjhash: Can't read '$XBMK_CACHE/hash/$project$tree'"
+
+ fx_ "x_ sha512sum" find "$datadir" "$configdir/$tree" "$mdir" \
+ -type f -not -path "*/.git*/*" | awk '{print $1}' > \
+ "$xbtmp/project.hash" || err "!h $project $tree"
+
+ pjhash="$(x_ sha512sum "$xbtmp/project.hash" | awk '{print $1}' || \
+ err)" || err "pjhash: Can't read sha512 of '$xbtmp/project.hash'"
+ [ "$pjhash" != "$old_pjhash" ] && badhash="y"
+ [ -f "$XBMK_CACHE/hash/$project$tree" ] || badhash="y"
+
+ printf "%s\n" "$pjhash" > "$XBMK_CACHE/hash/$project$tree" || \
+ err "!mk $XBMK_CACHE/hash/$project$tree"
+
+ [ "$badhash" != "y" ] || x_ rm -Rf "src/$project/$tree" \
+ "elf/$project/$tree" "elf/$project/$target"; :
+}
+
+check_cross_compiler()
+{
+ cbdir="src/coreboot/$tree"
+ [ "$project" != "coreboot" ] && cbdir="src/coreboot/default"
+ [ -n "$xtree" ] && cbdir="src/coreboot/$xtree"
+
+ x_ ./mk -f coreboot "${cbdir#src/coreboot/}"
+
+ export PATH="$xbmkpwd/$cbdir/util/crossgcc/xgcc/bin:$PATH"
+ export CROSS_COMPILE="${xarch% *}-"
+ [ -n "$xlang" ] && export BUILD_LANGUAGES="$xlang"
+
+ # match gnat-X to gcc
+ check_gnu_path gcc gnat || x_ check_gnu_path gnat gcc
+
+ xfix="${1%-*}" && [ "$xfix" = "x86_64" ] && xfix="x64"
+ xgccargs="crossgcc-$xfix UPDATED_SUBMODULES=1 CPUS=$XBMK_THREADS"
+ make -C "$cbdir" $xgccargs || x_ make -C "$cbdir" $xgccargs
+
+ # we only want to mess with hostcc to build xgcc
+ remkdir "$XBMK_CACHE/gnupath"
+}
+
+# fix mismatching gcc/gnat versions on debian trixie/sid. as of december 2024,
+# trixie/sid had gnat-13 as gnat and gcc-14 as gcc, but has gnat-14 in apt. in
+# some cases, gcc 13+14 and gnat-13 are present; or gnat-14 and gcc-14, but
+# gnat in PATH never resolves to gnat-14, because gnat-14 was "experimental"
+check_gnu_path()
+{
+ command -v "$1" 1>/dev/null || err "Host '$1' unavailable"
+
+ eval "`setvars "" gccver gccfull gnatver gnatfull gccdir gnatdir`"
+ x_ gnu_setver "$1" "$1" || err "Command '$1' unavailable."
+ gnu_setver "$2" "$2" || :
+
+ eval "[ -z \"\$$1ver\" ] && err \"Cannot detect host '$1' version\""
+ [ "$gnatfull" = "$gccfull" ] && return 0
+
+ eval "$1dir=\"$(dirname "$(command -v "$1")")\""
+ eval "_gnudir=\"\$$1dir\"; _gnuver=\"\$$1ver\""
+ for _bin in "$_gnudir/$2-"*; do
+ [ "${_bin#"$_gnudir/$2-"}" = "$_gnuver" ] && [ -x "$_bin" ] \
+ && _gnuver="${_bin#"$_gnudir/$2-"}" && break; :
+ done
+ gnu_setver "$2" "$_gnudir/$2-$_gnuver" || return 1
+ [ "$gnatfull" = "$gccfull" ] || return 1
+
+ (
+ remkdir "$XBMK_CACHE/gnupath" && x_ cd "$XBMK_CACHE/gnupath"
+ for _gnubin in "$_gnudir/$2"*"-$_gnuver"; do
+ _gnuutil="${_gnubin##*/}" && [ -e "$_gnubin" ] && \
+ x_ ln -s "$_gnubin" "${_gnuutil%"-$_gnuver"}"
+ done
+ ) || err "Cannot create $2-$_gnuver link in $_gnudir"; :
+}
+
+gnu_setver()
+{
+ eval "$2 --version 1>/dev/null 2>/dev/null || return 1"
+ eval "$1ver=\"`"$2" --version 2>/dev/null | head -n1`\""
+ eval "$1ver=\"\${$1ver##* }\""
+ eval "$1full=\"\$$1ver\""
+ eval "$1ver=\"\${$1ver%%.*}\""; :
+}
+
+check_defconfig()
+{
+ [ -f "$defconfig" ] || $dry err "$project/$target: missing defconfig"
+ dest_dir="$elfdir/$target/${defconfig#"$target_dir/config/"}"
+
+ $dry elfcheck || return 1; : # skip build if a previous one exists
+}
+
+elfcheck()
+{
+ # TODO: *STILL* very hacky check. do it properly (based on build.list)
+ ( fx_ "eval exit 1 && err" find "$dest_dir" -type f ) || return 1; :
+}
+
+handle_makefile()
+{
+ $dry check_makefile "$srcdir" && \
+ $dry x_ make -C "$srcdir" $cleanargs clean
+
+ [ -f "$defconfig" ] && x_ cp "$defconfig" "$srcdir/.config"
+
+ run_make_command || err "handle_makefile $srcdir: no makefile!"
+
+ _copy=".config" && [ "$mode" = "savedefconfig" ] && _copy="defconfig"
+ [ "${mode%config}" = "$mode" ] || \
+ $dry x_ cp "$srcdir/$_copy" "$defconfig"
+
+ [ -e "$srcdir/.git" ] && [ "$project" = "u-boot" ] && \
+ [ "$mode" = "distclean" ] && \
+ $dry x_ git -C "$srcdir" $cleanargs clean -fdx; :
+}
+
+run_make_command()
+{
+ [ -n "$mode" ] || x_ $premake
+
+ $dry check_cmake "$srcdir" && [ -z "$mode" ] && \
+ $dry check_autoconf "$srcdir"
+ $dry check_makefile "$srcdir" || return 1
+
+ $dry x_ make -C "$srcdir" $mode -j$XBMK_THREADS $makeargs
+ [ -n "$mode" ] || x_ $mkhelper
+
+ check_makefile "$srcdir" || return 0
+ [ "$mode" != "clean" ] || \
+ $dry make -C "$srcdir" $cleanargs distclean || \
+ $dry x_ make -C "$srcdir" $cleanargs clean; :
+}
+
+check_cmake()
+{
+ [ -z "$cmakedir" ] || $dry check_makefile "$1" || cmake -B "$1" \
+ "$1/$cmakedir" || $dry x_ check_makefile "$1"
+ [ -z "$cmakedir" ] || $dry x_ check_makefile "$1"; :
+}
+
+check_autoconf()
+{
+ (
+ x_ cd "$1"
+ [ -f "bootstrap" ] && x_ ./bootstrap $bootstrapargs
+ [ -f "autogen.sh" ] && x_ ./autogen.sh $autogenargs
+ [ -f "configure" ] && x_ ./configure $autoconfargs; :
+ ) || err "can't bootstrap project: $1"; :
+}
+
+check_makefile()
+{
+ [ -f "$1/Makefile" ] || [ -f "$1/makefile" ] || \
+ [ -f "$1/GNUmakefile" ] || return 1; :
+}
+
+copy_elf()
+{
+ [ -f "$listfile" ] && x_ mkdir -p "$dest_dir"
+ [ ! -f "$listfile" ] || while read -r f; do
+ [ -f "$srcdir/$f" ] && x_ cp "$srcdir/$f" "$dest_dir"; :
+ done < "$listfile" || err "copy_elf $*: cannot read '$listfile'"; :
+ x_ make clean -C "$srcdir" $cleanargs
+}
diff --git a/include/vendor.sh b/include/vendor.sh
new file mode 100644
index 00000000..55373913
--- /dev/null
+++ b/include/vendor.sh
@@ -0,0 +1,402 @@
+# SPDX-License-Identifier: GPL-3.0-only
+# Copyright (c) 2022 Caleb La Grange <thonkpeasant@protonmail.com>
+# Copyright (c) 2022 Ferass El Hafidi <vitali64pmemail@protonmail.com>
+# Copyright (c) 2023-2025 Leah Rowe <leah@libreboot.org>
+
+# These are variables and functions, extending the functionality of
+# inject.sh, to be used with lbmk; they are kept separate here, so that
+# the main inject.sh can be as similar as possible between lbmk and cbmk,
+# so that cherry-picking lbmk patches into cbmk yields fewer merge conflicts.
+
+# When reading this file, you should imagine that it is part of inject.sh,
+# with inject.sh concatenated onto vendor.sh; they are inexorably intertwined.
+# The main "mk" script sources vendor.sh first, and then inject.sh, in lbmk.
+
+e6400_unpack="$xbmkpwd/src/bios_extract/dell_inspiron_1100_unpacker.py"
+me7updateparser="$xbmkpwd/util/me7_update_parser/me7_update_parser.py"
+pfs_extract="$xbmkpwd/src/biosutilities/Dell_PFS_Extract.py"
+uefiextract="$xbmkpwd/elf/uefitool/uefiextract"
+vendir="vendorfiles"
+appdir="$vendir/app"
+vfix="DO_NOT_FLASH_YET._FIRST,_INJECT_FILES_VIA_INSTRUCTIONS_ON_LIBREBOOT.ORG_"
+
+# lbmk-specific extension to the "cv" variable (not suitable for cbmk)
+cvchk="CONFIG_INCLUDE_SMSC_SCH5545_EC_FW CONFIG_HAVE_MRC CONFIG_HAVE_ME_BIN \
+ CONFIG_LENOVO_TBFW_BIN CONFIG_VGA_BIOS_FILE CONFIG_FSP_M_FILE \
+ CONFIG_FSP_S_FILE CONFIG_KBC1126_FW1 CONFIG_KBC1126_FW2"
+
+# lbmk-specific extensions to the "cv" variable (not suitable for cbmk)
+cvxbmk="CONFIG_ME_BIN_PATH CONFIG_SMSC_SCH5545_EC_FW_FILE CONFIG_FSP_FULL_FD \
+ CONFIG_KBC1126_FW1_OFFSET CONFIG_KBC1126_FW2_OFFSET CONFIG_FSP_USE_REPO \
+ CONFIG_VGA_BIOS_ID CONFIG_BOARD_DELL_E6400 CONFIG_FSP_S_CBFS \
+ CONFIG_HAVE_REFCODE_BLOB CONFIG_REFCODE_BLOB_FILE CONFIG_FSP_FD_PATH \
+ CONFIG_IFD_BIN_PATH CONFIG_MRC_FILE CONFIG_FSP_M_CBFS"
+
+# lbmk-specific extensions; mostly used for downloading vendor files
+eval "`setvars "" has_hashes EC_hash DL_hash DL_url_bkup MRC_refcode_gbe vcfg \
+ E6400_VGA_DL_hash E6400_VGA_DL_url E6400_VGA_DL_url_bkup E6400_VGA_offset \
+ E6400_VGA_romname SCH5545EC_DL_url_bkup SCH5545EC_DL_hash _dest mecleaner \
+ kbc1126_ec_dump MRC_refcode_cbtree _dl SCH5545EC_DL_url EC_url rom DL_url \
+ nuke cbfstoolref FSPFD_hash _7ztest ME11bootguard ME11delta xromsize \
+ ME11version ME11sku ME11pch _me _metmp mfs TBFW_url_bkup TBFW_url cbdir \
+ TBFW_hash TBFW_size hashfile EC_url_bkup FSPM_bin_hash FSPS_bin_hash \
+ EC_FW1_hash EC_FW2_hash ME_bin_hash MRC_bin_hash REF_bin_hash _dl_bin \
+ SCH5545EC_bin_hash TBFW_bin_hash E6400_VGA_bin_hash _pre_dest`"
+
+download()
+{
+ [ $# -gt 0 ] || err "No argument given"
+ export PATH="$PATH:/sbin"
+ board="$1" && check_target && readkconfig download
+}
+
+getfiles()
+{
+ [ -z "$CONFIG_HAVE_ME_BIN" ] || fetch intel_me "$DL_url" \
+ "$DL_url_bkup" "$DL_hash" "$CONFIG_ME_BIN_PATH" curl "$ME_bin_hash"
+ [ -z "$CONFIG_INCLUDE_SMSC_SCH5545_EC_FW" ] || fetch sch5545ec \
+ "$SCH5545EC_DL_url" "$SCH5545EC_DL_url_bkup" "$SCH5545EC_DL_hash" \
+ "$CONFIG_SMSC_SCH5545_EC_FW_FILE" "curl" "$SCH5545EC_bin_hash"
+ [ -z "$CONFIG_KBC1126_FW1" ] || fetch kbc1126ec "$EC_url" \
+ "$EC_url_bkup" "$EC_hash" "$CONFIG_KBC1126_FW1" curl "$EC_FW1_hash"
+ [ -z "$CONFIG_KBC1126_FW2" ] || fetch kbc1126ec "$EC_url" \
+ "$EC_url_bkup" "$EC_hash" "$CONFIG_KBC1126_FW2" curl "$EC_FW2_hash"
+ [ -z "$CONFIG_VGA_BIOS_FILE" ] || fetch e6400vga "$E6400_VGA_DL_url" \
+ "$E6400_VGA_DL_url_bkup" "$E6400_VGA_DL_hash" \
+ "$CONFIG_VGA_BIOS_FILE" "curl" "$E6400_VGA_bin_hash"
+ [ -z "$CONFIG_HAVE_MRC" ] || fetch "mrc" "$MRC_url" "$MRC_url_bkup" \
+ "$MRC_hash" "$CONFIG_MRC_FILE" "curl" "$MRC_bin_hash"
+ [ -z "$CONFIG_REFCODE_BLOB_FILE" ] || fetch "refcode" "$MRC_url" \
+ "$MRC_url_bkup" "$MRC_hash" "$CONFIG_REFCODE_BLOB_FILE" "curl" \
+ "$REF_bin_hash"
+ [ -z "$CONFIG_LENOVO_TBFW_BIN" ] || fetch "tbfw" "$TBFW_url" \
+ "$TBFW_url_bkup" "$TBFW_hash" "$CONFIG_LENOVO_TBFW_BIN" "curl" \
+ "$TBFW_bin_hash"
+ [ -z "$CONFIG_FSP_M_FILE" ] || fetch "fsp" "$CONFIG_FSP_FD_PATH" \
+ "$CONFIG_FSP_FD_PATH" "$FSPFD_hash" "$CONFIG_FSP_M_FILE" "copy" \
+ "$FSPM_bin_hash"
+ [ -z "$CONFIG_FSP_S_FILE" ] || fetch "fsp" "$CONFIG_FSP_FD_PATH" \
+ "$CONFIG_FSP_FD_PATH" "$FSPFD_hash" "$CONFIG_FSP_S_FILE" "copy" \
+ "$FSPS_bin_hash"; :
+}
+
+fetch()
+{
+ dl_type="$1"
+ dl="$2"
+ dl_bkup="$3"
+ dlsum="$4"
+ _dest="${5##*../}"
+ _pre_dest="$XBMK_CACHE/tmpdl/check" || err "!fetch, mktemp, $*"
+ dlop="$6"
+ binsum="$7"
+
+ [ "$5" = "/dev/null" ] && return 0
+ _dl="$XBMK_CACHE/file/$dlsum" # internet file to extract from e.g. .exe
+ _dl_bin="$XBMK_CACHE/file/$binsum" # extracted file e.g. me.bin
+
+ # an extracted vendor file will be placed in pre_dest first, for
+ # verifying its checksum. if it matches, it is later moved to _dest
+ remkdir "${_pre_dest%/*}" "$appdir"
+
+ # HACK: if grabbing fsp from coreboot, fix the path for lbmk
+ [ "$dl_type" = "fsp" ] && for _cdl in dl dl_bkup; do
+ eval "$_cdl=\"\${$_cdl##*../}\"; _cdp=\"\$$_cdl\""
+ [ -f "$_cdp" ] || _cdp="$cbdir/$_cdp"
+ [ -f "$_cdp" ] && eval "$_cdl=\"$_cdp\""; :
+ done; :
+
+ # download the file (from the internet) to extract from
+ xbget "$dlop" "$dl" "$dl_bkup" "$_dl" "$dlsum"
+ x_ rm -Rf "${_dl}_extracted"
+
+ # skip extraction if a cached extracted file exists
+ ( xbget copy "$_dl_bin" "$_dl_bin" "$_dest" "$binsum" 2>/dev/null ) || :
+ [ -f "$_dest" ] && return 0
+
+ x_ mkdir -p "${_dest%/*}"
+ [ "$dl_type" = "fsp" ] || extract_archive "$_dl" "$appdir" || \
+ [ "$dl_type" = "e6400vga" ] || err "$_dest $dl_type: !extract"
+
+ x_ extract_$dl_type "$_dl" "$appdir"
+ set -u -e
+
+ # some functions don't output directly to the given file, _pre_dest.
+ # instead, they put multiple files there, but we need the one matching
+ # the given hashsum. So, search for a matching file via bruteforce:
+ ( fx_ "eval mkdst \"$binsum\"" x_ find "${_pre_dest%/*}" -type f ) || :
+
+ bad_checksum "$binsum" "$_dest" || [ ! -f "$_dest" ] || return 0
+ [ -z "$binsum" ] && printf "'%s': checksum undefined\n" "$_dest" 1>&2
+ [ -L "$_dest" ] && printf "WARNING: '%s' is a link!\n" "$_dest" 1>&2
+ [ -L "$_dest" ] || x_ rm -f "$_dest"
+ err "Could not safely extract '$_dest', for board '$board'"
+}
+
+mkdst()
+{
+ bad_checksum "$1" "$2" && x_ rm -f "$2" && return 0
+ x_ mv "$2" "$_dl_bin"
+ x_ cp "$_dl_bin" "$_dest"
+ exit 1
+}
+
+extract_intel_me()
+{
+ e "$mecleaner" f not && err "$cbdir: me_cleaner missing"
+
+ _7ztest="$xbloc/metmp/a"
+ _metmp="$xbloc/me.bin"
+ x_ rm -f "$_metmp" "$xbloc/a"
+
+ mfs="" && [ "$ME11bootguard" = "y" ] && mfs="--whitelist MFS" && \
+ chkvars ME11delta ME11version ME11sku ME11pch
+ [ "$ME11bootguard" = "y" ] && x_ ./mk -f deguard
+
+ set +u +e
+ x_ rm -Rf "$xbmkpwd/metmp"
+ ( fx_ find_me x_ find "$xbmkpwd/$appdir" -type f ) || :
+ [ "$ME11bootguard" != "y" ] && x_ mv "$_metmp" "$_pre_dest" && return 0
+
+ (
+ x_ cd src/deguard/
+ x_ ./finalimage.py --delta "data/delta/$ME11delta" --version \
+ "$ME11version" --pch "$ME11pch" --sku "$ME11sku" \
+ --fake-fpfs data/fpfs/zero --input "$_metmp" --output "$_pre_dest"
+ ) || err "Error running deguard for $_dest"; :
+}
+
+find_me()
+{
+ [ -f "$_metmp" ] && exit 1
+ [ -L "$1" ] && return 0
+
+ _7ztest="${_7ztest}a" && _r="-r" && [ -n "$mfs" ] && _r=""
+
+ "$mecleaner" $mfs $_r -t -O "$xbloc/a" -M "$_metmp" "$1" || \
+ "$mecleaner" $mfs $_r -t -O "$_metmp" "$1" || "$me7updateparser" \
+ -O "$_metmp" "$1" || extract_archive "$1" "$_7ztest" || return 0
+
+ [ -f "$_metmp" ] && exit 1
+ ( fx_ find_me x_ find "$_7ztest" -type f ) || exit 1; :
+}
+
+extract_archive()
+{
+ innoextract "$1" -d "$2" || python "$pfs_extract" "$1" -e || 7z x \
+ "$1" -o"$2" || unar "$1" -o "$2" || unzip "$1" -d "$2" || return 1
+
+ [ ! -d "${_dl}_extracted" ] || x_ cp -R "${_dl}_extracted" "$2"; :
+}
+
+extract_kbc1126ec()
+{
+ (
+ x_ cd "$appdir/"
+ mv Rompaq/68*.BIN ec.bin || unar -D ROM.CAB Rom.bin || unar -D \
+ Rom.CAB Rom.bin || unar -D 68*.CAB Rom.bin || err "!kbc1126 unar"
+ [ -f "ec.bin" ] || x_ mv Rom.bin ec.bin
+ x_ e ec.bin f && x_ "$kbc1126_ec_dump" ec.bin
+ ) || err "$board: can't extract kbc1126 ec firmware"
+
+ x_ e "$appdir/ec.bin.fw1" f && x_ e "$appdir/ec.bin.fw2" f
+ x_ cp "$appdir/"ec.bin.fw* "${_pre_dest%/*}/"
+}
+
+extract_e6400vga()
+{
+ set +u +e
+ chkvars E6400_VGA_offset E6400_VGA_romname
+ tail -c +$E6400_VGA_offset "$_dl" | gunzip > "$appdir/bios.bin" || :
+ (
+ x_ cd "$appdir"
+ x_ e "bios.bin" f
+ "$e6400_unpack" bios.bin || printf "TODO: fix dell extract util\n"
+ ) || err "can't extract e6400 vga rom"
+ x_ cp "$appdir/$E6400_VGA_romname" "$_pre_dest"
+}
+
+extract_sch5545ec()
+{
+ # full system ROM (UEFI), to extract with UEFIExtract:
+ _bios="${_dl}_extracted/Firmware/1 $dlsum -- 1 System BIOS vA.28.bin"
+ # this is the SCH5545 firmware, inside of the extracted UEFI ROM:
+ _sch5545ec_fw="$_bios.dump/4 7A9354D9-0468-444A-81CE-0BF617D890DF"
+ _sch5545ec_fw="$_sch5545ec_fw/54 D386BEB8-4B54-4E69-94F5-06091F67E0D3"
+ _sch5545ec_fw="$_sch5545ec_fw/0 Raw section/body.bin" # <-- this!
+
+ x_ "$uefiextract" "$_bios"
+ x_ cp "$_sch5545ec_fw" "$_pre_dest"
+}
+
+# Lenovo ThunderBolt firmware updates:
+# https://pcsupport.lenovo.com/us/en/products/laptops-and-netbooks/thinkpad-t-series-laptops/thinkpad-t480-type-20l5-20l6/20l5/solutions/ht508988
+extract_tbfw()
+{
+ chkvars TBFW_size
+ fx_ copytb x_ find "$appdir" -type f -name "TBT.bin"
+}
+
+copytb()
+{
+ [ -f "$1" ] && [ ! -L "$1" ] && x_ dd if=/dev/null of="$1" bs=1 \
+ seek=$TBFW_size && x_ mv "$1" "$_pre_dest" && return 1; :
+}
+
+extract_fsp()
+{
+ x_ python "$cbdir/3rdparty/fsp/Tools/SplitFspBin.py" split -f "$1" \
+ -o "${_pre_dest%/*}" -n "Fsp.fd"
+}
+
+setvfile()
+{
+ [ -n "$vcfg" ] && for c in $cvchk; do
+ vcmd="[ \"\${$c}\" != \"/dev/null\" ] && [ -n \"\${$c}\" ]"
+ eval "$vcmd && getvfile \"\$@\" && return 0"
+ done && return 1; :
+}
+
+getvfile()
+{
+ eval "`setcfg "config/vendor/$vcfg/pkg.cfg" 1`"
+ bootstrap && [ $# -gt 0 ] && getfiles && return 0 # download
+ fx_ prep x_ find "$tmpromdir" -maxdepth 1 -type f -name "*.rom"
+ ( check_vendor_hashes ) || err "$archive: Can't verify hashes"; :
+}
+
+bootstrap()
+{
+ cbdir="src/coreboot/$tree"
+ mecleaner="$xbmkpwd/$cbdir/util/me_cleaner/me_cleaner.py"
+ kbc1126_ec_dump="$xbmkpwd/$cbdir/util/kbc1126/kbc1126_ec_dump"
+ cbfstool="elf/coreboot/$tree/cbfstool"
+ rmodtool="elf/coreboot/$tree/rmodtool"
+
+ x_ ./mk -f coreboot "${cbdir##*/}"
+ fx_ "x_ ./mk -b" printf "uefitool\nbiosutilities\nbios_extract\n"
+ [ -d "${kbc1126_ec_dump%/*}" ] && x_ make -C "$cbdir/util/kbc1126"
+ [ -n "$MRC_refcode_cbtree" ] && \
+ cbfstoolref="elf/coreboot/$MRC_refcode_cbtree/cbfstool" && \
+ x_ ./mk -d coreboot "$MRC_refcode_cbtree"; :
+}
+
+prep()
+{
+ _xrom="$1"
+ _xromname="${1##*/}"
+ _xromnew="${_xrom%/*}/${_xromname#"$vfix"}"
+ [ "$nuke" = "nuke" ] && _xromnew="${_xrom%/*}/$vfix${_xrom##*/}"
+
+ e "$_xrom" f missing && return 0
+ [ -z "${_xromname#"$vfix"}" ] && err "$_xromname / $vfix: name match"
+
+ # Remove the prefix and 1-byte pad
+ if [ "$nuke" != "nuke" ] && \
+ [ "${_xromname#"$vfix"}" != "$_xromname" ]; then
+ xromsize="$(expr $(stat -c '%s' "$_xrom") - 1)" || err "!int"
+ [ $xromsize -lt 524288 ] && err "too small, $xromsize: $_xrom"
+
+ x_ dd if="$_xrom" of="$_xromnew" bs=$xromsize count=1
+ x_ rm -f "$_xrom"
+
+ _xrom="$_xromnew"
+ fi
+
+ [ "$nuke" != "nuke" ] || ( mksha512 "$_xrom" "vendorhashes" ) || err
+
+ add_vfiles "$_xrom" || return 1 # if break return, can still change MAC
+ [ "$nuke" != "nuke" ] && return 0
+
+ # Rename the file, prefixing a warning saying not to flash
+ cat "$_xrom" config/data/coreboot/0 > "$_xromnew" || err "!pad $_xrom"
+ x_ rm -f "$_xrom"
+}
+
+mksha512()
+{
+ [ "${1%/*}" != "$1" ] && x_ cd "${1%/*}"
+ sha512sum ./"${1##*/}" >> "$2" || err "!sha512sum \"$1\" > \"$2\""
+}
+
+add_vfiles()
+{
+ rom="$1"
+
+ if [ "$has_hashes" != "y" ] && [ "$nuke" != "nuke" ]; then
+ printf "'%s' has no hash file. Skipping.\n" "$archive" 1>&2
+ return 1
+ elif [ "$has_hashes" = "y" ] && [ "$nuke" = "nuke" ]; then
+ printf "'%s' has a hash file. Skipping nuke.\n" "$archive" 1>&2
+ return 1
+ fi
+
+ [ -n "$CONFIG_HAVE_REFCODE_BLOB" ] && vfile "fallback/refcode" \
+ "$CONFIG_REFCODE_BLOB_FILE" "stage"
+ [ "$CONFIG_HAVE_MRC" = "y" ] && vfile "mrc.bin" "$CONFIG_MRC_FILE" \
+ "mrc" "0xfffa0000"
+ [ "$CONFIG_HAVE_ME_BIN" = "y" ] && vfile IFD "$CONFIG_ME_BIN_PATH" me
+ [ -n "$CONFIG_KBC1126_FW1" ] && vfile ecfw1.bin \
+ "$CONFIG_KBC1126_FW1" raw "$CONFIG_KBC1126_FW1_OFFSET"
+ [ -n "$CONFIG_KBC1126_FW2" ] && vfile ecfw2.bin \
+ "$CONFIG_KBC1126_FW2" raw "$CONFIG_KBC1126_FW2_OFFSET"
+ [ -n "$CONFIG_VGA_BIOS_FILE" ] && [ -n "$CONFIG_VGA_BIOS_ID" ] && \
+ vfile "pci$CONFIG_VGA_BIOS_ID.rom" "$CONFIG_VGA_BIOS_FILE" optionrom
+ [ "$CONFIG_INCLUDE_SMSC_SCH5545_EC_FW" = "y" ] && \
+ [ -n "$CONFIG_SMSC_SCH5545_EC_FW_FILE" ] && \
+ vfile sch5545_ecfw.bin "$CONFIG_SMSC_SCH5545_EC_FW_FILE" raw
+ [ -z "$CONFIG_FSP_USE_REPO" ] && [ -z "$CONFIG_FSP_FULL_FD" ] && \
+ [ -n "$CONFIG_FSP_M_FILE" ] && \
+ vfile "$CONFIG_FSP_M_CBFS" "$CONFIG_FSP_M_FILE" fsp --xip
+ [ -z "$CONFIG_FSP_USE_REPO" ] && [ -z "$CONFIG_FSP_FULL_FD" ] && \
+ [ -n "$CONFIG_FSP_S_FILE" ] && \
+ vfile "$CONFIG_FSP_S_CBFS" "$CONFIG_FSP_S_FILE" fsp
+
+ printf "ROM image successfully patched: %s\n" "$rom"
+ xchanged="y"
+}
+
+vfile()
+{
+ [ "$2" = "/dev/null" ] && return 0
+
+ cbfsname="$1"
+ _dest="${2##*../}"
+ _t="$3"
+
+ _offset=""
+
+ if [ "$_t" = "fsp" ] && [ $# -gt 3 ]; then
+ _offset="$4"
+ elif [ $# -gt 3 ] && _offset="-b $4" && [ -z "$4" ]; then
+ err "vfile $*, $rom: offset given but empty (undefined)"
+ fi
+
+ [ "$nuke" = "nuke" ] || x_ e "$_dest" f
+
+ if [ "$cbfsname" = "IFD" ]; then
+ [ "$nuke" = "nuke" ] || x_ "$ifdtool" $ifdprefix -i \
+ $_t:$_dest "$rom" -O "$rom"
+ [ "$nuke" != "nuke" ] || x_ "$ifdtool" $ifdprefix --nuke \
+ $_t "$rom" -O "$rom"
+ elif [ "$nuke" = "nuke" ]; then
+ x_ "$cbfstool" "$rom" remove -n "$cbfsname"
+ elif [ "$_t" = "stage" ]; then # the only stage we handle is refcode
+ x_ rm -f "$xbloc/refcode"
+ x_ "$rmodtool" -i "$_dest" -o "$xbloc/refcode"
+ x_ "$cbfstool" "$rom" add-stage -f "$xbloc/refcode" \
+ -n "$cbfsname" -t stage
+ else
+ x_ "$cbfstool" "$rom" add -f "$_dest" -n "$cbfsname" \
+ -t $_t $_offset
+ fi
+ xchanged="y"; :
+}
+
+check_vendor_hashes()
+{
+ x_ cd "$tmpromdir"
+ [ "$has_hashes" = "n" ] || [ "$nuke" = "nuke" ] || sha512sum \
+ --status -c "$hashfile" || x_ sha1sum --status -c "$hashfile"
+ x_ rm -f "$hashfile"
+}
diff --git a/mk b/mk
index 2020115b..8da15f5b 100755
--- a/mk
+++ b/mk
@@ -2,8 +2,6 @@
# SPDX-License-Identifier: GPL-3.0-or-later
# Copyright (c) 2020-2025 Leah Rowe <leah@libreboot.org>
# Copyright (c) 2022 Caleb La Grange <thonkpeasant@protonmail.com>
-# Copyright (c) 2022 Ferass El Hafidi <vitali64pmemail@protonmail.com>
-# Copyright (c) 2022-2023 Alper Nebi Yasak <alpernebiyasak@gmail.com>
set -u -e
@@ -13,13 +11,13 @@ if [ "./${0##*/}" != "${0}" ] || [ ! -f "mk" ] || [ -L "mk" ]; then
fi
. "include/lib.sh"
-
. "include/init.sh"
+. "include/vendor.sh"
. "include/inject.sh"
. "include/mrc.sh"
. "include/rom.sh"
-
-eval "`setvars "" vdir src_dirname srcdir mode`"
+. "include/release.sh"
+. "include/get.sh"
main()
{
@@ -29,419 +27,14 @@ main()
version) printf "%s\nWebsite: %s\n" "$relname" "$projectsite" ;;
release|download|inject) $cmd "$@" ;;
-*) return 1 ;;
- *) $err "bad command" ;;
+ *) err "bad command" ;;
esac
set -u -e # some commands disable them. turn them on!
}
-release()
-{
- export XBMK_RELEASE="y"
-
- vdir="release"
- while getopts d:m: option; do
- [ -z "$OPTARG" ] && $err "empty argument not allowed"
- case "$option" in
- d) vdir="$OPTARG" ;;
- m) mode="$OPTARG" ;;
- *) $err "invalid option '-$option'" ;;
- esac
- done
-
- vdir="$vdir/$version"
- src_dirname="${relname}_src"
- srcdir="$vdir/$src_dirname"
-
- [ -e "$vdir" ] && $err "already exists: \"$vdir\""
- mkdir -p "$vdir" || $err "mkvdir: !mkdir -p \"$vdir\""
- git clone . "$srcdir" || $err "mkdir: !gitclone \"$srcdir\""
- touch "$srcdir/lock" || $err "can't make lock file in $srcdir/"
-
- build_release
-
- printf "\n\nDONE! Check release files under %s\n" "$vdir"
-}
-
-build_release()
-{
- (
- cd "$srcdir" || $err "$vdir: !cd \"$srcdir\""
-
- ./mk -f
- rmgit .
- x_ mv src/docs docs
- ) || $err "can't create release files"
-
- git log --graph --pretty=format:'%Cred%h%Creset %s %Creset' \
- --abbrev-commit > "$srcdir/CHANGELOG" || $err "!gitlog $srcdir"
- rm -f "$srcdir/lock" || $err "can't remove lock file in $srcdir"
-
- (
- cd "${srcdir%/*}" || $err "$vdir: mktarball \"$srcdir\""
- mktarball "${srcdir##*/}" "${srcdir##*/}.tar.xz" || $err "$vdir: mksrc"
- ) || $err "can't create src tarball"
- [ "$mode" = "src" ] && return 0
-
- touch "$srcdir/lock" || $err "can't make lock file in $srcdir/"
- (
- cd "$srcdir" || $err "$vdir: 2 !cd \"$srcdir\""
- x_ ./mk -d coreboot
- mk -b coreboot pico-serprog stm32-vserprog pcsx-redux
- x_ mv bin ../roms
- ) || $err "can't build rom images"
-
- rm -Rf "$srcdir" || $err "!rm -Rf $srcdir"
-}
-
main "$@" && exit 0
-# what follows was formerly script/trees, whose main() is now trees()
-
-. "include/git.sh"
-
-eval "`setvars "" xarch srcdir premake gnatdir xlang mode makeargs elfdir cmd \
- project target target_dir targets xtree _f release bootstrapargs mkhelper \
- autoconfargs listfile autogenargs btype rev build_depend gccdir cmakedir \
- defconfig postmake mkhelpercfg dry dest_dir mdir cleanargs gccver gccfull \
- gnatver gnatfull do_make badhash tree`"
-
-trees()
-{
- flags="f:b:m:u:c:x:s:l:n:d:"
-
- while getopts $flags option; do
- [ -n "$_f" ] && $err "only one flag is permitted"
- _f="$1"
-
- case "$_f" in
- -d) dry=":" ;;
- -b) : ;;
- -u) mode="oldconfig" ;;
- -m) mode="menuconfig" ;;
- -c) mode="distclean" ;;
- -x) mode="crossgcc-clean" ;;
- -f)
- do_make="n"
- dry=":" ;;
- -s) mode="savedefconfig" ;;
- -l) mode="olddefconfig" ;;
- -n) mode="nconfig" ;;
- *) $err "invalid option '-$option'" ;;
- esac
-
- if [ -z "${OPTARG+x}" ]; then
- shift 1
- break
- fi
-
- project="${OPTARG#src/}"
- shift 2
- done
- [ -z "$_f" ] && $err "missing flag ($flags)"
- if [ -z "$project" ]; then
- mk $_f $(ls -1 config/git)
- return 1
- fi
-
- [ -f "config/git/$project/pkg.cfg" ] || \
- $err "config/git/$project/pkg.cfg missing"
-
- for d in "elf" "config/data" "config" "src"; do
- eval "${d#*/}dir=\"$d/$project\""
- done
- dest_dir="$elfdir"
-
- listfile="$datadir/build.list"
- [ -f "$listfile" ] || listfile="" # optional on all projects
-
- mkhelpercfg="$datadir/mkhelper.cfg"
- if e "$mkhelpercfg" f missing; then
- mkhelpercfg="$xbmktmp/mkhelper.cfg"
- x_ touch "$mkhelpercfg"
- fi
-
- targets="$*"
- cmd="build_targets $targets"
- singletree "$project" && cmd="build_project"
-
- remkdir "${tmpgit%/*}"
-}
-
-build_project()
-{
- configure_project "$configdir" || return 0
- [ ! -f "$listfile" ] || $dry elfcheck || return 0
-
- [ "$mode" = "distclean" ] && mode="clean"
- run_make_command || return 0
-
- [ -n "$mode" ] || $dry copy_elf; :
-}
-
-build_targets()
-{
- [ -d "$configdir" ] || $err "directory, $configdir, does not exist"
- [ $# -gt 0 ] || targets="$(ls -1 "$configdir")" || $err "!o $configdir"
-
- for x in $targets; do
- unset CROSS_COMPILE
- export PATH="$xbmkpath"
- [ "$x" = "list" ] && x_ ls -1 "config/$project" && \
- listfile="" && break
-
- target="$x"
- printf "'make %s', '%s', '%s'\n" "$mode" "$project" "$target"
- x_ handle_defconfig
-
- [ -n "$mode" ] || x_ $postmake
- done; :
-}
-
-handle_defconfig()
-{
- target_dir="$configdir/$target"
-
- [ -f "CHANGELOG" ] || fetch_project "$project"
- configure_project "$target_dir" || return 0
- x_ mkdir -p "$elfdir/$target"
-
- chkvars tree
- srcdir="src/$project/$tree"
-
- if [ "$mode" = "distclean" ] || [ "$mode" = "crossgcc-clean" ]; then
- [ -d "$srcdir" ] || return 0
- fi
- [ -z "$mode" ] && $dry check_cross_compiler
-
- for y in "$target_dir/config"/*; do
- [ "$_f" = "-d" ] || [ -f "$y" ] || continue
- [ "$_f" = "-d" ] || defconfig="$y"
-
- [ -n "$mode" ] || check_defconfig || continue
- handle_makefile
- [ -n "$mode" ] || $dry copy_elf
- done; :
-}
-
-configure_project()
-{
- eval "`setvars "" cleanargs build_depend autoconfargs xtree postmake \
- makeargs btype mkhelper bootstrapargs premake release xlang xarch \
- badhash`"
- _tcfg="$1/target.cfg"
- [ -f "$_tcfg" ] || btype="auto"
- e "$datadir/mkhelper.cfg" f && eval "`setcfg "$datadir/mkhelper.cfg"`"
-
- while e "$_tcfg" f || [ "$cmd" != "build_project" ]; do
- eval "`setvars "" rev tree`"
- eval "`setcfg "$_tcfg"`"
- printf "Loading %s config: %s\n" "$project" "$_tcfg"
-
- [ "$_f" = "-d" ] && build_depend="" # dry run
- [ "$cmd" = "build_project" ] && break
- [ "$do_make" != "n" ] && break
-
- [ "${_tcfg%/*/target.cfg}" = "${_tcfg%"/$tree/target.cfg"}" ] \
- && break
- _tcfg="${_tcfg%/*/target.cfg}/$tree/target.cfg"
- done
- [ "$XBMK_RELEASE" = "y" ] && [ "$release" = "n" ] && return 1
- [ -z "$btype" ] || [ "${mode%config}" = "$mode" ] || return 1
- [ -z "$mode" ] && $dry build_dependencies
-
- mdir="$xbmkpwd/config/submodule/$project"
- [ -n "$tree" ] && mdir="$mdir/$tree"
- [ -f "CHANGELOG" ] || check_project_hashes
-
- if [ "$do_make" = "n" ]; then
- [ -f "CHANGELOG" ] || fetch_${cmd#build_}
- return 1
- fi
- x_ ./mk -f "$project" "$target"
-}
-
-build_dependencies()
-{
- for bd in $build_depend; do
- bd_p="${bd%%/*}"
- bd_t="${bd##*/}"
- [ -z "$bd_p" ] && $dry $err "$project/$tree: !bd '$bd'"
- [ "${bd##*/}" = "$bd" ] && bd_t=""
- [ -z "$bd_p" ] || $dry x_ ./mk -b $bd_p $bd_t; :
- done; :
-}
-
-check_project_hashes()
-{
- old_pjhash="" && x_ mkdir -p "$XBMK_CACHE/hash"
- [ ! -f "$XBMK_CACHE/hash/$project$tree" ] || \
- read -r old_pjhash < "$XBMK_CACHE/hash/$project$tree"
-
- fx_ sha512sum "$datadir" "$configdir/$tree" "$mdir" \
- -type f -not -path "*/.git*/*" | awk '{print $1}' > \
- "$xbmktmp/project.hash" || $err "!h $project $tree"
-
- pjhash="$(sha512sum "$xbmktmp/project.hash" | awk '{print $1}')" || :
- [ "$pjhash" != "$old_pjhash" ] && badhash="y"
- [ -f "$XBMK_CACHE/hash/$project$tree" ] || badhash="y"
-
- printf "%s\n" "$pjhash" > "$XBMK_CACHE/hash/$project$tree" || \
- $err "!mk $XBMK_CACHE/hash/$project$tree"
-
- [ "$badhash" != "y" ] || x_ rm -Rf "src/$project/$tree" \
- "elf/$project/$tree" "elf/$project/$target"; :
-}
-
-check_cross_compiler()
-{
- xgccargs="UPDATED_SUBMODULES=1 CPUS=$XBMK_THREADS"
- for _xarch in $xarch; do
- cbdir="src/coreboot/$tree"
- [ "$project" != "coreboot" ] && cbdir="src/coreboot/default"
- [ -n "$xtree" ] && cbdir="src/coreboot/$xtree"
-
- x_ ./mk -f coreboot "${cbdir#src/coreboot/}"
-
- export PATH="$xbmkpwd/$cbdir/util/crossgcc/xgcc/bin:$PATH"
- export CROSS_COMPILE="${xarch% *}-"
- [ -n "$xlang" ] && export BUILD_LANGUAGES="$xlang"
-
- xfix="${_xarch%-*}" && [ "$xfix" = "x86_64" ] && xfix="x64"
-
- # match gnat-X to gcc
- check_gnu_path gcc gnat || x_ check_gnu_path gnat gcc
-
- # sometimes buildgcc fails for like no reason. try twice.
- make -C "$cbdir" crossgcc-$xfix $xgccargs || \
- x_ make -C "$cbdir" crossgcc-$xfix $xgccargs
-
- # we only want to mess with hostcc to build xgcc
- rm -f "$XBMK_CACHE/gnupath/"* || $err "Can't clear gnupath/"; :
- done; :
-}
-
-# fix mismatching gcc/gnat versions on debian trixie/sid. as of december 2024,
-# trixie/sid had gnat-13 as gnat and gcc-14 as gcc, but has gnat-14 in apt. in
-# some cases, gcc 13+14 and gnat-13 are present; or gnat-14 and gcc-14, but
-# gnat in PATH never resolves to gnat-14, because gnat-14 was "experimental"
-check_gnu_path()
-{
- command -v "$1" 1>/dev/null || $err "Host '$1' unavailable"
-
- eval "`setvars "" gccver gccfull gnatver gnatfull gccdir gnatdir`"
- x_ gnu_setver "$1" "$1" && gnu_setver "$2" "$2" || :
-
- eval "[ -z \"\$$1ver\" ] && $err \"Cannot detect host '$1' version\""
- [ "$gnatfull" = "$gccfull" ] && return 0
-
- eval "$1dir=\"$(dirname "$(command -v "$1")")\""
- eval "_gnudir=\"\$$1dir\"; _gnuver=\"\$$1ver\""
- for _bin in "$_gnudir/$2-"*; do
- [ "${_bin#"$_gnudir/$2-"}" = "$_gnuver" ] && [ -x "$_bin" ] \
- && _gnuver="${_bin#"$_gnudir/$2-"}" && break; :
- done
- gnu_setver "$2" "$_gnudir/$2-$_gnuver" || return 1
- [ "$gnatfull" = "$gccfull" ] || return 1
-
- (
- remkdir "$XBMK_CACHE/gnupath" && x_ cd "$XBMK_CACHE/gnupath"
- for _gnubin in "$_gnudir/$2"*"-$_gnuver"; do
- _gnuutil="${_gnubin##*/}" && [ -e "$_gnubin" ] && \
- x_ ln -s "$_gnubin" "${_gnuutil%"-$_gnuver"}"
- done
- ) || $err "Cannot create $2-$_gnuver link in $_gnudir"; :
-}
-
-gnu_setver()
-{
- eval "$2 --version 1>/dev/null 2>/dev/null || return 1"
- eval "$1ver=\"`"$2" --version 2>/dev/null | head -n1`\""
- eval "$1ver=\"\${$1ver##* }\""
- eval "$1full=\"\$$1ver\""
- eval "$1ver=\"\${$1ver%%.*}\""; :
-}
-
-check_defconfig()
-{
- [ -f "$defconfig" ] || $dry $err "$project/$target: missing defconfig"
- dest_dir="$elfdir/$target/${defconfig#"$target_dir/config/"}"
-
- $dry elfcheck || return 1 # skip build if a previous one exists
- $dry x_ mkdir -p "$dest_dir"
-}
-
-elfcheck()
-{
- # TODO: very hacky check. do it properly (based on build.list)
- for elftest in "$dest_dir"/*; do
- [ -e "$elftest" ] && e "$elftest" f && return 1
- done; :
-}
-
-handle_makefile()
-{
- $dry check_makefile "$srcdir" && x_ make -C "$srcdir" $cleanargs clean
-
- [ -f "$defconfig" ] && x_ cp "$defconfig" "$srcdir/.config"
- [ -n "$mode" ] || [ -n "$btype" ] || $dry make -C \
- "$srcdir" silentoldconfig || make -C "$srcdir" oldconfig || :
-
- run_make_command || $err "handle_makefile $srcdir: no makefile!"
-
- _copy=".config" && [ "$mode" = "savedefconfig" ] && _copy="defconfig"
- [ "${mode%config}" = "$mode" ] || \
- $dry x_ cp "$srcdir/$_copy" "$defconfig"
-
- [ -e "$srcdir/.git" ] && [ "$project" = "u-boot" ] && \
- [ "$mode" = "distclean" ] && \
- $dry x_ git -C "$srcdir" $cleanargs clean -fdx; :
-}
-
-run_make_command()
-{
- [ -n "$mode" ] || x_ $premake
-
- $dry check_cmake "$srcdir" && [ -z "$mode" ] && \
- $dry check_autoconf "$srcdir"
- $dry check_makefile "$srcdir" || return 1
-
- $dry x_ make -C "$srcdir" $mode -j$XBMK_THREADS $makeargs
- [ -n "$mode" ] || x_ $mkhelper
-
- [ "$mode" != "clean" ] || \
- $dry make -C "$srcdir" $cleanargs distclean || :; :
-}
-
-check_cmake()
-{
- [ -z "$cmakedir" ] || $dry check_makefile "$1" || cmake -B "$1" \
- "$1/$cmakedir" || $dry x_ check_makefile "$1"
- [ -z "$cmakedir" ] || $dry x_ check_makefile "$1"; :
-}
-
-check_autoconf()
-{
- (
- cd "$1" || $err "!cd $1"
- [ -f "bootstrap" ] && x_ ./bootstrap $bootstrapargs
- [ -f "autogen.sh" ] && x_ ./autogen.sh $autogenargs
- [ -f "configure" ] && x_ ./configure $autoconfargs; :
- ) || $err "can't bootstrap project: $1"; :
-}
-
-check_makefile()
-{
- [ -f "$1/Makefile" ] || [ -f "$1/makefile" ] || \
- [ -f "$1/GNUmakefile" ] || return 1; :
-}
-
-copy_elf()
-{
- [ -f "$listfile" ] && x_ mkdir -p "$dest_dir" && while read -r f; do
- [ -f "$srcdir/$f" ] && x_ cp "$srcdir/$f" "$dest_dir"
- done < "$listfile"
- x_ make clean -C "$srcdir" $cleanargs
-}
+. "include/tree.sh"
trees "$@" || exit 0
. "$mkhelpercfg"