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 --- target/linux/ar71xx/image/generic.mk | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'target/linux/ar71xx/image') diff --git a/target/linux/ar71xx/image/generic.mk b/target/linux/ar71xx/image/generic.mk index 3b320814c5..55963c5768 100644 --- a/target/linux/ar71xx/image/generic.mk +++ b/target/linux/ar71xx/image/generic.mk @@ -1063,8 +1063,12 @@ define Device/NBG6616 IMAGE_SIZE := 15323k MTDPARTS := spi0.0:192k(u-boot)ro,64k(env)ro,64k(RFdata)ro,384k(zyxel_rfsd),384k(romd),64k(header),2048k(kernel),13184k(rootfs),15232k@0x120000(firmware) CMDLINE += mem=128M - IMAGES := sysupgrade.bin + RAS_BOARD := NBG6616 + RAS_ROOTFS_SIZE := 14464k + RAS_VERSION := "$(VERSION_DIST) $(REVISION)" + IMAGES := factory.bin sysupgrade.bin KERNEL := kernel-bin | patch-cmdline | lzma | uImage lzma | jffs2 boot/vmlinux.lzma.uImage + IMAGE/factory.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-rootfs | pad-rootfs | pad-to 64k | check-size $$$$(IMAGE_SIZE) | zyxel-ras-image IMAGE/sysupgrade.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-rootfs | pad-rootfs | check-size $$$$(IMAGE_SIZE) # We cannot currently build a factory image. It is the sysupgrade image # prefixed with a header (which is actually written into the MTD device). -- cgit v1.2.3