Skip to content

Commit

Permalink
image: use portable filename in 'append-image-stage'
Browse files Browse the repository at this point in the history
The 'append-image-stage' command doesn't work when setting the
EXTRA_IMAGE_NAME option of the ImageBuilder as in that case
DEVICE_IMG_PREFIX is modified and no longer matches the value it had in
buildroot. Choose a filename independent of DEVICE_IMG_PREFIX for
images staged using 'append-image-stage' to fix that.

Fixes: de4b29d ("image: introduce 'append-image-stage' build command")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
  • Loading branch information
dangowrt committed Apr 24, 2021
1 parent 210916c commit c7a5a09
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/image-commands.mk
Expand Up @@ -33,11 +33,11 @@ endef

ifdef IB
define Build/append-image-stage
dd if=$(STAGING_DIR_IMAGE)/$(DEVICE_IMG_PREFIX)-$(1) >> $@
dd if=$(STAGING_DIR_IMAGE)/$(BOARD)$(if $(SUBTARGET),-$(SUBTARGET))-$(DEVICE_NAME)-$(1) >> $@
endef
else
define Build/append-image-stage
dd if=$(BIN_DIR)/$(DEVICE_IMG_PREFIX)-$(1) of=$(STAGING_DIR_IMAGE)/$(DEVICE_IMG_PREFIX)-$(1)
dd if=$(BIN_DIR)/$(DEVICE_IMG_PREFIX)-$(1) of=$(STAGING_DIR_IMAGE)/$(BOARD)$(if $(SUBTARGET),-$(SUBTARGET))-$(DEVICE_NAME)-$(1)
dd if=$(BIN_DIR)/$(DEVICE_IMG_PREFIX)-$(1) >> $@
endef
endif
Expand Down

0 comments on commit c7a5a09

Please sign in to comment.