image: add 'append-image' build command
authorDaniel Golle <daniel@makrotopia.org>
Wed, 24 Mar 2021 13:34:13 +0000 (13:34 +0000)
committerDaniel Golle <daniel@makrotopia.org>
Wed, 24 Mar 2021 15:27:48 +0000 (15:27 +0000)
Commit 7ce1d9ce09 ("build: artifacts add dependency for built images")
now makes sure that sysupgrade and initramfs images are available at
the stage that artifacts are created.
Allow making use of that with a new build command 'append-image' to
be used in artifacts.
See the next commit for an example.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
include/image-commands.mk

index 684646e233cc223ae93527e9613fe6fadb1a6753..ec4f9624f54c99adfcf064d0ffc3adf57ae07bf5 100644 (file)
@@ -27,6 +27,10 @@ define Build/append-kernel
        dd if=$(IMAGE_KERNEL) >> $@
 endef
 
+define Build/append-image
+       dd if=$(BIN_DIR)/$(IMG_PREFIX)$(if $(PROFILE_SANITIZED),-$(PROFILE_SANITIZED))-$(1) >> $@
+endef
+
 compat_version=$(if $(DEVICE_COMPAT_VERSION),$(DEVICE_COMPAT_VERSION),1.0)
 json_quote=$(subst ','\'',$(subst ",\",$(1)))
 #")')