summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2026-09-24 13:46:15 +0100
committerLeah Rowe <leah@libreboot.org>2026-09-24 13:46:15 +0100
commit6c479d353ab0e26e20c285462fd6d2ac856114d0 (patch)
treec7bc562ade608d1b5298c33e790420e8d1a18e07
parent36029283ad26a489bb3849dbc1a2f4c69f332c79 (diff)
rom.sh: clean edk2 after successful elf copy
postmake (mkcorebootbin function) runs after mkhelper. this change allows clean re-building of edk2 without having to grab the entire coreboot tree again, when only modifying the target: coreboot/edk2_mrchromebox Signed-off-by: Leah Rowe <leah@libreboot.org>
-rw-r--r--include/fw/rom.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/fw/rom.sh b/include/fw/rom.sh
index bfbe85f9..8a4e1c9f 100644
--- a/include/fw/rom.sh
+++ b/include/fw/rom.sh
@@ -148,6 +148,18 @@ mkcorebootbin()
[ "$XBMK_RELEASE" = "y" ] && [ "$release" = "n" ] && \
return 0
+ # replicates coreboot's handling after edk2 build,
+ # which we patch out for copy. so now we clean it instead,
+ # after we successfully copied it out-of-tree.
+ # this enables clean re-building when modifying cb/edk2_mrchromebox
+ #
+ # so long as metadata in config/ doesn't change, and we
+ # have a build in elf/, then a re-build/re-download will
+ # not occur. this however means that we must set release=n
+ # for now. proper edk2 integration will come to lbmk soon(tm)
+ #
+ x_ rm -Rf "$srdir/payloads/external/edk2/workspace"
+
for y in "$defscan"/*; do
buildcfg="$y"
$if_not_skip_build mkcorebootbin_real