generic.mk 4.6 KB

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