mt7620.mk 12 KB

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