mt7620.mk 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423
  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 $@ && 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/poray-header
  19. mkporayfw $(1) \
  20. -f $@ \
  21. -o $@.new; \
  22. mv $@.new $@
  23. endef
  24. define Build/umedia-header
  25. fix-u-media-header -T 0x46 -B $(1) -i $@ -o $@.new && mv $@.new $@
  26. endef
  27. define Build/elecom-header
  28. cp $@ $(KDIR)/v_0.0.0.bin
  29. ( \
  30. $(STAGING_DIR_HOST)/bin/md5sum $(KDIR)/v_0.0.0.bin | \
  31. sed 's/ .*//' && \
  32. echo 458 \
  33. ) | $(STAGING_DIR_HOST)/bin/md5sum | \
  34. sed 's/ .*//' > $(KDIR)/v_0.0.0.md5
  35. $(STAGING_DIR_HOST)/bin/tar -cf $@ -C $(KDIR) v_0.0.0.bin v_0.0.0.md5
  36. endef
  37. define Device/ArcherC20i
  38. DTS := ArcherC20i
  39. KERNEL := $(KERNEL_DTB)
  40. KERNEL_INITRAMFS := $(KERNEL_DTB) | tplink-header ArcherC20i -c
  41. IMAGE/sysupgrade.bin := append-kernel | tplink-header ArcherC20i -j -r $(KDIR)/root.squashfs
  42. DEVICE_TITLE := TP-Link ArcherC20i
  43. endef
  44. TARGET_DEVICES += ArcherC20i
  45. define Device/ArcherC50
  46. DTS := ArcherC50
  47. KERNEL := $(KERNEL_DTB)
  48. KERNEL_INITRAMFS := $(KERNEL_DTB) | tplink-header ArcherC50 -c
  49. IMAGE/sysupgrade.bin := append-kernel | tplink-header ArcherC50 -j -r $(KDIR)/root.squashfs
  50. DEVICE_TITLE := TP-Link ArcherC50
  51. endef
  52. TARGET_DEVICES += ArcherC50
  53. ex2700_mtd_size=3866624
  54. define Device/ex2700
  55. DTS := EX2700
  56. IMAGE_SIZE := $(ex2700_mtd_size)
  57. IMAGES += factory.bin
  58. KERNEL := $(KERNEL_DTB) | uImage lzma | pad-kernel-ex2700
  59. IMAGE/factory.bin := $$(IMAGE/sysupgrade.bin) | netgear-header -B EX2700 -H 29764623+4+0+32+2x2+0
  60. DEVICE_TITLE := Netgear EX2700
  61. endef
  62. TARGET_DEVICES += ex2700
  63. define Device/wt3020-4M
  64. DTS := WT3020-4M
  65. IMAGE_SIZE := $(ralink_default_fw_size_4M)
  66. IMAGES += factory.bin
  67. IMAGE/factory.bin := $$(IMAGE/sysupgrade.bin) | poray-header -B WT3020 -F 4M
  68. DEVICE_TITLE := Nexx WT3020 (4MB)
  69. endef
  70. TARGET_DEVICES += wt3020-4M
  71. define Device/wt3020-8M
  72. DTS := WT3020-8M
  73. IMAGE_SIZE := $(ralink_default_fw_size_8M)
  74. IMAGES += factory.bin
  75. IMAGE/factory.bin := $$(IMAGE/sysupgrade.bin) | poray-header -B WT3020 -F 8M
  76. DEVICE_TITLE := Nexx WT3020 (8MB)
  77. endef
  78. TARGET_DEVICES += wt3020-8M
  79. define Device/wrh-300cr
  80. DTS := WRH-300CR
  81. IMAGE_SIZE := $(ralink_default_fw_size_16M)
  82. IMAGES += factory.bin
  83. IMAGE/factory.bin := $$(IMAGE/sysupgrade.bin) | elecom-header
  84. DEVICE_TITLE := Elecom WRH-300CR
  85. DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci
  86. endef
  87. TARGET_DEVICES += wrh-300cr
  88. define Device/e1700
  89. DTS := E1700
  90. IMAGES += factory.bin
  91. IMAGE/factory.bin := $$(IMAGE/sysupgrade.bin) | umedia-header 0x013326
  92. DEVICE_TITLE := Linksys E1700
  93. endef
  94. TARGET_DEVICES += e1700
  95. br100_mtd_size=8126464
  96. define Device/ai-br100
  97. DTS := AI-BR100
  98. IMAGE_SIZE := $(br100_mtd_size)
  99. DEVICE_TITLE := Aigale Ai-BR100
  100. DEVICE_PACKAGES:= kmod-usb2 kmod-usb-ohci
  101. endef
  102. TARGET_DEVICES += ai-br100
  103. whr_300hp2_mtd_size=7012352
  104. define Device/whr-300hp2
  105. DTS := WHR-300HP2
  106. IMAGE_SIZE := $(whr_300hp2_mtd_size)
  107. DEVICE_TITLE := Buffalo WHR-300HP2
  108. endef
  109. TARGET_DEVICES += whr-300hp2
  110. define Device/whr-600d
  111. DTS := WHR-600D
  112. IMAGE_SIZE := $(whr_300hp2_mtd_size)
  113. DEVICE_TITLE := Buffalo WHR-600D
  114. endef
  115. TARGET_DEVICES += whr-600d
  116. whr_1166d_mtd_size=15400960
  117. define Device/whr-1166d
  118. DTS := WHR-1166D
  119. IMAGE_SIZE := $(whr_1166d_mtd_size)
  120. DEVICE_TITLE := Buffalo WHR-1166D
  121. endef
  122. TARGET_DEVICES += whr-1166d
  123. dlink810l_mtd_size=6881280
  124. define Device/dir-810l
  125. DTS := DIR-810L
  126. IMAGE_SIZE := $(dlink810l_mtd_size)
  127. DEVICE_TITLE := D-Link DIR-810L
  128. endef
  129. TARGET_DEVICES += dir-810l
  130. na930_mtd_size=20971520
  131. define Device/na930
  132. DTS := NA930
  133. IMAGE_SIZE := $(na930_mtd_size)
  134. DEVICE_TITLE := Sercomm NA930
  135. endef
  136. TARGET_DEVICES += na930
  137. microwrt_mtd_size=16515072
  138. define Device/microwrt
  139. DTS := MicroWRT
  140. IMAGE_SIZE := $(microwrt_mtd_size)
  141. DEVICE_TITLE := Microduino MicroWRT
  142. endef
  143. TARGET_DEVICES += microwrt
  144. define Device/mt7620a
  145. DTS := MT7620a
  146. IMAGE_SIZE := $(ralink_default_fw_size_8M)
  147. DEVICE_TITLE := MediaTek MT7620a EVB
  148. endef
  149. TARGET_DEVICES += mt7620a
  150. define Device/mt7620a_mt7610e
  151. DTS := MT7620a_MT7610e
  152. IMAGE_SIZE := $(ralink_default_fw_size_8M)
  153. DEVICE_TITLE := MediaTek MT7620a + MT7610e EVB
  154. endef
  155. TARGET_DEVICES += mt7620a_mt7610e
  156. define Device/mt7620a_mt7530
  157. DTS := MT7620a_MT7530
  158. IMAGE_SIZE := $(ralink_default_fw_size_8M)
  159. DEVICE_TITLE := MediaTek MT7620a + MT7530 EVB
  160. endef
  161. TARGET_DEVICES += mt7620a_mt7530
  162. define Device/mt7620a_v22sg
  163. DTS := MT7620a_V22SG
  164. IMAGE_SIZE := $(ralink_default_fw_size_8M)
  165. DEVICE_TITLE := MediaTek MT7620a V22SG
  166. endef
  167. TARGET_DEVICES += mt7620a_v22sg
  168. define Device/rp-n53
  169. DTS := RP-N53
  170. IMAGE_SIZE := $(ralink_default_fw_size_8M)
  171. DEVICE_TITLE := Asus RP-N53
  172. endef
  173. TARGET_DEVICES += rp-n53
  174. define Device/cf-wr800n
  175. DTS := CF-WR800N
  176. IMAGE_SIZE := $(ralink_default_fw_size_8M)
  177. DEVICE_TITLE := Comfast CF-WR800N
  178. endef
  179. TARGET_DEVICES += cf-wr800n
  180. define Device/cs-qr10
  181. DTS := CS-QR10
  182. IMAGE_SIZE := $(ralink_default_fw_size_8M)
  183. DEVICE_TITLE := Planex CS-QR10
  184. DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-i2c-core kmod-i2c-ralink kmod-sound-core kmod-sound-mtk kmod-sdhci-mt7620
  185. endef
  186. TARGET_DEVICES += cs-qr10
  187. define Device/db-wrt01
  188. DTS := DB-WRT01
  189. IMAGE_SIZE := $(ralink_default_fw_size_8M)
  190. DEVICE_TITLE := Planex DB-WRT01
  191. endef
  192. TARGET_DEVICES += db-wrt01
  193. define Device/mzk-750dhp
  194. DTS := MZK-750DHP
  195. IMAGE_SIZE := $(ralink_default_fw_size_8M)
  196. DEVICE_TITLE := Planex MZK-750DHP
  197. DEVICE_PACKAGES := kmod-mt76
  198. endef
  199. TARGET_DEVICES += mzk-750dhp
  200. define Device/mzk-ex300np
  201. DTS := MZK-EX300NP
  202. IMAGE_SIZE := $(ralink_default_fw_size_8M)
  203. DEVICE_TITLE := Planex MZK-EX300NP
  204. endef
  205. TARGET_DEVICES += mzk-ex300np
  206. define Device/mzk-ex750np
  207. DTS := MZK-EX750NP
  208. IMAGE_SIZE := $(ralink_default_fw_size_8M)
  209. DEVICE_TITLE := Planex MZK-EX750NP
  210. DEVICE_PACKAGES := kmod-mt76
  211. endef
  212. TARGET_DEVICES += mzk-ex750np
  213. define Device/hc5661
  214. DTS := HC5661
  215. IMAGE_SIZE := $(ralink_default_fw_size_16M)
  216. DEVICE_TITLE := HiWiFi HC5661
  217. DEVICE_PACKAGES := kmod-usb2 kmod-sdhci kmod-sdhci-mt7620 kmod-ledtrig-usbdev
  218. endef
  219. TARGET_DEVICES += hc5661
  220. define Device/hc5761
  221. DTS := HC5761
  222. IMAGE_SIZE := $(ralink_default_fw_size_16M)
  223. DEVICE_TITLE := HiWiFi HC5761
  224. DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-sdhci kmod-sdhci-mt7620 kmod-ledtrig-usbdev
  225. endef
  226. TARGET_DEVICES += hc5761
  227. define Device/hc5861
  228. DTS := HC5861
  229. IMAGE_SIZE := $(ralink_default_fw_size_16M)
  230. DEVICE_TITLE := HiWiFi HC5861
  231. DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-sdhci kmod-sdhci-mt7620 kmod-ledtrig-usbdev
  232. endef
  233. TARGET_DEVICES += hc5861
  234. define Device/oy-0001
  235. DTS := OY-0001
  236. IMAGE_SIZE := $(ralink_default_fw_size_16M)
  237. DEVICE_TITLE := Oh Yeah OY-0001
  238. endef
  239. TARGET_DEVICES += oy-0001
  240. define Device/psg1208
  241. DTS := PSG1208
  242. IMAGE_SIZE := $(ralink_default_fw_size_8M)
  243. DEVICE_TITLE := Phicomm PSG1208
  244. DEVICE_PACKAGES := kmod-mt76
  245. endef
  246. TARGET_DEVICES += psg1208
  247. define Device/psg1218
  248. DTS := PSG1218
  249. IMAGE_SIZE := $(ralink_default_fw_size_8M)
  250. DEVICE_TITLE := Phicomm PSG1218
  251. DEVICE_PACKAGES := kmod-mt76
  252. endef
  253. TARGET_DEVICES += psg1218
  254. define Device/y1
  255. DTS := Y1
  256. IMAGE_SIZE := $(ralink_default_fw_size_16M)
  257. DEVICE_TITLE := Lenovo Y1
  258. endef
  259. TARGET_DEVICES += y1
  260. define Device/y1s
  261. DTS := Y1S
  262. IMAGE_SIZE := $(ralink_default_fw_size_16M)
  263. DEVICE_TITLE := Lenovo Y1S
  264. endef
  265. TARGET_DEVICES += y1s
  266. define Device/mlw221
  267. DTS := MLW221
  268. IMAGE_SIZE := $(ralink_default_fw_size_16M)
  269. DEVICE_TITLE := Kingston MLW221
  270. endef
  271. TARGET_DEVICES += mlw221
  272. define Device/mlwg2
  273. DTS := MLWG2
  274. IMAGE_SIZE := $(ralink_default_fw_size_16M)
  275. DEVICE_TITLE := Kingston MLWG2
  276. endef
  277. TARGET_DEVICES += mlwg2
  278. define Device/wmr-300
  279. DTS := WMR-300
  280. IMAGE_SIZE := $(ralink_default_fw_size_8M)
  281. DEVICE_TITLE := Buffalo WMR-300
  282. endef
  283. TARGET_DEVICES += wmr-300
  284. define Device/rt-n14u
  285. DTS := RT-N14U
  286. IMAGE_SIZE := $(ralink_default_fw_size_8M)
  287. DEVICE_TITLE := Asus RT-N14u
  288. endef
  289. TARGET_DEVICES += rt-n14u
  290. define Device/wrtnode
  291. DTS := WRTNODE
  292. IMAGE_SIZE := $(ralink_default_fw_size_16M)
  293. DEVICE_TITLE := WRTNode
  294. endef
  295. TARGET_DEVICES += wrtnode
  296. define Device/miwifi-mini
  297. DTS := MIWIFI-MINI
  298. IMAGE_SIZE := $(ralink_default_fw_size_16M)
  299. DEVICE_TITLE := Xiaomi MiWiFi Mini
  300. DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci
  301. endef
  302. TARGET_DEVICES += miwifi-mini
  303. define Device/gl-mt300a
  304. DTS := GL-MT300A
  305. IMAGE_SIZE := $(ralink_default_fw_size_16M)
  306. DEVICE_TITLE := GL-Inet GL-MT300A
  307. DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-mt76
  308. endef
  309. TARGET_DEVICES += gl-mt300a
  310. define Device/gl-mt300n
  311. DTS := GL-MT300N
  312. IMAGE_SIZE := $(ralink_default_fw_size_16M)
  313. DEVICE_TITLE := GL-Inet GL-MT300N
  314. DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-mt76
  315. endef
  316. TARGET_DEVICES += gl-mt300n
  317. define Device/gl-mt750
  318. DTS := GL-MT750
  319. IMAGE_SIZE := $(ralink_default_fw_size_16M)
  320. DEVICE_TITLE := GL-Inet GL-MT750
  321. DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-mt76
  322. endef
  323. TARGET_DEVICES += gl-mt750
  324. define Device/zte-q7
  325. DTS := ZTE-Q7
  326. IMAGE_SIZE := $(ralink_default_fw_size_8M)
  327. DEVICE_TITLE := ZTE Q7
  328. endef
  329. TARGET_DEVICES += zte-q7
  330. define Device/youku-yk1
  331. DTS := YOUKU-YK1
  332. IMAGE_SIZE := $(ralink_default_fw_size_16M)
  333. DEVICE_TITLE := YOUKU YK1
  334. endef
  335. TARGET_DEVICES += youku-yk1
  336. define Device/zbt-ape522ii
  337. DTS := ZBT-APE522II
  338. IMAGE_SIZE := $(ralink_default_fw_size_8M)
  339. DEVICE_TITLE := Zbtlink ZBT-APE522II
  340. DEVICE_PACKAGES := kmod-mt76
  341. endef
  342. TARGET_DEVICES += zbt-ape522ii
  343. define Device/zbt-wa05
  344. DTS := ZBT-WA05
  345. IMAGE_SIZE := $(ralink_default_fw_size_8M)
  346. DEVICE_TITLE := Zbtlink ZBT-WA05
  347. endef
  348. TARGET_DEVICES += zbt-wa05
  349. define Device/zbt-we826
  350. DTS := ZBT-WE826
  351. IMAGE_SIZE := $(ralink_default_fw_size_16M)
  352. DEVICE_TITLE := Zbtlink ZBT-WE826
  353. DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-mt76 kmod-sdhci-mt7620
  354. endef
  355. TARGET_DEVICES += zbt-we826
  356. define Device/zbt-wr8305rt
  357. DTS := ZBT-WR8305RT
  358. IMAGE_SIZE := $(ralink_default_fw_size_8M)
  359. DEVICE_TITLE := Zbtlink ZBT-WR8305RT
  360. endef
  361. TARGET_DEVICES += zbt-wr8305rt
  362. define Device/tiny-ac
  363. DTS := TINY-AC
  364. IMAGE_SIZE := $(ralink_default_fw_size_8M)
  365. DEVICE_TITLE := Dovado Tiny AC
  366. DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci
  367. endef
  368. TARGET_DEVICES += tiny-ac