ipq806x: drop legacy image leftovers
[openwrt/openwrt.git] / target / linux / ipq806x / image / Makefile
1 # Copyright (c) 2014 The Linux Foundation. All rights reserved.
2 #
3 include $(TOPDIR)/rules.mk
4 include $(INCLUDE_DIR)/image.mk
5
6 UBIFS_OPTS = -m 2048 -e 124KiB -c 4096 -U -F
7
8 define Device/Default
9 PROFILES := Default
10 KERNEL_DEPENDS = $$(wildcard $(DTS_DIR)/$$(DEVICE_DTS).dts)
11 KERNEL_INITRAMFS_PREFIX := $$(IMG_PREFIX)-$(1)-initramfs
12 KERNEL_PREFIX := $$(IMAGE_PREFIX)
13 KERNEL_LOADADDR = 0x42208000
14 SUPPORTED_DEVICES := $(subst _,$(comma),$(1))
15 IMAGE/sysupgrade.bin = sysupgrade-tar | append-metadata
16 IMAGE/sysupgrade.bin/squashfs :=
17 endef
18
19 define Device/LegacyImage
20 KERNEL_SUFFIX := -uImage
21 KERNEL = kernel-bin | append-dtb | uImage none
22 KERNEL_NAME := zImage
23 endef
24
25 define Device/FitImage
26 KERNEL_SUFFIX := -fit-uImage.itb
27 KERNEL = kernel-bin | gzip | fit gzip $$(DTS_DIR)/$$(DEVICE_DTS).dtb
28 KERNEL_NAME := Image
29 endef
30
31 define Device/FitImageLzma
32 KERNEL_SUFFIX := -fit-uImage.itb
33 KERNEL = kernel-bin | lzma | fit lzma $$(DTS_DIR)/$$(DEVICE_DTS).dtb
34 KERNEL_NAME := Image
35 endef
36
37 define Device/UbiFit
38 KERNEL_IN_UBI := 1
39 IMAGES := nand-factory.ubi nand-sysupgrade.bin
40 IMAGE/nand-factory.ubi := append-ubi
41 IMAGE/nand-sysupgrade.bin := sysupgrade-tar | append-metadata
42 endef
43
44 define Device/DniImage
45 FILESYSTEMS := squashfs
46 KERNEL_SUFFIX := -uImage
47 KERNEL = kernel-bin | append-dtb | uImage none
48 KERNEL_NAME := zImage
49 NETGEAR_BOARD_ID :=
50 NETGEAR_HW_ID :=
51 UBINIZE_OPTS := -E 5
52 IMAGES := factory.img sysupgrade.bin
53 IMAGE/factory.img := append-kernel | pad-offset $$$$(BLOCKSIZE) 64 | append-uImage-fakeroot-hdr | pad-to $$$$(KERNEL_SIZE) | append-ubi | netgear-dni
54 IMAGE/sysupgrade.bin := append-kernel | pad-offset $$$$(BLOCKSIZE) 64 | append-uImage-fakeroot-hdr | sysupgrade-tar kernel=$$$$@ | append-metadata
55 endef
56 DEVICE_VARS += NETGEAR_BOARD_ID NETGEAR_HW_ID
57
58 define Device/TpSafeImage
59 FILESYSTEMS := squashfs
60 KERNEL_SUFFIX := -uImage
61 KERNEL = kernel-bin | append-dtb | uImage none
62 KERNEL_NAME := zImage
63 TPLINK_BOARD_ID :=
64 IMAGES := factory.bin sysupgrade.bin
65 IMAGE/factory.bin := append-rootfs | tplink-safeloader factory
66 IMAGE/sysupgrade.bin := append-rootfs | tplink-safeloader sysupgrade | append-metadata
67 endef
68 DEVICE_VARS += TPLINK_BOARD_ID
69
70 define Device/ZyXELImage
71 FILESYSTEMS := squashfs
72 KERNEL_SUFFIX := -uImage
73 KERNEL = kernel-bin | append-dtb | uImage none | pad-to $${KERNEL_SIZE}
74 KERNEL_NAME := zImage
75 IMAGES := sysupgrade.bin mmcblk0p5-rootfs.bin mmcblk0p4-kernel.bin
76 IMAGE/sysupgrade.bin/squashfs := append-rootfs | pad-to $$$${BLOCKSIZE} | sysupgrade-tar rootfs=$$$$@ | append-metadata
77 IMAGE/mmcblk0p5-rootfs.bin := append-rootfs | pad-rootfs | pad-to $$$${BLOCKSIZE}
78 IMAGE/mmcblk0p4-kernel.bin := append-kernel
79 endef
80
81 define Device/avm_fritzbox-4040
82 $(call Device/FitImageLzma)
83 DEVICE_DTS := qcom-ipq4019-fritz4040
84 KERNEL_LOADADDR := 0x80208000
85 BLOCKSIZE := 4k
86 PAGESIZE := 256
87 BOARD_NAME := fritz4040
88 DEVICE_TITLE := AVM Fritz!Box 4040
89 IMAGE_SIZE := 29753344
90 IMAGES = sysupgrade.bin
91 IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata
92 DEVICE_PACKAGES := kmod-usb-phy-qcom-ipq4019 ipq-wifi-fritz4040 fritz-tffs fritz-caldata u-boot-fritz4040
93 endef
94 TARGET_DEVICES += avm_fritzbox-4040
95
96 define Device/linksys_ea8500
97 $(call Device/LegacyImage)
98 DEVICE_DTS := qcom-ipq8064-ea8500
99 PAGESIZE := 2048
100 BLOCKSIZE := 128k
101 KERNEL_SIZE := 3072k
102 FILESYSTEMS := squashfs
103 KERNEL = kernel-bin | append-dtb | uImage none | append-uImage-fakeroot-hdr
104 BOARD_NAME := ea8500
105 SUPPORTED_DEVICES += ea8500
106 UBINIZE_OPTS := -E 5
107 IMAGES := factory.bin sysupgrade.bin
108 IMAGE/factory.bin := append-kernel | pad-to $$$${KERNEL_SIZE} | append-ubi
109 DEVICE_TITLE := Linksys EA8500
110 DEVICE_PACKAGES := ath10k-firmware-qca99x0
111 endef
112 TARGET_DEVICES += linksys_ea8500
113
114 define Device/netgear_d7800
115 $(call Device/DniImage)
116 DEVICE_DTS := qcom-ipq8064-d7800
117 KERNEL_SIZE := 2097152
118 NETGEAR_BOARD_ID := D7800
119 NETGEAR_HW_ID := 29764958+0+128+512+4x4+4x4
120 BLOCKSIZE := 128k
121 PAGESIZE := 2048
122 BOARD_NAME := d7800
123 SUPPORTED_DEVICES += d7800
124 DEVICE_TITLE := Netgear Nighthawk X4 D7800
125 DEVICE_PACKAGES := ath10k-firmware-qca99x0
126 endef
127 TARGET_DEVICES += netgear_d7800
128
129 define Device/netgear_r7500
130 $(call Device/DniImage)
131 DEVICE_DTS := qcom-ipq8064-r7500
132 KERNEL_SIZE := 2097152
133 NETGEAR_BOARD_ID := R7500
134 NETGEAR_HW_ID := 29764841+0+128+256+3x3+4x4
135 BLOCKSIZE := 128k
136 PAGESIZE := 2048
137 BOARD_NAME := r7500
138 SUPPORTED_DEVICES += r7500
139 DEVICE_TITLE := Netgear Nighthawk X4 R7500
140 DEVICE_PACKAGES := ath10k-firmware-qca988x
141 endef
142 TARGET_DEVICES += netgear_r7500
143
144 define Device/netgear_r7500v2
145 $(call Device/DniImage)
146 DEVICE_DTS := qcom-ipq8064-r7500v2
147 KERNEL_SIZE := 2097152
148 NETGEAR_BOARD_ID := R7500v2
149 NETGEAR_HW_ID := 29764958+0+128+512+3x3+4x4
150 BLOCKSIZE := 128k
151 PAGESIZE := 2048
152 BOARD_NAME := r7500v2
153 SUPPORTED_DEVICES += r7500v2
154 DEVICE_TITLE := Netgear Nighthawk X4 R7500v2
155 DEVICE_PACKAGES := ath10k-firmware-qca99x0 ath10k-firmware-qca988x
156 endef
157 TARGET_DEVICES += netgear_r7500v2
158
159 define Device/netgear_r7800
160 $(call Device/DniImage)
161 DEVICE_DTS := qcom-ipq8065-r7800
162 KERNEL_SIZE := 2097152
163 NETGEAR_BOARD_ID := R7800
164 NETGEAR_HW_ID := 29764958+0+128+512+4x4+4x4+cascade
165 BLOCKSIZE := 128k
166 PAGESIZE := 2048
167 BOARD_NAME := r7800
168 SUPPORTED_DEVICES += r7800
169 DEVICE_TITLE := Netgear Nighthawk X4S R7800
170 DEVICE_PACKAGES := ath10k-firmware-qca9984
171 endef
172 TARGET_DEVICES += netgear_r7800
173
174 define Device/openmesh_a42
175 $(call Device/FitImageLzma)
176 FILESYSTEMS := squashfs
177 DEVICE_DTS := qcom-ipq4019-a42
178 KERNEL_LOADADDR := 0x80208000
179 BLOCKSIZE := 64k
180 SUPPORTED_DEVICES := openmesh,a42
181 DEVICE_TITLE := OpenMesh A42
182 KERNEL = kernel-bin | lzma | fit lzma $$(DTS_DIR)/$$(DEVICE_DTS).dtb | pad-to $$(BLOCKSIZE)
183 IMAGE_SIZE := 15616k
184 IMAGES = factory.bin sysupgrade.bin
185 IMAGE/factory.bin := append-rootfs | pad-rootfs | openmesh-image ce_type=A42
186 IMAGE/sysupgrade.bin/squashfs := append-rootfs | pad-rootfs | sysupgrade-tar rootfs=$$$$@ | append-metadata
187 DEVICE_PACKAGES := ath10k-firmware-qca4019 uboot-envtools ipq-wifi-openmesh_a42
188 endef
189 TARGET_DEVICES += openmesh_a42
190
191 define Device/qcom_ap-dk01.1-c1
192 DEVICE_TITLE := QCA AP-DK01.1-C1
193 BOARD_NAME := ap-dk01.1-c1
194 DEVICE_DTS := qcom-ipq4019-ap.dk01.1-c1
195 KERNEL_LOADADDR := 0x80208000
196 KERNEL_INSTALL := 1
197 KERNEL_SIZE := 4096k
198 IMAGE_SIZE := 26624k
199 FILESYSTEMS := squashfs
200 $(call Device/FitImage)
201 IMAGES := sysupgrade.bin
202 IMAGE/sysupgrade.bin := append-kernel | pad-to $$$${KERNEL_SIZE} | append-rootfs | pad-rootfs | append-metadata
203 DEVICE_PACKAGES := ath10k-firmware-qca4019
204 endef
205 TARGET_DEVICES += qcom_ap-dk01.1-c1
206
207 define Device/qcom_ap-dk04.1-c1
208 $(call Device/FitImage)
209 $(call Device/UbiFit)
210 DEVICE_DTS := qcom-ipq4019-ap.dk04.1-c1
211 KERNEL_LOADADDR := 0x80208000
212 KERNEL_INSTALL := 1
213 KERNEL_SIZE := 4048k
214 BLOCKSIZE := 128k
215 PAGESIZE := 2048
216 BOARD_NAME := ap-dk04.1-c1
217 DEVICE_TITLE := QCA AP-DK04.1-C1
218 endef
219 TARGET_DEVICES += qcom_ap-dk04.1-c1
220
221 define Device/qcom_ipq8064-ap148
222 $(call Device/FitImage)
223 $(call Device/UbiFit)
224 DEVICE_DTS := qcom-ipq8064-ap148
225 KERNEL_INSTALL := 1
226 BLOCKSIZE := 128k
227 PAGESIZE := 2048
228 BOARD_NAME := ap148
229 SUPPORTED_DEVICES += ap148
230 DEVICE_TITLE := Qualcomm AP148
231 DEVICE_PACKAGES := ath10k-firmware-qca99x0
232 endef
233 TARGET_DEVICES += qcom_ipq8064-ap148
234
235 define Device/qcom_ipq8064-ap148-legacy
236 $(call Device/LegacyImage)
237 $(call Device/UbiFit)
238 DEVICE_DTS := qcom-ipq8064-ap148
239 BLOCKSIZE := 128k
240 PAGESIZE := 2048
241 BOARD_NAME := ap148
242 SUPPORTED_DEVICES := qcom,ipq8064-ap148 ap148
243 DEVICE_TITLE := Qualcomm AP148 (legacy)
244 DEVICE_PACKAGES := ath10k-firmware-qca99x0
245 endef
246 TARGET_DEVICES += qcom_ipq8064-ap148-legacy
247
248 define Device/qcom_ipq8064-db149
249 $(call Device/FitImage)
250 DEVICE_DTS := qcom-ipq8064-db149
251 KERNEL_INSTALL := 1
252 BOARD_NAME := db149
253 DEVICE_TITLE := Qualcomm DB149
254 DEVICE_PACKAGES := ath10k-firmware-qca99x0
255 endef
256 TARGET_DEVICES += qcom_ipq8064-db149
257
258 define Device/tplink_c2600
259 $(call Device/TpSafeImage)
260 DEVICE_DTS := qcom-ipq8064-c2600
261 BLOCKSIZE := 128k
262 PAGESIZE := 2048
263 BOARD_NAME := c2600
264 SUPPORTED_DEVICES += c2600
265 TPLINK_BOARD_ID := C2600
266 DEVICE_TITLE := TP-Link Archer C2600
267 DEVICE_PACKAGES := ath10k-firmware-qca99x0
268 endef
269 TARGET_DEVICES += tplink_c2600
270
271 define Device/tplink_vr2600v
272 FILESYSTEMS := squashfs
273 KERNEL_SUFFIX := -uImage
274 KERNEL = kernel-bin | append-dtb | uImage none
275 KERNEL_NAME := zImage
276 KERNEL_SIZE := 2097152
277 DEVICE_DTS := qcom-ipq8064-vr2600v
278 BLOCKSIZE := 128k
279 PAGESIZE := 2048
280 BOARD_NAME := vr2600v
281 SUPPORTED_DEVICES += vr2600v
282 DEVICE_TITLE := TP-Link Archer VR2600v
283 DEVICE_PACKAGES := ath10k-firmware-qca99x0
284 IMAGES := sysupgrade.bin
285 IMAGE/sysupgrade.bin := pad-extra 512 | append-kernel | pad-to $$$${KERNEL_SIZE} | append-rootfs | pad-rootfs | append-metadata
286 endef
287 TARGET_DEVICES += tplink_vr2600v
288
289 define Device/zyxel_nbg6817
290 DEVICE_DTS := qcom-ipq8065-nbg6817
291 KERNEL_SIZE := 4096k
292 BLOCKSIZE := 64k
293 BOARD_NAME := nbg6817
294 SUPPORTED_DEVICES += nbg6817
295 DEVICE_TITLE := ZyXEL NBG6817
296 DEVICE_PACKAGES := ath10k-firmware-qca9984 e2fsprogs kmod-fs-ext4 losetup
297 $(call Device/ZyXELImage)
298 endef
299 TARGET_DEVICES += zyxel_nbg6817
300
301 $(eval $(call BuildImage))