generic-ubnt.mk 8.8 KB

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