ipq807x: add initial support for prpl Foundation Haze board
[openwrt/staging/stintel.git] / target / linux / ipq807x / image / generic.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 DEVICE_PACKAGES := e2fsprogs kmod-fs-ext4 losetup
18 endef
19
20 define Device/UbiFit
21 KERNEL_IN_UBI := 1
22 IMAGES := factory.ubi sysupgrade.bin
23 IMAGE/factory.ubi := append-ubi
24 IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
25 endef
26
27 define Device/buffalo_wxr-5950ax12
28 $(call Device/FitImage)
29 DEVICE_VENDOR := Buffalo
30 DEVICE_MODEL := WXR-5950AX12
31 BLOCKSIZE := 128k
32 PAGESIZE := 2048
33 DEVICE_DTS_CONFIG := config@hk01
34 SOC := ipq8074
35 IMAGES := sysupgrade.bin
36 IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
37 DEVICE_PACKAGES := ipq-wifi-buffalo_wxr-5950ax12
38 endef
39 TARGET_DEVICES += buffalo_wxr-5950ax12
40
41 define Device/compex_wpq873
42 $(call Device/FitImage)
43 $(call Device/UbiFit)
44 DEVICE_VENDOR := Compex
45 DEVICE_MODEL := WPQ873
46 BLOCKSIZE := 128k
47 PAGESIZE := 2048
48 DEVICE_DTS_CONFIG := config@hk09.wpq873
49 SOC := ipq8072
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 endef
120 TARGET_DEVICES += prpl_haze
121
122 define Device/qnap_301w
123 $(call Device/FitImage)
124 $(call Device/EmmcImage)
125 DEVICE_VENDOR := QNAP
126 DEVICE_MODEL := 301w
127 DEVICE_DTS_CONFIG := config@hk01
128 KERNEL_SIZE := 16384k
129 SOC := ipq8072
130 DEVICE_PACKAGES += ipq-wifi-qnap_301w
131 endef
132 TARGET_DEVICES += qnap_301w
133
134 define Device/redmi_ax6
135 $(call Device/xiaomi_ax3600)
136 DEVICE_VENDOR := Redmi
137 DEVICE_MODEL := AX6
138 DEVICE_PACKAGES := ipq-wifi-redmi_ax6
139 endef
140 TARGET_DEVICES += redmi_ax6
141
142 define Device/xiaomi_ax3600
143 $(call Device/FitImage)
144 $(call Device/UbiFit)
145 DEVICE_VENDOR := Xiaomi
146 DEVICE_MODEL := AX3600
147 BLOCKSIZE := 128k
148 PAGESIZE := 2048
149 DEVICE_DTS_CONFIG := config@ac04
150 SOC := ipq8071
151 KERNEL_SIZE := 36608k
152 DEVICE_PACKAGES := ipq-wifi-xiaomi_ax3600 kmod-ath10k-ct-smallbuffers ath10k-firmware-qca9887-ct
153 ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),)
154 ARTIFACTS := initramfs-factory.ubi
155 ARTIFACT/initramfs-factory.ubi := append-image-stage initramfs-uImage.itb | ubinize-kernel
156 endif
157 endef
158 TARGET_DEVICES += xiaomi_ax3600
159
160 define Device/xiaomi_ax9000
161 $(call Device/FitImage)
162 $(call Device/UbiFit)
163 DEVICE_VENDOR := Xiaomi
164 DEVICE_MODEL := AX9000
165 BLOCKSIZE := 128k
166 PAGESIZE := 2048
167 DEVICE_DTS_CONFIG := config@hk14
168 SOC := ipq8072
169 KERNEL_SIZE := 57344k
170 DEVICE_PACKAGES := ipq-wifi-xiaomi_ax9000 kmod-ath11k-pci ath11k-firmware-qcn9074 \
171 kmod-ath10k-ct ath10k-firmware-qca9887-ct
172 ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),)
173 ARTIFACTS := initramfs-factory.ubi
174 ARTIFACT/initramfs-factory.ubi := append-image-stage initramfs-uImage.itb | ubinize-kernel
175 endif
176 endef
177 TARGET_DEVICES += xiaomi_ax9000
178
179 define Device/zyxel_nbg7815
180 $(call Device/FitImage)
181 $(call Device/EmmcImage)
182 DEVICE_VENDOR := ZYXEL
183 DEVICE_MODEL := NBG7815
184 DEVICE_DTS_CONFIG := config@nbg7815
185 SOC := ipq8074
186 DEVICE_PACKAGES += ipq-wifi-zyxel_nbg7815 kmod-ath11k-pci kmod-hwmon-tmp103 \
187 kmod-bluetooth
188 endef
189 TARGET_DEVICES += zyxel_nbg7815