[openwrt/openwrt] image: add 'append-image' build command

LEDE Commits lede-commits at lists.infradead.org
Wed Mar 24 15:29:24 GMT 2021


dangole pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/8f89b1ab0fef81c85925c88e99a557e91e575aa3

commit 8f89b1ab0fef81c85925c88e99a557e91e575aa3
Author: Daniel Golle <daniel at makrotopia.org>
AuthorDate: Wed Mar 24 13:34:13 2021 +0000

    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 at makrotopia.org>
---
 include/image-commands.mk | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/include/image-commands.mk b/include/image-commands.mk
index 684646e233..ec4f9624f5 100644
--- a/include/image-commands.mk
+++ b/include/image-commands.mk
@@ -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)))
 #")')



More information about the lede-commits mailing list