aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ath79/image/nand.mk
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/ath79/image/nand.mk')
-rw-r--r--target/linux/ath79/image/nand.mk49
1 files changed, 49 insertions, 0 deletions
diff --git a/target/linux/ath79/image/nand.mk b/target/linux/ath79/image/nand.mk
index db4ff9c6f0..c30fa814c2 100644
--- a/target/linux/ath79/image/nand.mk
+++ b/target/linux/ath79/image/nand.mk
@@ -1,3 +1,31 @@
+# attention: only zlib compression is allowed for the boot fs
+define Build/zyxel-buildkerneljffs
+ rm -rf $(KDIR_TMP)/zyxelnbg6716
+ mkdir -p $(KDIR_TMP)/zyxelnbg6716/image/boot
+ cp $@ $(KDIR_TMP)/zyxelnbg6716/image/boot/vmlinux.lzma.uImage
+ $(STAGING_DIR_HOST)/bin/mkfs.jffs2 \
+ --big-endian --squash-uids -v -e 128KiB -q -f -n -x lzma -x rtime \
+ -o $@ \
+ -d $(KDIR_TMP)/zyxelnbg6716/image
+ rm -rf $(KDIR_TMP)/zyxelnbg6716
+endef
+
+define Build/zyxel-factory
+ let \
+ maxsize="$(subst k,* 1024,$(RAS_ROOTFS_SIZE))"; \
+ let size="$$(stat -c%s $@)"; \
+ if [ $$size -lt $$maxsize ]; then \
+ $(STAGING_DIR_HOST)/bin/mkrasimage \
+ -b $(RAS_BOARD) \
+ -v $(RAS_VERSION) \
+ -r $@ \
+ -s $$maxsize \
+ -o $@.new \
+ -l 131072 \
+ && mv $@.new $@ ; \
+ fi
+endef
+
define Device/glinet_gl-ar300m-nand
ATH_SOC := qca9531
DEVICE_VENDOR := GL.iNet
@@ -13,3 +41,24 @@ define Device/glinet_gl-ar300m-nand
IMAGE/factory.ubi := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi
endef
TARGET_DEVICES += glinet_gl-ar300m-nand
+
+define Device/zyxel_nbg6716
+ ATH_SOC := qca9558
+ DEVICE_VENDOR := ZyXEL
+ DEVICE_PACKAGES := kmod-usb2 kmod-usb-ledtrig-usbport kmod-ath10k-ct ath10k-firmware-qca988x-ct
+ RAS_BOARD := NBG6716
+ RAS_ROOTFS_SIZE := 29696k
+ RAS_VERSION := "OpenWrt Linux-$(LINUX_VERSION)"
+ KERNEL_SIZE := 4096k
+ BLOCKSIZE := 128k
+ PAGESIZE := 2048
+ KERNEL := kernel-bin | append-dtb | uImage none | \
+ zyxel-buildkerneljffs | check-size 4096k
+ IMAGES := sysupgrade.tar sysupgrade-4M-Kernel.bin factory.bin
+ IMAGE/sysupgrade.tar/squashfs := append-rootfs | pad-to $$$${BLOCKSIZE} | sysupgrade-tar rootfs=$$$$@ | append-metadata
+ IMAGE/sysupgrade-4M-Kernel.bin/squashfs := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi | pad-to 263192576 | gzip
+ IMAGE/factory.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi | zyxel-factory
+ UBINIZE_OPTS := -E 5
+endef
+TARGET_DEVICES += zyxel_nbg6716
+DEVICE_VARS += RAS_ROOTFS_SIZE RAS_BOARD RAS_VERSION