1
0

generic.mk 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669
  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-v2
  55. $(Device/cf-e380ac-v1)
  56. DEVICE_TITLE := COMFAST CF-E380AC v2
  57. BOARDNAME = CF-E380AC-V2
  58. IMAGE_SIZE = 16000k
  59. MTDPARTS = spi0.0:256k(u-boot)ro,64k(art)ro,16000k(firmware),64k(art-backup)ro
  60. endef
  61. TARGET_DEVICES += cf-e380ac-v2
  62. define Device/cf-e520n
  63. DEVICE_TITLE := COMFAST CF-E520N
  64. DEVICE_PACKAGES := kmod-usb-core kmod-usb2
  65. BOARDNAME = CF-E520N
  66. IMAGE_SIZE = 8000k
  67. CONSOLE = ttyS0,115200
  68. MTDPARTS = spi0.0:64k(u-boot)ro,64k(art)ro,8000k(firmware),64k(art-backup)ro
  69. endef
  70. TARGET_DEVICES += cf-e520n
  71. define Device/cf-e530n
  72. $(Device/cf-e520n)
  73. DEVICE_TITLE := COMFAST CF-E530N
  74. BOARDNAME = CF-E530N
  75. endef
  76. TARGET_DEVICES += cf-e530n
  77. define Device/cpe830
  78. $(Device/ap90q)
  79. DEVICE_TITLE := YunCore CPE830
  80. DEVICE_PACKAGES := rssileds
  81. BOARDNAME = CPE830
  82. endef
  83. TARGET_DEVICES += cpe830
  84. define Device/cpe870
  85. DEVICE_TITLE := YunCore CPE870
  86. DEVICE_PACKAGES := rssileds
  87. BOARDNAME = CPE870
  88. IMAGE_SIZE = 7936k
  89. CONSOLE = ttyS0,115200
  90. MTDPARTS = spi0.0:64k(u-boot)ro,64k(u-boot-env),7936k(firmware),64k(config)ro,64k(art)ro
  91. endef
  92. TARGET_DEVICES += cpe870
  93. define Device/dragino2
  94. BOARDNAME := DRAGINO2
  95. CONSOLE := ttyATH0,115200
  96. DEVICE_PACKAGES := kmod-usb-core kmod-usb-ohci kmod-usb2 kmod-usb-ledtrig-usbport
  97. DEVICE_TITLE := Dragino 2 (MS14)
  98. IMAGE_SIZE := 16000k
  99. MTDPARTS := spi0.0:256k(u-boot)ro,16000k(firmware),64k(config)ro,64k(art)ro
  100. endef
  101. TARGET_DEVICES += dragino2
  102. define Device/weio
  103. DEVICE_TITLE := WeIO
  104. DEVICE_PACKAGES := kmod-usb-core kmod-usb2
  105. BOARDNAME = WEIO
  106. IMAGE_SIZE = 16000k
  107. CONSOLE = ttyATH0,115200
  108. MTDPARTS = spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,16000k(firmware),64k(art)ro
  109. endef
  110. TARGET_DEVICES += weio
  111. define Device/gl-ar150
  112. DEVICE_TITLE := GL AR150
  113. DEVICE_PACKAGES := kmod-usb-core kmod-usb2
  114. BOARDNAME = GL-AR150
  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. define Device/tpe-r1100
  120. $(Device/gl-ar150)
  121. DEVICE_TITLE := TPE-R1100 Think Penguin Mini Router
  122. BOARDNAME = TPE-R1100
  123. endef
  124. TARGET_DEVICES += gl-ar150 tpe-r1100
  125. define Device/gl-usb150
  126. DEVICE_TITLE := GL.iNet GL-USB150
  127. DEVICE_PACKAGES := -swconfig
  128. BOARDNAME := GL-USB150
  129. IMAGE_SIZE := 16000k
  130. CONSOLE := ttyATH0,115200
  131. MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,16000k(firmware),64k(art)ro
  132. SUPPORTED_DEVICES := gl-usb150
  133. IMAGE/sysupgrade.bin = append-kernel | pad-to $$$$(BLOCKSIZE) | \
  134. append-rootfs | pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE)
  135. endef
  136. TARGET_DEVICES += gl-usb150
  137. define Device/gl-ar300
  138. DEVICE_TITLE := GL AR300
  139. DEVICE_PACKAGES := kmod-usb-core kmod-usb2
  140. BOARDNAME = GL-AR300
  141. IMAGE_SIZE = 16000k
  142. CONSOLE = ttyS0,115200
  143. MTDPARTS = spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,16000k(firmware),64k(art)ro
  144. endef
  145. TARGET_DEVICES += gl-ar300
  146. define Device/gl-ar300m
  147. DEVICE_TITLE := GL AR300M
  148. DEVICE_PACKAGES := kmod-usb-core kmod-usb2 uboot-envtools
  149. BOARDNAME = GL-AR300M
  150. IMAGE_SIZE = 16000k
  151. CONSOLE = ttyS0,115200
  152. MTDPARTS = spi0.0:256k(u-boot)ro,64k(u-boot-env),16000k(firmware),64k(art)ro
  153. endef
  154. define Device/tpe-r1200
  155. $(Device/gl-ar300m)
  156. DEVICE_TITLE := TPE-R1200 Think Penguin Mini Router
  157. BOARDNAME = TPE-R1200
  158. endef
  159. TARGET_DEVICES += gl-ar300m tpe-r1200
  160. define Device/gl-ar750
  161. DEVICE_TITLE := GL.iNet GL-AR750
  162. DEVICE_PACKAGES := kmod-usb-core \
  163. kmod-usb2 kmod-usb-storage
  164. BOARDNAME := GL-AR750
  165. SUPPORTED_DEVICES := gl-ar750
  166. IMAGE_SIZE := 16000k
  167. MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env),64k(art)ro,-(firmware)
  168. IMAGE/sysupgrade.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | \
  169. append-rootfs | pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE)
  170. endef
  171. TARGET_DEVICES += gl-ar750
  172. define Device/gl-domino
  173. DEVICE_TITLE := GL Domino Pi
  174. DEVICE_PACKAGES := kmod-usb-core kmod-usb2
  175. BOARDNAME = DOMINO
  176. IMAGE_SIZE = 16000k
  177. CONSOLE = ttyATH0,115200
  178. MTDPARTS = spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,16000k(firmware),64k(art)ro
  179. endef
  180. TARGET_DEVICES += gl-domino
  181. define Device/gl-mifi
  182. DEVICE_TITLE := GL MIFI
  183. DEVICE_PACKAGES := kmod-usb-core kmod-usb2
  184. BOARDNAME = GL-MIFI
  185. IMAGE_SIZE = 16000k
  186. CONSOLE = ttyATH0,115200
  187. MTDPARTS = spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,16000k(firmware),64k(art)ro
  188. endef
  189. TARGET_DEVICES += gl-mifi
  190. define Device/mr12
  191. DEVICE_TITLE := Meraki MR12
  192. DEVICE_PACKAGES := kmod-spi-gpio
  193. BOARDNAME = MR12
  194. IMAGE_SIZE = 15680k
  195. MTDPARTS = spi0.0:256k(u-boot)ro,256k(u-boot-env)ro,13440k(rootfs),2240k(kernel),64k(mac),128k(art)ro,15680k@0x80000(firmware)
  196. IMAGE/kernel.bin = append-kernel
  197. IMAGE/rootfs.bin = append-rootfs | pad-rootfs
  198. IMAGE/sysupgrade.bin = append-rootfs | pad-rootfs | pad-to 13440k | append-kernel | check-size $$$$(IMAGE_SIZE)
  199. IMAGES := kernel.bin rootfs.bin sysupgrade.bin
  200. endef
  201. TARGET_DEVICES += mr12
  202. define Device/mr16
  203. DEVICE_TITLE := Meraki MR16
  204. DEVICE_PACKAGES := kmod-spi-gpio
  205. BOARDNAME = MR16
  206. IMAGE_SIZE = 15680k
  207. MTDPARTS = spi0.0:256k(u-boot)ro,256k(u-boot-env)ro,13440k(rootfs),2240k(kernel),64k(mac),128k(art)ro,15680k@0x80000(firmware)
  208. IMAGE/kernel.bin = append-kernel
  209. IMAGE/rootfs.bin = append-rootfs | pad-rootfs
  210. IMAGE/sysupgrade.bin = append-rootfs | pad-rootfs | pad-to 13440k | append-kernel | check-size $$$$(IMAGE_SIZE)
  211. IMAGES := kernel.bin rootfs.bin sysupgrade.bin
  212. endef
  213. TARGET_DEVICES += mr16
  214. define Device/dr531
  215. DEVICE_TITLE := Wallys DR531
  216. DEVICE_PACKAGES := kmod-usb-core kmod-usb2
  217. BOARDNAME = DR531
  218. IMAGE_SIZE = 7808k
  219. MTDPARTS = spi0.0:192k(u-boot)ro,64k(u-boot-env),64k(partition-table)ro,7808k(firmware),64k(art)ro
  220. endef
  221. TARGET_DEVICES += dr531
  222. define Device/wndr3700
  223. DEVICE_TITLE := NETGEAR WNDR3700
  224. DEVICE_PACKAGES := kmod-usb-core kmod-usb-ohci kmod-usb2 kmod-usb-ledtrig-usbport kmod-leds-wndr3700-usb
  225. BOARDNAME = WNDR3700
  226. NETGEAR_KERNEL_MAGIC = 0x33373030
  227. NETGEAR_BOARD_ID = WNDR3700
  228. IMAGE_SIZE = 7680k
  229. MTDPARTS = spi0.0:320k(u-boot)ro,128k(u-boot-env)ro,7680k(firmware),64k(art)ro
  230. IMAGES := sysupgrade.bin factory.img factory-NA.img
  231. KERNEL := kernel-bin | patch-cmdline | lzma -d20 | netgear-uImage lzma
  232. IMAGE/default = append-kernel | pad-to $$$$(BLOCKSIZE) | netgear-squashfs | append-rootfs | pad-rootfs
  233. IMAGE/sysupgrade.bin = $$(IMAGE/default) | check-size $$$$(IMAGE_SIZE)
  234. IMAGE/factory.img = $$(IMAGE/default) | netgear-dni | check-size $$$$(IMAGE_SIZE)
  235. IMAGE/factory-NA.img = $$(IMAGE/default) | netgear-dni NA | check-size $$$$(IMAGE_SIZE)
  236. endef
  237. define Device/wndr3700v2
  238. $(Device/wndr3700)
  239. DEVICE_TITLE := NETGEAR WNDR3700 v2
  240. NETGEAR_BOARD_ID = WNDR3700v2
  241. NETGEAR_KERNEL_MAGIC = 0x33373031
  242. NETGEAR_HW_ID = 29763654+16+64
  243. IMAGE_SIZE = 15872k
  244. MTDPARTS = spi0.0:320k(u-boot)ro,128k(u-boot-env)ro,15872k(firmware),64k(art)ro
  245. IMAGES := sysupgrade.bin factory.img
  246. endef
  247. define Device/wndr3800
  248. $(Device/wndr3700v2)
  249. DEVICE_TITLE := NETGEAR WNDR3800
  250. NETGEAR_BOARD_ID = WNDR3800
  251. NETGEAR_HW_ID = 29763654+16+128
  252. endef
  253. define Device/wndr3800ch
  254. $(Device/wndr3800)
  255. DEVICE_TITLE := NETGEAR WNDR3800 (Ch)
  256. NETGEAR_BOARD_ID = WNDR3800CH
  257. endef
  258. define Device/wndrmac
  259. $(Device/wndr3700v2)
  260. DEVICE_TITLE := NETGEAR WNDRMAC
  261. NETGEAR_BOARD_ID = WNDRMAC
  262. endef
  263. define Device/wndrmacv2
  264. $(Device/wndr3800)
  265. DEVICE_TITLE := NETGEAR WNDRMAC v2
  266. NETGEAR_BOARD_ID = WNDRMACv2
  267. endef
  268. TARGET_DEVICES += wndr3700 wndr3700v2 wndr3800 wndr3800ch wndrmac wndrmacv2
  269. define Device/cap324
  270. DEVICE_TITLE := PowerCloud CAP324 Cloud AP
  271. DEVICE_PACKAGES := uboot-envtools
  272. BOARDNAME := CAP324
  273. DEVICE_PROFILE := CAP324
  274. IMAGE_SIZE = 15296k
  275. MTDPARTS = spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,15296k(firmware),640k(certs),64k(nvram),64k(art)ro
  276. endef
  277. TARGET_DEVICES += cap324
  278. define Device/cap324-nocloud
  279. DEVICE_TITLE := PowerCloud CAP324 Cloud AP (No-Cloud)
  280. DEVICE_PACKAGES := uboot-envtools
  281. BOARDNAME := CAP324
  282. DEVICE_PROFILE := CAP324
  283. IMAGE_SIZE = 16000k
  284. MTDPARTS = spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,16000k(firmware),64k(art)ro
  285. endef
  286. TARGET_DEVICES += cap324-nocloud
  287. define Device/cr3000
  288. DEVICE_TITLE := PowerCloud CR3000 Cloud Router
  289. DEVICE_PACKAGES := uboot-envtools
  290. BOARDNAME := CR3000
  291. DEVICE_PROFILE := CR3000
  292. IMAGE_SIZE = 7104k
  293. MTDPARTS = spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,7104k(firmware),640k(certs),64k(nvram),64k(art)ro
  294. endef
  295. TARGET_DEVICES += cr3000
  296. define Device/cr3000-nocloud
  297. DEVICE_TITLE := PowerCloud CR3000 (No-Cloud)
  298. DEVICE_PACKAGES := uboot-envtools
  299. BOARDNAME := CR3000
  300. DEVICE_PROFILE := CR3000
  301. IMAGE_SIZE = 7808k
  302. MTDPARTS = spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,7808k(firmware),64k(art)ro
  303. endef
  304. TARGET_DEVICES += cr3000-nocloud
  305. define Device/cr5000
  306. DEVICE_TITLE := PowerCloud CR5000 Cloud Router
  307. DEVICE_PACKAGES := uboot-envtools kmod-usb2 kmod-usb-ohci kmod-usb-ledtrig-usbport kmod-usb-core
  308. BOARDNAME := CR5000
  309. DEVICE_PROFILE := CR5000
  310. IMAGE_SIZE = 7104k
  311. MTDPARTS = spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,7104k(firmware),640k(certs),64k(nvram),64k(art)ro
  312. endef
  313. TARGET_DEVICES += cr5000
  314. define Device/cr5000-nocloud
  315. DEVICE_TITLE := PowerCloud CR5000 (No-Cloud)
  316. DEVICE_PACKAGES := uboot-envtools kmod-usb2 kmod-usb-ohci kmod-usb-ledtrig-usbport kmod-usb-core
  317. BOARDNAME := CR5000
  318. DEVICE_PROFILE := CR5000
  319. IMAGE_SIZE = 7808k
  320. MTDPARTS = spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,7808k(firmware),64k(art)ro
  321. endef
  322. TARGET_DEVICES += cr5000-nocloud
  323. define Device/antminer-s1
  324. $(Device/tplink-8mlzma)
  325. DEVICE_TITLE := Antminer-S1
  326. DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-crypto-manager kmod-i2c-gpio-custom kmod-usb-hid
  327. BOARDNAME := ANTMINER-S1
  328. DEVICE_PROFILE := ANTMINERS1
  329. TPLINK_HWID := 0x04440101
  330. CONSOLE := ttyATH0,115200
  331. endef
  332. define Device/antminer-s3
  333. $(Device/tplink-8mlzma)
  334. DEVICE_TITLE := Antminer-S3
  335. DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-crypto-manager kmod-i2c-gpio-custom kmod-usb-hid
  336. BOARDNAME := ANTMINER-S3
  337. DEVICE_PROFILE := ANTMINERS3
  338. TPLINK_HWID := 0x04440301
  339. CONSOLE := ttyATH0,115200
  340. endef
  341. define Device/antrouter-r1
  342. $(Device/tplink-8mlzma)
  343. DEVICE_TITLE := Antrouter-R1
  344. DEVICE_PACKAGES := kmod-usb-core kmod-usb2
  345. BOARDNAME := ANTROUTER-R1
  346. DEVICE_PROFILE := ANTROUTERR1
  347. TPLINK_HWID := 0x44440101
  348. CONSOLE := ttyATH0,115200
  349. endef
  350. define Device/el-m150
  351. $(Device/tplink-8mlzma)
  352. DEVICE_TITLE := EasyLink EL-M150
  353. DEVICE_PACKAGES := kmod-usb-core kmod-usb2
  354. BOARDNAME := EL-M150
  355. DEVICE_PROFILE := ELM150
  356. TPLINK_HWID := 0x01500101
  357. CONSOLE := ttyATH0,115200
  358. endef
  359. define Device/el-mini
  360. $(Device/tplink-8mlzma)
  361. DEVICE_TITLE := EasyLink EL-MINI
  362. DEVICE_PACKAGES := kmod-usb-core kmod-usb2
  363. BOARDNAME := EL-MINI
  364. DEVICE_PROFILE := ELMINI
  365. TPLINK_HWID := 0x01530001
  366. CONSOLE := ttyATH0,115200
  367. endef
  368. TARGET_DEVICES += antminer-s1 antminer-s3 antrouter-r1 el-m150 el-mini
  369. define Device/gl-inet-6408A-v1
  370. $(Device/tplink-8mlzma)
  371. DEVICE_TITLE := GL.iNet 6408
  372. DEVICE_PACKAGES := kmod-usb-core kmod-usb2
  373. BOARDNAME := GL-INET
  374. DEVICE_PROFILE := GLINET
  375. TPLINK_HWID := 0x08000001
  376. CONSOLE := ttyATH0,115200
  377. endef
  378. define Device/gl-inet-6416A-v1
  379. $(Device/tplink-16mlzma)
  380. DEVICE_TITLE := GL.iNet 6416
  381. DEVICE_PACKAGES := kmod-usb-core kmod-usb2
  382. BOARDNAME := GL-INET
  383. DEVICE_PROFILE := GLINET
  384. TPLINK_HWID := 0x08000001
  385. CONSOLE := ttyATH0,115200
  386. endef
  387. TARGET_DEVICES += gl-inet-6408A-v1 gl-inet-6416A-v1
  388. define Device/jwap230
  389. DEVICE_TITLE := jjPlus JWAP230
  390. DEVICE_PACKAGES := kmod-usb-core kmod-usb2
  391. BOARDNAME = JWAP230
  392. IMAGE_SIZE = 16000k
  393. MTDPARTS = spi0.0:256k(u-boot)ro,64k(u-boot-env),16000k(firmware),64k(art)ro
  394. endef
  395. TARGET_DEVICES += jwap230
  396. define Device/rnx-n360rt
  397. $(Device/tplink-4m)
  398. DEVICE_TITLE := Rosewill RNX-N360RT
  399. BOARDNAME := TL-WR941ND
  400. DEVICE_PROFILE := RNXN360RT
  401. TPLINK_HWID := 0x09410002
  402. TPLINK_HWREV := 0x00420001
  403. endef
  404. TARGET_DEVICES += rnx-n360rt
  405. define Device/minibox-v1
  406. $(Device/tplink-16mlzma)
  407. DEVICE_TITLE := Gainstrong MiniBox V1.0
  408. DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport
  409. BOARDNAME := MINIBOX-V1
  410. DEVICE_PROFILE := MINIBOXV1
  411. TPLINK_HWID := 0x3C000201
  412. CONSOLE := ttyATH0,115200
  413. endef
  414. TARGET_DEVICES += minibox-v1
  415. define Device/omy-g1
  416. $(Device/tplink-16mlzma)
  417. DEVICE_TITLE := OMYlink OMY-G1
  418. DEVICE_PACKAGES := kmod-usb-core kmod-usb2
  419. BOARDNAME := OMY-G1
  420. DEVICE_PROFILE := OMYG1
  421. TPLINK_HWID := 0x06660101
  422. endef
  423. define Device/omy-x1
  424. $(Device/tplink-8mlzma)
  425. DEVICE_TITLE := OMYlink OMY-X1
  426. BOARDNAME := OMY-X1
  427. DEVICE_PROFILE := OMYX1
  428. TPLINK_HWID := 0x06660201
  429. endef
  430. TARGET_DEVICES += omy-g1 omy-x1
  431. define Device/onion-omega
  432. $(Device/tplink-16mlzma)
  433. DEVICE_TITLE := Onion Omega
  434. 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
  435. BOARDNAME := ONION-OMEGA
  436. DEVICE_PROFILE := OMEGA
  437. TPLINK_HWID := 0x04700001
  438. CONSOLE := ttyATH0,115200
  439. endef
  440. TARGET_DEVICES += onion-omega
  441. define Device/smart-300
  442. $(Device/tplink-8mlzma)
  443. DEVICE_TITLE := NC-LINK SMART-300
  444. BOARDNAME := SMART-300
  445. DEVICE_PROFILE := SMART-300
  446. TPLINK_HWID := 0x93410001
  447. endef
  448. TARGET_DEVICES += smart-300
  449. define Device/som9331
  450. $(Device/tplink-8mlzma)
  451. DEVICE_TITLE := OpenEmbed SOM9331
  452. 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
  453. BOARDNAME := SOM9331
  454. DEVICE_PROFILE := SOM9331
  455. TPLINK_HWID := 0x04800054
  456. CONSOLE := ttyATH0,115200
  457. endef
  458. TARGET_DEVICES += som9331
  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/c-55
  480. DEVICE_TITLE := AirTight Networks C-55
  481. DEVICE_PACKAGES := kmod-ath9k
  482. BOARDNAME = C-55
  483. KERNEL_SIZE = 2048k
  484. IMAGE_SIZE = 15872k
  485. 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)
  486. IMAGE/sysupgrade.bin = append-kernel | pad-to $$$$(KERNEL_SIZE) | append-rootfs | pad-rootfs | check-size $$$$(IMAGE_SIZE)
  487. endef
  488. TARGET_DEVICES += c-55
  489. define Build/uImageHiWiFi
  490. # Field ih_name needs to start with "tw150v1"
  491. mkimage -A $(LINUX_KARCH) \
  492. -O linux -T kernel \
  493. -C $(1) -a $(KERNEL_LOADADDR) -e $(if $(KERNEL_ENTRY),$(KERNEL_ENTRY),$(KERNEL_LOADADDR)) \
  494. -n 'tw150v1 $(call toupper,$(LINUX_KARCH)) libreCMC Linux-$(LINUX_VERSION)' -d $@ $@.new
  495. @mv $@.new $@
  496. endef
  497. define Device/hiwifi-hc6361
  498. DEVICE_TITLE := HiWiFi HC6361
  499. DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-storage \
  500. kmod-fs-ext4 kmod-nls-iso8859-1 e2fsprogs
  501. BOARDNAME := HiWiFi-HC6361
  502. DEVICE_PROFILE := HIWIFI_HC6361
  503. IMAGE_SIZE := 16128k
  504. KERNEL := kernel-bin | patch-cmdline | lzma | uImageHiWiFi lzma
  505. CONSOLE := ttyATH0,115200
  506. MTDPARTS := spi0.0:64k(u-boot)ro,64k(bdinfo)ro,16128k(firmware),64k(backup)ro,64k(art)ro
  507. endef
  508. TARGET_DEVICES += hiwifi-hc6361
  509. define Build/seama
  510. $(STAGING_DIR_HOST)/bin/seama -i $@ $(if $(1),$(1),-m "dev=/dev/mtdblock/1" -m "type=firmware")
  511. mv $@.seama $@
  512. endef
  513. define Build/seama-seal
  514. $(call Build/seama,-s $@.seama $(1))
  515. endef
  516. define Device/seama
  517. CONSOLE := ttyS0,115200
  518. LOADER_TYPE := bin
  519. BLOCKSIZE := 64k
  520. KERNEL := kernel-bin | patch-cmdline | relocate-kernel | lzma
  521. KERNEL_INITRAMFS := kernel-bin | patch-cmdline | lzma | seama
  522. KERNEL_INITRAMFS_SUFFIX = $$(KERNEL_SUFFIX).seama
  523. IMAGES := sysupgrade.bin factory.bin
  524. # 64 bytes offset:
  525. # - 28 bytes seama_header
  526. # - 36 bytes of META data (4-bytes aligned)
  527. IMAGE/default := append-kernel | pad-offset $$$$(BLOCKSIZE) 64 | append-rootfs
  528. IMAGE/sysupgrade.bin := \
  529. $$(IMAGE/default) | seama | pad-rootfs | \
  530. check-size $$$$(IMAGE_SIZE)
  531. IMAGE/factory.bin := \
  532. $$(IMAGE/default) | seama | pad-rootfs | \
  533. seama-seal -m "signature=$$$$(SEAMA_SIGNATURE)" | \
  534. check-size $$$$(IMAGE_SIZE)
  535. SEAMA_SIGNATURE :=
  536. DEVICE_VARS += SEAMA_SIGNATURE
  537. endef
  538. define Device/mynet-n600
  539. $(Device/seama)
  540. DEVICE_TITLE := Western Digital My Net N600
  541. DEVICE_PACKAGES := kmod-usb-core kmod-usb2
  542. BOARDNAME = MYNET-N600
  543. IMAGE_SIZE = 15808k
  544. MTDPARTS = spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,64k(devdata)ro,64k(devconf)ro,15872k(firmware),64k(radiocfg)ro
  545. SEAMA_SIGNATURE := wrgnd16_wd_db600
  546. endef
  547. define Device/mynet-n750
  548. $(Device/seama)
  549. DEVICE_TITLE := Western Digital My Net N750
  550. DEVICE_PACKAGES := kmod-usb-core kmod-usb2
  551. BOARDNAME = MYNET-N750
  552. IMAGE_SIZE = 15808k
  553. MTDPARTS = spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,64k(devdata)ro,64k(devconf)ro,15872k(firmware),64k(radiocfg)ro
  554. SEAMA_SIGNATURE := wrgnd13_wd_av
  555. endef
  556. TARGET_DEVICES += dir-869-a1 mynet-n600 mynet-n750
  557. define Build/mkwrggimg
  558. $(STAGING_DIR_HOST)/bin/mkwrggimg -b \
  559. -i $@ -o $@.imghdr -d /dev/mtdblock/1 \
  560. -m $(BOARDNAME) -s $(DAP_SIGNATURE) \
  561. -v libreCMC -B $(REVISION)
  562. mv $@.imghdr $@
  563. endef
  564. define Build/wrgg-pad-rootfs
  565. $(STAGING_DIR_HOST)/bin/padjffs2 $(IMAGE_ROOTFS) -c 64 >>$@
  566. endef
  567. TARGET_DEVICES += dap-2695-a1
  568. define Build/mkbuffaloimg
  569. $(STAGING_DIR_HOST)/bin/mkbuffaloimg -B $(BOARDNAME) \
  570. -R $$(($(subst k, * 1024,$(ROOTFS_SIZE)))) \
  571. -K $$(($(subst k, * 1024,$(KERNEL_SIZE)))) \
  572. -i $@ -o $@.new
  573. mv $@.new $@
  574. endef
  575. define Device/bhr-4grv2
  576. DEVICE_TITLE := Buffalo BHR-4GRV2
  577. BOARDNAME := BHR-4GRV2
  578. ROOTFS_SIZE := 14528k
  579. KERNEL_SIZE := 1472k
  580. IMAGE_SIZE := 16000k
  581. MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,14528k(rootfs),1472k(kernel),64k(art)ro,16000k@0x50000(firmware)
  582. IMAGES := sysupgrade.bin factory.bin
  583. IMAGE/sysupgrade.bin = append-rootfs | pad-rootfs | pad-to $$$$(ROOTFS_SIZE) | append-kernel | check-size $$$$(IMAGE_SIZE)
  584. IMAGE/factory.bin = append-kernel | pad-to $$$$(KERNEL_SIZE) | append-rootfs | pad-rootfs | mkbuffaloimg
  585. endef
  586. TARGET_DEVICES += bhr-4grv2