generic-ubnt.mk 8.0 KB

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