[OpenWrt-Devel] [PATCH 1/2] include: add a new ubinize-image build target

Mathieu Olivari mathieu at codeaurora.org
Thu Aug 20 21:34:26 EDT 2015


This new build target can be used to generate a ubinized.bin file,
including the kernel and the FS specified as an argument.

Signed-off-by: Mathieu Olivari <mathieu at codeaurora.org>
---
 include/image.mk | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/include/image.mk b/include/image.mk
index 73fc805..f98d871 100644
--- a/include/image.mk
+++ b/include/image.mk
@@ -380,6 +380,12 @@ define Build/combined-image
 	@mv $@.new $@
 endef
 
+define Build/ubinize-image
+	$(if $(filter $(1),$(TARGET_FILESYSTEMS)), \
+		$(call Image/Build/UbinizeImage,$(DEVICE_NAME),--kernel $(word 1,$^),$(1),$(UBINIZE_OPTS)); \
+		cp $(KDIR)/$(IMG_PREFIX)-$(DEVICE_NAME)-$(1)-ubinized.bin $@)
+endef
+
 define Device/Init
   PROFILES := $(PROFILE)
   DEVICE_NAME := $(1)
-- 
2.1.4
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list