ramips: fix Youku-YK1 support
[openwrt/openwrt.git] / target / linux / ramips / image / mt7620.mk
index fd9f10a246500ba151b78cc7d16a47728ed85da4..2f3f59e4c69f67ea811ea032ba978ab5f600fb7a 100644 (file)
@@ -2,7 +2,7 @@
 # MT7620A Profiles
 #
 
-DEVICE_VARS += TPLINK_BOARD_ID
+DEVICE_VARS += TPLINK_FLASHLAYOUT TPLINK_HWID TPLINK_HWREV TPLINK_HWREVADD TPLINK_HVERSION
 
 define Build/elecom-header
        cp $@ $(KDIR)/v_0.0.0.bin
@@ -25,44 +25,75 @@ define Device/ai-br100
 endef
 TARGET_DEVICES += ai-br100
 
+define Device/Archer
+  TPLINK_HWREVADD := 0
+  TPLINK_HVERSION := 3
+  KERNEL := $(KERNEL_DTB)
+  KERNEL_INITRAMFS := $(KERNEL_DTB) | tplink-v2-header -e
+  IMAGE/factory.bin := tplink-v2-image -e
+  IMAGE/sysupgrade.bin := tplink-v2-image -s -e | append-metadata
+endef
+
+define Device/ArcherC20
+  $(Device/Archer)
+  DTS := ArcherC20
+  SUPPORTED_DEVICES := c20
+  TPLINK_FLASHLAYOUT := 8Mmtk
+  TPLINK_HWID := 0xc2000001
+  TPLINK_HWREV := 0x44
+  TPLINK_HWREVADD := 0x1
+  IMAGES += factory.bin
+  DEVICE_TITLE := TP-Link ArcherC20
+  DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport
+endef
+TARGET_DEVICES += ArcherC20
+
 define Device/ArcherC20i
+  $(Device/Archer)
   DTS := ArcherC20i
   SUPPORTED_DEVICES := c20i
-  TPLINK_BOARD_ID := ArcherC20i
-  KERNEL := $(KERNEL_DTB)
-  KERNEL_INITRAMFS := $(KERNEL_DTB) | tplink-v2-header
-  IMAGE/factory.bin := tplink-v2-image
-  IMAGE/sysupgrade.bin := tplink-v2-image -s | append-metadata
+  TPLINK_FLASHLAYOUT := 8Mmtk
+  TPLINK_HWID := 0xc2000001
+  TPLINK_HWREV := 58
   IMAGES += factory.bin
   DEVICE_TITLE := TP-Link ArcherC20i
 endef
 TARGET_DEVICES += ArcherC20i
 
-define Device/ArcherC50
+define Device/ArcherC50v1
+  $(Device/Archer)
   DTS := ArcherC50
   SUPPORTED_DEVICES := c50
-  TPLINK_BOARD_ID := ArcherC50
-  KERNEL := $(KERNEL_DTB)
-  KERNEL_INITRAMFS := $(KERNEL_DTB) | tplink-v2-header
-  IMAGE/factory.bin := tplink-v2-image
-  IMAGE/sysupgrade.bin := tplink-v2-image -s | append-metadata
-  IMAGES += factory.bin
-  DEVICE_TITLE := TP-Link ArcherC50
+  TPLINK_FLASHLAYOUT := 8Mmtk
+  TPLINK_HWID := 0xc7500001
+  TPLINK_HWREV := 69
+  IMAGES += factory-us.bin factory-eu.bin
+  IMAGE/factory-us.bin := tplink-v2-image -e -w 0
+  IMAGE/factory-eu.bin := tplink-v2-image -e -w 2
+  DEVICE_TITLE := TP-Link ArcherC50v1
 endef
-TARGET_DEVICES += ArcherC50
+TARGET_DEVICES += ArcherC50v1
 
 define Device/ArcherMR200
+  $(Device/Archer)
   DTS := ArcherMR200
   SUPPORTED_DEVICES := mr200
