ramips: add support for ZyXEL WAP6805 (Altibox WiFi+)
[openwrt/openwrt.git] / target / linux / ramips / image / mt7621.mk
index 9103fd67622d5850a9687640f10c5b7856d87ef8..ad61440c4c9a14c3052145eee2ead3d21032d12d 100644 (file)
@@ -81,6 +81,11 @@ define Build/iodata-mstc-header
        )
 endef
 
+define Build/mitrastarimage
+       uimage_padhdr -l 160 -i $@ -o $@.new
+       mv $@.new $@
+endef
+
 define Build/ubnt-erx-factory-image
        if [ -e $(KDIR)/tmp/$(KERNEL_INITRAMFS_IMAGE) -a "$$(stat -c%s $@)" -lt "$(KERNEL_SIZE)" ]; then \
                echo '21001:7' > $(1).compat; \
@@ -1129,3 +1134,17 @@ define Device/zio_freezio
        kmod-usb-ledtrig-usbport wpad-basic
 endef
 TARGET_DEVICES += zio_freezio
+
+define Device/zyxel_wap6805
+  BLOCKSIZE := 128k
+  PAGESIZE := 2048
+  KERNEL_SIZE := 4096k
+  UBINIZE_OPTS := -E 5
+  IMAGE_SIZE := 32448k
+  DEVICE_VENDOR := ZyXEL
+  DEVICE_MODEL := WAP6805
+  DEVICE_PACKAGES := kmod-mt7603 wpad-basic kmod-mt7621-qtn-rgmii
+  KERNEL := $(KERNEL_DTB) | uImage lzma | mitrastarimage
+  IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
+endef
+TARGET_DEVICES += zyxel_wap6805