ee7707540b785337094bc801d11faa3967cfe291
[openwrt/staging/jow.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/buffalo_wxr-5950ax12
37 $(call Device/FitImage)
38 DEVICE_VENDOR := Buffalo
39 DEVICE_MODEL := WXR-5950AX12
40 BLOCKSIZE := 128k
41 PAGESIZE := 2048
42 DEVICE_DTS_CONFIG := config@hk01
43 SOC := ipq8074
44 IMAGES := sysupgrade.bin
45 IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
46 DEVICE_PACKAGES := ipq-wifi-buffalo_wxr-5950ax12
47 endef
48 TARGET_DEVICES += buffalo_wxr-5950ax12
49
50 define Device/compex_wpq873
51 $(call Device/FitImage)
52 $(call Device/UbiFit)
53 DEVICE_VENDOR := Compex
54 DEVICE_MODEL := WPQ873
55 BLOCKSIZE := 128k
56 PAGESIZE := 2048
57 DEVICE_DTS_CONFIG := config@hk09.wpq873
58 SOC := ipq8072
59 DEVICE_PACKAGES := ipq-wifi-compex_wpq873
60 IMAGE/factory.ubi := append-ubi | qsdk-ipq-factory-nand
61 endef
62 TARGET_DEVICES += compex_wpq873
63
64 define Device/dynalink_dl-wrx36
65 $(call Device/FitImage)
66 $(call Device/UbiFit)
67 DEVICE_VENDOR := Dynalink
68 DEVICE_MODEL := DL-WRX36
69 BLOCKSIZE := 128k
70 PAGESIZE := 2048
71 DEVICE_DTS_CONFIG := config@rt5010w-d350-rev0
72 SOC := ipq8072
73 DEVICE_PACKAGES := ipq-wifi-dynalink_dl-wrx36
74 endef
75 TARGET_DEVICES += dynalink_dl-wrx36
76
77 define Device/edgecore_eap102
78 $(call Device/FitImage)
79 $(call Device/UbiFit)
80 DEVICE_VENDOR := Edgecore
81 DEVICE_MODEL := EAP102
82 BLOCKSIZE := 128k
83 PAGESIZE := 2048
84 DEVICE_DTS_CONFIG := config@ac02
85 SOC := ipq8071
86 DEVICE_PACKAGES := ipq-wifi-edgecore_eap102
87 IMAGE/factory.ubi := append-ubi | qsdk-ipq-factory-nand
88 endef
89 TARGET_DEVICES += edgecore_eap102
90
91 define Device/edimax_cax1800
92 $(call Device/FitImage)
93 $(call Device/UbiFit)
94 DEVICE_VENDOR := Edimax
95 DEVICE_MODEL := CAX1800
96 BLOCKSIZE := 128k
97 PAGESIZE := 2048
98 DEVICE_DTS_CONFIG := config@ac03
99 SOC := ipq8070
100 DEVICE_PACKAGES := ipq-wifi-edimax_cax1800
101 endef
102 TARGET_DEVICES += edimax_cax1800
103
104 define Device/netgear_rax120v2
105 $(call Device/FitImage)
106 $(call Device/UbiFit)
107 DEVICE_VENDOR := Netgear
108 DEVICE_MODEL := RAX120v2
109 BLOCKSIZE := 128k
110 PAGESIZE := 2048
111 DEVICE_DTS_CONFIG := config@hk01
112 SOC := ipq8074
113 KERNEL_SIZE := 29696k
114 NETGEAR_BOARD_ID := RAX120
115 NETGEAR_HW_ID := 29765589+0+512+1024+4x4+8x8
116 DEVICE_PACKAGES := ipq-wifi-netgear_rax120v2 kmod-spi-gpio \
117 kmod-spi-bitbang kmod-gpio-nxp-74hc164 kmod-hwmon-g761
118 IMAGES = web-ui-factory.img sysupgrade.bin
119 IMAGE/web-ui-factory.img := append-image initramfs-uImage.itb | \
120 pad-offset $$$$(BLOCKSIZE) 64 | append-uImage-fakehdr filesystem | \
121 netgear-dni
122 IMAGE/sysupgrade.bin := append-kernel | pad-offset $$$$(BLOCKSIZE) 64 | \
123 append-uImage-fakehdr filesystem | sysupgrade-tar kernel=$$$$@ | \
124 append-metadata
125 endef
126 TARGET_DEVICES += netgear_rax120v2
127
128 define Device/netgear_wax218
129 $(call Device/FitImage)
130 $(call Device/UbiFit)
131 DEVICE_VENDOR := Netgear
132 DEVICE_MODEL := WAX218
133 DEVICE_DTS_CONFIG := config@hk07
134 BLOCKSIZE := 128k
135 PAGESIZE := 2048
136 SOC := ipq8072
137 ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),)
138 ARTIFACTS := web-ui-factory.fit
139 ARTIFACT/web-ui-factory.fit := append-image initramfs-uImage.itb | \
140 ubinize-kernel | qsdk-ipq-factory-nand
141 endif
142 DEVICE_PACKAGES := kmod-spi-gpio kmod-spi-bitbang kmod-gpio-nxp-74hc164 \
143 ipq-wifi-netgear_wax218
144 endef
145 TARGET_DEVICES += netgear_wax218
146
147 define Device/netgear_wax620
148 $(call Device/FitImage)
149 $(call Device/UbiFit)
150 DEVICE_VENDOR := Netgear
151 DEVICE_MODEL := WAX620
152 DEVICE_DTS_CONFIG := config@hk07
153 BLOCKSIZE := 128k
154 PAGESIZE := 2048
155 SOC := ipq8072
156 DEVICE_PACKAGES += kmod-spi-gpio kmod-gpio-nxp-74hc164 \
157 ipq-wifi-netgear_wax620
158 endef
159 TARGET_DEVICES += netgear_wax620
160
161 define Device/netgear_wax630
162 $(call Device/FitImage)
163 $(call Device/UbiFit)
164 DEVICE_VENDOR := Netgear
165 DEVICE_MODEL := WAX630
166 DEVICE_DTS_CONFIG := config@hk01
167 BLOCKSIZE := 128k
168 PAGESIZE := 2048
169 SOC := ipq8074
170 IMAGES := ui-factory.tar factory.ubi sysupgrade.bin
171 IMAGE/ui-factory.tar := append-ubi | wax6xx-netgear-tar
172 DEVICE_PACKAGES += kmod-spi-gpio ipq-wifi-netgear_wax630
173 endef
174 TARGET_DEVICES += netgear_wax630
175
176 define Device/prpl_haze
177 $(call Device/FitImage)
178 $(call Device/EmmcImage)
179 DEVICE_VENDOR := prpl Foundation
180 DEVICE_MODEL := Haze
181 DEVICE_DTS_CONFIG := config@hk09
182 SOC := ipq8072
183 DEVICE_PACKAGES += ath11k-firmware-qcn9074 ipq-wifi-prpl_haze kmod-ath11k-pci \
184 mkf2fs f2fsck kmod-fs-f2fs
185 endef
186 TARGET_DEVICES += prpl_haze
187
188 define Device/qnap_301w
189 $(call Device/FitImage)
190 $(call Device/EmmcImage)
191 DEVICE_VENDOR := QNAP
192 DEVICE_MODEL := 301w
193 DEVICE_DTS_CONFIG := config@hk01
194 KERNEL_SIZE := 16384k
195 SOC := ipq8072
196 DEVICE_PACKAGES += ipq-wifi-qnap_301w
197 endef
198 TARGET_DEVICES += qnap_301w
199
200 define Device/redmi_ax6
201 $(call Device/xiaomi_ax3600)
202 DEVICE_VENDOR := Redmi
203 DEVICE_MODEL := AX6
204 DEVICE_PACKAGES := ipq-wifi-redmi_ax6
205 endef
206 TARGET_DEVICES += redmi_ax6
207
208 define Device/xiaomi_ax3600
209 $(call Device/FitImage)
210 $(call Device/UbiFit)
211 DEVICE_VENDOR := Xiaomi
212 DEVICE_MODEL := AX3600
213 BLOCKSIZE := 128k
214 PAGESIZE := 2048
215 DEVICE_DTS_CONFIG := config@ac04
216 SOC := ipq8071
217 KERNEL_SIZE := 36608k
218 DEVICE_PACKAGES := ipq-wifi-xiaomi_ax3600 kmod-ath10k-ct-smallbuffers ath10k-firmware-qca9887-ct
219 ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),)
220 ARTIFACTS := initramfs-factory.ubi
221 ARTIFACT/initramfs-factory.ubi := append-image-stage initramfs-uImage.itb | ubinize-kernel
222 endif
223 endef
224 TARGET_DEVICES += xiaomi_ax3600
225
226 define Device/xiaomi_ax9000
227 $(call Device/FitImage)
228 $(call Device/UbiFit)
229 DEVICE_VENDOR := Xiaomi
230 DEVICE_MODEL := AX9000
231 BLOCKSIZE := 128k
232 PAGESIZE := 2048
233 DEVICE_DTS_CONFIG := config@hk14
234 SOC := ipq8072
235 KERNEL_SIZE := 57344k
236 DEVICE_PACKAGES := ipq-wifi-xiaomi_ax9000 kmod-ath11k-pci ath11k-firmware-qcn9074 \
237 kmod-ath10k-ct ath10k-firmware-qca9887-ct
238 ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),)
239 ARTIFACTS := initramfs-factory.ubi
240 ARTIFACT/initramfs-factory.ubi := append-image-stage initramfs-uImage.itb | ubinize-kernel
241 endif
242 endef
243 TARGET_DEVICES += xiaomi_ax9000
244
245 define Device/zyxel_nbg7815
246 $(call Device/FitImage)
247 $(call Device/EmmcImage)
248 DEVICE_VENDOR := ZYXEL
249 DEVICE_MODEL := NBG7815
250 DEVICE_DTS_CONFIG := config@nbg7815
251 SOC := ipq8074
252 DEVICE_PACKAGES += ipq-wifi-zyxel_nbg7815 kmod-ath11k-pci kmod-hwmon-tmp103 \
253 kmod-bluetooth
254 endef
255 TARGET_DEVICES += zyxel_nbg7815
256
257 define Device/yuncore_ax880
258 $(call Device/FitImage)
259 $(call Device/UbiFit)
260 DEVICE_VENDOR := Yuncore
261 DEVICE_MODEL := AX880
262 BLOCKSIZE := 128k
263 PAGESIZE := 2048
264 DEVICE_DTS_CONFIG := config@hk09
265 SOC := ipq8072
266 DEVICE_PACKAGES := ipq-wifi-yuncore_ax880
267 IMAGES += factory.bin
268 IMAGE/factory.bin := append-ubi | qsdk-ipq-factory-nand
269 endef
270 TARGET_DEVICES += yuncore_ax880
271