image: add 'append-image' build command

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>
(cherry picked from commit 8f89b1ab0f)
This commit is contained in:
Daniel Golle 2021-03-24 13:34:13 +00:00 committed by Tianling Shen
parent 9d6b3d5182
commit 4726c988e5
No known key found for this signature in database
GPG Key ID: 6850B6345C862176

View File

@ -11,6 +11,10 @@ define rootfs_align
$(patsubst %-256k,0x40000,$(patsubst %-128k,0x20000,$(patsubst %-64k,0x10000,$(patsubst squashfs%,0x4,$(patsubst root.%,%,$(1))))))
endef
define Build/append-image
dd if=$(BIN_DIR)/$(IMG_PREFIX)$(if $(PROFILE_SANITIZED),-$(PROFILE_SANITIZED))-$(1) >> $@
endef
define Build/buffalo-enc
$(eval product=$(word 1,$(1)))
$(eval version=$(word 2,$(1)))