ipq807x: add Arcadyan AW1000 support
[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/netgear_rax120v2
119 $(call Device/FitImage)
120 $(call Device/UbiFit)
121 DEVICE_VENDOR := Netgear
122 DEVICE_MODEL := RAX120v2
123 BLOCKSIZE := 128k
124 PAGESIZE := 2048
125 DEVICE_DTS_CONFIG := config@hk01
126 SOC := ipq8074
127 KERNEL_SIZE := 29696k
128 NETGEAR_BOARD_ID := RAX120
129 NETGEAR_HW_ID := 29765589+0+512+1024+4x4+8x8
130 DEVICE_PACKAGES := ipq-wifi-netgear_rax120v2 kmod-spi-gpio \
131 kmod-spi-bitbang kmod-gpio-nxp-74hc164 kmod-hwmon-g761
132 IMAGES = web-ui-factory.img sysupgrade.bin
133 IMAGE/web-ui-factory.img := append-image initramfs-uImage.itb | \
134 pad-offset $$$$(BLOCKSIZE) 64 | append-uImage-fakehdr filesystem | \
135 netgear-dni
136 IMAGE/sysupgrade.bin := append-kernel | pad-offset $$$$(BLOCKSIZE) 64 | \
137 append-uImage-fakehdr filesystem | sysupgrade-tar kernel=$$$$@ | \
138 append-metadata
139 endef
140 TARGET_DEVICES += netgear_rax120v2
141
142 define Device/netgear_wax218
143 $(call Device/FitImage)
144 $(call Device/UbiFit)
145 DEVICE_VENDOR := Netgear
146 DEVICE_MODEL := WAX218
147 DEVICE_DTS_CONFIG := config@hk07
148 BLOCKSIZE := 128k
149 PAGESIZE := 2048
150 SOC := ipq8072
151 ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),)
152 ARTIFACTS := web-ui-factory.fit
153 ARTIFACT/web-ui-factory.fit := append-image initramfs-uImage.itb | \
154 ubinize-kernel | qsdk-ipq-factory-nand
155 endif
156 DEVICE_PACKAGES := kmod-spi-gpio kmod-spi-bitbang kmod-gpio-nxp-74hc164 \
157 ipq-wifi-netgear_wax218
158 endef
159 TARGET_DEVICES += netgear_wax218
160
161 define Device/netgear_wax620
162 $(call Device/FitImage)
163 $(call Device/UbiFit)
164 DEVICE_VENDOR := Netgear
165 DEVICE_MODEL := WAX620
166 DEVICE_DTS_CONFIG := config@hk07
167 BLOCKSIZE := 128k
168 PAGESIZE := 2048
169 SOC := ipq8072
170 DEVICE_PACKAGES += kmod-spi-gpio kmod-gpio-nxp-74hc164 \
171 ipq-wifi-netgear_wax620
172 endef
173 TARGET_DEVICES += netgear_wax620
174
175 define Device/netgear_wax630
176 $(call Device/FitImage)
177 $(call Device/UbiFit)
178 DEVICE_VENDOR := Netgear
179 DEVICE_MODEL := WAX630
180 DEVICE_DTS_CONFIG := config@hk01
181 BLOCKSIZE := 128k
182 PAGESIZE := 2048
183 SOC := ipq8074
184 IMAGES := ui-factory.tar factory.ubi sysupgrade.bin
185 IMAGE/ui-factory.tar := append-ubi | wax6xx-netgear-tar
186 DEVICE_PACKAGES += kmod-spi-gpio ipq-wifi-netgear_wax630
187 endef
188 TARGET_DEVICES += netgear_wax630
189
190 define Device/prpl_haze
191 $(call Device/FitImage)
192 $(call Device/EmmcImage)
193 DEVICE_VENDOR := prpl Foundation
194 DEVICE_MODEL := Haze
195 DEVICE_DTS_CONFIG := config@hk09
196 SOC := ipq8072
197 DEVICE_PACKAGES += ath11k-firmware-qcn9074 ipq-wifi-prpl_haze kmod-ath11k-pci \
198 mkf2fs f2fsck kmod-fs-f2fs
199 endef
200 TARGET_DEVICES += prpl_haze
201
202 define Device/qnap_301w
203 $(call Device/FitImage)
204 $(call Device/EmmcImage)
205 DEVICE_VENDOR := QNAP
206 DEVICE_MODEL := 301w
207 DEVICE_DTS_CONFIG := config@hk01
208 KERNEL_SIZE := 16384k
209 SOC := ipq8072
210 DEVICE_PACKAGES += ipq-wifi-qnap_301w
211 endef
212 TARGET_DEVICES += qnap_301w
213
214 define Device/redmi_ax6
215 $(call Device/xiaomi_ax3600)
216 DEVICE_VENDOR := Redmi
217 DEVICE_MODEL := AX6
218 DEVICE_PACKAGES := ipq-wifi-redmi_ax6
219 endef
220 TARGET_DEVICES += redmi_ax6
221
222 define Device/xiaomi_ax3600
223 $(call Device/FitImage)
224 $(call Device/UbiFit)
225 DEVICE_VENDOR := Xiaomi
226 DEVICE_MODEL := AX3600
227 BLOCKSIZE := 128k
228 PAGESIZE := 2048
229 DEVICE_DTS_CONFIG := config@ac04
230 SOC := ipq8071
231 KERNEL_SIZE := 36608k
232 DEVICE_PACKAGES := ipq-wifi-xiaomi_ax3600 kmod-ath10k-ct-smallbuffers ath10k-firmware-qca9887-ct
233 ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),)
234 ARTIFACTS := initramfs-factory.ubi
235 ARTIFACT/initramfs-factory.ubi := append-image-stage initramfs-uImage.itb | ubinize-kernel
236 endif
237 endef
238 TARGET_DEVICES += xiaomi_ax3600
239
240 define Device/xiaomi_ax9000
241 $(call Device/FitImage)
242 $(call Device/UbiFit)
243 DEVICE_VENDOR := Xiaomi
244 DEVICE_MODEL := AX9000
245 BLOCKSIZE := 128k
246 PAGESIZE := 2048
247 DEVICE_DTS_CONFIG := config@hk14
248 SOC := ipq8072
249 KERNEL_SIZE := 57344k
250 DEVICE_PACKAGES := ipq-wifi-xiaomi_ax9000 kmod-ath11k-pci ath11k-firmware-qcn9074 \
251 kmod-ath10k-ct ath10k-firmware-qca9887-ct
252 ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),)
253 ARTIFACTS := initramfs-factory.ubi
254 ARTIFACT/initramfs-factory.ubi := append-image-stage initramfs-uImage.itb | ubinize-kernel
255 endif
256 endef
257 TARGET_DEVICES += xiaomi_ax9000
258
259 define Device/yuncore_ax880
260 $(call Device/FitImage)
261 $(call Device/UbiFit)
262 DEVICE_VENDOR := Yuncore
263 DEVICE_MODEL := AX880
264 BLOCKSIZE := 128k
265 PAGESIZE := 2048
266 DEVICE_DTS_CONFIG := config@hk09
267 SOC := ipq8072
268 DEVICE_PACKAGES := ipq-wifi-yuncore_ax880
269 IMAGES += factory.bin
270 IMAGE/factory.bin := append-ubi | qsdk-ipq-factory-nand
271 endef
272 TARGET_DEVICES += yuncore_ax880
273
274 define Device/zyxel_nbg7815
275 $(call Device/FitImage)
276 $(call Device/EmmcImage)
277 DEVICE_VENDOR := ZYXEL
278 DEVICE_MODEL := NBG7815
279 DEVICE_DTS_CONFIG := config@nbg7815
280 SOC := ipq8074
281 DEVICE_PACKAGES += ipq-wifi-zyxel_nbg7815 kmod-ath11k-pci \
282 kmod-bluetooth kmod-hwmon-tmp103
283 endef
284 TARGET_DEVICES += zyxel_nbg7815