Skip to content

Commit 2a1efb1

Browse files
committed
WiP Makefile: wipe board dir to ensure reproducible builds. Will most probably impact qemu board public key injection since rom is wiped... Might need to move coreboot_dir and board_dir wiping under dev cycle helpers
Signed-off-by: Thierry Laurion <[email protected]>
1 parent 83c8947 commit 2a1efb1

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Makefile

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

145-
# Create the board output directory if it doesn't already exist
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
146148
BOARD_LOG := $(shell \
147149
mkdir -p "$(board_build)" ; \
150+
rm -rf "$(board_build)"/* ; \
148151
echo "$(DATE) $(GIT_HASH) $(GIT_STATUS)" > "$(HASHES)" ; \
149152
echo "$(DATE) $(GIT_HASH) $(GIT_STATUS)" > "$(SIZES)" ; \
150153
)

0 commit comments

Comments
 (0)