ath79: add support for devolo WiFi pro 1750c
[openwrt/openwrt.git] / target / linux / ath79 / image / generic.mk
1 include ./common-buffalo.mk
2 include ./common-netgear.mk
3
4 DEVICE_VARS += ADDPATTERN_ID ADDPATTERN_VERSION
5
6 define Build/cybertan-trx
7 @echo -n '' > $@-empty.bin
8 -$(STAGING_DIR_HOST)/bin/trx -o $@.new \
9 -f $(IMAGE_KERNEL) -F $@-empty.bin \
10 -x 32 -a 0x10000 -x -32 -f $@
11 -mv "$@.new" "$@"
12 -rm $@-empty.bin
13 endef
14
15 define Build/addpattern
16 -$(STAGING_DIR_HOST)/bin/addpattern -B $(ADDPATTERN_ID) \
17 -v v$(ADDPATTERN_VERSION) -i $@ -o $@.new
18 -mv "$@.new" "$@"
19 endef
20
21 define Build/elecom-header
22 $(eval fw_size=$(word 1,$(1)))
23 $(eval edimax_model=$(word 2,$(1)))
24 $(eval product=$(word 3,$(1)))
25 $(eval factory_bin=$(word 4,$(1)))
26 if [ -e $(KDIR)/tmp/$(KERNEL_INITRAMFS_IMAGE) -a "$$(stat -c%s $@)" -lt "$(fw_size)" ]; then \
27 $(CP) $(KDIR)/tmp/$(KERNEL_INITRAMFS_IMAGE) $(factory_bin); \
28 $(STAGING_DIR_HOST)/bin/mkedimaximg \
29 -b -s CSYS -m $(edimax_model) \
30 -f 0x70000 -S 0x01100000 \
31 -i $(factory_bin) -o $(factory_bin).new; \
32 mv $(factory_bin).new $(factory_bin); \
33 ( \
34 echo -n -e "ELECOM\x00\x00$(product)" | dd bs=40 count=1 conv=sync; \
35 echo -n "0.00" | dd bs=16 count=1 conv=sync; \
36 dd if=$(factory_bin); \
37 ) > $(factory_bin).new; \
38 mv $(factory_bin).new $(factory_bin); \
39 $(CP) $(factory_bin) $(BIN_DIR)/; \
40 else \
41 echo "WARNING: initramfs kernel image too big, cannot generate factory image" >&2; \
42 fi
43
44 endef
45
46 define Build/nec-fw
47 ( stat -c%s $@ | tr -d "\n" | dd bs=16 count=1 conv=sync; ) >> $@
48 ( \
49 echo -n -e "$(1)" | dd bs=16 count=1 conv=sync; \
50 echo -n "0.0.00" | dd bs=16 count=1 conv=sync; \
51 dd if=$@; \
52 ) > $@.new
53 mv $@.new $@
54 endef
55
56 define Device/avm_fritz300e
57 ATH_SOC := ar7242
58 DEVICE_TITLE := AVM FRITZ!WLAN Repeater 300E
59 KERNEL := kernel-bin | append-dtb | lzma | eva-image
60 KERNEL_INITRAMFS := $$(KERNEL)
61 IMAGE_SIZE := 15232k
62 IMAGE/sysupgrade.bin := append-kernel | pad-to 64k | \
63 append-squashfs-fakeroot-be | pad-to 256 | \
64 append-rootfs | pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE)
65 DEVICE_PACKAGES := fritz-tffs rssileds -swconfig
66 endef
67 TARGET_DEVICES += avm_fritz300e
68
69 define Device/avm_fritz4020
70 ATH_SOC := qca9561
71 DEVICE_TITLE := AVM FRITZ!Box 4020
72 IMAGE_SIZE := 15232k
73 KERNEL := kernel-bin | append-dtb | lzma | eva-image
74 KERNEL_INITRAMFS := $$(KERNEL)
75 IMAGE/sysupgrade.bin := append-kernel | pad-to 64k | \
76 append-squashfs-fakeroot-be | pad-to 256 | \
77 append-rootfs | pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE)
78 DEVICE_PACKAGES := fritz-tffs
79 endef
80 TARGET_DEVICES += avm_fritz4020
81
82 define Device/buffalo_bhr-4grv
83 ATH_SOC := ar7242
84 DEVICE_TITLE := Buffalo BHR-4GRV
85 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport
86 IMAGE_SIZE := 32256k
87 IMAGES += factory.bin tftp.bin
88 IMAGE/default := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs | check-size $$$$(IMAGE_SIZE)
89 IMAGE/factory.bin := $$(IMAGE/default) | buffalo-enc BHR-4GRV 1.99 | buffalo-tag BHR-4GRV 3
90 IMAGE/tftp.bin := $$(IMAGE/default) | buffalo-tftp-header
91 SUPPORTED_DEVICES += wzr-hp-g450h
92 endef
93 TARGET_DEVICES += buffalo_bhr-4grv
94
95 define Device/buffalo_bhr-4grv2
96 ATH_SOC := qca9557
97 DEVICE_TITLE := Buffalo BHR-4GRV2
98 IMAGE_SIZE := 16000k
99 endef
100 TARGET_DEVICES += buffalo_bhr-4grv2
101
102 define Device/buffalo_wzr-hp-ag300h
103 ATH_SOC := ar7161
104 DEVICE_TITLE := Buffalo WZR-HP-AG300H
105 IMAGE_SIZE := 32256k
106 IMAGES += factory.bin tftp.bin
107 IMAGE/default := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs | check-size $$$$(IMAGE_SIZE)
108 IMAGE/factory.bin := $$(IMAGE/default) | buffalo-enc WZR-HP-AG300H 1.99 | buffalo-tag WZR-HP-AG300H 3
109 IMAGE/tftp.bin := $$(IMAGE/default) | buffalo-tftp-header
110 DEVICE_PACKAGES := kmod-usb-core kmod-usb-ohci kmod-usb2 kmod-usb-ledtrig-usbport kmod-leds-reset kmod-owl-loader
111 SUPPORTED_DEVICES += wzr-hp-ag300h
112 endef
113 TARGET_DEVICES += buffalo_wzr-hp-ag300h
114
115 define Device/buffalo_wzr-hp-g302h-a1a0
116 ATH_SOC := ar7242
117 DEVICE_TITLE := Buffalo WZR-HP-G302H A1A0
118 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport
119 IMAGE_SIZE := 32128k
120 IMAGES += factory.bin tftp.bin
121 IMAGE/default := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs | check-size $$$$(IMAGE_SIZE)
122 IMAGE/factory.bin := $$(IMAGE/default) | buffalo-enc WZR-HP-G302H 1.99 | buffalo-tag WZR-HP-G302H 4
123 IMAGE/tftp.bin := $$(IMAGE/default) | buffalo-tftp-header
124 SUPPORTED_DEVICES += wzr-hp-g300nh2
125 endef
126 TARGET_DEVICES += buffalo_wzr-hp-g302h-a1a0
127
128 define Device/buffalo_wzr-hp-g450h
129 ATH_SOC := ar7242
130 DEVICE_TITLE := Buffalo WZR-HP-G450H/WZR-450HP
131 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport
132 IMAGE_SIZE := 32256k
133 IMAGES += factory.bin tftp.bin
134 IMAGE/default := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs | check-size $$$$(IMAGE_SIZE)
135 IMAGE/factory.bin := $$(IMAGE/default) | buffalo-enc WZR-HP-G450H 1.99 | buffalo-tag WZR-HP-G450H 3
136 IMAGE/tftp.bin := $$(IMAGE/default) | buffalo-tftp-header
137 SUPPORTED_DEVICES += wzr-hp-g450h
138 endef
139 TARGET_DEVICES += buffalo_wzr-hp-g450h
140
141 define Device/devolo_dvl1200e
142 ATH_SOC := qca9558
143 DEVICE_TITLE := devolo WiFi pro 1200e
144 DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca988x-ct
145 IMAGE_SIZE := 15936k
146 endef
147 TARGET_DEVICES += devolo_dvl1200e
148
149 define Device/devolo_dvl1750c
150 ATH_SOC := qca9558
151 DEVICE_TITLE := devolo WiFi pro 1750c
152 DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca988x-ct
153 IMAGE_SIZE := 15936k
154 endef
155 TARGET_DEVICES += devolo_dvl1750c
156
157 define Device/dlink_dir-825-b1
158 ATH_SOC := ar7161
159 DEVICE_TITLE := D-LINK DIR-825 B1
160 IMAGE_SIZE := 6208k
161 IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE)
162 DEVICE_PACKAGES := kmod-usb-core kmod-usb-ohci kmod-usb2 kmod-usb-ledtrig-usbport kmod-leds-reset kmod-owl-loader
163 SUPPORTED_DEVICES += dir-825-b1
164 endef
165 TARGET_DEVICES += dlink_dir-825-b1
166
167 define Device/dlink_dir-825-c1
168 ATH_SOC := ar9344
169 DEVICE_TITLE := D-LINK DIR-825 C1
170 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport kmod-leds-reset kmod-owl-loader
171 SUPPORTED_DEVICES += dir-825-c1
172 IMAGE_SIZE := 15936k
173 IMAGES := factory.bin sysupgrade.bin
174 IMAGE/default := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs
175 IMAGE/factory.bin := $$(IMAGE/default) | pad-offset $$$$(IMAGE_SIZE) 26 | \
176 append-string 00DB120AR9344-RT-101214-00 | check-size $$$$(IMAGE_SIZE)
177 IMAGE/sysupgrade.bin := $$(IMAGE/default) | append-metadata | check-size $$$$(IMAGE_SIZE)
178 endef
179 TARGET_DEVICES += dlink_dir-825-c1
180
181 define Device/dlink_dir-835-a1
182 ATH_SOC := ar9344
183 DEVICE_TITLE := D-LINK DIR-835 A1
184 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-leds-reset kmod-owl-loader
185 SUPPORTED_DEVICES += dir-835-a1
186 IMAGE_SIZE := 15936k
187 IMAGES := factory.bin sysupgrade.bin
188 IMAGE/default := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs
189 IMAGE/factory.bin := $$(IMAGE/default) | pad-offset $$$$(IMAGE_SIZE) 26 | \
190 append-string 00DB120AR9344-RT-101214-00 | check-size $$$$(IMAGE_SIZE)
191 IMAGE/sysupgrade.bin := $$(IMAGE/default) | append-metadata | check-size $$$$(IMAGE_SIZE)
192 endef
193 TARGET_DEVICES += dlink_dir-835-a1
194
195 define Device/elecom_wrc-300ghbk2-i
196 ATH_SOC := qca9563
197 DEVICE_TITLE := ELECOM WRC-300GHBK2-I
198 IMAGE_SIZE := 7616k
199 KERNEL_INITRAMFS := $$(KERNEL) | pad-to 2 | \
200 elecom-header 7798706 RN51 WRC-300GHBK2-I \
201 $(KDIR)/tmp/$$(KERNEL_INITRAMFS_PREFIX)-factory.bin
202 endef
203 TARGET_DEVICES += elecom_wrc-300ghbk2-i
204
205 define Device/embeddedwireless_dorin
206 ATH_SOC := ar9331
207 DEVICE_TITLE := Embedded Wireless Dorin
208 DEVICE_PACKAGES := kmod-usb-chipidea2
209 IMAGE_SIZE := 16000k
210 endef
211 TARGET_DEVICES += embeddedwireless_dorin
212
213 define Device/etactica_eg200
214 ATH_SOC := ar9331
215 DEVICE_TITLE := eTactica EG200
216 DEVICE_PACKAGES := kmod-usb-chipidea2 kmod-ledtrig-oneshot \
217 kmod-usb-serial kmod-usb-serial-ftdi kmod-usb-storage kmod-fs-ext4
218 SUPPORTED_DEVICES += rme-eg200
219 endef
220 TARGET_DEVICES += etactica_eg200
221
222 define Device/glinet_ar150
223 ATH_SOC := ar9330
224 DEVICE_TITLE := GL.iNet GL-AR150
225 DEVICE_PACKAGES := kmod-usb-chipidea2
226 IMAGE_SIZE := 16000k
227 SUPPORTED_DEVICES += gl-ar150
228 endef
229 TARGET_DEVICES += glinet_ar150
230
231 define Device/glinet_ar300m-nor
232 ATH_SOC := qca9531
233 DEVICE_TITLE := GL.iNet GL-AR300M
234 DEVICE_PACKAGES := kmod-usb-core kmod-usb2
235 IMAGE_SIZE := 16000k
236 SUPPORTED_DEVICES += gl-ar300m
237 endef
238 TARGET_DEVICES += glinet_ar300m-nor
239
240 define Device/glinet_gl-x750
241 ATH_SOC := qca9531
242 DEVICE_TITLE := GL.iNet GL-X750
243 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-ath10k-ct ath10k-firmware-qca9887-ct
244 IMAGE_SIZE := 16000k
245 endef
246 TARGET_DEVICES += glinet_gl-x750
247
248 define Device/iodata_etg3-r
249 ATH_SOC := ar9342
250 DEVICE_TITLE := I-O DATA ETG3-R
251 IMAGE_SIZE := 7680k
252 endef
253 TARGET_DEVICES += iodata_etg3-r
254
255 define Device/iodata_wn-ac1167dgr
256 ATH_SOC := qca9557
257 DEVICE_TITLE := I-O DATA WN-AC1167DGR
258 IMAGE_SIZE := 14656k
259 IMAGES += factory.bin
260 IMAGE/factory.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | \
261 append-rootfs | pad-rootfs | check-size $$$$(IMAGE_SIZE) | \
262 senao-header -r 0x30a -p 0x61 -t 2
263 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-ath10k-ct ath10k-firmware-qca988x-ct
264 endef
265 TARGET_DEVICES += iodata_wn-ac1167dgr
266
267 define Device/iodata_wn-ac1600dgr2
268 ATH_SOC := qca9557
269 DEVICE_TITLE := I-O DATA WN-AC1600DGR2
270 IMAGE_SIZE := 14656k
271 IMAGES += factory.bin
272 IMAGE/factory.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | \
273 append-rootfs | pad-rootfs | check-size $$$$(IMAGE_SIZE) | \
274 senao-header -r 0x30a -p 0x60 -t 2 -v 200
275 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-ath10k-ct ath10k-firmware-qca988x-ct
276 endef
277 TARGET_DEVICES += iodata_wn-ac1600dgr2
278
279 define Device/iodata_wn-ag300dgr
280 ATH_SOC := ar1022
281 DEVICE_TITLE := I-O DATA WN-AG300DGR
282 IMAGE_SIZE := 15424k
283 IMAGES += factory.bin
284 IMAGE/factory.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | \
285 append-rootfs | pad-rootfs | check-size $$$$(IMAGE_SIZE) | \
286 senao-header -r 0x30a -p 0x47 -t 2
287 DEVICE_PACKAGES := kmod-usb-core kmod-usb2
288 endef
289 TARGET_DEVICES += iodata_wn-ag300dgr
290
291 define Device/nec_wg800hp
292 ATH_SOC := qca9563
293 DEVICE_TITLE := NEC Aterm WG800HP
294 IMAGE_SIZE := 7104k
295 IMAGES += factory.bin
296 IMAGE/factory.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | \
297 append-rootfs | pad-rootfs | check-size $$$$(IMAGE_SIZE) | \
298 xor-image -p 6A57190601121E4C004C1E1201061957 -x | \
299 nec-fw LASER_ATERM
300 DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca9887-ct-htt
301 endef
302 TARGET_DEVICES += nec_wg800hp
303
304 define Device/ocedo_koala
305 ATH_SOC := qca9558
306 DEVICE_TITLE := OCEDO Koala
307 DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca988x-ct
308 SUPPORTED_DEVICES += koala
309 IMAGE_SIZE := 7424k
310 IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE)
311 endef
312 TARGET_DEVICES += ocedo_koala
313
314 define Device/ocedo_raccoon
315 ATH_SOC := ar9344
316 DEVICE_TITLE := OCEDO Raccoon
317 IMAGE_SIZE := 7424k
318 IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE)
319 endef
320 TARGET_DEVICES += ocedo_raccoon
321
322 define Device/openmesh_om5p-ac-v2
323 ATH_SOC := qca9558
324 DEVICE_TITLE := OpenMesh OM5P-AC v2
325 DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca988x-ct om-watchdog
326 IMAGE_SIZE := 7808k
327 SUPPORTED_DEVICES += om5p-acv2
328 endef
329 TARGET_DEVICES += openmesh_om5p-ac-v2
330
331 define Device/pcs_cap324
332 ATH_SOC := ar9344
333 DEVICE_TITLE := PowerCloud Systems CAP324
334 IMAGE_SIZE := 16000k
335 SUPPORTED_DEVICES += cap324
336 endef
337 TARGET_DEVICES += pcs_cap324
338
339 define Device/pcs_cr3000
340 ATH_SOC := ar9341
341 DEVICE_TITLE := PowerCloud Systems CR3000
342 IMAGE_SIZE := 7808k
343 SUPPORTED_DEVICES += cr3000
344 endef
345 TARGET_DEVICES += pcs_cr3000
346
347 define Device/pcs_cr5000
348 ATH_SOC := ar9344
349 DEVICE_TITLE := PowerCloud Systems CR5000
350 DEVICE_PACKAGES := kmod-usb2 kmod-usb-core
351 IMAGE_SIZE := 7808k
352 SUPPORTED_DEVICES += cr5000
353 endef
354 TARGET_DEVICES += pcs_cr5000
355
356 define Device/netgear_wndr3x00
357 ATH_SOC := ar7161
358 KERNEL := kernel-bin | append-dtb | lzma -d20 | netgear-uImage lzma
359 IMAGES += factory.img
360 IMAGE/default := append-kernel | pad-to $$$$(BLOCKSIZE) | netgear-squashfs | append-rootfs | pad-rootfs
361 IMAGE/sysupgrade.bin := $$(IMAGE/default) | append-metadata | check-size $$$$(IMAGE_SIZE)
362 IMAGE/factory.img := $$(IMAGE/default) | netgear-dni | check-size $$$$(IMAGE_SIZE)
363 DEVICE_PACKAGES := kmod-usb-core kmod-usb-ohci kmod-usb2 kmod-usb-ledtrig-usbport kmod-leds-reset kmod-owl-loader
364 endef
365
366 define Device/netgear_wndr3700
367 $(Device/netgear_wndr3x00)
368 DEVICE_TITLE := NETGEAR WNDR3700
369 NETGEAR_KERNEL_MAGIC := 0x33373030
370 NETGEAR_BOARD_ID := WNDR3700
371 IMAGE_SIZE := 7680k
372 IMAGES += factory-NA.img
373 IMAGE/factory-NA.img := $$(IMAGE/default) | netgear-dni NA | check-size $$$$(IMAGE_SIZE)
374 SUPPORTED_DEVICES += wndr3700
375 endef
376 TARGET_DEVICES += netgear_wndr3700
377
378 define Device/netgear_wndr3700v2
379 $(Device/netgear_wndr3x00)
380 DEVICE_TITLE := NETGEAR WNDR3700v2
381 NETGEAR_KERNEL_MAGIC := 0x33373031
382 NETGEAR_BOARD_ID := WNDR3700v2
383 NETGEAR_HW_ID := 29763654+16+64
384 IMAGE_SIZE := 15872k
385 SUPPORTED_DEVICES += wndr3700v2
386 endef
387 TARGET_DEVICES += netgear_wndr3700v2
388
389 define Device/pisen_wmm003n
390 $(Device/tplink-8mlzma)
391 ATH_SOC := ar9331
392 DEVICE_TITLE := Pisen WMM003N (Cloud Easy Power)
393 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-chipidea2
394 TPLINK_HWID := 0x07030101
395 endef
396 TARGET_DEVICES += pisen_wmm003n
397
398 define Device/netgear_wndr3800
399 $(Device/netgear_wndr3x00)
400 DEVICE_TITLE := NETGEAR WNDR3800
401 NETGEAR_KERNEL_MAGIC := 0x33373031
402 NETGEAR_BOARD_ID := WNDR3800
403 NETGEAR_HW_ID := 29763654+16+128
404 IMAGE_SIZE := 15872k
405 SUPPORTED_DEVICES += wndr3800
406 endef
407 TARGET_DEVICES += netgear_wndr3800
408
409 define Device/phicomm_k2t
410 ATH_SOC := qca9563
411 DEVICE_TITLE := Phicomm K2T
412 IMAGE_SIZE := 15744k
413 IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE)
414 DEVICE_PACKAGES := kmod-leds-reset kmod-ath10k-ct ath10k-firmware-qca9888-ct
415 endef
416 TARGET_DEVICES += phicomm_k2t
417
418 define Device/rosinson_wr818
419 ATH_SOC := qca9563
420 DEVICE_TITLE := ROSINSON WR818
421 IMAGE_SIZE := 15872k
422 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport
423 endef
424 TARGET_DEVICES += rosinson_wr818
425
426 define Device/wd_mynet-wifi-rangeextender
427 ATH_SOC := ar9344
428 DEVICE_TITLE := Western Digital My Net Wi-Fi Range Extender
429 DEVICE_PACKAGES := rssileds nvram -swconfig
430 IMAGE_SIZE := 7808k
431 ADDPATTERN_ID := mynet-rext
432 ADDPATTERN_VERSION := 1.00.01
433 IMAGE/sysupgrade.bin := append-rootfs | pad-rootfs | cybertan-trx | \
434 addpattern | append-metadata
435 SUPPORTED_DEVICES += mynet-rext
436 endef
437 TARGET_DEVICES += wd_mynet-wifi-rangeextender
438
439 define Device/winchannel_wb2000
440 ATH_SOC := ar9344
441 DEVICE_TITLE := Winchannel WB2000
442 IMAGE_SIZE := 15872k
443 DEVICE_PACKAGES := kmod-i2c-core kmod-i2c-gpio kmod-rtc-ds1307 kmod-usb2 kmod-usb-ledtrig-usbport
444 endef
445 TARGET_DEVICES += winchannel_wb2000