ipq50xx.mk 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  1. DEVICE_VARS += BOOT_SCRIPT
  2. define Build/mstc-header
  3. $(eval version=$(word 1,$(1)))
  4. $(eval hdrlen=$(if $(word 2,$(1)),$(word 2,$(1)),0x400))
  5. gzip -c $@ | tail -c8 > [email protected]
  6. ( \
  7. printf "CMOC"; \
  8. tail -c+5 [email protected]; head -c4 [email protected]; \
  9. printf '$(call toupper,$(LINUX_KARCH)) $(VERSION_DIST) Linux-$(LINUX_VERSION)' | \
  10. dd bs=64 count=1 conv=sync 2>/dev/null; \
  11. printf "$(version)" | \
  12. dd bs=64 count=1 conv=sync 2>/dev/null; \
  13. dd if=/dev/zero bs=$$(($(hdrlen) - 0x8c)) count=1 2>/dev/null; \
  14. cat $@; \
  15. ) > [email protected]
  16. mv [email protected] $@
  17. rm -f [email protected]
  18. endef
  19. define Device/elecom_wrc-x3000gs2
  20. $(call Device/FitImageLzma)
  21. DEVICE_VENDOR := ELECOM
  22. DEVICE_MODEL := WRC-X3000GS2
  23. DEVICE_DTS_CONFIG := [email protected]
  24. SOC := ipq5018
  25. KERNEL_IN_UBI := 1
  26. BLOCKSIZE := 128k
  27. PAGESIZE := 2048
  28. IMAGE_SIZE := 52480k
  29. NAND_SIZE := 128m
  30. IMAGES += factory.bin
  31. IMAGE/factory.bin := append-ubi | qsdk-ipq-factory-nand | \
  32. mstc-header 4.04(XZF.0)b90 | elecom-product-header WRC-X3000GS2
  33. DEVICE_PACKAGES := ath11k-firmware-qcn6122 ipq-wifi-elecom_wrc-x3000gs2
  34. endef
  35. TARGET_DEVICES += elecom_wrc-x3000gs2
  36. define Device/glinet_gl-b3000
  37. $(call Device/FitImage)
  38. DEVICE_VENDOR := GL.iNet
  39. DEVICE_MODEL := GL-B3000
  40. SOC := ipq5018
  41. KERNEL_IN_UBI := 1
  42. BLOCKSIZE := 128k
  43. PAGESIZE := 2048
  44. NAND_SIZE := 128m
  45. DEVICE_DTS_CONFIG := [email protected]
  46. SUPPORTED_DEVICES += b3000
  47. BOOT_SCRIPT:= glinet_gl-b3000.bootscript
  48. IMAGES := factory.img sysupgrade.bin
  49. IMAGE/factory.img := append-ubi | gl-qsdk-factory | append-metadata
  50. DEVICE_PACKAGES := \
  51. ath11k-firmware-qcn6122 \
  52. ipq-wifi-glinet_gl-b3000 \
  53. dumpimage
  54. endef
  55. TARGET_DEVICES += glinet_gl-b3000
  56. define Device/iodata_wn-dax3000gr
  57. $(call Device/FitImageLzma)
  58. DEVICE_VENDOR := I-O DATA
  59. DEVICE_MODEL := WN-DAX3000GR
  60. DEVICE_DTS_CONFIG := [email protected]
  61. SOC := ipq5018
  62. KERNEL_IN_UBI := 1
  63. BLOCKSIZE := 128k
  64. PAGESIZE := 2048
  65. IMAGE_SIZE := 52480k
  66. NAND_SIZE := 128m
  67. IMAGES += factory.bin
  68. IMAGE/factory.bin := append-ubi | qsdk-ipq-factory-nand | \
  69. mstc-header 4.04(XZH.1)b90 0x480
  70. DEVICE_PACKAGES := ath11k-firmware-qcn6122 ipq-wifi-iodata_wn-dax3000gr
  71. endef
  72. TARGET_DEVICES += iodata_wn-dax3000gr
  73. define Device/linksys_ipq50xx_mx_base
  74. $(call Device/FitImageLzma)
  75. DEVICE_VENDOR := Linksys
  76. BLOCKSIZE := 128k
  77. PAGESIZE := 2048
  78. KERNEL_SIZE := 8192k
  79. IMAGE_SIZE := 83968k
  80. NAND_SIZE := 256m
  81. SOC := ipq5018
  82. IMAGES += factory.bin
  83. IMAGE/factory.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi | linksys-image type=$$$$(DEVICE_MODEL)
  84. endef
  85. define Device/linksys_mr5500
  86. $(call Device/linksys_ipq50xx_mx_base)
  87. DEVICE_MODEL := MR5500
  88. DEVICE_DTS_CONFIG := [email protected]
  89. DEVICE_PACKAGES := kmod-ath11k-pci \
  90. ath11k-firmware-qcn9074 \
  91. ipq-wifi-linksys_mr5500 \
  92. kmod-usb-ledtrig-usbport
  93. endef
  94. TARGET_DEVICES += linksys_mr5500
  95. define Device/linksys_mx2000
  96. $(call Device/linksys_ipq50xx_mx_base)
  97. DEVICE_MODEL := MX2000
  98. DEVICE_DTS_CONFIG := [email protected]
  99. DEVICE_PACKAGES := ath11k-firmware-qcn6122 \
  100. ipq-wifi-linksys_mx2000
  101. endef
  102. TARGET_DEVICES += linksys_mx2000
  103. define Device/linksys_mx5500
  104. $(call Device/linksys_ipq50xx_mx_base)
  105. DEVICE_MODEL := MX5500
  106. DEVICE_DTS_CONFIG := [email protected]
  107. DEVICE_PACKAGES := kmod-ath11k-pci \
  108. ath11k-firmware-qcn9074 \
  109. ipq-wifi-linksys_mx5500
  110. endef
  111. TARGET_DEVICES += linksys_mx5500
  112. define Device/linksys_spnmx56
  113. $(call Device/linksys_ipq50xx_mx_base)
  114. DEVICE_MODEL := SPNMX56
  115. DEVICE_DTS_CONFIG := [email protected]
  116. DEVICE_PACKAGES := kmod-ath11k-pci \
  117. ath11k-firmware-qcn9074 \
  118. ipq-wifi-linksys_spnmx56
  119. endef
  120. TARGET_DEVICES += linksys_spnmx56
  121. define Device/xiaomi_ax6000
  122. $(call Device/FitImage)
  123. $(call Device/UbiFit)
  124. DEVICE_VENDOR := Xiaomi
  125. DEVICE_MODEL := AX6000
  126. BLOCKSIZE := 128k
  127. PAGESIZE := 2048
  128. DEVICE_DTS_CONFIG := [email protected]
  129. SOC := ipq5018
  130. KERNEL_SIZE := 36864k
  131. NAND_SIZE := 128m
  132. DEVICE_PACKAGES := kmod-ath11k-pci \
  133. ath11k-firmware-qcn9074 \
  134. kmod-ath10k-ct-smallbuffers \
  135. ath10k-firmware-qca9887-ct \
  136. ipq-wifi-xiaomi_ax6000
  137. ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),)
  138. ARTIFACTS := initramfs-factory.ubi
  139. ARTIFACT/initramfs-factory.ubi := append-image-stage initramfs-uImage.itb | ubinize-kernel
  140. endif
  141. endef
  142. TARGET_DEVICES += xiaomi_ax6000
  143. define Device/yuncore_ax830
  144. $(call Device/FitImage)
  145. $(call Device/UbiFit)
  146. DEVICE_VENDOR := Yuncore
  147. DEVICE_MODEL := AX830
  148. BLOCKSIZE := 128k
  149. PAGESIZE := 2048
  150. SOC := ipq5018
  151. DEVICE_DTS_CONFIG := [email protected]
  152. DEVICE_PACKAGES := ath11k-firmware-ipq5018 \
  153. ath11k-firmware-qcn6122 \
  154. ipq-wifi-yuncore_ax830
  155. endef
  156. TARGET_DEVICES += yuncore_ax830