ipq807x.mk 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470
  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_mx4x00
  160. $(call Device/linksys_mx)
  161. SOC := ipq8174
  162. DEVICE_PACKAGES += ipq-wifi-linksys_mx4200
  163. endef
  164. define Device/linksys_mx4200v1
  165. $(call Device/linksys_mx4x00)
  166. DEVICE_MODEL := MX4200
  167. DEVICE_VARIANT := v1
  168. DEVICE_PACKAGES += kmod-bluetooth
  169. endef
  170. TARGET_DEVICES += linksys_mx4200v1
  171. define Device/linksys_mx4200v2
  172. $(call Device/linksys_mx4200v1)
  173. DEVICE_VARIANT := v2
  174. endef
  175. TARGET_DEVICES += linksys_mx4200v2
  176. define Device/linksys_mx4300
  177. $(call Device/linksys_mx4x00)
  178. DEVICE_MODEL := MX4300
  179. BLOCKSIZE := 256k
  180. PAGESIZE := 4096
  181. KERNEL_SIZE := 8192k
  182. IMAGE_SIZE := 171264k
  183. NAND_SIZE := 1024m
  184. endef
  185. TARGET_DEVICES += linksys_mx4300
  186. define Device/linksys_mx5300
  187. $(call Device/linksys_mx)
  188. DEVICE_MODEL := MX5300
  189. DEVICE_PACKAGES += kmod-rtc-ds1307 ipq-wifi-linksys_mx5300 \
  190. kmod-ath10k-ct ath10k-firmware-qca9984-ct
  191. endef
  192. TARGET_DEVICES += linksys_mx5300
  193. define Device/linksys_mx8500
  194. $(call Device/linksys_mx)
  195. DEVICE_MODEL := MX8500
  196. DEVICE_PACKAGES += ipq-wifi-linksys_mx8500 kmod-ath11k-pci \
  197. ath11k-firmware-qcn9074 kmod-bluetooth
  198. endef
  199. TARGET_DEVICES += linksys_mx8500
  200. define Device/netgear_rax120v2
  201. $(call Device/FitImage)
  202. $(call Device/UbiFit)
  203. DEVICE_VENDOR := Netgear
  204. DEVICE_MODEL := RAX120v2
  205. BLOCKSIZE := 128k
  206. PAGESIZE := 2048
  207. DEVICE_DTS_CONFIG := config@hk01
  208. SOC := ipq8074
  209. KERNEL_SIZE := 29696k
  210. NETGEAR_BOARD_ID := RAX120
  211. NETGEAR_HW_ID := 29765589+0+512+1024+4x4+8x8
  212. DEVICE_PACKAGES := ipq-wifi-netgear_rax120v2 kmod-spi-gpio \
  213. kmod-spi-bitbang kmod-gpio-nxp-74hc164 kmod-hwmon-g762
  214. ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),)
  215. IMAGES += web-ui-factory.img
  216. IMAGE/web-ui-factory.img := append-image initramfs-uImage.itb | \
  217. pad-offset $$$$(BLOCKSIZE) 64 | append-uImage-fakehdr filesystem | \
  218. netgear-dni
  219. endif
  220. IMAGE/sysupgrade.bin := append-kernel | pad-offset $$$$(BLOCKSIZE) 64 | \
  221. append-uImage-fakehdr filesystem | sysupgrade-tar kernel=$$$$@ | \
  222. append-metadata
  223. endef
  224. TARGET_DEVICES += netgear_rax120v2
  225. define Device/netgear_sxk80
  226. $(call Device/FitImage)
  227. $(call Device/UbiFit)
  228. DEVICE_PACKAGES += ipq-wifi-netgear_sxk80
  229. DEVICE_VENDOR := Netgear
  230. BLOCKSIZE := 128k
  231. PAGESIZE := 2048
  232. DEVICE_DTS_CONFIG := config@hk01
  233. SOC := ipq8074
  234. KERNEL_SIZE := 6272k
  235. NETGEAR_HW_ID := 29766265+0+512+1024+4x4+4x4+4x4
  236. endef
  237. define Device/netgear_sxr80
  238. $(call Device/netgear_sxk80)
  239. DEVICE_MODEL := SXR80
  240. NETGEAR_BOARD_ID := SXR80
  241. endef
  242. TARGET_DEVICES += netgear_sxr80
  243. define Device/netgear_sxs80
  244. $(call Device/netgear_sxk80)
  245. DEVICE_MODEL := SXS80
  246. NETGEAR_BOARD_ID := SXS80
  247. endef
  248. TARGET_DEVICES += netgear_sxs80
  249. define Device/netgear_wax218
  250. $(call Device/FitImage)
  251. $(call Device/UbiFit)
  252. DEVICE_VENDOR := Netgear
  253. DEVICE_MODEL := WAX218
  254. DEVICE_DTS_CONFIG := config@hk07
  255. BLOCKSIZE := 128k
  256. PAGESIZE := 2048
  257. SOC := ipq8072
  258. ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),)
  259. ARTIFACTS := web-ui-factory.fit
  260. ARTIFACT/web-ui-factory.fit := append-image initramfs-uImage.itb | \
  261. ubinize-kernel | qsdk-ipq-factory-nand
  262. endif
  263. DEVICE_PACKAGES := kmod-spi-gpio kmod-spi-bitbang kmod-gpio-nxp-74hc164 \
  264. ipq-wifi-netgear_wax218
  265. endef
  266. TARGET_DEVICES += netgear_wax218
  267. define Device/netgear_wax620
  268. $(call Device/FitImage)
  269. $(call Device/UbiFit)
  270. DEVICE_VENDOR := Netgear
  271. DEVICE_MODEL := WAX620
  272. DEVICE_DTS_CONFIG := config@hk07
  273. BLOCKSIZE := 128k
  274. PAGESIZE := 2048
  275. SOC := ipq8072
  276. DEVICE_PACKAGES := kmod-spi-gpio kmod-gpio-nxp-74hc164 \
  277. ipq-wifi-netgear_wax620
  278. endef
  279. TARGET_DEVICES += netgear_wax620
  280. define Device/netgear_wax630
  281. $(call Device/FitImage)
  282. $(call Device/UbiFit)
  283. DEVICE_VENDOR := Netgear
  284. DEVICE_MODEL := WAX630
  285. DEVICE_DTS_CONFIG := config@hk01
  286. BLOCKSIZE := 128k
  287. PAGESIZE := 2048
  288. SOC := ipq8074
  289. IMAGES += ui-factory.tar
  290. IMAGE/ui-factory.tar := append-ubi | wax6xx-netgear-tar
  291. DEVICE_PACKAGES := kmod-spi-gpio ipq-wifi-netgear_wax630
  292. endef
  293. TARGET_DEVICES += netgear_wax630
  294. define Device/prpl_haze
  295. $(call Device/FitImage)
  296. $(call Device/EmmcImage)
  297. DEVICE_VENDOR := prpl Foundation
  298. DEVICE_MODEL := Haze
  299. DEVICE_DTS_CONFIG := config@hk09
  300. SOC := ipq8072
  301. DEVICE_PACKAGES := ath11k-firmware-qcn9074 ipq-wifi-prpl_haze kmod-ath11k-pci \
  302. kmod-fs-f2fs f2fs-tools kmod-leds-lp5562
  303. endef
  304. TARGET_DEVICES += prpl_haze
  305. define Device/qnap_301w
  306. $(call Device/FitImage)
  307. $(call Device/EmmcImage)
  308. DEVICE_VENDOR := QNAP
  309. DEVICE_MODEL := 301w
  310. DEVICE_DTS_CONFIG := config@hk01
  311. KERNEL_SIZE := 16384k
  312. SOC := ipq8072
  313. DEVICE_PACKAGES := kmod-fs-f2fs f2fs-tools ipq-wifi-qnap_301w
  314. endef
  315. TARGET_DEVICES += qnap_301w
  316. define Device/redmi_ax6
  317. $(call Device/xiaomi_ax3600)
  318. DEVICE_VENDOR := Redmi
  319. DEVICE_MODEL := AX6
  320. DEVICE_PACKAGES := ipq-wifi-redmi_ax6
  321. endef
  322. TARGET_DEVICES += redmi_ax6
  323. define Device/spectrum_sax1v1k
  324. $(call Device/FitImage)
  325. $(call Device/EmmcImage)
  326. DEVICE_VENDOR := Spectrum
  327. DEVICE_MODEL := SAX1V1K
  328. DEVICE_DTS_CONFIG := config@rt5010w-d187-rev6
  329. SOC := ipq8072
  330. IMAGES := sysupgrade.bin
  331. DEVICE_PACKAGES := kmod-fs-f2fs f2fs-tools ipq-wifi-spectrum_sax1v1k
  332. endef
  333. TARGET_DEVICES += spectrum_sax1v1k
  334. define Device/tplink_eap660hd-v1
  335. $(call Device/FitImage)
  336. $(call Device/UbiFit)
  337. DEVICE_VENDOR := TP-Link
  338. DEVICE_MODEL := EAP660 HD
  339. DEVICE_VARIANT := v1
  340. BLOCKSIZE := 128k
  341. PAGESIZE := 2048
  342. SOC := ipq8072
  343. DEVICE_PACKAGES := ipq-wifi-tplink_eap660hd-v1
  344. TPLINK_SUPPORT_STRING := SupportList:\r\nEAP660 HD(TP-Link|UN|AX3600-D):1.0\r\n
  345. endef
  346. TARGET_DEVICES += tplink_eap660hd-v1
  347. define Device/xiaomi_ax3600
  348. $(call Device/FitImage)
  349. $(call Device/UbiFit)
  350. DEVICE_VENDOR := Xiaomi
  351. DEVICE_MODEL := AX3600
  352. BLOCKSIZE := 128k
  353. PAGESIZE := 2048
  354. DEVICE_DTS_CONFIG := config@ac04
  355. SOC := ipq8071
  356. KERNEL_SIZE := 36608k
  357. DEVICE_PACKAGES := ipq-wifi-xiaomi_ax3600 kmod-ath10k-ct-smallbuffers ath10k-firmware-qca9887-ct
  358. ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),)
  359. ARTIFACTS := initramfs-factory.ubi
  360. ARTIFACT/initramfs-factory.ubi := append-image-stage initramfs-uImage.itb | ubinize-kernel
  361. endif
  362. endef
  363. TARGET_DEVICES += xiaomi_ax3600
  364. define Device/xiaomi_ax9000
  365. $(call Device/FitImage)
  366. $(call Device/UbiFit)
  367. DEVICE_VENDOR := Xiaomi
  368. DEVICE_MODEL := AX9000
  369. BLOCKSIZE := 128k
  370. PAGESIZE := 2048
  371. DEVICE_DTS_CONFIG := config@hk14
  372. SOC := ipq8072
  373. KERNEL_SIZE := 57344k
  374. DEVICE_PACKAGES := ipq-wifi-xiaomi_ax9000 kmod-ath11k-pci ath11k-firmware-qcn9074 \
  375. kmod-ath10k-ct ath10k-firmware-qca9887-ct
  376. ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),)
  377. ARTIFACTS := initramfs-factory.ubi
  378. ARTIFACT/initramfs-factory.ubi := append-image-stage initramfs-uImage.itb | ubinize-kernel
  379. endif
  380. endef
  381. TARGET_DEVICES += xiaomi_ax9000
  382. define Device/yuncore_ax880
  383. $(call Device/FitImage)
  384. $(call Device/UbiFit)
  385. DEVICE_VENDOR := Yuncore
  386. DEVICE_MODEL := AX880
  387. BLOCKSIZE := 128k
  388. PAGESIZE := 2048
  389. DEVICE_DTS_CONFIG := config@hk09
  390. SOC := ipq8072
  391. DEVICE_PACKAGES := ipq-wifi-yuncore_ax880
  392. IMAGES += factory.bin
  393. IMAGE/factory.bin := append-ubi | qsdk-ipq-factory-nand
  394. endef
  395. TARGET_DEVICES += yuncore_ax880
  396. define Device/zbtlink_zbt-z800ax
  397. $(call Device/FitImage)
  398. $(call Device/UbiFit)
  399. DEVICE_VENDOR := Zbtlink
  400. DEVICE_MODEL := ZBT-Z800AX
  401. BLOCKSIZE := 128k
  402. PAGESIZE := 2048
  403. DEVICE_DTS_CONFIG := config@hk09
  404. SOC := ipq8072
  405. DEVICE_PACKAGES := ipq-wifi-zbtlink_zbt-z800ax
  406. IMAGES += factory.bin
  407. IMAGE/factory.bin := append-ubi | qsdk-ipq-factory-nand
  408. endef
  409. TARGET_DEVICES += zbtlink_zbt-z800ax
  410. define Device/zte_mf269
  411. $(call Device/FitImage)
  412. $(call Device/UbiFit)
  413. DEVICE_VENDOR := ZTE
  414. DEVICE_MODEL := MF269
  415. BLOCKSIZE := 128k
  416. PAGESIZE := 2048
  417. DEVICE_DTS_CONFIG := config@ac04
  418. SOC := ipq8071
  419. KERNEL_SIZE := 53248k
  420. DEVICE_PACKAGES := ipq-wifi-zte_mf269
  421. endef
  422. TARGET_DEVICES += zte_mf269
  423. define Device/zyxel_nbg7815
  424. $(call Device/FitImage)
  425. $(call Device/EmmcImage)
  426. DEVICE_VENDOR := ZYXEL
  427. DEVICE_MODEL := NBG7815
  428. DEVICE_DTS_CONFIG := config@nbg7815
  429. SOC := ipq8074
  430. DEVICE_PACKAGES := kmod-fs-f2fs f2fs-tools ipq-wifi-zyxel_nbg7815 kmod-ath11k-pci \
  431. kmod-bluetooth kmod-hwmon-tmp103
  432. endef
  433. TARGET_DEVICES += zyxel_nbg7815