-  TPLINK_BOARD_ID := ArcherMR200
-  KERNEL := $(KERNEL_DTB)
-  KERNEL_INITRAMFS := $(KERNEL_DTB) | tplink-v2-header
-  IMAGE/sysupgrade.bin := tplink-v2-image -s | append-metadata
+  TPLINK_FLASHLAYOUT := 8MLmtk
+  TPLINK_HWID := 0xd7500001
+  TPLINK_HWREV := 0x4a
   DEVICE_PACKAGES := kmod-usb2 kmod-usb-net kmod-usb-net-rndis kmod-usb-serial kmod-usb-serial-option adb-enablemodem
   DEVICE_TITLE := TP-Link ArcherMR200
 endef
 TARGET_DEVICES += ArcherMR200
 
+define Device/c108
+  DTS := C108
+  IMAGE_SIZE := 16777216
+  DEVICE_TITLE := HNET C108
+  DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-sdhci-mt7620
+endef
+TARGET_DEVICES += c108
+
 define Device/cf-wr800n
   DTS := CF-WR800N
   DEVICE_TITLE := Comfast CF-WR800N
@@ -141,17 +172,18 @@ define Device/ex2700
 endef
 TARGET_DEVICES += ex2700
 
-define Device/ex3700
+define Device/ex3700-ex3800
   NETGEAR_BOARD_ID := U12H319T00_NETGEAR
   DTS := EX3700
   BLOCKSIZE := 4k
   IMAGE_SIZE := 7744k
-  IMAGES += factory.bin
-  IMAGE/factory.bin := $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | netgear-chk
+  IMAGES += factory.chk
+  IMAGE/factory.chk := $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | netgear-chk
   DEVICE_PACKAGES := -kmod-mt76 kmod-mt76x2
-  DEVICE_TITLE := Netgear EX3700
+  DEVICE_TITLE := Netgear EX3700/EX3800
+  SUPPORTED_DEVICES := ex3700
 endef
-TARGET_DEVICES += ex3700
+TARGET_DEVICES += ex3700-ex3800
 
 define Device/gl-mt300a
   DTS := GL-MT300A
@@ -161,6 +193,13 @@ define Device/gl-mt300a
 endef
 TARGET_DEVICES += gl-mt300a
 
+define Device/u25awf-h1
+  DTS := U25AWF-H1
+  IMAGE_SIZE := 16064k
+  DEVICE_TITLE := Kimax U25AWF-H1
+endef
+TARGET_DEVICES += u25awf-h1
+
 define Device/gl-mt300n
   DTS := GL-MT300N
   IMAGE_SIZE := $(ralink_default_fw_size_16M)
@@ -446,6 +485,7 @@ define Device/wt3020-8M
   IMAGE/factory.bin := $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | \
        poray-header -B WT3020 -F 8M
   DEVICE_TITLE := Nexx WT3020 (8MB)
+  DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci
 endef
 TARGET_DEVICES += wt3020-8M
 
@@ -465,11 +505,21 @@ TARGET_DEVICES += y1s
 
 define Device/youku-yk1
   DTS := YOUKU-YK1
-  IMAGE_SIZE := $(ralink_default_fw_size_16M)
+  IMAGE_SIZE := $(ralink_default_fw_size_32M)
   DEVICE_TITLE := YOUKU YK1
+  DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-sdhci-mt7620 kmod-usb-ledtrig-usbport
 endef
 TARGET_DEVICES += youku-yk1
 
+define Device/we1026-5g-16m
+  DTS := WE1026-5G-16M
+  IMAGE_SIZE := 16777216
+  SUPPORTED_DEVICES += we1026-5g-16m
+  DEVICE_TITLE := Zbtlink ZBT-WE1026-5G (16M)
+  DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-mt76 kmod-sdhci-mt7620
+endef
+TARGET_DEVICES += we1026-5g-16m
+
 define Device/zbt-ape522ii
   DTS := ZBT-APE522II
   DEVICE_TITLE := Zbtlink ZBT-APE522II