generic-ubnt.mk 7.9 KB

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