generic-ubnt.mk 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334
  1. include ./common-ubnt.mk
  2. define Device/ubnt_aircube-ac
  3. $(Device/ubnt-acb)
  4. SOC := ar9342
  5. DEVICE_MODEL := airCube AC
  6. UBNT_CHIP := ar9342
  7. DEVICE_PACKAGES += kmod-ath10k-ct-smallbuffers ath10k-firmware-qca988x-ct
  8. endef
  9. TARGET_DEVICES += ubnt_aircube-ac
  10. define Device/ubnt_aircube-isp
  11. $(Device/ubnt-acb)
  12. SOC := qca9533
  13. DEVICE_MODEL := airCube ISP
  14. UBNT_CHIP := qca9533
  15. SUPPORTED_DEVICES += ubnt,acb-isp
  16. endef
  17. TARGET_DEVICES += ubnt_aircube-isp
  18. define Device/ubnt_amplifi-router-hd
  19. IMAGE_SIZE := 11264k
  20. UBNT_BOARD := AFi-R-HD
  21. UBNT_TYPE := AFi-R
  22. UBNT_VERSION := 3.6.3
  23. SOC := qca9563
  24. DEVICE_VENDOR := Ubiquiti
  25. DEVICE_MODEL := AmpliFi Router HD
  26. UBNT_CHIP := qca956x
  27. DEVICE_PACKAGES += kmod-ath10k-ct-smallbuffers ath10k-firmware-qca988x-ct kmod-usb2
  28. endef
  29. TARGET_DEVICES += ubnt_amplifi-router-hd
  30. define Device/ubnt_bullet-ac
  31. $(Device/ubnt-2wa)
  32. DEVICE_MODEL := Bullet AC
  33. DEVICE_PACKAGES += kmod-ath10k-ct-smallbuffers ath10k-firmware-qca988x-ct rssileds
  34. endef
  35. TARGET_DEVICES += ubnt_bullet-ac
  36. define Device/ubnt_bullet-m-xw
  37. $(Device/ubnt-xw)
  38. DEVICE_MODEL := Bullet M
  39. DEVICE_ALT0_VENDOR := Ubiquiti
  40. DEVICE_ALT0_MODEL := Rocket M
  41. DEVICE_ALT0_VARIANT := XW
  42. DEVICE_PACKAGES += rssileds
  43. SUPPORTED_DEVICES += bullet-m-xw
  44. endef
  45. TARGET_DEVICES += ubnt_bullet-m-xw
  46. define Device/ubnt_edgeswitch-5xp
  47. $(Device/ubnt-sw)
  48. DEVICE_MODEL := EdgeSwitch 5XP
  49. endef
  50. TARGET_DEVICES += ubnt_edgeswitch-5xp
  51. define Device/ubnt_edgeswitch-8xp
  52. $(Device/ubnt-sw)
  53. DEVICE_MODEL := EdgeSwitch 8XP
  54. DEVICE_PACKAGES += kmod-dsa-b53-mdio
  55. DEVICE_COMPAT_VERSION := 1.1
  56. DEVICE_COMPAT_MESSAGE := Config cannot be migrated from swconfig to DSA
  57. endef
  58. TARGET_DEVICES += ubnt_edgeswitch-8xp
  59. define Device/ubnt_lap-120
  60. $(Device/ubnt-wa)
  61. DEVICE_MODEL := LiteAP ac (LAP-120)
  62. DEVICE_PACKAGES += kmod-ath10k-ct-smallbuffers ath10k-firmware-qca988x-ct
  63. endef
  64. TARGET_DEVICES += ubnt_lap-120
  65. define Device/ubnt_litebeam-ac-gen2
  66. $(Device/ubnt-wa)
  67. DEVICE_MODEL := LiteBeam AC
  68. DEVICE_VARIANT := Gen2
  69. DEVICE_PACKAGES := kmod-ath10k-ct-smallbuffers ath10k-firmware-qca988x-ct
  70. endef
  71. TARGET_DEVICES += ubnt_litebeam-ac-gen2
  72. define Device/ubnt_litebeam-m5-xw
  73. $(Device/ubnt-xw)
  74. DEVICE_MODEL := LiteBeam M5
  75. SUPPORTED_DEVICES += lbe-m5
  76. DEVICE_PACKAGES := -kmod-usb2
  77. endef
  78. TARGET_DEVICES += ubnt_litebeam-m5-xw
  79. define Device/ubnt_nanobeam-ac
  80. $(Device/ubnt-wa)
  81. DEVICE_MODEL := NanoBeam AC
  82. DEVICE_VARIANT := Gen1
  83. DEVICE_PACKAGES += kmod-ath10k-ct-smallbuffers ath10k-firmware-qca988x-ct rssileds
  84. endef
  85. TARGET_DEVICES += ubnt_nanobeam-ac
  86. define Device/ubnt_nanobeam-ac-gen2
  87. $(Device/ubnt-wa)
  88. DEVICE_MODEL := NanoBeam AC
  89. DEVICE_VARIANT := Gen2
  90. DEVICE_PACKAGES += kmod-ath10k-ct-smallbuffers ath10k-firmware-qca988x-ct rssileds
  91. endef
  92. TARGET_DEVICES += ubnt_nanobeam-ac-gen2
  93. define Device/ubnt_nanobeam-ac-xc
  94. $(Device/ubnt-xc)
  95. SOC := qca9558
  96. DEVICE_MODEL := NanoBeam AC
  97. DEVICE_VARIANT := Gen1 (XC)
  98. DEVICE_PACKAGES += kmod-ath10k-ct ath10k-firmware-qca988x-ct rssileds
  99. endef
  100. TARGET_DEVICES += ubnt_nanobeam-ac-xc
  101. define Device/ubnt_nanostation-ac
  102. $(Device/ubnt-wa)
  103. DEVICE_MODEL := Nanostation AC
  104. DEVICE_PACKAGES += kmod-ath10k-ct-smallbuffers ath10k-firmware-qca988x-ct rssileds
  105. endef
  106. TARGET_DEVICES += ubnt_nanostation-ac
  107. define Device/ubnt_nanostation-ac-loco
  108. $(Device/ubnt-wa)
  109. DEVICE_MODEL := Nanostation AC loco
  110. DEVICE_PACKAGES += kmod-ath10k-ct-smallbuffers ath10k-firmware-qca988x-ct
  111. endef
  112. TARGET_DEVICES += ubnt_nanostation-ac-loco
  113. define Device/ubnt_nanostation-loco-m-xw
  114. $(Device/ubnt-xw)
  115. DEVICE_MODEL := Nanostation Loco M
  116. DEVICE_PACKAGES += rssileds -kmod-usb2
  117. DEVICE_ALT0_VENDOR := Ubiquiti
  118. DEVICE_ALT0_MODEL := AirGrid M5 HP
  119. DEVICE_ALT0_VARIANT := XW
  120. DEVICE_ALT1_VENDOR := Ubiquiti
  121. DEVICE_ALT1_MODEL := PowerBeam M5 300
  122. DEVICE_ALT1_VARIANT := XW
  123. DEVICE_ALT2_VENDOR := Ubiquiti
  124. DEVICE_ALT2_MODEL := NanoBeam M5
  125. DEVICE_ALT2_VARIANT := XW
  126. SUPPORTED_DEVICES += loco-m-xw nanostation-m-xw ubnt,nanobeam-m5-xw
  127. endef
  128. TARGET_DEVICES += ubnt_nanostation-loco-m-xw
  129. define Device/ubnt_nanostation-m-xw
  130. $(Device/ubnt-xw)
  131. DEVICE_MODEL := Nanostation M
  132. DEVICE_PACKAGES += rssileds
  133. SUPPORTED_DEVICES += nanostation-m-xw
  134. endef
  135. TARGET_DEVICES += ubnt_nanostation-m-xw
  136. define Device/ubnt_powerbeam-5ac-500
  137. $(Device/ubnt-xc)
  138. SOC := qca9558
  139. DEVICE_MODEL := PowerBeam 5AC
  140. DEVICE_VARIANT := 500
  141. DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca988x-ct
  142. endef
  143. TARGET_DEVICES += ubnt_powerbeam-5ac-500
  144. define Device/ubnt_powerbeam-5ac-gen2
  145. $(Device/ubnt-wa)
  146. DEVICE_MODEL := PowerBeam 5AC
  147. DEVICE_VARIANT := Gen2
  148. DEVICE_PACKAGES := kmod-ath10k-ct-smallbuffers ath10k-firmware-qca988x-ct rssileds
  149. endef
  150. TARGET_DEVICES += ubnt_powerbeam-5ac-gen2
  151. define Device/ubnt_powerbeam-m2-xw
  152. $(Device/ubnt-xw)
  153. DEVICE_MODEL := PowerBeam M2
  154. DEVICE_PACKAGES += rssileds
  155. SUPPORTED_DEVICES += loco-m-xw
  156. endef
  157. TARGET_DEVICES += ubnt_powerbeam-m2-xw
  158. define Device/ubnt_powerbeam-m5-xw
  159. $(Device/ubnt-xw)
  160. DEVICE_MODEL := PowerBeam M5
  161. DEVICE_PACKAGES += rssileds
  162. SUPPORTED_DEVICES += loco-m-xw
  163. endef
  164. TARGET_DEVICES += ubnt_powerbeam-m5-xw
  165. define Device/ubnt_powerbridge-m
  166. $(Device/ubnt-xm)
  167. SOC := ar7241
  168. DEVICE_MODEL := PowerBridge M
  169. DEVICE_PACKAGES += rssileds
  170. SUPPORTED_DEVICES += bullet-m
  171. endef
  172. TARGET_DEVICES += ubnt_powerbridge-m
  173. define Device/ubnt_rocket-5ac-lite
  174. $(Device/ubnt-xc)
  175. SOC := qca9558
  176. DEVICE_MODEL := Rocket 5AC
  177. DEVICE_VARIANT := Lite
  178. DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca988x-ct
  179. endef
  180. TARGET_DEVICES += ubnt_rocket-5ac-lite
  181. define Device/ubnt_rocket-m
  182. $(Device/ubnt-xm)
  183. SOC := ar7241
  184. DEVICE_MODEL := Rocket M
  185. DEVICE_PACKAGES += rssileds
  186. SUPPORTED_DEVICES += rocket-m
  187. endef
  188. TARGET_DEVICES += ubnt_rocket-m
  189. define Device/ubnt_routerstation_common
  190. DEVICE_PACKAGES := -kmod-ath9k -wpad-basic-mbedtls -uboot-envtools kmod-usb-ohci \
  191. kmod-usb2 fconfig
  192. DEVICE_VENDOR := Ubiquiti
  193. SOC := ar7161
  194. LOADER_TYPE := bin
  195. LOADER_FLASH_OFFS := 0x50000
  196. COMPILE := loader-$(1).bin
  197. COMPILE/loader-$(1).bin := loader-okli-compile | lzma | pad-to 128k
  198. IMAGE_SIZE := 16000k
  199. IMAGES += factory.bin
  200. IMAGE/factory.bin := append-kernel | uImage lzma -M 0x4f4b4c49 | pad-to $$$$(BLOCKSIZE) | \
  201. append-rootfs | pad-rootfs | pad-to $$$$(BLOCKSIZE) | \
  202. mkubntimage $$$$(KDIR)/loader-$(1).bin | check-size
  203. IMAGE/sysupgrade.bin := append-kernel | uImage lzma -M 0x4f4b4c49 | pad-to $$$$(BLOCKSIZE) | \
  204. append-rootfs | pad-rootfs | pad-to $$$$(BLOCKSIZE) | check-size | \
  205. sysupgrade-tar kernel=$$$$(KDIR)/loader-$(1).bin rootfs=$$$$@ | append-metadata
  206. KERNEL := kernel-bin | append-dtb | lzma
  207. KERNEL_INITRAMFS := kernel-bin | append-dtb
  208. DEVICE_COMPAT_VERSION := 2.0
  209. DEVICE_COMPAT_MESSAGE := Partition design has changed compared to older versions (19.07 and 21.02) \
  210. due to kernel drivers restrictions. Upgrade via sysupgrade mechanism is one way operation. \
  211. Downgrading OpenWrt version will involve usage of TFTP recovery or bootloader command line interface.
  212. endef
  213. define Device/ubnt_routerstation
  214. $(Device/ubnt_routerstation_common)
  215. DEVICE_MODEL := RouterStation
  216. UBNT_BOARD := RS
  217. UBNT_TYPE := RSx
  218. UBNT_CHIP := ar7100
  219. DEVICE_PACKAGES += -swconfig
  220. endef
  221. TARGET_DEVICES += ubnt_routerstation
  222. define Device/ubnt_routerstation-pro
  223. $(Device/ubnt_routerstation_common)
  224. DEVICE_MODEL := RouterStation Pro
  225. UBNT_BOARD := RSPRO
  226. UBNT_TYPE := RSPRO
  227. UBNT_CHIP := ar7100pro
  228. endef
  229. TARGET_DEVICES += ubnt_routerstation-pro
  230. define Device/ubnt_uk-ultra
  231. $(Device/ubnt_unifiac)
  232. DEVICE_MODEL := UniFi Swiss Army Knife Ultra
  233. DEVICE_PACKAGES += rssileds -swconfig
  234. endef
  235. TARGET_DEVICES += ubnt_uk-ultra
  236. define Device/ubnt_unifi-ap
  237. $(Device/ubnt-bz)
  238. DEVICE_MODEL := UniFi AP
  239. SUPPORTED_DEVICES += unifi ubnt,unifi
  240. endef
  241. TARGET_DEVICES += ubnt_unifi-ap
  242. define Device/ubnt_unifi-ap-lr
  243. $(Device/ubnt-bz)
  244. DEVICE_MODEL := UniFi AP
  245. DEVICE_VARIANT := LR
  246. SUPPORTED_DEVICES += unifi ubnt,unifi ubnt,unifi-ap
  247. endef
  248. TARGET_DEVICES += ubnt_unifi-ap-lr
  249. define Device/ubnt_unifiac-lite
  250. $(Device/ubnt_unifiac)
  251. DEVICE_MODEL := UniFi AC Lite
  252. DEVICE_PACKAGES += -swconfig
  253. SUPPORTED_DEVICES += unifiac-lite
  254. endef
  255. TARGET_DEVICES += ubnt_unifiac-lite
  256. define Device/ubnt_unifiac-lr
  257. $(Device/ubnt_unifiac)
  258. DEVICE_MODEL := UniFi AC LR
  259. DEVICE_PACKAGES += -swconfig
  260. SUPPORTED_DEVICES += unifiac-lite ubnt,unifiac-lite
  261. endef
  262. TARGET_DEVICES += ubnt_unifiac-lr
  263. define Device/ubnt_unifiac-mesh
  264. $(Device/ubnt_unifiac)
  265. DEVICE_MODEL := UniFi AC Mesh
  266. DEVICE_PACKAGES += -swconfig
  267. SUPPORTED_DEVICES += unifiac-lite
  268. endef
  269. TARGET_DEVICES += ubnt_unifiac-mesh
  270. define Device/ubnt_unifiac-mesh-pro
  271. $(Device/ubnt_unifiac)
  272. DEVICE_MODEL := UniFi AC Mesh Pro
  273. SUPPORTED_DEVICES += unifiac-pro
  274. endef
  275. TARGET_DEVICES += ubnt_unifiac-mesh-pro
  276. define Device/ubnt_unifiac-pro
  277. $(Device/ubnt_unifiac)
  278. DEVICE_MODEL := UniFi AC Pro
  279. DEVICE_PACKAGES += kmod-usb2
  280. SUPPORTED_DEVICES += unifiac-pro
  281. endef
  282. TARGET_DEVICES += ubnt_unifiac-pro
  283. define Device/ubnt_unifi-ap-outdoor-plus
  284. $(Device/ubnt-bz)
  285. $(Device/ubnt-unifi-jffs2)
  286. DEVICE_MODEL := UniFi AP Outdoor+
  287. SUPPORTED_DEVICES += unifi-outdoor-plus
  288. endef
  289. TARGET_DEVICES += ubnt_unifi-ap-outdoor-plus
  290. define Device/ubnt_unifi-ap-pro
  291. $(Device/ubnt-unifi-jffs2)
  292. SOC := ar9344
  293. DEVICE_MODEL := UniFi AP Pro
  294. UBNT_CHIP := ar934x
  295. SUPPORTED_DEVICES += uap-pro
  296. endef
  297. TARGET_DEVICES += ubnt_unifi-ap-pro