Skip to content

Commit 4981e70

Browse files
committed
Makefile: Wipe coreboot_dir and board_dir cleanup in canary dev cycle helper for reproducible builds in dev cycles
Otherwise qemu roms which injects distinct public key with entropy at each build are wiped. TODO : revisit approach when flashrom/flashprog/qemu supports 16MB SPI flash emulation so we can use flashprog to flash internally, which will require refactoring Signed-off-by: Thierry Laurion <[email protected]>
1 parent 83c8947 commit 4981e70

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

Makefile

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -974,8 +974,14 @@ real.remove_canary_files-extract_patch_rebuild_what_changed:
974974
@echo "This approach economizes time since most build artifacts do not need to be rebuilt, as the file dates should be the same as when you originally built them."
975975
@echo "Only a minimal time is needed for rebuilding, which is also good for your SSD."
976976
@echo "*** USE THIS APPROACH FIRST ***"
977-
find ./build/ -type f -name ".canary" -print -delete
978-
find ./install/*/* -print -exec rm -rf {} + 2>/dev/null || true
977+
@echo "Removing ./build .canary files..."
978+
@find ./build/ -type f -name ".canary" -print -delete || true
979+
@echo "Removing install/*/* content..."
980+
@find ./install/*/* -print -exec rm -rf {} + 2>/dev/null || true
981+
@echo "Removing coreboot board related artifact directory: $(build)/$(coreboot_dir)"
982+
rm -rf "$(build)/$(coreboot_dir)"
983+
@echo "Removing coreboot board related artifacts directory $(board_build)"
984+
rm -rf "$(board_build)"
979985
$(call overwrite_canary_if_coreboot_git)
980986

981987
real.gitclean_keep_packages_and_build:

modules/coreboot

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,6 @@ endif
150150

151151
$(coreboot_module)_configure := \
152152
mkdir -p "$(build)/$(coreboot_dir)"; \
153-
rm -rf $(build)/$(coreboot_dir)/*; \
154153
$(call install_config,$(pwd)/$(CONFIG_COREBOOT_CONFIG),$(build)/$(coreboot_dir)/.config); \
155154
sed -i '/^CONFIG_LOCALVERSION/d' $(build)/$(coreboot_dir)/.config; \
156155
echo 'CONFIG_LOCALVERSION=$(CONFIG_COREBOOT_LOCALVERSION)' >> $(build)/$(coreboot_dir)/.config; \

0 commit comments

Comments
 (0)