aboutsummaryrefslogtreecommitdiffstats
path: root/include/image-commands.mk
diff options
context:
space:
mode:
authorDavid Bauer <mail@david-bauer.net>2018-08-22 17:30:44 +0200
committerJohn Crispin <john@phrozen.org>2018-08-28 11:26:53 +0200
commit8e9a59a6b924469c0061d4bd945ae0c6dbfdecfe (patch)
tree7914371eee00fbd443f0293f454e6d34e7d03274 /include/image-commands.mk
parent8132e0624726f0df512f79052299a5790259cda0 (diff)
downloadupstream-8e9a59a6b924469c0061d4bd945ae0c6dbfdecfe.tar.gz
upstream-8e9a59a6b924469c0061d4bd945ae0c6dbfdecfe.tar.bz2
upstream-8e9a59a6b924469c0061d4bd945ae0c6dbfdecfe.zip
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 <mail@david-bauer.net>
Diffstat (limited to 'include/image-commands.mk')
-rw-r--r--include/image-commands.mk18
1 files changed, 9 insertions, 9 deletions
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