ipq807x.mk 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454
  1. DEVICE_VARS += NETGEAR_BOARD_ID NETGEAR_HW_ID
  2. define Build/asus-fake-ramdisk
  3. rm -rf $(KDIR)/tmp/fakerd
  4. dd if=/dev/zero bs=32 count=1 > $(KDIR)/tmp/fakerd
  5. $(info KERNEL_INITRAMFS is $(KERNEL_INITRAMFS))
  6. endef
  7. define Build/asus-fake-rootfs
  8. $(eval comp=$(word 1,$(1)))
  9. $(eval filepath=$(word 2,$(1)))
  10. $(eval filecont=$(word 3,$(1)))
  11. rm -rf $(KDIR)/tmp/fakefs $(KDIR)/tmp/fakehsqs
  12. mkdir -p $(KDIR)/tmp/fakefs/$$(dirname $(filepath))
  13. echo '$(filecont)' > $(KDIR)/tmp/fakefs/$(filepath)
  14. $(STAGING_DIR_HOST)/bin/mksquashfs4 $(KDIR)/tmp/fakefs $(KDIR)/tmp/fakehsqs -comp $(comp) \
  15. -b 4096 -no-exports -no-sparse -no-xattrs -all-root -noappend \
  16. $(wordlist 4,$(words $(1)),$(1))
  17. endef
  18. define Build/asus-trx
  19. $(STAGING_DIR_HOST)/bin/asusuimage $(wordlist 1,$(words $(1)),$(1)) -i $@ -o [email protected]
  20. mv [email protected] $@
  21. endef
  22. define Build/wax6xx-netgear-tar
  23. mkdir [email protected]
  24. mv $@ [email protected]/nand-ipq807x-apps.img
  25. md5sum [email protected]/nand-ipq807x-apps.img | cut -c 1-32 > [email protected]/nand-ipq807x-apps.md5sum
  26. echo $(DEVICE_MODEL) > [email protected]/metadata.txt
  27. echo $(DEVICE_MODEL)"_V9.9.9.9" > [email protected]/version
  28. tar -C [email protected]/ -cf $@ .
  29. rm -rf [email protected]
  30. endef
  31. define Device/arcadyan_aw1000
  32. $(call Device/FitImage)
  33. $(call Device/UbiFit)
  34. DEVICE_VENDOR := Arcadyan
  35. DEVICE_MODEL := AW1000
  36. BLOCKSIZE := 256k
  37. PAGESIZE := 4096
  38. DEVICE_DTS_CONFIG := config@hk09
  39. SOC := ipq8072
  40. DEVICE_PACKAGES := ipq-wifi-arcadyan_aw1000 kmod-spi-gpio \
  41. kmod-gpio-nxp-74hc164 kmod-usb-serial-option uqmi
  42. endef
  43. TARGET_DEVICES += arcadyan_aw1000
  44. define Device/asus_rt-ax89x
  45. DEVICE_VENDOR := Asus
  46. DEVICE_MODEL := RT-AX89X
  47. BLOCKSIZE := 128k
  48. PAGESIZE := 2048
  49. DEVICE_DTS_CONFIG := config@hk01
  50. SOC := ipq8074
  51. DEVICE_PACKAGES := kmod-hwmon-gpiofan ipq-wifi-asus_rt-ax89x
  52. KERNEL_NAME := vmlinux
  53. KERNEL := kernel-bin | libdeflate-gzip
  54. KERNEL_IN_UBI := 1
  55. IMAGE/sysupgrade.bin/squashfs := \
  56. append-kernel | asus-fake-ramdisk |\
  57. multiImage gzip $$(KDIR)/tmp/fakerd $$(KDIR)/image-$$(DEVICE_DTS).dtb |\
  58. sysupgrade-tar kernel=$$$$@ | append-metadata
  59. ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),)
  60. ARTIFACTS := initramfs-factory.trx initramfs-uImage.itb
  61. ARTIFACT/initramfs-uImage.itb := \
  62. append-image-stage initramfs-kernel.bin | fit gzip $$(KDIR)/image-$$(DEVICE_DTS).dtb
  63. ARTIFACT/initramfs-factory.trx := \
  64. append-image-stage initramfs-kernel.bin |\
  65. asus-fake-rootfs xz /lib/firmware/IPQ8074A/fw_version.txt "fake" -no-compression |\
  66. multiImage gzip $$(KDIR)/tmp/fakehsqs $$(KDIR)/image-$$(DEVICE_DTS).dtb |\
  67. asus-trx -v 2 -n RT-AX89U -b 388 -e 49000
  68. endif
  69. endef
  70. TARGET_DEVICES += asus_rt-ax89x
  71. define Device/buffalo_wxr-5950ax12
  72. $(call Device/FitImage)
  73. DEVICE_VENDOR := Buffalo
  74. DEVICE_MODEL := WXR-5950AX12
  75. BLOCKSIZE := 128k
  76. PAGESIZE := 2048
  77. DEVICE_DTS_CONFIG := config@hk01
  78. SOC := ipq8074
  79. DEVICE_PACKAGES := ipq-wifi-buffalo_wxr-5950ax12
  80. endef
  81. TARGET_DEVICES += buffalo_wxr-5950ax12
  82. define Device/cmcc_rm2-6
  83. $(call Device/FitImage)
  84. $(call Device/UbiFit)
  85. DEVICE_VENDOR := CMCC
  86. DEVICE_MODEL := RM2-6
  87. BLOCKSIZE := 128k
  88. PAGESIZE := 2048
  89. DEVICE_DTS_CONFIG := config@ac02
  90. SOC := ipq8070
  91. IMAGES += factory.bin
  92. IMAGE/factory.bin := append-ubi | qsdk-ipq-factory-nand
  93. DEVICE_PACKAGES := ipq-wifi-cmcc_rm2-6 kmod-hwmon-gpiofan
  94. endef
  95. TARGET_DEVICES += cmcc_rm2-6
  96. define Device/compex_wpq873
  97. $(call Device/FitImage)
  98. $(call Device/UbiFit)
  99. DEVICE_VENDOR := Compex
  100. DEVICE_MODEL := WPQ873
  101. BLOCKSIZE := 128k
  102. PAGESIZE := 2048
  103. DEVICE_DTS_CONFIG := [email protected]
  104. SOC := ipq8072
  105. DEVICE_PACKAGES := ipq-wifi-compex_wpq873
  106. IMAGE/factory.ubi := append-ubi | qsdk-ipq-factory-nand
  107. endef
  108. TARGET_DEVICES += compex_wpq873
  109. define Device/dynalink_dl-wrx36
  110. $(call Device/FitImage)
  111. $(call Device/UbiFit)
  112. DEVICE_VENDOR := Dynalink
  113. DEVICE_MODEL := DL-WRX36
  114. BLOCKSIZE := 128k
  115. PAGESIZE := 2048
  116. DEVICE_DTS_CONFIG := config@rt5010w-d350-rev0
  117. SOC := ipq8072
  118. DEVICE_PACKAGES := ipq-wifi-dynalink_dl-wrx36
  119. endef
  120. TARGET_DEVICES += dynalink_dl-wrx36
  121. define Device/edgecore_eap102
  122. $(call Device/FitImage)
  123. $(call Device/UbiFit)
  124. DEVICE_VENDOR := Edgecore
  125. DEVICE_MODEL := EAP102
  126. BLOCKSIZE := 128k
  127. PAGESIZE := 2048
  128. DEVICE_DTS_CONFIG := config@ac02
  129. SOC := ipq8071
  130. DEVICE_PACKAGES := ipq-wifi-edgecore_eap102
  131. IMAGE/factory.ubi := append-ubi | qsdk-ipq-factory-nand
  132. endef
  133. TARGET_DEVICES += edgecore_eap102
  134. define Device/edimax_cax1800
  135. $(call Device/FitImage)
  136. $(call Device/UbiFit)
  137. DEVICE_VENDOR := Edimax
  138. DEVICE_MODEL := CAX1800
  139. BLOCKSIZE := 128k
  140. PAGESIZE := 2048
  141. DEVICE_DTS_CONFIG := config@ac03
  142. SOC := ipq8070
  143. DEVICE_PACKAGES := ipq-wifi-edimax_cax1800
  144. endef
  145. TARGET_DEVICES += edimax_cax1800
  146. define Device/linksys_mx
  147. $(call Device/FitImage)
  148. DEVICE_VENDOR := Linksys
  149. BLOCKSIZE := 128k
  150. PAGESIZE := 2048
  151. KERNEL_SIZE := 6144k
  152. IMAGE_SIZE := 147456k
  153. NAND_SIZE := 512m
  154. SOC := ipq8072
  155. IMAGES += factory.bin
  156. IMAGE/factory.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi | linksys-image type=$$$$(DEVICE_MODEL)
  157. DEVICE_PACKAGES := kmod-leds-pca963x
  158. endef
  159. define Device/linksys_mx4200v1
  160. $(call Device/linksys_mx)
  161. DEVICE_MODEL := MX4200
  162. DEVICE_VARIANT := v1
  163. SOC := ipq8174
  164. DEVICE_PACKAGES += ipq-wifi-linksys_mx4200 kmod-bluetooth
  165. endef
  166. TARGET_DEVICES += linksys_mx4200v1
  167. define Device/linksys_mx4200v2
  168. $(call Device/linksys_mx4200v1)
  169. DEVICE_VARIANT := v2
  170. endef
  171. TARGET_DEVICES += linksys_mx4200v2
  172. define Device/linksys_mx5300
  173. $(call Device/linksys_mx)
  174. DEVICE_MODEL := MX5300
  175. DEVICE_PACKAGES += kmod-rtc-ds1307 ipq-wifi-linksys_mx5300 \
  176. kmod-ath10k-ct ath10k-firmware-qca9984-ct
  177. endef
  178. TARGET_DEVICES += linksys_mx5300
  179. define Device/linksys_mx8500
  180. $(call Device/linksys_mx)
  181. DEVICE_MODEL := MX8500
  182. DEVICE_PACKAGES += ipq-wifi-linksys_mx8500 kmod-ath11k-pci \
  183. ath11k-firmware-qcn9074 kmod-bluetooth
  184. endef
  185. TARGET_DEVICES += linksys_mx8500
  186. define Device/netgear_rax120v2
  187. $(call Device/FitImage)
  188. $(call Device/UbiFit)
  189. DEVICE_VENDOR := Netgear
  190. DEVICE_MODEL := RAX120v2
  191. BLOCKSIZE := 128k
  192. PAGESIZE := 2048
  193. DEVICE_DTS_CONFIG := config@hk01
  194. SOC := ipq8074
  195. KERNEL_SIZE := 29696k
  196. NETGEAR_BOARD_ID := RAX120
  197. NETGEAR_HW_ID := 29765589+0+512+1024+4x4+8x8
  198. DEVICE_PACKAGES := ipq-wifi-netgear_rax120v2 kmod-spi-gpio \
  199. kmod-spi-bitbang kmod-gpio-nxp-74hc164 kmod-hwmon-g762
  200. ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),)
  201. IMAGES += web-ui-factory.img
  202. IMAGE/web-ui-factory.img := append-image initramfs-uImage.itb | \
  203. pad-offset $$$$(BLOCKSIZE) 64 | append-uImage-fakehdr filesystem | \
  204. netgear-dni
  205. endif
  206. IMAGE/sysupgrade.bin := append-kernel | pad-offset $$$$(BLOCKSIZE) 64 | \
  207. append-uImage-fakehdr filesystem | sysupgrade-tar kernel=$$$$@ | \
  208. append-metadata
  209. endef
  210. TARGET_DEVICES += netgear_rax120v2
  211. define Device/netgear_sxk80
  212. $(call Device/FitImage)
  213. $(call Device/UbiFit)
  214. DEVICE_PACKAGES += ipq-wifi-netgear_sxk80
  215. DEVICE_VENDOR := Netgear
  216. BLOCKSIZE := 128k
  217. PAGESIZE := 2048
  218. DEVICE_DTS_CONFIG := config@hk01
  219. SOC := ipq8074
  220. KERNEL_SIZE := 6272k
  221. NETGEAR_HW_ID := 29766265+0+512+1024+4x4+4x4+4x4
  222. endef
  223. define Device/netgear_sxr80
  224. $(call Device/netgear_sxk80)
  225. DEVICE_MODEL := SXR80
  226. NETGEAR_BOARD_ID := SXR80
  227. endef
  228. TARGET_DEVICES += netgear_sxr80
  229. define Device/netgear_sxs80
  230. $(call Device/netgear_sxk80)
  231. DEVICE_MODEL := SXS80
  232. NETGEAR_BOARD_ID := SXS80
  233. endef
  234. TARGET_DEVICES += netgear_sxs80
  235. define Device/netgear_wax218
  236. $(call Device/FitImage)
  237. $(call Device/UbiFit)
  238. DEVICE_VENDOR := Netgear
  239. DEVICE_MODEL := WAX218
  240. DEVICE_DTS_CONFIG := config@hk07
  241. BLOCKSIZE := 128k
  242. PAGESIZE := 2048
  243. SOC := ipq8072
  244. ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),)
  245. ARTIFACTS := web-ui-factory.fit
  246. ARTIFACT/web-ui-factory.fit := append-image initramfs-uImage.itb | \
  247. ubinize-kernel | qsdk-ipq-factory-nand
  248. endif
  249. DEVICE_PACKAGES := kmod-spi-gpio kmod-spi-bitbang kmod-gpio-nxp-74hc164 \
  250. ipq-wifi-netgear_wax218
  251. endef
  252. TARGET_DEVICES += netgear_wax218
  253. define Device/netgear_wax620
  254. $(call Device/FitImage)
  255. $(call Device/UbiFit)
  256. DEVICE_VENDOR := Netgear
  257. DEVICE_MODEL := WAX620
  258. DEVICE_DTS_CONFIG := config@hk07
  259. BLOCKSIZE := 128k
  260. PAGESIZE := 2048
  261. SOC := ipq8072
  262. DEVICE_PACKAGES := kmod-spi-gpio kmod-gpio-nxp-74hc164 \
  263. ipq-wifi-netgear_wax620
  264. endef
  265. TARGET_DEVICES += netgear_wax620
  266. define Device/netgear_wax630
  267. $(call Device/FitImage)
  268. $(call Device/UbiFit)
  269. DEVICE_VENDOR := Netgear
  270. DEVICE_MODEL := WAX630
  271. DEVICE_DTS_CONFIG := config@hk01
  272. BLOCKSIZE := 128k
  273. PAGESIZE := 2048
  274. SOC := ipq8074
  275. IMAGES += ui-factory.tar
  276. IMAGE/ui-factory.tar := append-ubi | wax6xx-netgear-tar
  277. DEVICE_PACKAGES := kmod-spi-gpio ipq-wifi-netgear_wax630
  278. endef
  279. TARGET_DEVICES += netgear_wax630
  280. define Device/prpl_haze
  281. $(call Device/FitImage)
  282. $(call Device/EmmcImage)
  283. DEVICE_VENDOR := prpl Foundation
  284. DEVICE_MODEL := Haze
  285. DEVICE_DTS_CONFIG := config@hk09
  286. SOC := ipq8072
  287. DEVICE_PACKAGES := ath11k-firmware-qcn9074 ipq-wifi-prpl_haze kmod-ath11k-pci \
  288. kmod-fs-f2fs f2fs-tools kmod-leds-lp5562
  289. endef
  290. TARGET_DEVICES += prpl_haze
  291. define Device/qnap_301w
  292. $(call Device/FitImage)
  293. $(call Device/EmmcImage)
  294. DEVICE_VENDOR := QNAP
  295. DEVICE_MODEL := 301w
  296. DEVICE_DTS_CONFIG := config@hk01
  297. KERNEL_SIZE := 16384k
  298. SOC := ipq8072
  299. DEVICE_PACKAGES := kmod-fs-f2fs f2fs-tools ipq-wifi-qnap_301w
  300. endef
  301. TARGET_DEVICES += qnap_301w
  302. define Device/redmi_ax6
  303. $(call Device/xiaomi_ax3600)
  304. DEVICE_VENDOR := Redmi
  305. DEVICE_MODEL := AX6
  306. DEVICE_PACKAGES := ipq-wifi-redmi_ax6
  307. endef
  308. TARGET_DEVICES += redmi_ax6
  309. define Device/spectrum_sax1v1k
  310. $(call Device/FitImage)
  311. $(call Device/EmmcImage)
  312. DEVICE_VENDOR := Spectrum
  313. DEVICE_MODEL := SAX1V1K
  314. DEVICE_DTS_CONFIG := config@rt5010w-d187-rev6
  315. SOC := ipq8072
  316. IMAGES := sysupgrade.bin
  317. DEVICE_PACKAGES := kmod-fs-f2fs f2fs-tools ipq-wifi-spectrum_sax1v1k
  318. endef
  319. TARGET_DEVICES += spectrum_sax1v1k
  320. define Device/tplink_eap660hd-v1
  321. $(call Device/FitImage)
  322. $(call Device/UbiFit)
  323. DEVICE_VENDOR := TP-Link
  324. DEVICE_MODEL := EAP660 HD
  325. DEVICE_VARIANT := v1
  326. BLOCKSIZE := 128k
  327. PAGESIZE := 2048
  328. SOC := ipq8072
  329. DEVICE_PACKAGES := ipq-wifi-tplink_eap660hd-v1
  330. TPLINK_SUPPORT_STRING := SupportList:\r\nEAP660 HD(TP-Link|UN|AX3600-D):1.0\r\n
  331. endef
  332. TARGET_DEVICES += tplink_eap660hd-v1
  333. define Device/xiaomi_ax3600
  334. $(call Device/FitImage)
  335. $(call Device/UbiFit)
  336. DEVICE_VENDOR := Xiaomi
  337. DEVICE_MODEL := AX3600
  338. BLOCKSIZE := 128k
  339. PAGESIZE := 2048
  340. DEVICE_DTS_CONFIG := config@ac04
  341. SOC := ipq8071
  342. KERNEL_SIZE := 36608k
  343. DEVICE_PACKAGES := ipq-wifi-xiaomi_ax3600 kmod-ath10k-ct-smallbuffers ath10k-firmware-qca9887-ct
  344. ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),)
  345. ARTIFACTS := initramfs-factory.ubi
  346. ARTIFACT/initramfs-factory.ubi := append-image-stage initramfs-uImage.itb | ubinize-kernel
  347. endif
  348. endef
  349. TARGET_DEVICES += xiaomi_ax3600
  350. define Device/xiaomi_ax9000
  351. $(call Device/FitImage)
  352. $(call Device/UbiFit)
  353. DEVICE_VENDOR := Xiaomi
  354. DEVICE_MODEL := AX9000
  355. BLOCKSIZE := 128k
  356. PAGESIZE := 2048
  357. DEVICE_DTS_CONFIG := config@hk14
  358. SOC := ipq8072
  359. KERNEL_SIZE := 57344k
  360. DEVICE_PACKAGES := ipq-wifi-xiaomi_ax9000 kmod-ath11k-pci ath11k-firmware-qcn9074 \
  361. kmod-ath10k-ct ath10k-firmware-qca9887-ct
  362. ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),)
  363. ARTIFACTS := initramfs-factory.ubi
  364. ARTIFACT/initramfs-factory.ubi := append-image-stage initramfs-uImage.itb | ubinize-kernel
  365. endif
  366. endef
  367. TARGET_DEVICES += xiaomi_ax9000
  368. define Device/yuncore_ax880
  369. $(call Device/FitImage)
  370. $(call Device/UbiFit)
  371. DEVICE_VENDOR := Yuncore
  372. DEVICE_MODEL := AX880
  373. BLOCKSIZE := 128k
  374. PAGESIZE := 2048
  375. DEVICE_DTS_CONFIG := config@hk09
  376. SOC := ipq8072
  377. DEVICE_PACKAGES := ipq-wifi-yuncore_ax880
  378. IMAGES += factory.bin
  379. IMAGE/factory.bin := append-ubi | qsdk-ipq-factory-nand
  380. endef
  381. TARGET_DEVICES += yuncore_ax880
  382. define Device/zbtlink_zbt-z800ax
  383. $(call Device/FitImage)
  384. $(call Device/UbiFit)
  385. DEVICE_VENDOR := Zbtlink
  386. DEVICE_MODEL := ZBT-Z800AX
  387. BLOCKSIZE := 128k
  388. PAGESIZE := 2048
  389. DEVICE_DTS_CONFIG := config@hk09
  390. SOC := ipq8072
  391. DEVICE_PACKAGES := ipq-wifi-zbtlink_zbt-z800ax
  392. IMAGES += factory.bin
  393. IMAGE/factory.bin := append-ubi | qsdk-ipq-factory-nand
  394. endef
  395. TARGET_DEVICES += zbtlink_zbt-z800ax
  396. define Device/zte_mf269
  397. $(call Device/FitImage)
  398. $(call Device/UbiFit)
  399. DEVICE_VENDOR := ZTE
  400. DEVICE_MODEL := MF269
  401. BLOCKSIZE := 128k
  402. PAGESIZE := 2048
  403. DEVICE_DTS_CONFIG := config@ac04
  404. SOC := ipq8071
  405. KERNEL_SIZE := 53248k
  406. DEVICE_PACKAGES := ipq-wifi-zte_mf269
  407. endef
  408. TARGET_DEVICES += zte_mf269
  409. define Device/zyxel_nbg7815
  410. $(call Device/FitImage)
  411. $(call Device/EmmcImage)
  412. DEVICE_VENDOR := ZYXEL
  413. DEVICE_MODEL := NBG7815
  414. DEVICE_DTS_CONFIG := config@nbg7815
  415. SOC := ipq8074
  416. DEVICE_PACKAGES := kmod-fs-f2fs f2fs-tools ipq-wifi-zyxel_nbg7815 kmod-ath11k-pci \
  417. kmod-bluetooth kmod-hwmon-tmp103
  418. endef
  419. TARGET_DEVICES += zyxel_nbg7815