From 4726c988e5b7e391a3fbd239da8a3dd92d1a72cb Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Wed, 24 Mar 2021 13:34:13 +0000 Subject: [PATCH] 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 (cherry picked from commit 8f89b1ab0fef81c85925c88e99a557e91e575aa3) --- include/image-commands.mk | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/image-commands.mk b/include/image-commands.mk index 30e2afa71a..9d50867f69 100644 --- a/include/image-commands.mk +++ b/include/image-commands.mk @@ -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)))