generic.mk 20 KB

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