generic-ubnt.mk 9.1 KB

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