ipq40xx: Add support for Teltonika RUTX10
[openwrt/openwrt.git] / target / linux / ipq40xx / image / generic.mk
index dcfe3e027c1e7137a95c7a6a40e5e0e9ca9dbf7e..0d7d7a30d223be108e2288b3e7424c84f3350b80 100644 (file)
@@ -46,6 +46,17 @@ define Build/append-rootfshdr
        dd if=$@.new bs=64 count=1 >> $(IMAGE_KERNEL)
 endef
 
+define Build/append-rutx-metadata
+       echo \
+               '{ \
+                       "device_code": [".*"], \
+                       "hwver": [".*"], \
+                       "batch": [".*"], \
+                       "serial": [".*"], \
+                       "supported_devices":["teltonika,rutx"] \
+               }' | fwtool -I - $@
+endef
+
 define Build/mkmylofw_32m
        $(eval device_id=$(word 1,$(1)))
        $(eval revision=$(word 2,$(1)))
@@ -252,10 +263,10 @@ endef
 TARGET_DEVICES += buffalo_wtr-m2133hp
 
 define Device/cellc_rtl30vw
-       KERNEL_SUFFIX := -fit-uImage.itb
+       KERNEL_SUFFIX := -fit-zImage.itb
        KERNEL_INITRAMFS = kernel-bin | gzip | fit gzip $$(DTS_DIR)/$$(DEVICE_DTS).dtb
-       KERNEL = kernel-bin | gzip | fit gzip $$(DTS_DIR)/$$(DEVICE_DTS).dtb | uImage lzma | pad-to 2048
-       KERNEL_NAME := Image
+       KERNEL = kernel-bin | fit none $$(DTS_DIR)/$$(DEVICE_DTS).dtb | uImage lzma | pad-to 2048
+       KERNEL_NAME := zImage
        KERNEL_IN_UBI :=
        IMAGES := nand-factory.bin nand-sysupgrade.bin
        IMAGE/nand-factory.bin := append-rootfshdr | append-ubi | qsdk-ipq-factory-nand-askey
@@ -308,6 +319,7 @@ define Device/compex_wpj428
        IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata
        IMAGE/cpximg-6a04.bin := append-kernel | append-rootfs | pad-rootfs | mkmylofw_32m 0x8A2 3
        DEVICE_PACKAGES := kmod-gpio-beeper
+       DEFAULT := n
 endef
 TARGET_DEVICES += compex_wpj428
 
@@ -327,6 +339,7 @@ define Device/devolo_magic-2-wifi-next
        IMAGES := sysupgrade.bin
        IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata
        DEVICE_PACKAGES := ipq-wifi-devolo_magic-2-wifi-next
+       DEFAULT := n
 endef
 TARGET_DEVICES += devolo_magic-2-wifi-next
 
@@ -435,6 +448,7 @@ define Device/engenius_emr3500
        IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata
        IMAGE/factory.bin := qsdk-ipq-factory-nor | check-size
        DEVICE_PACKAGES := ipq-wifi-engenius_emr3500
+       DEFAULT := n
 endef
 TARGET_DEVICES += engenius_emr3500
 
@@ -750,6 +764,32 @@ define Device/openmesh_a62
 endef
 TARGET_DEVICES += openmesh_a62
 
+define Device/p2w_r619ac
+       $(call Device/FitzImage)
+       $(call Device/UbiFit)
+       DEVICE_VENDOR := P&W
+       DEVICE_MODEL := R619AC
+       SOC := qcom-ipq4019
+       DEVICE_DTS_CONFIG := config@10
+       BLOCKSIZE := 128k
+       PAGESIZE := 2048
+       DEVICE_PACKAGES := ipq-wifi-p2w_r619ac
+endef
+
+define Device/p2w_r619ac-64m
+       $(call Device/p2w_r619ac)
+       DEVICE_VARIANT := 64M NAND
+       IMAGES += nand-factory.bin
+       IMAGE/nand-factory.bin := append-ubi | qsdk-ipq-factory-nand
+endef
+TARGET_DEVICES += p2w_r619ac-64m
+
+define Device/p2w_r619ac-128m
+       $(call Device/p2w_r619ac)
+       DEVICE_VARIANT := 128M NAND
+endef
+TARGET_DEVICES += p2w_r619ac-128m
+
 define Device/plasmacloud_pa1200
        $(call Device/FitImageLzma)
        DEVICE_VENDOR := Plasma Cloud
@@ -794,6 +834,7 @@ define Device/qcom_ap-dk01.1-c1
        IMAGE_SIZE := 26624k
        $(call Device/FitImage)
        IMAGE/sysupgrade.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-rootfs | pad-rootfs | append-metadata
+       DEFAULT := n
 endef
 TARGET_DEVICES += qcom_ap-dk01.1-c1
 
@@ -810,6 +851,7 @@ define Device/qcom_ap-dk04.1-c1
        BLOCKSIZE := 128k
        PAGESIZE := 2048
        BOARD_NAME := ap-dk04.1-c1
+       DEFAULT := n
 endef
 TARGET_DEVICES += qcom_ap-dk04.1-c1
 
@@ -824,6 +866,7 @@ define Device/qxwlan_e2600ac-c1
        IMAGE_SIZE := 31232k
        IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata
        DEVICE_PACKAGES := ipq-wifi-qxwlan_e2600ac
+       DEFAULT := n
 endef
 TARGET_DEVICES += qxwlan_e2600ac-c1
 
@@ -841,6 +884,22 @@ define Device/qxwlan_e2600ac-c2
 endef
 TARGET_DEVICES += qxwlan_e2600ac-c2
 
+define Device/teltonika_rutx10
+       $(call Device/FitImage)
+       $(call Device/UbiFit)
+       DEVICE_VENDOR := Teltonika
+       DEVICE_MODEL := RUTX10
+       SOC := qcom-ipq4018
+       DEVICE_DTS_CONFIG := config@5
+       KERNEL_INSTALL := 1
+       BLOCKSIZE := 128k
+       PAGESIZE := 2048
+       FILESYSTEMS := squashfs
+       IMAGE/nand-factory.ubi := append-ubi | qsdk-ipq-factory-nand | append-rutx-metadata
+       DEVICE_PACKAGES := ipq-wifi-teltonika_rutx kmod-bluetooth
+endef
+TARGET_DEVICES += teltonika_rutx10
+
 define Device/unielec_u4019-32m
        $(call Device/FitImage)
        DEVICE_VENDOR := Unielec
@@ -851,6 +910,7 @@ define Device/unielec_u4019-32m
        KERNEL_SIZE := 4096k
        IMAGE_SIZE := 31232k
        IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata
+       DEFAULT := n
 endef
 TARGET_DEVICES += unielec_u4019-32m