From 8e9a59a6b924469c0061d4bd945ae0c6dbfdecfe Mon Sep 17 00:00:00 2001 From: David Bauer Date: Wed, 22 Aug 2018 17:30:44 +0200 Subject: build: add mkrasimage The current make-ras.sh image generation script for the ZyXEL NBG6617 has portability issues with bash. Because of this, factory images are currently not built correctly by the OpenWRT buildbots. This commit replaces the make-ras.sh by C-written mkrasimage. The new mkrasimage is also compatible with other ZyXEL devices using the ras image-format. This is not tested with the NBG6616 but it correctly builds the header for ZyXEL factory image. Signed-off-by: David Bauer --- include/image-commands.mk | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'include') diff --git a/include/image-commands.mk b/include/image-commands.mk index 3cc5dc21e1..ae01706b14 100644 --- a/include/image-commands.mk +++ b/include/image-commands.mk @@ -49,17 +49,17 @@ define Build/eva-image mv $@.new $@ endef -define Build/make-ras +define Build/zyxel-ras-image let \ newsize="$(subst k,* 1024,$(RAS_ROOTFS_SIZE))"; \ - $(TOPDIR)/scripts/make-ras.sh \ - --board $(RAS_BOARD) \ - --version $(RAS_VERSION) \ - --kernel $(call param_get_default,kernel,$(1),$(IMAGE_KERNEL)) \ - --rootfs $@ \ - --rootfssize $$newsize \ - $@.new - @mv $@.new $@ + $(STAGING_DIR_HOST)/bin/mkrasimage \ + -b $(RAS_BOARD) \ + -v $(RAS_VERSION) \ + -r $@ \ + -s $$newsize \ + -o $@.new \ + $(if $(findstring separate-kernel,$(word 1,$(1))),-k $(IMAGE_KERNEL)) \ + && mv $@.new $@ endef define Build/mkbuffaloimg -- cgit v1.2.3