2
0

generic.mk 19 KB

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