1
0

mt7620.mk 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464
  1. #
  2. # MT7620A Profiles
  3. #
  4. define Build/tplink-header
  5. $(STAGING_DIR_HOST)/bin/mktplinkfw2 -a 0x4 -V "ver. 2.0" -B $(1) \
  6. -o $@.new -k $@ -r $(IMAGE_ROOTFS) && mv $@.new $@
  7. endef
  8. define Build/pad-kernel-ex2700
  9. cp $@ $@.tmp && dd if=/dev/zero bs=64 count=1 >> $@.tmp \
  10. && dd if=$@.tmp of=$@.new bs=64k conv=sync && truncate -s -64 $@.new \
  11. && cat ex2700-fakeroot.uImage >> $@.new && rm $@.tmp && mv $@.new $@
  12. endef
  13. define Build/netgear-header
  14. $(STAGING_DIR_HOST)/bin/mkdniimg \
  15. $(1) -v OpenWrt -i $@ \
  16. -o $@.new && mv $@.new $@
  17. endef
  18. define Build/elecom-header
  19. cp $@ $(KDIR)/v_0.0.0.bin
  20. ( \
  21. mkhash md5 $(KDIR)/v_0.0.0.bin && \
  22. echo 458 \
  23. ) | mkhash md5 > $(KDIR)/v_0.0.0.md5
  24. $(STAGING_DIR_HOST)/bin/tar -cf $@ -C $(KDIR) v_0.0.0.bin v_0.0.0.md5
  25. endef
  26. define Build/zyimage
  27. $(STAGING_DIR_HOST)/bin/zyimage $(1) $@
  28. endef
  29. define Device/ArcherC20i
  30. DTS := ArcherC20i
  31. SUPPORTED_DEVICES := c20i
  32. KERNEL := $(KERNEL_DTB)
  33. KERNEL_INITRAMFS := $(KERNEL_DTB) | tplink-header ArcherC20i -c
  34. IMAGE/sysupgrade.bin := append-kernel | tplink-header ArcherC20i -j | append-metadata
  35. DEVICE_TITLE := TP-Link ArcherC20i
  36. endef
  37. TARGET_DEVICES += ArcherC20i
  38. define Device/ArcherC50
  39. DTS := ArcherC50
  40. SUPPORTED_DEVICES := c50
  41. KERNEL := $(KERNEL_DTB)
  42. KERNEL_INITRAMFS := $(KERNEL_DTB) | tplink-header ArcherC50 -c
  43. IMAGE/sysupgrade.bin := append-kernel | tplink-header ArcherC50 -j | append-metadata
  44. DEVICE_TITLE := TP-Link ArcherC50
  45. endef
  46. TARGET_DEVICES += ArcherC50
  47. define Device/ArcherMR200
  48. DTS := ArcherMR200
  49. SUPPORTED_DEVICES := mr200
  50. KERNEL := $(KERNEL_DTB)
  51. KERNEL_INITRAMFS := $(KERNEL_DTB) | tplink-header ArcherMR200 -c
  52. IMAGE/sysupgrade.bin := append-kernel | tplink-header ArcherMR200 -j | append-metadata
  53. DEVICE_PACKAGES := kmod-usb2 kmod-usb-net kmod-usb-net-rndis kmod-usb-serial kmod-usb-serial-option adb
  54. DEVICE_TITLE := TP-Link ArcherMR200
  55. endef
  56. TARGET_DEVICES += ArcherMR200
  57. define Device/ex2700
  58. DTS := EX2700
  59. BLOCKSIZE := 4k
  60. IMAGE_SIZE := $(ralink_default_fw_size_4M)
  61. IMAGES += factory.bin
  62. KERNEL := $(KERNEL_DTB) | uImage lzma | pad-kernel-ex2700
  63. IMAGE/factory.bin := $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | \
  64. netgear-header -B EX2700 -H 29764623+4+0+32+2x2+0
  65. DEVICE_TITLE := Netgear EX2700
  66. endef
  67. TARGET_DEVICES += ex2700
  68. define Device/wt3020-4M
  69. DTS := WT3020-4M
  70. BLOCKSIZE := 4k
  71. IMAGE_SIZE := $(ralink_default_fw_size_4M)
  72. IMAGES += factory.bin
  73. IMAGE/factory.bin := $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | \
  74. poray-header -B WT3020 -F 4M
  75. DEVICE_TITLE := Nexx WT3020 (4MB)
  76. endef
  77. TARGET_DEVICES += wt3020-4M
  78. define Device/wt3020-8M
  79. DTS := WT3020-8M
  80. IMAGES += factory.bin
  81. IMAGE/factory.bin := $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | \
  82. poray-header -B WT3020 -F 8M
  83. DEVICE_TITLE := Nexx WT3020 (8MB)
  84. endef
  85. TARGET_DEVICES += wt3020-8M
  86. define Device/wrh-300cr
  87. DTS := WRH-300CR
  88. IMAGE_SIZE := $(ralink_default_fw_size_16M)
  89. IMAGES += factory.bin
  90. IMAGE/factory.bin := $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | \
  91. elecom-header
  92. DEVICE_TITLE := Elecom WRH-300CR
  93. DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci
  94. endef
  95. TARGET_DEVICES += wrh-300cr
  96. define Device/e1700
  97. DTS := E1700
  98. IMAGES += factory.bin
  99. IMAGE/factory.bin := $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | \
  100. umedia-header 0x013326
  101. DEVICE_TITLE := Linksys E1700
  102. endef
  103. TARGET_DEVICES += e1700
  104. define Device/ai-br100
  105. DTS := AI-BR100
  106. IMAGE_SIZE := 7936k
  107. DEVICE_TITLE := Aigale Ai-BR100
  108. DEVICE_PACKAGES:= kmod-usb2 kmod-usb-ohci
  109. endef
  110. TARGET_DEVICES += ai-br100
  111. define Device/whr-300hp2
  112. DTS := WHR-300HP2
  113. IMAGE_SIZE := 6848k
  114. DEVICE_TITLE := Buffalo WHR-300HP2
  115. endef
  116. TARGET_DEVICES += whr-300hp2
  117. define Device/whr-600d
  118. DTS := WHR-600D
  119. IMAGE_SIZE := 6848k
  120. DEVICE_TITLE := Buffalo WHR-600D
  121. endef
  122. TARGET_DEVICES += whr-600d
  123. define Device/whr-1166d
  124. DTS := WHR-1166D
  125. IMAGE_SIZE := 15040k
  126. DEVICE_TITLE := Buffalo WHR-1166D
  127. endef
  128. TARGET_DEVICES += whr-1166d
  129. define Device/dir-810l
  130. DTS := DIR-810L
  131. IMAGE_SIZE := 6720k
  132. DEVICE_TITLE := D-Link DIR-810L
  133. endef
  134. TARGET_DEVICES += dir-810l
  135. define Device/na930
  136. DTS := NA930
  137. IMAGE_SIZE := 20m
  138. DEVICE_TITLE := Sercomm NA930
  139. endef
  140. TARGET_DEVICES += na930
  141. define Device/microwrt
  142. DTS := MicroWRT
  143. IMAGE_SIZE := 16128k
  144. DEVICE_TITLE := Microduino MicroWRT
  145. endef
  146. TARGET_DEVICES += microwrt
  147. define Device/mt7620a
  148. DTS := MT7620a
  149. DEVICE_TITLE := MediaTek MT7620a EVB
  150. endef
  151. TARGET_DEVICES += mt7620a
  152. define Device/mt7620a_mt7610e
  153. DTS := MT7620a_MT7610e
  154. DEVICE_TITLE := MediaTek MT7620a + MT7610e EVB
  155. endef
  156. TARGET_DEVICES += mt7620a_mt7610e
  157. define Device/mt7620a_mt7530
  158. DTS := MT7620a_MT7530
  159. DEVICE_TITLE := MediaTek MT7620a + MT7530 EVB
  160. endef
  161. TARGET_DEVICES += mt7620a_mt7530
  162. define Device/mt7620a_v22sg
  163. DTS := MT7620a_V22SG
  164. DEVICE_TITLE := MediaTek MT7620a V22SG
  165. endef
  166. TARGET_DEVICES += mt7620a_v22sg
  167. define Device/rp-n53
  168. DTS := RP-N53
  169. DEVICE_TITLE := Asus RP-N53
  170. endef
  171. TARGET_DEVICES += rp-n53
  172. define Device/cf-wr800n
  173. DTS := CF-WR800N
  174. DEVICE_TITLE := Comfast CF-WR800N
  175. endef
  176. TARGET_DEVICES += cf-wr800n
  177. define Device/cs-qr10
  178. DTS := CS-QR10
  179. DEVICE_TITLE := Planex CS-QR10
  180. DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-i2c-core kmod-i2c-ralink kmod-sound-core kmod-sound-mtk kmod-sdhci-mt7620
  181. endef
  182. TARGET_DEVICES += cs-qr10
  183. define Device/db-wrt01
  184. DTS := DB-WRT01
  185. DEVICE_TITLE := Planex DB-WRT01
  186. endef
  187. TARGET_DEVICES += db-wrt01
  188. define Device/mzk-750dhp
  189. DTS := MZK-750DHP
  190. DEVICE_TITLE := Planex MZK-750DHP
  191. DEVICE_PACKAGES := kmod-mt76
  192. endef
  193. TARGET_DEVICES += mzk-750dhp
  194. define Device/mzk-ex300np
  195. DTS := MZK-EX300NP
  196. DEVICE_TITLE := Planex MZK-EX300NP
  197. endef
  198. TARGET_DEVICES += mzk-ex300np
  199. define Device/mzk-ex750np
  200. DTS := MZK-EX750NP
  201. DEVICE_TITLE := Planex MZK-EX750NP
  202. DEVICE_PACKAGES := kmod-mt76
  203. endef
  204. TARGET_DEVICES += mzk-ex750np
  205. define Device/hc5661
  206. DTS := HC5661
  207. IMAGE_SIZE := $(ralink_default_fw_size_16M)
  208. DEVICE_TITLE := HiWiFi HC5661
  209. DEVICE_PACKAGES := kmod-usb2 kmod-sdhci kmod-sdhci-mt7620 kmod-usb-ledtrig-usbport
  210. endef
  211. TARGET_DEVICES += hc5661
  212. define Device/hc5761
  213. DTS := HC5761
  214. IMAGE_SIZE := $(ralink_default_fw_size_16M)
  215. DEVICE_TITLE := HiWiFi HC5761
  216. DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-sdhci kmod-sdhci-mt7620 kmod-usb-ledtrig-usbport
  217. endef
  218. TARGET_DEVICES += hc5761
  219. define Device/hc5861
  220. DTS := HC5861
  221. IMAGE_SIZE := $(ralink_default_fw_size_16M)
  222. DEVICE_TITLE := HiWiFi HC5861
  223. DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-sdhci kmod-sdhci-mt7620 kmod-usb-ledtrig-usbport
  224. endef
  225. TARGET_DEVICES += hc5861
  226. define Device/oy-0001
  227. DTS := OY-0001
  228. IMAGE_SIZE := $(ralink_default_fw_size_16M)
  229. DEVICE_TITLE := Oh Yeah OY-0001
  230. endef
  231. TARGET_DEVICES += oy-0001
  232. define Device/psg1208
  233. DTS := PSG1208
  234. DEVICE_TITLE := Phicomm PSG1208
  235. DEVICE_PACKAGES := kmod-mt76
  236. endef
  237. TARGET_DEVICES += psg1208
  238. define Device/psg1218
  239. DTS := PSG1218
  240. DEVICE_TITLE := Phicomm PSG1218
  241. DEVICE_PACKAGES := kmod-mt76
  242. endef
  243. TARGET_DEVICES += psg1218
  244. define Device/y1
  245. DTS := Y1
  246. IMAGE_SIZE := $(ralink_default_fw_size_16M)
  247. DEVICE_TITLE := Lenovo Y1
  248. endef
  249. TARGET_DEVICES += y1
  250. define Device/y1s
  251. DTS := Y1S
  252. IMAGE_SIZE := $(ralink_default_fw_size_16M)
  253. DEVICE_TITLE := Lenovo Y1S
  254. endef
  255. TARGET_DEVICES += y1s
  256. define Device/mlw221
  257. DTS := MLW221
  258. IMAGE_SIZE := $(ralink_default_fw_size_16M)
  259. DEVICE_TITLE := Kingston MLW221
  260. endef
  261. TARGET_DEVICES += mlw221
  262. define Device/mlwg2
  263. DTS := MLWG2
  264. IMAGE_SIZE := $(ralink_default_fw_size_16M)
  265. DEVICE_TITLE := Kingston MLWG2
  266. endef
  267. TARGET_DEVICES += mlwg2
  268. define Device/wmr-300
  269. DTS := WMR-300
  270. DEVICE_TITLE := Buffalo WMR-300
  271. endef
  272. TARGET_DEVICES += wmr-300
  273. define Device/rt-n14u
  274. DTS := RT-N14U
  275. DEVICE_TITLE := Asus RT-N14u
  276. endef
  277. TARGET_DEVICES += rt-n14u
  278. define Device/wrtnode
  279. DTS := WRTNODE
  280. IMAGE_SIZE := $(ralink_default_fw_size_16M)
  281. DEVICE_TITLE := WRTNode
  282. endef
  283. TARGET_DEVICES += wrtnode
  284. define Device/miwifi-mini
  285. DTS := MIWIFI-MINI
  286. IMAGE_SIZE := $(ralink_default_fw_size_16M)
  287. DEVICE_TITLE := Xiaomi MiWiFi Mini
  288. DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci
  289. endef
  290. TARGET_DEVICES += miwifi-mini
  291. define Device/gl-mt300a
  292. DTS := GL-MT300A
  293. IMAGE_SIZE := $(ralink_default_fw_size_16M)
  294. DEVICE_TITLE := GL-Inet GL-MT300A
  295. DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-mt76
  296. endef
  297. TARGET_DEVICES += gl-mt300a
  298. define Device/gl-mt300n
  299. DTS := GL-MT300N
  300. IMAGE_SIZE := $(ralink_default_fw_size_16M)
  301. DEVICE_TITLE := GL-Inet GL-MT300N
  302. DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-mt76
  303. endef
  304. TARGET_DEVICES += gl-mt300n
  305. define Device/gl-mt750
  306. DTS := GL-MT750
  307. IMAGE_SIZE := $(ralink_default_fw_size_16M)
  308. DEVICE_TITLE := GL-Inet GL-MT750
  309. DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-mt76
  310. endef
  311. TARGET_DEVICES += gl-mt750
  312. define Device/zte-q7
  313. DTS := ZTE-Q7
  314. DEVICE_TITLE := ZTE Q7
  315. endef
  316. TARGET_DEVICES += zte-q7
  317. define Device/youku-yk1
  318. DTS := YOUKU-YK1
  319. IMAGE_SIZE := $(ralink_default_fw_size_16M)
  320. DEVICE_TITLE := YOUKU YK1
  321. endef
  322. TARGET_DEVICES += youku-yk1
  323. define Device/zbt-ape522ii
  324. DTS := ZBT-APE522II
  325. DEVICE_TITLE := Zbtlink ZBT-APE522II
  326. DEVICE_PACKAGES := kmod-mt76
  327. endef
  328. TARGET_DEVICES += zbt-ape522ii
  329. define Device/zbt-cpe102
  330. DTS := ZBT-CPE102
  331. DEVICE_TITLE := Zbtlink ZBT-CPE102
  332. DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci
  333. endef
  334. TARGET_DEVICES += zbt-cpe102
  335. define Device/zbt-wa05
  336. DTS := ZBT-WA05
  337. DEVICE_TITLE := Zbtlink ZBT-WA05
  338. endef
  339. TARGET_DEVICES += zbt-wa05
  340. define Device/zbt-we826
  341. DTS := ZBT-WE826
  342. IMAGE_SIZE := $(ralink_default_fw_size_16M)
  343. DEVICE_TITLE := Zbtlink ZBT-WE826
  344. DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-mt76 kmod-sdhci-mt7620
  345. endef
  346. TARGET_DEVICES += zbt-we826
  347. define Device/zbt-wr8305rt
  348. DTS := ZBT-WR8305RT
  349. DEVICE_TITLE := Zbtlink ZBT-WR8305RT
  350. endef
  351. TARGET_DEVICES += zbt-wr8305rt
  352. define Device/tiny-ac
  353. DTS := TINY-AC
  354. DEVICE_TITLE := Dovado Tiny AC
  355. DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci
  356. endef
  357. TARGET_DEVICES += tiny-ac
  358. define Device/dch-m225
  359. DTS := DCH-M225
  360. BLOCKSIZE := 4k
  361. IMAGES += factory.bin
  362. IMAGE_SIZE := 6848k
  363. IMAGE/sysupgrade.bin := \
  364. append-kernel | pad-offset $$$$(BLOCKSIZE) 64 | append-rootfs | \
  365. seama -m "dev=/dev/mtdblock/2" -m "type=firmware" | \
  366. pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE)
  367. IMAGE/factory.bin := \
  368. append-kernel | pad-offset $$$$(BLOCKSIZE) 64 | \
  369. append-rootfs | pad-rootfs -x 64 | \
  370. seama -m "dev=/dev/mtdblock/2" -m "type=firmware" | \
  371. seama-seal -m "signature=wapn22_dlink.2013gui_dap1320b" | \
  372. check-size $$$$(IMAGE_SIZE)
  373. DEVICE_TITLE := D-Link DCH-M225
  374. DEVICE_PACKAGES := kmod-mt76
  375. endef
  376. TARGET_DEVICES += dch-m225
  377. define Device/kn_rc
  378. DTS := kn_rc
  379. DEVICE_TITLE := ZyXEL Keenetic Omni
  380. DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-usb-ledtrig-usbport
  381. IMAGES += factory.bin
  382. IMAGE/factory.bin := $$(IMAGE/sysupgrade.bin) | check-size $$$$(IMAGE_SIZE) | \
  383. zyimage -d 4882 -v "ZyXEL Keenetic Omni"
  384. endef
  385. TARGET_DEVICES += kn_rc
  386. define Device/kn_rf
  387. DTS := kn_rf
  388. DEVICE_TITLE := ZyXEL Keenetic Omni II
  389. DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-usb-ledtrig-usbport
  390. IMAGES += factory.bin
  391. IMAGE/factory.bin := $$(IMAGE/sysupgrade.bin) | check-size $$$$(IMAGE_SIZE) | \
  392. zyimage -d 2102034 -v "ZyXEL Keenetic Omni II"
  393. endef
  394. TARGET_DEVICES += kn_rf
  395. define Device/kng_rc
  396. DTS := kng_rc
  397. IMAGE_SIZE := $(ralink_default_fw_size_16M)
  398. DEVICE_TITLE := ZyXEL Keenetic Viva
  399. DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-usb-ledtrig-usbport kmod-switch-rtl8366-smi kmod-switch-rtl8367b
  400. IMAGES += factory.bin
  401. IMAGE/factory.bin := $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | \
  402. zyimage -d 8997 -v "ZyXEL Keenetic Viva"
  403. endef
  404. TARGET_DEVICES += kng_rc