generic.mk 19 KB

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