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