generic.mk 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740
  1. define Device/ap121f
  2. DEVICE_TITLE := ALFA Network AP121F
  3. DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-storage -swconfig
  4. BOARDNAME := AP121F
  5. IMAGE_SIZE := 16064k
  6. CONSOLE := ttyATH0,115200
  7. MTDPARTS := spi0.0:192k(u-boot)ro,64k(u-boot-env),64k(art)ro,-(firmware)
  8. SUPPORTED_DEVICES := ap121f
  9. IMAGE/sysupgrade.bin = append-kernel | pad-to $$$$(BLOCKSIZE) | \
  10. append-rootfs | pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE)
  11. endef
  12. TARGET_DEVICES += ap121f
  13. define Device/ap90q
  14. DEVICE_TITLE := YunCore AP90Q
  15. BOARDNAME = AP90Q
  16. IMAGE_SIZE = 16000k
  17. CONSOLE = ttyS0,115200
  18. MTDPARTS = spi0.0:256k(u-boot)ro,64k(u-boot-env),16000k(firmware),64k(art)ro
  19. endef
  20. TARGET_DEVICES += ap90q
  21. define Device/bsb
  22. DEVICE_TITLE := Smart Electronics Black Swift board
  23. DEVICE_PACKAGES := kmod-usb-core kmod-usb2
  24. BOARDNAME = BSB
  25. IMAGE_SIZE = 16000k
  26. CONSOLE = ttyATH0,115200
  27. MTDPARTS = spi0.0:128k(u-boot)ro,64k(u-boot-env)ro,16128k(firmware),64k(art)ro
  28. endef
  29. TARGET_DEVICES += bsb
  30. define Device/carambola2
  31. DEVICE_TITLE := Carambola2 board from 8Devices
  32. DEVICE_PACKAGES := kmod-usb-core kmod-usb2
  33. BOARDNAME = CARAMBOLA2
  34. IMAGE_SIZE = 16000k
  35. CONSOLE = ttyATH0,115200
  36. MTDPARTS = spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,16000k(firmware),64k(art)ro
  37. endef
  38. TARGET_DEVICES += carambola2
  39. define Device/cf-e316n-v2
  40. DEVICE_TITLE := COMFAST CF-E316N v2
  41. BOARDNAME = CF-E316N-V2
  42. IMAGE_SIZE = 16192k
  43. CONSOLE = ttyS0,115200
  44. MTDPARTS = spi0.0:64k(u-boot)ro,64k(art)ro,16192k(firmware),64k(art-backup)ro
  45. endef
  46. TARGET_DEVICES += cf-e316n-v2
  47. define Device/cf-e320n-v2
  48. $(Device/cf-e316n-v2)
  49. DEVICE_TITLE := COMFAST CF-E320N v2
  50. DEVICE_PACKAGES := kmod-usb-core kmod-usb2
  51. BOARDNAME = CF-E320N-V2
  52. endef
  53. TARGET_DEVICES += cf-e320n-v2
  54. define Device/cf-e380ac-v1
  55. DEVICE_TITLE := COMFAST CF-E380AC v1
  56. DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-ath10k ath10k-firmware-qca988x
  57. BOARDNAME = CF-E380AC-V1
  58. IMAGE_SIZE = 16128k
  59. CONSOLE = ttyS0,115200
  60. MTDPARTS = spi0.0:128k(u-boot)ro,64k(art)ro,16128k(firmware),64k(art-backup)ro
  61. endef
  62. TARGET_DEVICES += cf-e380ac-v1
  63. define Device/cf-e380ac-v2
  64. $(Device/cf-e380ac-v1)
  65. DEVICE_TITLE := COMFAST CF-E380AC v2
  66. BOARDNAME = CF-E380AC-V2
  67. IMAGE_SIZE = 16000k
  68. MTDPARTS = spi0.0:256k(u-boot)ro,64k(art)ro,16000k(firmware),64k(art-backup)ro
  69. endef
  70. TARGET_DEVICES += cf-e380ac-v2
  71. define Device/cf-e520n
  72. DEVICE_TITLE := COMFAST CF-E520N
  73. DEVICE_PACKAGES := kmod-usb-core kmod-usb2
  74. BOARDNAME = CF-E520N
  75. IMAGE_SIZE = 8000k
  76. CONSOLE = ttyS0,115200
  77. MTDPARTS = spi0.0:64k(u-boot)ro,64k(art)ro,8000k(firmware),64k(art-backup)ro
  78. endef
  79. TARGET_DEVICES += cf-e520n
  80. define Device/cf-e530n
  81. $(Device/cf-e520n)
  82. DEVICE_TITLE := COMFAST CF-E530N
  83. BOARDNAME = CF-E530N
  84. endef
  85. TARGET_DEVICES += cf-e530n
  86. define Device/cpe830
  87. $(Device/ap90q)
  88. DEVICE_TITLE := YunCore CPE830
  89. DEVICE_PACKAGES := rssileds
  90. BOARDNAME = CPE830
  91. endef
  92. TARGET_DEVICES += cpe830
  93. define Device/cpe870
  94. DEVICE_TITLE := YunCore CPE870
  95. DEVICE_PACKAGES := rssileds
  96. BOARDNAME = CPE870
  97. IMAGE_SIZE = 7936k
  98. CONSOLE = ttyS0,115200
  99. MTDPARTS = spi0.0:64k(u-boot)ro,64k(u-boot-env),7936k(firmware),64k(config)ro,64k(art)ro
  100. endef
  101. TARGET_DEVICES += cpe870
  102. define Device/dragino2
  103. BOARDNAME := DRAGINO2
  104. CONSOLE := ttyATH0,115200
  105. DEVICE_PACKAGES := kmod-usb-core kmod-usb-ohci kmod-usb2 kmod-usb-ledtrig-usbport
  106. DEVICE_TITLE := Dragino 2 (MS14)
  107. IMAGE_SIZE := 16000k
  108. MTDPARTS := spi0.0:256k(u-boot)ro,16000k(firmware),64k(config)ro,64k(art)ro
  109. endef
  110. TARGET_DEVICES += dragino2
  111. define Device/weio
  112. DEVICE_TITLE := WeIO
  113. DEVICE_PACKAGES := kmod-usb-core kmod-usb2
  114. BOARDNAME = WEIO
  115. IMAGE_SIZE = 16000k
  116. CONSOLE = ttyATH0,115200
  117. MTDPARTS = spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,16000k(firmware),64k(art)ro
  118. endef
  119. TARGET_DEVICES += weio
  120. define Device/gl-ar150
  121. DEVICE_TITLE := GL AR150
  122. DEVICE_PACKAGES := kmod-usb-core kmod-usb2
  123. BOARDNAME = GL-AR150
  124. IMAGE_SIZE = 16000k
  125. CONSOLE = ttyATH0,115200
  126. MTDPARTS = spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,16000k(firmware),64k(art)ro
  127. endef
  128. TARGET_DEVICES += gl-ar150
  129. define Device/gl-ar300
  130. DEVICE_TITLE := GL AR300
  131. DEVICE_PACKAGES := kmod-usb-core kmod-usb2
  132. BOARDNAME = GL-AR300
  133. IMAGE_SIZE = 16000k
  134. CONSOLE = ttyS0,115200
  135. MTDPARTS = spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,16000k(firmware),64k(art)ro
  136. endef
  137. TARGET_DEVICES += gl-ar300
  138. define Device/gl-ar300m
  139. DEVICE_TITLE := GL AR300M
  140. DEVICE_PACKAGES := kmod-usb-core kmod-usb2 uboot-envtools
  141. BOARDNAME = GL-AR300M
  142. IMAGE_SIZE = 16000k
  143. CONSOLE = ttyS0,115200
  144. MTDPARTS = spi0.0:256k(u-boot)ro,64k(u-boot-env),16000k(firmware),64k(art)ro
  145. endef
  146. TARGET_DEVICES += gl-ar300m
  147. define Device/gl-domino
  148. DEVICE_TITLE := GL Domino Pi
  149. DEVICE_PACKAGES := kmod-usb-core kmod-usb2
  150. BOARDNAME = DOMINO
  151. IMAGE_SIZE = 16000k
  152. CONSOLE = ttyATH0,115200
  153. MTDPARTS = spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,16000k(firmware),64k(art)ro
  154. endef
  155. TARGET_DEVICES += gl-domino
  156. define Device/gl-mifi
  157. DEVICE_TITLE := GL MIFI
  158. DEVICE_PACKAGES := kmod-usb-core kmod-usb2
  159. BOARDNAME = GL-MIFI
  160. IMAGE_SIZE = 16000k
  161. CONSOLE = ttyATH0,115200
  162. MTDPARTS = spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,16000k(firmware),64k(art)ro
  163. endef
  164. TARGET_DEVICES += gl-mifi
  165. define Device/mr12
  166. DEVICE_TITLE := Meraki MR12
  167. DEVICE_PACKAGES := kmod-spi-gpio
  168. BOARDNAME = MR12
  169. IMAGE_SIZE = 15680k
  170. MTDPARTS = spi0.0:256k(u-boot)ro,256k(u-boot-env)ro,13440k(rootfs),2240k(kernel),64k(mac),128k(art)ro,15680k@0x80000(firmware)
  171. IMAGE/kernel.bin = append-kernel
  172. IMAGE/rootfs.bin = append-rootfs | pad-rootfs
  173. IMAGE/sysupgrade.bin = append-rootfs | pad-rootfs | pad-to 13440k | append-kernel | check-size $$$$(IMAGE_SIZE)
  174. IMAGES := kernel.bin rootfs.bin sysupgrade.bin
  175. endef
  176. TARGET_DEVICES += mr12
  177. define Device/mr16
  178. DEVICE_TITLE := Meraki MR16
  179. DEVICE_PACKAGES := kmod-spi-gpio
  180. BOARDNAME = MR16
  181. IMAGE_SIZE = 15680k
  182. MTDPARTS = spi0.0:256k(u-boot)ro,256k(u-boot-env)ro,13440k(rootfs),2240k(kernel),64k(mac),128k(art)ro,15680k@0x80000(firmware)
  183. IMAGE/kernel.bin = append-kernel
  184. IMAGE/rootfs.bin = append-rootfs | pad-rootfs
  185. IMAGE/sysupgrade.bin = append-rootfs | pad-rootfs | pad-to 13440k | append-kernel | check-size $$$$(IMAGE_SIZE)
  186. IMAGES := kernel.bin rootfs.bin sysupgrade.bin
  187. endef
  188. TARGET_DEVICES += mr16
  189. define Device/dr531
  190. DEVICE_TITLE := Wallys DR531
  191. DEVICE_PACKAGES := kmod-usb-core kmod-usb2
  192. BOARDNAME = DR531
  193. IMAGE_SIZE = 7808k
  194. MTDPARTS = spi0.0:192k(u-boot)ro,64k(u-boot-env),64k(partition-table)ro,7808k(firmware),64k(art)ro
  195. endef
  196. TARGET_DEVICES += dr531
  197. define Device/wndr3700
  198. DEVICE_TITLE := NETGEAR WNDR3700
  199. DEVICE_PACKAGES := kmod-usb-core kmod-usb-ohci kmod-usb2 kmod-usb-ledtrig-usbport kmod-leds-wndr3700-usb
  200. BOARDNAME = WNDR3700
  201. NETGEAR_KERNEL_MAGIC = 0x33373030
  202. NETGEAR_BOARD_ID = WNDR3700
  203. IMAGE_SIZE = 7680k
  204. MTDPARTS = spi0.0:320k(u-boot)ro,128k(u-boot-env)ro,7680k(firmware),64k(art)ro
  205. IMAGES := sysupgrade.bin factory.img factory-NA.img
  206. KERNEL := kernel-bin | patch-cmdline | lzma -d20 | netgear-uImage lzma
  207. IMAGE/default = append-kernel | pad-to $$$$(BLOCKSIZE) | netgear-squashfs | append-rootfs | pad-rootfs
  208. IMAGE/sysupgrade.bin = $$(IMAGE/default) | check-size $$$$(IMAGE_SIZE)
  209. IMAGE/factory.img = $$(IMAGE/default) | netgear-dni | check-size $$$$(IMAGE_SIZE)
  210. IMAGE/factory-NA.img = $$(IMAGE/default) | netgear-dni NA | check-size $$$$(IMAGE_SIZE)
  211. endef
  212. define Device/wndr3700v2
  213. $(Device/wndr3700)
  214. DEVICE_TITLE := NETGEAR WNDR3700 v2
  215. NETGEAR_BOARD_ID = WNDR3700v2
  216. NETGEAR_KERNEL_MAGIC = 0x33373031
  217. NETGEAR_HW_ID = 29763654+16+64
  218. IMAGE_SIZE = 15872k
  219. MTDPARTS = spi0.0:320k(u-boot)ro,128k(u-boot-env)ro,15872k(firmware),64k(art)ro
  220. IMAGES := sysupgrade.bin factory.img
  221. endef
  222. define Device/wndr3800
  223. $(Device/wndr3700v2)
  224. DEVICE_TITLE := NETGEAR WNDR3800
  225. NETGEAR_BOARD_ID = WNDR3800
  226. NETGEAR_HW_ID = 29763654+16+128
  227. endef
  228. define Device/wndr3800ch
  229. $(Device/wndr3800)
  230. DEVICE_TITLE := NETGEAR WNDR3800 (Ch)
  231. NETGEAR_BOARD_ID = WNDR3800CH
  232. endef
  233. define Device/wndrmac
  234. $(Device/wndr3700v2)
  235. DEVICE_TITLE := NETGEAR WNDRMAC
  236. NETGEAR_BOARD_ID = WNDRMAC
  237. endef
  238. define Device/wndrmacv2
  239. $(Device/wndr3800)
  240. DEVICE_TITLE := NETGEAR WNDRMAC v2
  241. NETGEAR_BOARD_ID = WNDRMACv2
  242. endef
  243. TARGET_DEVICES += wndr3700 wndr3700v2 wndr3800 wndr3800ch wndrmac wndrmacv2
  244. define Device/cap324
  245. DEVICE_TITLE := PowerCloud CAP324 Cloud AP
  246. DEVICE_PACKAGES := uboot-envtools
  247. BOARDNAME := CAP324
  248. DEVICE_PROFILE := CAP324
  249. IMAGE_SIZE = 15296k
  250. MTDPARTS = spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,15296k(firmware),640k(certs),64k(nvram),64k(art)ro
  251. endef
  252. TARGET_DEVICES += cap324
  253. define Device/cap324-nocloud
  254. DEVICE_TITLE := PowerCloud CAP324 Cloud AP (No-Cloud)
  255. DEVICE_PACKAGES := uboot-envtools
  256. BOARDNAME := CAP324
  257. DEVICE_PROFILE := CAP324
  258. IMAGE_SIZE = 16000k
  259. MTDPARTS = spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,16000k(firmware),64k(art)ro
  260. endef
  261. TARGET_DEVICES += cap324-nocloud
  262. define Device/cr3000
  263. DEVICE_TITLE := PowerCloud CR3000 Cloud Router
  264. DEVICE_PACKAGES := uboot-envtools
  265. BOARDNAME := CR3000
  266. DEVICE_PROFILE := CR3000
  267. IMAGE_SIZE = 7104k
  268. MTDPARTS = spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,7104k(firmware),640k(certs),64k(nvram),64k(art)ro
  269. endef
  270. TARGET_DEVICES += cr3000
  271. define Device/cr3000-nocloud
  272. DEVICE_TITLE := PowerCloud CR3000 (No-Cloud)
  273. DEVICE_PACKAGES := uboot-envtools
  274. BOARDNAME := CR3000
  275. DEVICE_PROFILE := CR3000
  276. IMAGE_SIZE = 7808k
  277. MTDPARTS = spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,7808k(firmware),64k(art)ro
  278. endef
  279. TARGET_DEVICES += cr3000-nocloud
  280. define Device/cr5000
  281. DEVICE_TITLE := PowerCloud CR5000 Cloud Router
  282. DEVICE_PACKAGES := uboot-envtools kmod-usb2 kmod-usb-ohci kmod-usb-ledtrig-usbport kmod-usb-core
  283. BOARDNAME := CR5000
  284. DEVICE_PROFILE := CR5000
  285. IMAGE_SIZE = 7104k
  286. MTDPARTS = spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,7104k(firmware),640k(certs),64k(nvram),64k(art)ro
  287. endef
  288. TARGET_DEVICES += cr5000
  289. define Device/cr5000-nocloud
  290. DEVICE_TITLE := PowerCloud CR5000 (No-Cloud)
  291. DEVICE_PACKAGES := uboot-envtools kmod-usb2 kmod-usb-ohci kmod-usb-ledtrig-usbport kmod-usb-core
  292. BOARDNAME := CR5000
  293. DEVICE_PROFILE := CR5000
  294. IMAGE_SIZE = 7808k
  295. MTDPARTS = spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,7808k(firmware),64k(art)ro
  296. endef
  297. TARGET_DEVICES += cr5000-nocloud
  298. define Device/antminer-s1
  299. $(Device/tplink-8mlzma)
  300. DEVICE_TITLE := Antminer-S1
  301. DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-crypto-manager kmod-i2c-gpio-custom kmod-usb-hid
  302. BOARDNAME := ANTMINER-S1
  303. DEVICE_PROFILE := ANTMINERS1
  304. TPLINK_HWID := 0x04440101
  305. CONSOLE := ttyATH0,115200
  306. endef
  307. define Device/antminer-s3
  308. $(Device/tplink-8mlzma)
  309. DEVICE_TITLE := Antminer-S3
  310. DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-crypto-manager kmod-i2c-gpio-custom kmod-usb-hid
  311. BOARDNAME := ANTMINER-S3
  312. DEVICE_PROFILE := ANTMINERS3
  313. TPLINK_HWID := 0x04440301
  314. CONSOLE := ttyATH0,115200
  315. endef
  316. define Device/antrouter-r1
  317. $(Device/tplink-8mlzma)
  318. DEVICE_TITLE := Antrouter-R1
  319. DEVICE_PACKAGES := kmod-usb-core kmod-usb2
  320. BOARDNAME := ANTROUTER-R1
  321. DEVICE_PROFILE := ANTROUTERR1
  322. TPLINK_HWID := 0x44440101
  323. CONSOLE := ttyATH0,115200
  324. endef
  325. define Device/el-m150
  326. $(Device/tplink-8mlzma)
  327. DEVICE_TITLE := EasyLink EL-M150
  328. DEVICE_PACKAGES := kmod-usb-core kmod-usb2
  329. BOARDNAME := EL-M150
  330. DEVICE_PROFILE := ELM150
  331. TPLINK_HWID := 0x01500101
  332. CONSOLE := ttyATH0,115200
  333. endef
  334. define Device/el-mini
  335. $(Device/tplink-8mlzma)
  336. DEVICE_TITLE := EasyLink EL-MINI
  337. DEVICE_PACKAGES := kmod-usb-core kmod-usb2
  338. BOARDNAME := EL-MINI
  339. DEVICE_PROFILE := ELMINI
  340. TPLINK_HWID := 0x01530001
  341. CONSOLE := ttyATH0,115200
  342. endef
  343. TARGET_DEVICES += antminer-s1 antminer-s3 antrouter-r1 el-m150 el-mini
  344. define Device/gl-inet-6408A-v1
  345. $(Device/tplink-8mlzma)
  346. DEVICE_TITLE := GL.iNet 6408
  347. DEVICE_PACKAGES := kmod-usb-core kmod-usb2
  348. BOARDNAME := GL-INET
  349. DEVICE_PROFILE := GLINET
  350. TPLINK_HWID := 0x08000001
  351. CONSOLE := ttyATH0,115200
  352. endef
  353. define Device/gl-inet-6416A-v1
  354. $(Device/tplink-16mlzma)
  355. DEVICE_TITLE := GL.iNet 6416
  356. DEVICE_PACKAGES := kmod-usb-core kmod-usb2
  357. BOARDNAME := GL-INET
  358. DEVICE_PROFILE := GLINET
  359. TPLINK_HWID := 0x08000001
  360. CONSOLE := ttyATH0,115200
  361. endef
  362. TARGET_DEVICES += gl-inet-6408A-v1 gl-inet-6416A-v1
  363. define Device/jwap230
  364. DEVICE_TITLE := jjPlus JWAP230
  365. DEVICE_PACKAGES := kmod-usb-core kmod-usb2
  366. BOARDNAME = JWAP230
  367. IMAGE_SIZE = 16000k
  368. MTDPARTS = spi0.0:256k(u-boot)ro,64k(u-boot-env),16000k(firmware),64k(art)ro
  369. endef
  370. TARGET_DEVICES += jwap230
  371. define Device/rnx-n360rt
  372. $(Device/tplink-4m)
  373. DEVICE_TITLE := Rosewill RNX-N360RT
  374. BOARDNAME := TL-WR941ND
  375. DEVICE_PROFILE := RNXN360RT
  376. TPLINK_HWID := 0x09410002
  377. TPLINK_HWREV := 0x00420001
  378. endef
  379. TARGET_DEVICES += rnx-n360rt
  380. define Device/mc-mac1200r
  381. $(Device/tplink-8mlzma)
  382. DEVICE_TITLE := MERCURY MAC1200R
  383. DEVICE_PACKAGES := kmod-ath10k ath10k-firmware-qca988x
  384. BOARDNAME := MC-MAC1200R
  385. DEVICE_PROFILE := MAC1200R
  386. TPLINK_HWID := 0x12000001
  387. endef
  388. TARGET_DEVICES += mc-mac1200r
  389. define Device/minibox-v1
  390. $(Device/tplink-16mlzma)
  391. DEVICE_TITLE := Gainstrong MiniBox V1.0
  392. DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport
  393. BOARDNAME := MINIBOX-V1
  394. DEVICE_PROFILE := MINIBOXV1
  395. TPLINK_HWID := 0x3C000201
  396. CONSOLE := ttyATH0,115200
  397. endef
  398. TARGET_DEVICES += minibox-v1
  399. define Device/omy-g1
  400. $(Device/tplink-16mlzma)
  401. DEVICE_TITLE := OMYlink OMY-G1
  402. DEVICE_PACKAGES := kmod-usb-core kmod-usb2
  403. BOARDNAME := OMY-G1
  404. DEVICE_PROFILE := OMYG1
  405. TPLINK_HWID := 0x06660101
  406. endef
  407. define Device/omy-x1
  408. $(Device/tplink-8mlzma)
  409. DEVICE_TITLE := OMYlink OMY-X1
  410. BOARDNAME := OMY-X1
  411. DEVICE_PROFILE := OMYX1
  412. TPLINK_HWID := 0x06660201
  413. endef
  414. TARGET_DEVICES += omy-g1 omy-x1
  415. define Device/onion-omega
  416. $(Device/tplink-16mlzma)
  417. DEVICE_TITLE := Onion Omega
  418. DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-storage kmod-i2c-core kmod-i2c-gpio-custom kmod-spi-bitbang kmod-spi-dev kmod-spi-gpio kmod-spi-gpio-custom kmod-usb-serial
  419. BOARDNAME := ONION-OMEGA
  420. DEVICE_PROFILE := OMEGA
  421. TPLINK_HWID := 0x04700001
  422. CONSOLE := ttyATH0,115200
  423. endef
  424. TARGET_DEVICES += onion-omega
  425. define Device/smart-300
  426. $(Device/tplink-8mlzma)
  427. DEVICE_TITLE := NC-LINK SMART-300
  428. BOARDNAME := SMART-300
  429. DEVICE_PROFILE := SMART-300
  430. TPLINK_HWID := 0x93410001
  431. endef
  432. TARGET_DEVICES += smart-300
  433. define Device/som9331
  434. $(Device/tplink-8mlzma)
  435. DEVICE_TITLE := OpenEmbed SOM9331
  436. DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-storage kmod-i2c-core kmod-i2c-gpio-custom kmod-spi-bitbang kmod-spi-dev kmod-spi-gpio kmod-spi-gpio-custom kmod-usb-serial
  437. BOARDNAME := SOM9331
  438. DEVICE_PROFILE := SOM9331
  439. TPLINK_HWID := 0x04800054
  440. CONSOLE := ttyATH0,115200
  441. endef
  442. TARGET_DEVICES += som9331
  443. define Device/sr3200
  444. DEVICE_TITLE := YunCore SR3200
  445. DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-ath10k ath10k-firmware-qca988x
  446. BOARDNAME = SR3200
  447. IMAGE_SIZE = 16000k
  448. CONSOLE = ttyS0,115200
  449. MTDPARTS = spi0.0:256k(u-boot)ro,64k(u-boot-env),16000k(firmware),64k(art)ro
  450. endef
  451. TARGET_DEVICES += sr3200
  452. define Device/xd3200
  453. $(Device/sr3200)
  454. DEVICE_TITLE := YunCore XD3200
  455. DEVICE_PACKAGES := kmod-ath10k ath10k-firmware-qca988x
  456. BOARDNAME = XD3200
  457. endef
  458. TARGET_DEVICES += xd3200
  459. define Device/tellstick-znet-lite
  460. $(Device/tplink-16mlzma)
  461. DEVICE_TITLE := TellStick ZNet Lite
  462. DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-acm kmod-usb-serial kmod-usb-serial-pl2303
  463. BOARDNAME := TELLSTICK-ZNET-LITE
  464. DEVICE_PROFILE := TELLSTICKZNETLITE
  465. TPLINK_HWID := 0x00726001
  466. CONSOLE := ttyATH0,115200
  467. endef
  468. TARGET_DEVICES += tellstick-znet-lite
  469. define Device/oolite
  470. $(Device/tplink-16mlzma)
  471. DEVICE_TITLE := Gainstrong OOLITE
  472. DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport
  473. BOARDNAME := GS-OOLITE
  474. DEVICE_PROFILE := OOLITE
  475. TPLINK_HWID := 0x3C000101
  476. CONSOLE := ttyATH0,115200
  477. endef
  478. TARGET_DEVICES += oolite
  479. define Device/NBG6616
  480. DEVICE_TITLE := ZyXEL NBG6616
  481. DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport kmod-usb-storage kmod-rtc-pcf8563 kmod-ath10k ath10k-firmware-qca988x
  482. BOARDNAME = NBG6616
  483. KERNEL_SIZE = 2048k
  484. IMAGE_SIZE = 15323k
  485. MTDPARTS = spi0.0:192k(u-boot)ro,64k(env)ro,64k(RFdata)ro,384k(zyxel_rfsd),384k(romd),64k(header),2048k(kernel),13184k(rootfs),15232k@0x120000(firmware)
  486. CMDLINE += mem=128M
  487. IMAGES := sysupgrade.bin
  488. KERNEL := kernel-bin | patch-cmdline | lzma | uImage lzma | jffs2 boot/vmlinux.lzma.uImage
  489. IMAGE/sysupgrade.bin = append-kernel | pad-to $$$$(KERNEL_SIZE) | append-rootfs | pad-rootfs | check-size $$$$(IMAGE_SIZE)
  490. # We cannot currently build a factory image. It is the sysupgrade image
  491. # prefixed with a header (which is actually written into the MTD device).
  492. # The header is 2kiB and is filled with 0xff. The format seems to be:
  493. # 2 bytes: 0x0000
  494. # 2 bytes: checksum of the data partition (big endian)
  495. # 4 bytes: length of the contained image file (big endian)
  496. # 32 bytes: Firmware Version string (NUL terminated, 0xff padded)
  497. # 2 bytes: 0x0000
  498. # 2 bytes: checksum over the header partition (big endian)
  499. # 32 bytes: Model (e.g. "NBG6616", NUL termiated, 0xff padded)
  500. # rest: 0xff padding
  501. #
  502. # The checksums are calculated by adding up all bytes and if a 16bit
  503. # overflow occurs, one is added and the sum is masked to 16 bit:
  504. # csum = csum + databyte; if (csum > 0xffff) { csum += 1; csum &= 0xffff };
  505. # Should the file have an odd number of bytes then the byte len-0x800 is
  506. # used additionally.
  507. # The checksum for the header is calcualted over the first 2048 bytes with
  508. # the firmware checksum as the placeholder during calculation.
  509. #
  510. # The header is padded with 0xff to the erase block size of the device.
  511. endef
  512. TARGET_DEVICES += NBG6616
  513. define Device/c-55
  514. DEVICE_TITLE := AirTight Networks C-55
  515. DEVICE_PACKAGES := kmod-ath9k
  516. BOARDNAME = C-55
  517. KERNEL_SIZE = 2048k
  518. IMAGE_SIZE = 15872k
  519. MTDPARTS = spi0.0:256k(u-boot)ro,128k(u-boot-env)ro,2048k(kernel),13824k(rootfs),13824k(opt)ro,2624k(failsafe)ro,64k(art)ro,15872k@0x60000(firmware)
  520. IMAGE/sysupgrade.bin = append-kernel | pad-to $$$$(KERNEL_SIZE) | append-rootfs | pad-rootfs | check-size $$$$(IMAGE_SIZE)
  521. endef
  522. TARGET_DEVICES += c-55
  523. define Build/uImageHiWiFi
  524. # Field ih_name needs to start with "tw150v1"
  525. mkimage -A $(LINUX_KARCH) \
  526. -O linux -T kernel \
  527. -C $(1) -a $(KERNEL_LOADADDR) -e $(if $(KERNEL_ENTRY),$(KERNEL_ENTRY),$(KERNEL_LOADADDR)) \
  528. -n 'tw150v1 $(call toupper,$(LINUX_KARCH)) LEDE Linux-$(LINUX_VERSION)' -d $@ $@.new
  529. @mv $@.new $@
  530. endef
  531. define Device/hiwifi-hc6361
  532. DEVICE_TITLE := HiWiFi HC6361
  533. DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-storage \
  534. kmod-fs-ext4 kmod-nls-iso8859-1 e2fsprogs
  535. BOARDNAME := HiWiFi-HC6361
  536. DEVICE_PROFILE := HIWIFI_HC6361
  537. IMAGE_SIZE := 16128k
  538. KERNEL := kernel-bin | patch-cmdline | lzma | uImageHiWiFi lzma
  539. CONSOLE := ttyATH0,115200
  540. MTDPARTS := spi0.0:64k(u-boot)ro,64k(bdinfo)ro,16128k(firmware),64k(backup)ro,64k(art)ro
  541. endef
  542. TARGET_DEVICES += hiwifi-hc6361
  543. define Build/seama
  544. $(STAGING_DIR_HOST)/bin/seama -i $@ $(if $(1),$(1),-m "dev=/dev/mtdblock/1" -m "type=firmware")
  545. mv $@.seama $@
  546. endef
  547. define Build/seama-seal
  548. $(call Build/seama,-s $@.seama $(1))
  549. endef
  550. define Device/seama
  551. CONSOLE := ttyS0,115200
  552. LOADER_TYPE := bin
  553. BLOCKSIZE := 64k
  554. KERNEL := kernel-bin | patch-cmdline | relocate-kernel | lzma
  555. KERNEL_INITRAMFS := kernel-bin | patch-cmdline | lzma | seama
  556. KERNEL_INITRAMFS_SUFFIX = $$(KERNEL_SUFFIX).seama
  557. IMAGES := sysupgrade.bin factory.bin
  558. # 64 bytes offset:
  559. # - 28 bytes seama_header
  560. # - 36 bytes of META data (4-bytes aligned)
  561. IMAGE/default := append-kernel | pad-offset $$$$(BLOCKSIZE) 64 | append-rootfs
  562. IMAGE/sysupgrade.bin := \
  563. $$(IMAGE/default) | seama | pad-rootfs | \
  564. check-size $$$$(IMAGE_SIZE)
  565. IMAGE/factory.bin := \
  566. $$(IMAGE/default) | seama | pad-rootfs | \
  567. seama-seal -m "signature=$$$$(SEAMA_SIGNATURE)" | \
  568. check-size $$$$(IMAGE_SIZE)
  569. SEAMA_SIGNATURE :=
  570. DEVICE_VARS += SEAMA_SIGNATURE
  571. endef
  572. define Device/dir-869-a1
  573. $(Device/seama)
  574. DEVICE_TITLE := D-Link DIR-869 rev. A1
  575. DEVICE_PACKAGES := kmod-ath10k ath10k-firmware-qca988x
  576. BOARDNAME = DIR-869-A1
  577. IMAGE_SIZE = 15872k
  578. MTDPARTS = spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,64k(devdata)ro,64k(devconf)ro,15872k(firmware),64k(radiocfg)ro
  579. SEAMA_SIGNATURE := wrgac54_dlink.2015_dir869
  580. IMAGE/factory.bin := \
  581. $$(IMAGE/default) | pad-rootfs -x 64 | \
  582. seama | seama-seal -m "signature=$$$$(SEAMA_SIGNATURE)" | \
  583. check-size $$$$(IMAGE_SIZE)
  584. endef
  585. define Device/mynet-n600
  586. $(Device/seama)
  587. DEVICE_TITLE := Western Digital My Net N600
  588. DEVICE_PACKAGES := kmod-usb-core kmod-usb2
  589. BOARDNAME = MYNET-N600
  590. IMAGE_SIZE = 15808k
  591. MTDPARTS = spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,64k(devdata)ro,64k(devconf)ro,15872k(firmware),64k(radiocfg)ro
  592. SEAMA_SIGNATURE := wrgnd16_wd_db600
  593. endef
  594. define Device/mynet-n750
  595. $(Device/seama)
  596. DEVICE_TITLE := Western Digital My Net N750
  597. DEVICE_PACKAGES := kmod-usb-core kmod-usb2
  598. BOARDNAME = MYNET-N750
  599. IMAGE_SIZE = 15808k
  600. MTDPARTS = spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,64k(devdata)ro,64k(devconf)ro,15872k(firmware),64k(radiocfg)ro
  601. SEAMA_SIGNATURE := wrgnd13_wd_av
  602. endef
  603. define Device/qihoo-c301
  604. $(Device/seama)
  605. DEVICE_TITLE := Qihoo C301
  606. DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport kmod-ath10k ath10k-firmware-qca988x
  607. BOARDNAME = QIHOO-C301
  608. IMAGE_SIZE = 15744k
  609. MTDPARTS = spi0.0:256k(u-boot)ro,64k(u-boot-env),64k(devdata),64k(devconf),15744k(firmware),64k(warm_start),64k(action_image_config),64k(radiocfg)ro;spi0.1:15360k(upgrade2),1024k(privatedata)
  610. SEAMA_SIGNATURE := wrgac26_qihoo360_360rg
  611. endef
  612. TARGET_DEVICES += dir-869-a1 mynet-n600 mynet-n750 qihoo-c301
  613. define Build/mkwrggimg
  614. $(STAGING_DIR_HOST)/bin/mkwrggimg -b \
  615. -i $@ -o $@.imghdr -d /dev/mtdblock/1 \
  616. -m $(BOARDNAME) -s $(DAP_SIGNATURE) \
  617. -v LEDE -B $(REVISION)
  618. mv $@.imghdr $@
  619. endef
  620. define Build/wrgg-pad-rootfs
  621. $(STAGING_DIR_HOST)/bin/padjffs2 $(IMAGE_ROOTFS) -c 64 >>$@
  622. endef
  623. define Device/dap-2695-a1
  624. DEVICE_TITLE := D-Link DAP-2695 rev. A1
  625. DEVICE_PACKAGES := ath10k-firmware-qca988x kmod-ath10k uboot-envtools
  626. BOARDNAME = DAP-2695-A1
  627. IMAGES := factory.img sysupgrade.bin
  628. IMAGE_SIZE = 15360k
  629. IMAGE/factory.img = append-kernel | pad-offset 65536 160 | append-rootfs | wrgg-pad-rootfs | mkwrggimg | check-size $$$$(IMAGE_SIZE)
  630. IMAGE/sysupgrade.bin = append-kernel | pad-offset 65536 160 | mkwrggimg | append-rootfs | wrgg-pad-rootfs | check-size $$$$(IMAGE_SIZE)
  631. KERNEL := kernel-bin | patch-cmdline | relocate-kernel | lzma
  632. KERNEL_INITRAMFS := $$(KERNEL) | mkwrggimg
  633. MTDPARTS = spi0.0:256k(bootloader)ro,64k(bdcfg)ro,64k(rgdb)ro,64k(langpack)ro,15360k(firmware),448k(captival)ro,64k(certificate)ro,64k(radiocfg)ro
  634. DAP_SIGNATURE := wapac02_dkbs_dap2695
  635. DEVICE_VARS += DAP_SIGNATURE
  636. endef
  637. TARGET_DEVICES += dap-2695-a1
  638. define Build/mkbuffaloimg
  639. $(STAGING_DIR_HOST)/bin/mkbuffaloimg -B $(BOARDNAME) \
  640. -R $$(($(subst k, * 1024,$(ROOTFS_SIZE)))) \
  641. -K $$(($(subst k, * 1024,$(KERNEL_SIZE)))) \
  642. -i $@ -o $@.new
  643. mv $@.new $@
  644. endef
  645. define Device/bhr-4grv2
  646. DEVICE_TITLE := Buffalo BHR-4GRV2
  647. BOARDNAME := BHR-4GRV2
  648. ROOTFS_SIZE := 14528k
  649. KERNEL_SIZE := 1472k
  650. IMAGE_SIZE := 16000k
  651. MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,14528k(rootfs),1472k(kernel),64k(art)ro,16000k@0x50000(firmware)
  652. IMAGES := sysupgrade.bin factory.bin
  653. IMAGE/sysupgrade.bin = append-rootfs | pad-rootfs | pad-to $$$$(ROOTFS_SIZE) | append-kernel | check-size $$$$(IMAGE_SIZE)
  654. IMAGE/factory.bin = append-kernel | pad-to $$$$(KERNEL_SIZE) | append-rootfs | pad-rootfs | mkbuffaloimg
  655. endef
  656. TARGET_DEVICES += bhr-4grv2