generic.mk 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190
  1. define Device/FitImage
  2. KERNEL_SUFFIX := -uImage.itb
  3. KERNEL = kernel-bin | libdeflate-gzip | fit gzip $$(KDIR)/image-$$(DEVICE_DTS).dtb
  4. KERNEL_NAME := Image
  5. endef
  6. define Device/FitImageLzma
  7. KERNEL_SUFFIX := -uImage.itb
  8. KERNEL = kernel-bin | lzma | fit lzma $$(KDIR)/image-$$(DEVICE_DTS).dtb
  9. KERNEL_NAME := Image
  10. endef
  11. define Device/EmmcImage
  12. IMAGES += factory.bin sysupgrade.bin
  13. IMAGE/factory.bin := append-rootfs | pad-rootfs | pad-to 64k
  14. IMAGE/sysupgrade.bin/squashfs := append-rootfs | pad-to 64k | sysupgrade-tar rootfs=$$$$@ | append-metadata
  15. DEVICE_PACKAGES := e2fsprogs kmod-fs-ext4 losetup
  16. endef
  17. define Device/UbiFit
  18. KERNEL_IN_UBI := 1
  19. IMAGES := factory.ubi sysupgrade.bin
  20. IMAGE/factory.ubi := append-ubi
  21. IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
  22. endef
  23. define Device/buffalo_wxr-5950ax12
  24. $(call Device/FitImage)
  25. DEVICE_VENDOR := Buffalo
  26. DEVICE_MODEL := WXR-5950AX12
  27. BLOCKSIZE := 128k
  28. PAGESIZE := 2048
  29. DEVICE_DTS_CONFIG := config@hk01
  30. SOC := ipq8074
  31. IMAGES := sysupgrade.bin
  32. IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
  33. DEVICE_PACKAGES := ipq-wifi-buffalo_wxr-5950ax12
  34. endef
  35. TARGET_DEVICES += buffalo_wxr-5950ax12
  36. define Device/compex_wpq873
  37. $(call Device/FitImage)
  38. $(call Device/UbiFit)
  39. DEVICE_VENDOR := Compex
  40. DEVICE_MODEL := WPQ873
  41. BLOCKSIZE := 128k
  42. PAGESIZE := 2048
  43. DEVICE_DTS_CONFIG := [email protected]
  44. SOC := ipq8072
  45. IMAGE/factory.ubi := append-ubi | qsdk-ipq-factory-nand
  46. endef
  47. TARGET_DEVICES += compex_wpq873
  48. define Device/dynalink_dl-wrx36
  49. $(call Device/FitImage)
  50. $(call Device/UbiFit)
  51. DEVICE_VENDOR := Dynalink
  52. DEVICE_MODEL := DL-WRX36
  53. BLOCKSIZE := 128k
  54. PAGESIZE := 2048
  55. DEVICE_DTS_CONFIG := config@rt5010w-d350-rev0
  56. SOC := ipq8072
  57. DEVICE_PACKAGES := ipq-wifi-dynalink_dl-wrx36
  58. endef
  59. TARGET_DEVICES += dynalink_dl-wrx36
  60. define Device/edgecore_eap102
  61. $(call Device/FitImage)
  62. $(call Device/UbiFit)
  63. DEVICE_VENDOR := Edgecore
  64. DEVICE_MODEL := EAP102
  65. BLOCKSIZE := 128k
  66. PAGESIZE := 2048
  67. DEVICE_DTS_CONFIG := config@ac02
  68. SOC := ipq8071
  69. DEVICE_PACKAGES := ipq-wifi-edgecore_eap102
  70. IMAGE/factory.ubi := append-ubi | qsdk-ipq-factory-nand
  71. endef
  72. TARGET_DEVICES += edgecore_eap102
  73. define Device/edimax_cax1800
  74. $(call Device/FitImage)
  75. $(call Device/UbiFit)
  76. DEVICE_VENDOR := Edimax
  77. DEVICE_MODEL := CAX1800
  78. BLOCKSIZE := 128k
  79. PAGESIZE := 2048
  80. DEVICE_DTS_CONFIG := config@ac03
  81. SOC := ipq8070
  82. DEVICE_PACKAGES := ipq-wifi-edimax_cax1800
  83. endef
  84. TARGET_DEVICES += edimax_cax1800
  85. define Device/netgear_wax218
  86. $(call Device/FitImage)
  87. $(call Device/UbiFit)
  88. ARTIFACTS := web-ui-factory.fit
  89. DEVICE_VENDOR := Netgear
  90. DEVICE_MODEL := WAX218
  91. DEVICE_DTS_CONFIG := config@hk07
  92. BLOCKSIZE := 128k
  93. PAGESIZE := 2048
  94. SOC := ipq8072
  95. ARTIFACT/web-ui-factory.fit := append-image initramfs-uImage.itb | \
  96. ubinize-kernel | qsdk-ipq-factory-nand
  97. DEVICE_PACKAGES := kmod-spi-gpio kmod-spi-bitbang kmod-gpio-nxp-74hc164 \
  98. ipq-wifi-netgear_wax218
  99. endef
  100. TARGET_DEVICES += netgear_wax218
  101. define Device/prpl_haze
  102. $(call Device/FitImage)
  103. $(call Device/EmmcImage)
  104. DEVICE_VENDOR := prpl Foundation
  105. DEVICE_MODEL := Haze
  106. DEVICE_DTS_CONFIG := config@hk09
  107. SOC := ipq8072
  108. DEVICE_PACKAGES += ath11k-firmware-qcn9074 ipq-wifi-prpl_haze kmod-ath11k-pci
  109. DEFAULT_PACKAGES += ath11k-firmware-qcn9074 ipq-wifi-prpl_haze kmod-ath11k-pci
  110. endef
  111. TARGET_DEVICES += prpl_haze
  112. define Device/qnap_301w
  113. $(call Device/FitImage)
  114. $(call Device/EmmcImage)
  115. DEVICE_VENDOR := QNAP
  116. DEVICE_MODEL := 301w
  117. DEVICE_DTS_CONFIG := config@hk01
  118. KERNEL_SIZE := 16384k
  119. SOC := ipq8072
  120. DEVICE_PACKAGES += ipq-wifi-qnap_301w
  121. endef
  122. TARGET_DEVICES += qnap_301w
  123. define Device/redmi_ax6
  124. $(call Device/xiaomi_ax3600)
  125. DEVICE_VENDOR := Redmi
  126. DEVICE_MODEL := AX6
  127. DEVICE_PACKAGES := ipq-wifi-redmi_ax6
  128. endef
  129. TARGET_DEVICES += redmi_ax6
  130. define Device/xiaomi_ax3600
  131. $(call Device/FitImage)
  132. $(call Device/UbiFit)
  133. DEVICE_VENDOR := Xiaomi
  134. DEVICE_MODEL := AX3600
  135. BLOCKSIZE := 128k
  136. PAGESIZE := 2048
  137. DEVICE_DTS_CONFIG := config@ac04
  138. SOC := ipq8071
  139. KERNEL_SIZE := 36608k
  140. DEVICE_PACKAGES := ipq-wifi-xiaomi_ax3600 kmod-ath10k-ct-smallbuffers ath10k-firmware-qca9887-ct
  141. ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),)
  142. ARTIFACTS := initramfs-factory.ubi
  143. ARTIFACT/initramfs-factory.ubi := append-image-stage initramfs-uImage.itb | ubinize-kernel
  144. endif
  145. endef
  146. TARGET_DEVICES += xiaomi_ax3600
  147. define Device/xiaomi_ax9000
  148. $(call Device/FitImage)
  149. $(call Device/UbiFit)
  150. DEVICE_VENDOR := Xiaomi
  151. DEVICE_MODEL := AX9000
  152. BLOCKSIZE := 128k
  153. PAGESIZE := 2048
  154. DEVICE_DTS_CONFIG := config@hk14
  155. SOC := ipq8072
  156. KERNEL_SIZE := 57344k
  157. DEVICE_PACKAGES := ipq-wifi-xiaomi_ax9000 kmod-ath11k-pci ath11k-firmware-qcn9074 \
  158. kmod-ath10k-ct ath10k-firmware-qca9887-ct
  159. ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),)
  160. ARTIFACTS := initramfs-factory.ubi
  161. ARTIFACT/initramfs-factory.ubi := append-image-stage initramfs-uImage.itb | ubinize-kernel
  162. endif
  163. endef
  164. TARGET_DEVICES += xiaomi_ax9000
  165. define Device/zyxel_nbg7815
  166. $(call Device/FitImage)
  167. $(call Device/EmmcImage)
  168. DEVICE_VENDOR := ZYXEL
  169. DEVICE_MODEL := NBG7815
  170. DEVICE_DTS_CONFIG := config@nbg7815
  171. SOC := ipq8074
  172. DEVICE_PACKAGES += ipq-wifi-zyxel_nbg7815 kmod-ath11k-pci kmod-hwmon-tmp103 \
  173. kmod-bluetooth
  174. endef
  175. TARGET_DEVICES += zyxel_nbg7815