ipq807x: add support for Linksys MX4200 V1 and V2
[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 Build/wax6xx-netgear-tar
27 mkdir $@.tmp
28 mv $@ $@.tmp/nand-ipq807x-apps.img
29 md5sum $@.tmp/nand-ipq807x-apps.img | cut -c 1-32 > $@.tmp/nand-ipq807x-apps.md5sum
30 echo $(DEVICE_MODEL) > $@.tmp/metadata.txt
31 echo $(DEVICE_MODEL)"_V9.9.9.9" > $@.tmp/version
32 tar -C $@.tmp/ -cf $@ .
33 rm -rf $@.tmp
34 endef
35
36 define Device/arcadyan_aw1000
37 $(call Device/FitImage)
38 $(call Device/UbiFit)
39 DEVICE_VENDOR := Arcadyan
40 DEVICE_MODEL := AW1000
41 BLOCKSIZE := 256k
42 PAGESIZE := 4096
43 DEVICE_DTS_CONFIG := config@hk09
44 SOC := ipq8072
45 DEVICE_PACKAGES := ipq-wifi-arcadyan_aw1000 kmod-spi-gpio \
46 kmod-gpio-nxp-74hc164 kmod-usb-serial-option uqmi
47 endef
48 TARGET_DEVICES += arcadyan_aw1000
49
50 define Device/buffalo_wxr-5950ax12
51 $(call Device/FitImage)
52 DEVICE_VENDOR := Buffalo
53 DEVICE_MODEL := WXR-5950AX12
54 BLOCKSIZE := 128k
55 PAGESIZE := 2048
56 DEVICE_DTS_CONFIG := config@hk01
57 SOC := ipq8074
58 IMAGES := sysupgrade.bin
59 IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
60 DEVICE_PACKAGES := ipq-wifi-buffalo_wxr-5950ax12
61 endef
62 TARGET_DEVICES += buffalo_wxr-5950ax12
63
64 define Device/compex_wpq873
65 $(call Device/FitImage)
66 $(call Device/UbiFit)
67 DEVICE_VENDOR := Compex
68 DEVICE_MODEL := WPQ873
69 BLOCKSIZE := 128k
70 PAGESIZE := 2048
71 DEVICE_DTS_CONFIG := config@hk09.wpq873
72 SOC := ipq8072
73 DEVICE_PACKAGES := ipq-wifi-compex_wpq873
74 IMAGE/factory.ubi := append-ubi | qsdk-ipq-factory-nand
75 endef
76 TARGET_DEVICES += compex_wpq873
77
78 define Device/dynalink_dl-wrx36
79 $(call Device/FitImage)
80 $(call Device/UbiFit)
81 DEVICE_VENDOR := Dynalink
82 DEVICE_MODEL := DL-WRX36
83 BLOCKSIZE := 128k
84 PAGESIZE := 2048
85 DEVICE_DTS_CONFIG := config@rt5010w-d350-rev0
86 SOC := ipq8072
87 DEVICE_PACKAGES := ipq-wifi-dynalink_dl-wrx36
88 endef
89 TARGET_DEVICES += dynalink_dl-wrx36
90
91 define Device/edgecore_eap102
92 $(call Device/FitImage)
93 $(call Device/UbiFit)
94 DEVICE_VENDOR := Edgecore
95 DEVICE_MODEL := EAP102
96 BLOCKSIZE := 128k
97 PAGESIZE := 2048
98 DEVICE_DTS_CONFIG := config@ac02
99 SOC := ipq8071
100 DEVICE_PACKAGES := ipq-wifi-edgecore_eap102
101 IMAGE/factory.ubi := append-ubi | qsdk-ipq-factory-nand
102 endef
103 TARGET_DEVICES += edgecore_eap102
104
105 define Device/edimax_cax1800
106 $(call Device/FitImage)
107 $(call Device/UbiFit)
108 DEVICE_VENDOR := Edimax
109 DEVICE_MODEL := CAX1800
110 BLOCKSIZE := 128k
111 PAGESIZE := 2048
112 DEVICE_DTS_CONFIG := config@ac03
113 SOC := ipq8070
114 DEVICE_PACKAGES := ipq-wifi-edimax_cax1800
115 endef
116 TARGET_DEVICES += edimax_cax1800
117
118 define Device/linksys_mx4200v1
119 $(call Device/FitImage)
120 $(call Device/UbiFit)
121 DEVICE_VENDOR := Linksys
122 DEVICE_MODEL := MX4200
123 DEVICE_VARIANT := v1
124 BLOCKSIZE := 128k
125 PAGESIZE := 2048
126 KERNEL_SIZE := 6144k
127 IMAGE_SIZE := 147456k
128 NAND_SIZE := 512m
129 KERNEL_IN_UBI :=
130 SOC := ipq8174
131 IMAGES += factory.bin
132 IMAGE/factory.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi | linksys-image type=MX4200
133 DEVICE_PACKAGES := kmod-leds-pca963x ipq-wifi-linksys_mx4200 kmod-bluetooth
134 endef
135 TARGET_DEVICES += linksys_mx4200v1
136
137 define Device/linksys_mx4200v2
138 $(call Device/linksys_mx4200v1)
139 DEVICE_VARIANT := v2
140 endef
141 TARGET_DEVICES += linksys_mx4200v2
142
143 define Device/netgear_rax120v2
144 $(call Device/FitImage)
145 $(call Device/UbiFit)
146 DEVICE_VENDOR := Netgear
147 DEVICE_MODEL := RAX120v2
148 BLOCKSIZE := 128k
149 PAGESIZE := 2048
150 DEVICE_DTS_CONFIG := config@hk01
151 SOC := ipq8074
152 KERNEL_SIZE := 29696k
153 NETGEAR_BOARD_ID := RAX120
154 NETGEAR_HW_ID := 29765589+0+512+1024+4x4+8x8
155 DEVICE_PACKAGES := ipq-wifi-netgear_rax120v2 kmod-spi-gpio \
156 kmod-spi-bitbang kmod-gpio-nxp-74hc164 kmod-hwmon-g761
157 IMAGES = web-ui-factory.img sysupgrade.bin
158 IMAGE/web-ui-factory.img := append-image initramfs-uImage.itb | \
159 pad-offset $$$$(BLOCKSIZE) 64 | append-uImage-fakehdr filesystem | \
160 netgear-dni
161 IMAGE/sysupgrade.bin := append-kernel | pad-offset $$$$(BLOCKSIZE) 64 | \
162 append-uImage-fakehdr filesystem | sysupgrade-tar kernel=$$$$@ | \
163 append-metadata
164 endef
165 TARGET_DEVICES += netgear_rax120v2
166
167 define Device/netgear_wax218
168 $(call Device/FitImage)
169 $(call Device/UbiFit)
170 DEVICE_VENDOR := Netgear
171 DEVICE_MODEL := WAX218
172 DEVICE_DTS_CONFIG := config@hk07
173 BLOCKSIZE := 128k
174 PAGESIZE := 2048
175 SOC := ipq8072
176 ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),)
177 ARTIFACTS := web-ui-factory.fit
178 ARTIFACT/web-ui-factory.fit := append-image initramfs-uImage.itb | \
179 ubinize-kernel | qsdk-ipq-factory-nand
180 endif
181 DEVICE_PACKAGES := kmod-spi-gpio kmod-spi-bitbang kmod-gpio-nxp-74hc164 \
182 ipq-wifi-netgear_wax218
183 endef
184 TARGET_DEVICES += netgear_wax218
185
186 define Device/netgear_wax620
187 $(call Device/FitImage)
188 $(call Device/UbiFit)
189 DEVICE_VENDOR := Netgear
190 DEVICE_MODEL := WAX620
191 DEVICE_DTS_CONFIG := config@hk07
192 BLOCKSIZE := 128k
193 PAGESIZE := 2048
194 SOC := ipq8072
195 DEVICE_PACKAGES += kmod-spi-gpio kmod-gpio-nxp-74hc164 \
196 ipq-wifi-netgear_wax620
197 endef
198 TARGET_DEVICES += netgear_wax620
199
200 define Device/netgear_wax630
201 $(call Device/FitImage)
202 $(call Device/UbiFit)
203 DEVICE_VENDOR := Netgear
204 DEVICE_MODEL := WAX630
205 DEVICE_DTS_CONFIG := config@hk01
206 BLOCKSIZE := 128k
207 PAGESIZE := 2048
208 SOC := ipq8074
209 IMAGES := ui-factory.tar factory.ubi sysupgrade.bin
210 IMAGE/ui-factory.tar := append-ubi | wax6xx-netgear-tar
211 DEVICE_PACKAGES += kmod-spi-gpio ipq-wifi-netgear_wax630
212 endef
213 TARGET_DEVICES += netgear_wax630
214
215 define Device/prpl_haze
216 $(call Device/FitImage)
217 $(call Device/EmmcImage)
218 DEVICE_VENDOR := prpl Foundation
219 DEVICE_MODEL := Haze
220 DEVICE_DTS_CONFIG := config@hk09
221 SOC := ipq8072
222 DEVICE_PACKAGES += ath11k-firmware-qcn9074 ipq-wifi-prpl_haze kmod-ath11k-pci \
223 mkf2fs f2fsck kmod-fs-f2fs
224 endef
225 TARGET_DEVICES += prpl_haze
226
227 define Device/qnap_301w
228 $(call Device/FitImage)
229 $(call Device/EmmcImage)
230 DEVICE_VENDOR := QNAP
231 DEVICE_MODEL := 301w
232 DEVICE_DTS_CONFIG := config@hk01
233 KERNEL_SIZE := 16384k
234 SOC := ipq8072
235 DEVICE_PACKAGES += ipq-wifi-qnap_301w
236 endef
237 TARGET_DEVICES += qnap_301w
238
239 define Device/redmi_ax6
240 $(call Device/xiaomi_ax3600)
241 DEVICE_VENDOR := Redmi
242 DEVICE_MODEL := AX6
243 DEVICE_PACKAGES := ipq-wifi-redmi_ax6
244 endef
245 TARGET_DEVICES += redmi_ax6
246
247 define Device/xiaomi_ax3600
248 $(call Device/FitImage)
249 $(call Device/UbiFit)
250 DEVICE_VENDOR := Xiaomi
251 DEVICE_MODEL := AX3600
252 BLOCKSIZE := 128k
253 PAGESIZE := 2048
254 DEVICE_DTS_CONFIG := config@ac04
255 SOC := ipq8071
256 KERNEL_SIZE := 36608k
257 DEVICE_PACKAGES := ipq-wifi-xiaomi_ax3600 kmod-ath10k-ct-smallbuffers ath10k-firmware-qca9887-ct
258 ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),)
259 ARTIFACTS := initramfs-factory.ubi
260 ARTIFACT/initramfs-factory.ubi := append-image-stage initramfs-uImage.itb | ubinize-kernel
261 endif
262 endef
263 TARGET_DEVICES += xiaomi_ax3600
264
265 define Device/xiaomi_ax9000
266 $(call Device/FitImage)
267 $(call Device/UbiFit)
268 DEVICE_VENDOR := Xiaomi
269 DEVICE_MODEL := AX9000
270 BLOCKSIZE := 128k
271 PAGESIZE := 2048
272 DEVICE_DTS_CONFIG := config@hk14
273 SOC := ipq8072
274 KERNEL_SIZE := 57344k
275 DEVICE_PACKAGES := ipq-wifi-xiaomi_ax9000 kmod-ath11k-pci ath11k-firmware-qcn9074 \
276 kmod-ath10k-ct ath10k-firmware-qca9887-ct
277 ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),)
278 ARTIFACTS := initramfs-factory.ubi
279 ARTIFACT/initramfs-factory.ubi := append-image-stage initramfs-uImage.itb | ubinize-kernel
280 endif
281 endef
282 TARGET_DEVICES += xiaomi_ax9000
283
284 define Device/yuncore_ax880
285 $(call Device/FitImage)
286 $(call Device/UbiFit)
287 DEVICE_VENDOR := Yuncore
288 DEVICE_MODEL := AX880
289 BLOCKSIZE := 128k
290 PAGESIZE := 2048
291 DEVICE_DTS_CONFIG := config@hk09
292 SOC := ipq8072
293 DEVICE_PACKAGES := ipq-wifi-yuncore_ax880
294 IMAGES += factory.bin
295 IMAGE/factory.bin := append-ubi | qsdk-ipq-factory-nand
296 endef
297 TARGET_DEVICES += yuncore_ax880
298
299 define Device/zte_mf269
300 $(call Device/FitImage)
301 $(call Device/UbiFit)
302 DEVICE_VENDOR := ZTE
303 DEVICE_MODEL := MF269
304 BLOCKSIZE := 128k
305 PAGESIZE := 2048
306 DEVICE_DTS_CONFIG := config@ac04
307 SOC := ipq8071
308 KERNEL_SIZE := 53248k
309 DEVICE_PACKAGES := ipq-wifi-zte_mf269
310 endef
311 TARGET_DEVICES += zte_mf269
312
313 define Device/zyxel_nbg7815
314 $(call Device/FitImage)
315 $(call Device/EmmcImage)
316 DEVICE_VENDOR := ZYXEL
317 DEVICE_MODEL := NBG7815
318 DEVICE_DTS_CONFIG := config@nbg7815
319 SOC := ipq8074
320 DEVICE_PACKAGES += ipq-wifi-zyxel_nbg7815 kmod-ath11k-pci \
321 kmod-bluetooth kmod-hwmon-tmp103
322 endef
323 TARGET_DEVICES += zyxel_nbg7815