diff mbox series

build: make sure that $(STAGING_DIR_IMAGE) exists

Message ID Y4YlRFwZzbnulIQV@makrotopia.org
State Accepted
Delegated to: Daniel Golle
Headers show
Series build: make sure that $(STAGING_DIR_IMAGE) exists | expand

Commit Message

Daniel Golle Nov. 29, 2022, 3:29 p.m. UTC
Call 'mkdir -p $(STAGING_DIR_IMAGE)' before trying to store files in
this potentially non-existing folder.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
---
 include/image-commands.mk | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/include/image-commands.mk b/include/image-commands.mk
index 1f6ba1c15a..41e1c96948 100644
--- a/include/image-commands.mk
+++ b/include/image-commands.mk
@@ -53,6 +53,7 @@  define Build/append-image-stage
 	cp "$(BIN_DIR)/$(DEVICE_IMG_PREFIX)-$(1)" "$@.stripmeta"
 	fwtool -s /dev/null -t "$@.stripmeta" || :
 	fwtool -i /dev/null -t "$@.stripmeta" || :
+	mkdir -p "$(STAGING_DIR_IMAGE)"
 	dd if="$@.stripmeta" of="$(STAGING_DIR_IMAGE)/$(BOARD)$(if $(SUBTARGET),-$(SUBTARGET))-$(DEVICE_NAME)-$(1)"
 	dd if="$@.stripmeta" >> "$@"
 	rm "$@.stripmeta"