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