ipq807x: add support for Netgear RAX120v2
[openwrt/staging/neocturne.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_rax120v2
95 $(call Device/FitImage)
96 $(call Device/UbiFit)
97 DEVICE_VENDOR := Netgear
98 DEVICE_MODEL := RAX120v2
99 BLOCKSIZE := 128k
100 PAGESIZE := 2048
101 DEVICE_DTS_CONFIG := config@hk01
102 SOC := ipq8074
103 KERNEL_SIZE := 29696k
104 NETGEAR_BOARD_ID := RAX120
105 NETGEAR_HW_ID := 29765589+0+512+1024+4x4+8x8
106 DEVICE_PACKAGES := ipq-wifi-netgear_rax120v2 kmod-spi-gpio \
107 kmod-spi-bitbang kmod-gpio-nxp-74hc164 kmod-hwmon-g761
108 IMAGES = web-ui-factory.img sysupgrade.bin
109 IMAGE/web-ui-factory.img := append-image initramfs-uImage.itb | \
110 pad-offset $$$$(BLOCKSIZE) 64 | append-uImage-fakehdr filesystem | \
111 netgear-dni
112 IMAGE/sysupgrade.bin := append-kernel | pad-offset $$$$(BLOCKSIZE) 64 | \
113 append-uImage-fakehdr filesystem | sysupgrade-tar kernel=$$$$@ | \
114 append-metadata
115 endef
116 TARGET_DEVICES += netgear_rax120v2
117
118 define Device/netgear_wax218
119 $(call Device/FitImage)
120 $(call Device/UbiFit)
121 ARTIFACTS := web-ui-factory.fit
122 DEVICE_VENDOR := Netgear
123 DEVICE_MODEL := WAX218
124 DEVICE_DTS_CONFIG := config@hk07
125 BLOCKSIZE := 128k
126 PAGESIZE := 2048
127 SOC := ipq8072
128 ARTIFACT/web-ui-factory.fit := append-image initramfs-uImage.itb | \
129 ubinize-kernel | qsdk-ipq-factory-nand
130 DEVICE_PACKAGES := kmod-spi-gpio kmod-spi-bitbang kmod-gpio-nxp-74hc164 \
131 ipq-wifi-netgear_wax218
132 endef
133 TARGET_DEVICES += netgear_wax218
134
135 define Device/prpl_haze
136 $(call Device/FitImage)
137 $(call Device/EmmcImage)
138 DEVICE_VENDOR := prpl Foundation
139 DEVICE_MODEL := Haze
140 DEVICE_DTS_CONFIG := config@hk09
141 SOC := ipq8072
142 DEVICE_PACKAGES += ath11k-firmware-qcn9074 ipq-wifi-prpl_haze kmod-ath11k-pci \
143 mkf2fs f2fsck kmod-fs-f2fs
144 endef
145 TARGET_DEVICES += prpl_haze
146
147 define Device/qnap_301w
148 $(call Device/FitImage)
149 $(call Device/EmmcImage)
150 DEVICE_VENDOR := QNAP
151 DEVICE_MODEL := 301w
152 DEVICE_DTS_CONFIG := config@hk01
153 KERNEL_SIZE := 16384k
154 SOC := ipq8072
155 DEVICE_PACKAGES += ipq-wifi-qnap_301w
156 endef
157 TARGET_DEVICES += qnap_301w
158
159 define Device/redmi_ax6
160 $(call Device/xiaomi_ax3600)
161 DEVICE_VENDOR := Redmi
162 DEVICE_MODEL := AX6
163 DEVICE_PACKAGES := ipq-wifi-redmi_ax6
164 endef
165 TARGET_DEVICES += redmi_ax6
166
167 define Device/xiaomi_ax3600
168 $(call Device/FitImage)
169 $(call Device/UbiFit)
170 DEVICE_VENDOR := Xiaomi
171 DEVICE_MODEL := AX3600
172 BLOCKSIZE := 128k
173 PAGESIZE := 2048
174 DEVICE_DTS_CONFIG := config@ac04
175 SOC := ipq8071
176 KERNEL_SIZE := 36608k
177 DEVICE_PACKAGES := ipq-wifi-xiaomi_ax3600 kmod-ath10k-ct-smallbuffers ath10k-firmware-qca9887-ct
178 ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),)
179 ARTIFACTS := initramfs-factory.ubi
180 ARTIFACT/initramfs-factory.ubi := append-image-stage initramfs-uImage.itb | ubinize-kernel
181 endif
182 endef
183 TARGET_DEVICES += xiaomi_ax3600
184
185 define Device/xiaomi_ax9000
186 $(call Device/FitImage)
187 $(call Device/UbiFit)
188 DEVICE_VENDOR := Xiaomi
189 DEVICE_MODEL := AX9000
190 BLOCKSIZE := 128k
191 PAGESIZE := 2048
192 DEVICE_DTS_CONFIG := config@hk14
193 SOC := ipq8072
194 KERNEL_SIZE := 57344k
195 DEVICE_PACKAGES := ipq-wifi-xiaomi_ax9000 kmod-ath11k-pci ath11k-firmware-qcn9074 \
196 kmod-ath10k-ct ath10k-firmware-qca9887-ct
197 ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),)
198 ARTIFACTS := initramfs-factory.ubi
199 ARTIFACT/initramfs-factory.ubi := append-image-stage initramfs-uImage.itb | ubinize-kernel
200 endif
201 endef
202 TARGET_DEVICES += xiaomi_ax9000
203
204 define Device/zyxel_nbg7815
205 $(call Device/FitImage)
206 $(call Device/EmmcImage)
207 DEVICE_VENDOR := ZYXEL
208 DEVICE_MODEL := NBG7815
209 DEVICE_DTS_CONFIG := config@nbg7815
210 SOC := ipq8074
211 DEVICE_PACKAGES += ipq-wifi-zyxel_nbg7815 kmod-ath11k-pci kmod-hwmon-tmp103 \
212 kmod-bluetooth
213 endef
214 TARGET_DEVICES += zyxel_nbg7815