Skip to content

Commit 66e328a

Browse files
committed
Makefile: move coreboot_dir and board_dir cleanup to canary dev cycle helper to not impact qemu builds (which need to inject pubkey chich changes at each build.....
Signed-off-by: Thierry Laurion <[email protected]>
1 parent 2a1efb1 commit 66e328a

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

Makefile

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -142,12 +142,9 @@ PACKAGES := $(shell mkdir -p "$(packages)")
142142
HASHES := $(board_build)/hashes.txt
143143
SIZES := $(board_build)/sizes.txt
144144

145-
# Create the board output directory and delete any board's build arficats
146-
# This ensures that artifacts are wiped
147-
# TODO: verify that qemu builds which injects public still works between builds, otherwise move this is canary dev helper
145+
# Create the board output directory if it doesn't already exist
148146
BOARD_LOG := $(shell \
149147
mkdir -p "$(board_build)" ; \
150-
rm -rf "$(board_build)"/* ; \
151148
echo "$(DATE) $(GIT_HASH) $(GIT_STATUS)" > "$(HASHES)" ; \
152149
echo "$(DATE) $(GIT_HASH) $(GIT_STATUS)" > "$(SIZES)" ; \
153150
)
@@ -977,8 +974,14 @@ real.remove_canary_files-extract_patch_rebuild_what_changed:
977974
@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."
978975
@echo "Only a minimal time is needed for rebuilding, which is also good for your SSD."
979976
@echo "*** USE THIS APPROACH FIRST ***"
980-
find ./build/ -type f -name ".canary" -print -delete
981-
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 artifacts $(build)/$(coreboot_dir)/*"
982+
rm -rf "$(build)/$(coreboot_dir)/*"
983+
@echo "Removing coreboot board related artifacts $(board_build)"
984+
rm -rf "$(board_build)"
982985
$(call overwrite_canary_if_coreboot_git)
983986

984987
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)