3b7fdb7015fe753be5cf748cd0b78208f2030e30
[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 DEVICE_VARS += SEAMA_SIGNATURE SEAMA_MTDBLOCK
6 DEVICE_VARS += KERNEL_INITRAMFS_PREFIX
7
8 define Build/cybertan-trx
9 @echo -n '' > $@-empty.bin
10 -$(STAGING_DIR_HOST)/bin/trx -o $@.new \
11 -f $(IMAGE_KERNEL) -F $@-empty.bin \
12 -x 32 -a 0x10000 -x -32 -f $@
13 -mv "$@.new" "$@"
14 -rm $@-empty.bin
15 endef
16
17 define Build/addpattern
18 -$(STAGING_DIR_HOST)/bin/addpattern -B $(ADDPATTERN_ID) \
19 -v v$(ADDPATTERN_VERSION) -i $@ -o $@.new
20 -mv "$@.new" "$@"
21 endef
22
23 define Build/add-elecom-factory-initramfs
24 $(eval edimax_model=$(word 1,$(1)))
25 $(eval product=$(word 2,$(1)))
26
27 $(STAGING_DIR_HOST)/bin/mkedimaximg \
28 -b -s CSYS -m $(edimax_model) \
29 -f 0x70000 -S 0x01100000 \
30 -i $@ -o $@.factory
31
32 ( \
33 echo -n -e "ELECOM\x00\x00$(product)" | dd bs=40 count=1 conv=sync; \
34 echo -n "0.00" | dd bs=16 count=1 conv=sync; \
35 dd if=$@.factory; \
36 ) > $@.factory.new
37
38 if [ "$$(stat -c%s $@.factory.new)" -le $$(($(subst k,* 1024,$(subst m, * 1024k,$(IMAGE_SIZE))))) ]; then \
39 mv $@.factory.new $(BIN_DIR)/$(KERNEL_INITRAMFS_PREFIX)-factory.bin; \
40 else \
41 echo "WARNING: initramfs kernel image too big, cannot generate factory image" >&2; \
42 fi
43 endef
44
45 define Build/nec-enc
46 $(STAGING_DIR_HOST)/bin/nec-enc \
47 -i $@ -o $@.new -k $(1)
48 mv $@.new $@
49 endef
50
51 define Build/nec-fw
52 ( stat -c%s $@ | tr -d "\n" | dd bs=16 count=1 conv=sync; ) >> $@
53 ( \
54 echo -n -e "$(1)" | dd bs=16 count=1 conv=sync; \
55 echo -n "0.0.00" | dd bs=16 count=1 conv=sync; \
56 dd if=$@; \
57 ) > $@.new
58 mv $@.new $@
59 endef
60
61 define Device/seama
62 KERNEL := kernel-bin | append-dtb | relocate-kernel | lzma
63 KERNEL_INITRAMFS := $$(KERNEL) | seama
64 IMAGES += factory.bin
65 SEAMA_MTDBLOCK := 1
66
67 # 64 bytes offset:
68 # - 28 bytes seama_header
69 # - 36 bytes of META data (4-bytes aligned)
70 IMAGE/default := append-kernel | pad-offset $$$$(BLOCKSIZE) 64 | append-rootfs
71 IMAGE/sysupgrade.bin := \
72 $$(IMAGE/default) | seama | pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE)
73 IMAGE/factory.bin := \
74 $$(IMAGE/default) | pad-rootfs -x 64 | seama | seama-seal | check-size $$$$(IMAGE_SIZE)
75 SEAMA_SIGNATURE :=
76 endef
77
78 define Device/8dev_carambola2
79 ATH_SOC := ar9331
80 DEVICE_TITLE := 8devices Carambola2
81 DEVICE_PACKAGES := kmod-usb2 kmod-usb-chipidea2
82 IMAGE_SIZE := 16000k
83 SUPPORTED_DEVICES += carambola2
84 endef
85 TARGET_DEVICES += 8dev_carambola2
86
87 define Device/aruba_ap-105
88 ATH_SOC := ar7161
89 DEVICE_TITLE := Aruba AP-105
90 IMAGE_SIZE := 16000k
91 DEVICE_PACKAGES := kmod-i2c-core kmod-i2c-gpio kmod-tpm-i2c-atmel
92 endef
93 TARGET_DEVICES += aruba_ap-105
94
95 define Device/avm_fritz300e
96 ATH_SOC := ar7242
97 DEVICE_TITLE := AVM FRITZ!WLAN Repeater 300E
98 KERNEL := kernel-bin | append-dtb | lzma | eva-image
99 KERNEL_INITRAMFS := $$(KERNEL)
100 IMAGE_SIZE := 15232k
101 IMAGE/sysupgrade.bin := append-kernel | pad-to 64k | \
102 append-squashfs-fakeroot-be | pad-to 256 | \
103 append-rootfs | pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE)
104 DEVICE_PACKAGES := fritz-tffs rssileds -swconfig
105 endef
106 TARGET_DEVICES += avm_fritz300e
107
108 define Device/avm_fritz4020
109 ATH_SOC := qca9561
110 DEVICE_TITLE := AVM FRITZ!Box 4020
111 IMAGE_SIZE := 15232k
112 KERNEL := kernel-bin | append-dtb | lzma | eva-image
113 KERNEL_INITRAMFS := $$(KERNEL)
114 IMAGE/sysupgrade.bin := append-kernel | pad-to 64k | \
115 append-squashfs-fakeroot-be | pad-to 256 | \
116 append-rootfs | pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE)
117 DEVICE_PACKAGES := fritz-tffs
118 SUPPORTED_DEVICES += fritz4020
119 endef
120 TARGET_DEVICES += avm_fritz4020
121
122 define Device/buffalo_bhr-4grv
123 ATH_SOC := ar7242
124 DEVICE_TITLE := Buffalo BHR-4GRV
125 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport
126 IMAGE_SIZE := 32256k
127 IMAGES += factory.bin tftp.bin
128 IMAGE/default := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs | check-size $$$$(IMAGE_SIZE)
129 IMAGE/factory.bin := $$(IMAGE/default) | buffalo-enc BHR-4GRV 1.99 | buffalo-tag BHR-4GRV 3
130 IMAGE/tftp.bin := $$(IMAGE/default) | buffalo-tftp-header
131 SUPPORTED_DEVICES += wzr-hp-g450h
132 endef
133 TARGET_DEVICES += buffalo_bhr-4grv
134
135 define Device/buffalo_bhr-4grv2
136 ATH_SOC := qca9557
137 DEVICE_TITLE := Buffalo BHR-4GRV2
138 IMAGE_SIZE := 16000k
139 endef
140 TARGET_DEVICES += buffalo_bhr-4grv2
141
142 define Device/buffalo_wzr-hp-ag300h
143 ATH_SOC := ar7161
144 DEVICE_TITLE := Buffalo WZR-HP-AG300H
145 IMAGE_SIZE := 32256k
146 IMAGES += factory.bin tftp.bin
147 IMAGE/default := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs | check-size $$$$(IMAGE_SIZE)
148 IMAGE/factory.bin := $$(IMAGE/default) | buffalo-enc WZR-HP-AG300H 1.99 | buffalo-tag WZR-HP-AG300H 3
149 IMAGE/tftp.bin := $$(IMAGE/default) | buffalo-tftp-header
150 DEVICE_PACKAGES := kmod-usb-core kmod-usb-ohci kmod-usb2 kmod-usb-ledtrig-usbport kmod-leds-reset kmod-owl-loader
151 SUPPORTED_DEVICES += wzr-hp-ag300h
152 endef
153 TARGET_DEVICES += buffalo_wzr-hp-ag300h
154
155 define Device/buffalo_wzr-hp-g302h-a1a0
156 ATH_SOC := ar7242
157 DEVICE_TITLE := Buffalo WZR-HP-G302H A1A0
158 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport
159 IMAGE_SIZE := 32128k
160 IMAGES += factory.bin tftp.bin
161 IMAGE/default := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs | check-size $$$$(IMAGE_SIZE)
162 IMAGE/factory.bin := $$(IMAGE/default) | buffalo-enc WZR-HP-G302H 1.99 | buffalo-tag WZR-HP-G302H 4
163 IMAGE/tftp.bin := $$(IMAGE/default) | buffalo-tftp-header
164 SUPPORTED_DEVICES += wzr-hp-g300nh2
165 endef
166 TARGET_DEVICES += buffalo_wzr-hp-g302h-a1a0
167
168 define Device/buffalo_wzr-hp-g450h
169 ATH_SOC := ar7242
170 DEVICE_TITLE := Buffalo WZR-HP-G450H/WZR-450HP
171 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport
172 IMAGE_SIZE := 32256k
173 IMAGES += factory.bin tftp.bin
174 IMAGE/default := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs | check-size $$$$(IMAGE_SIZE)
175 IMAGE/factory.bin := $$(IMAGE/default) | buffalo-enc WZR-HP-G450H 1.99 | buffalo-tag WZR-HP-G450H 3
176 IMAGE/tftp.bin := $$(IMAGE/default) | buffalo-tftp-header
177 SUPPORTED_DEVICES += wzr-hp-g450h
178 endef
179 TARGET_DEVICES += buffalo_wzr-hp-g450h
180
181 define Device/comfast_cf-e110n-v2
182 ATH_SOC := qca9533
183 DEVICE_TITLE := COMFAST CF-E110N v2
184 DEVICE_PACKAGES := rssileds kmod-leds-gpio -swconfig -uboot-envtools
185 IMAGE_SIZE := 16192k
186 endef
187 TARGET_DEVICES += comfast_cf-e110n-v2
188
189 define Device/comfast_cf-e120a-v3
190 ATH_SOC := ar9344
191 DEVICE_TITLE := COMFAST CF-E120A v3
192 DEVICE_PACKAGES := rssileds kmod-leds-gpio -uboot-envtools
193 IMAGE_SIZE := 8000k
194 endef
195 TARGET_DEVICES += comfast_cf-e120a-v3
196
197 define Device/comfast_cf-e5
198 ATH_SOC := qca9531
199 DEVICE_TITLE := COMFAST CF-E5/E7
200 DEVICE_PACKAGES := rssileds kmod-leds-gpio kmod-usb-core kmod-usb2 kmod-usb-net \
201 kmod-usb-net-qmi-wwan -swconfig -uboot-envtools
202 IMAGE_SIZE := 16192k
203 endef
204 TARGET_DEVICES += comfast_cf-e5
205
206 define Device/devolo_dvl1200e
207 ATH_SOC := qca9558
208 DEVICE_TITLE := devolo WiFi pro 1200e
209 DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca988x-ct
210 IMAGE_SIZE := 15936k
211 endef
212 TARGET_DEVICES += devolo_dvl1200e
213
214 define Device/devolo_dvl1200i
215 ATH_SOC := qca9558
216 DEVICE_TITLE := devolo WiFi pro 1200i
217 DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca988x-ct
218 IMAGE_SIZE := 15936k
219 endef
220 TARGET_DEVICES += devolo_dvl1200i
221
222 define Device/devolo_dvl1750c
223 ATH_SOC := qca9558
224 DEVICE_TITLE := devolo WiFi pro 1750c
225 DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca988x-ct
226 IMAGE_SIZE := 15936k
227 endef
228 TARGET_DEVICES += devolo_dvl1750c
229
230 define Device/devolo_dvl1750e
231 ATH_SOC := qca9558
232 DEVICE_TITLE := devolo WiFi pro 1750e
233 DEVICE_PACKAGES := kmod-usb2 kmod-ath10k-ct ath10k-firmware-qca988x-ct
234 IMAGE_SIZE := 15936k
235 endef
236 TARGET_DEVICES += devolo_dvl1750e
237
238 define Device/devolo_dvl1750i
239 ATH_SOC := qca9558
240 DEVICE_TITLE := devolo WiFi pro 1750i
241 DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca988x-ct
242 IMAGE_SIZE := 15936k
243 endef
244 TARGET_DEVICES += devolo_dvl1750i
245
246 define Device/devolo_dvl1750x
247 ATH_SOC := qca9558
248 DEVICE_TITLE := devolo WiFi pro 1750x
249 DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca988x-ct
250 IMAGE_SIZE := 15936k
251 endef
252 TARGET_DEVICES += devolo_dvl1750x
253
254 define Device/dlink_dir-825-b1
255 ATH_SOC := ar7161
256 DEVICE_TITLE := D-LINK DIR-825 B1
257 IMAGE_SIZE := 6208k
258 IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE)
259 DEVICE_PACKAGES := kmod-usb-core kmod-usb-ohci kmod-usb2 kmod-usb-ledtrig-usbport kmod-leds-reset kmod-owl-loader
260 SUPPORTED_DEVICES += dir-825-b1
261 endef
262 TARGET_DEVICES += dlink_dir-825-b1
263
264 define Device/dlink_dir-825-c1
265 ATH_SOC := ar9344
266 DEVICE_TITLE := D-LINK DIR-825 C1
267 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport kmod-leds-reset kmod-owl-loader
268 SUPPORTED_DEVICES += dir-825-c1
269 IMAGE_SIZE := 15936k
270 IMAGES := factory.bin sysupgrade.bin
271 IMAGE/default := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs
272 IMAGE/factory.bin := $$(IMAGE/default) | pad-offset $$$$(IMAGE_SIZE) 26 | \
273 append-string 00DB120AR9344-RT-101214-00 | check-size $$$$(IMAGE_SIZE)
274 IMAGE/sysupgrade.bin := $$(IMAGE/default) | append-metadata | check-size $$$$(IMAGE_SIZE)
275 endef
276 TARGET_DEVICES += dlink_dir-825-c1
277
278 define Device/dlink_dir-835-a1
279 ATH_SOC := ar9344
280 DEVICE_TITLE := D-LINK DIR-835 A1
281 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-leds-reset kmod-owl-loader
282 SUPPORTED_DEVICES += dir-835-a1
283 IMAGE_SIZE := 15936k
284 IMAGES := factory.bin sysupgrade.bin
285 IMAGE/default := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs
286 IMAGE/factory.bin := $$(IMAGE/default) | pad-offset $$$$(IMAGE_SIZE) 26 | \
287 append-string 00DB120AR9344-RT-101214-00 | check-size $$$$(IMAGE_SIZE)
288 IMAGE/sysupgrade.bin := $$(IMAGE/default) | append-metadata | check-size $$$$(IMAGE_SIZE)
289 endef
290 TARGET_DEVICES += dlink_dir-835-a1
291
292 define Device/dlink_dir-859-a1
293 $(Device/seama)
294 ATH_SOC := qca9563
295 DEVICE_TITLE := D-LINK DIR-859 A1
296 IMAGE_SIZE := 15872k
297 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-ath10k-ct ath10k-firmware-qca988x-ct
298 SEAMA_SIGNATURE := wrgac37_dlink.2013gui_dir859
299 SUPPORTED_DEVICES += dir-859-a1
300 endef
301 TARGET_DEVICES += dlink_dir-859-a1
302
303 define Device/elecom_wrc-1750ghbk2-i
304 ATH_SOC := qca9563
305 DEVICE_TITLE := ELECOM WRC-1750GHBK2-I/C
306 IMAGE_SIZE := 15808k
307 KERNEL_INITRAMFS := $$(KERNEL) | pad-to 2 | \
308 add-elecom-factory-initramfs RN68 WRC-1750GHBK2
309 DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca988x-ct
310 endef
311 TARGET_DEVICES += elecom_wrc-1750ghbk2-i
312
313 define Device/elecom_wrc-300ghbk2-i
314 ATH_SOC := qca9563
315 DEVICE_TITLE := ELECOM WRC-300GHBK2-I
316 IMAGE_SIZE := 7616k
317 KERNEL_INITRAMFS := $$(KERNEL) | pad-to 2 | \
318 add-elecom-factory-initramfs RN51 WRC-300GHBK2-I
319 endef
320 TARGET_DEVICES += elecom_wrc-300ghbk2-i
321
322 define Device/embeddedwireless_dorin
323 ATH_SOC := ar9331
324 DEVICE_TITLE := Embedded Wireless Dorin
325 DEVICE_PACKAGES := kmod-usb-chipidea2
326 IMAGE_SIZE := 16000k
327 endef
328 TARGET_DEVICES += embeddedwireless_dorin
329
330 define Device/engenius_ecb1750
331 ATH_SOC := qca9558
332 DEVICE_TITLE := EnGenius ECB1750
333 DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca988x-ct
334 IMAGE_SIZE := 15680k
335 IMAGE/factory.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | \
336 append-rootfs | pad-rootfs | check-size $$$$(IMAGE_SIZE) | \
337 senao-header -r 0x101 -p 0x6d -t 2
338 IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE)
339 endef
340 TARGET_DEVICES += engenius_ecb1750
341
342 define Device/engenius_epg5000
343 ATH_SOC := qca9558
344 DEVICE_TITLE := EnGenius EPG5000
345 DEVICE_PACKAGES := ath10k-firmware-qca988x-ct kmod-ath10k-ct kmod-usb2
346 IMAGE_SIZE := 14656k
347 IMAGES += factory.dlf
348 IMAGE/factory.dlf := append-kernel | pad-to $$$$(BLOCKSIZE) | \
349 append-rootfs | pad-rootfs | check-size $$$$(IMAGE_SIZE) | \
350 senao-header -r 0x101 -p 0x71 -t 2
351 SUPPORTED_DEVICES += epg5000
352 endef
353 TARGET_DEVICES += engenius_epg5000
354
355 define Device/engenius_ews511ap
356 ATH_SOC := qca9531
357 DEVICE_TITLE := EnGenius EWS511AP
358 DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca9887-ct
359 IMAGE_SIZE := 16000k
360 endef
361 TARGET_DEVICES += engenius_ews511ap
362
363 define Device/etactica_eg200
364 ATH_SOC := ar9331
365 DEVICE_TITLE := eTactica EG200
366 DEVICE_PACKAGES := kmod-usb-chipidea2 kmod-ledtrig-oneshot \
367 kmod-usb-serial kmod-usb-serial-ftdi kmod-usb-storage kmod-fs-ext4
368 SUPPORTED_DEVICES += rme-eg200
369 endef
370 TARGET_DEVICES += etactica_eg200
371
372 define Device/glinet_gl-ar150
373 ATH_SOC := ar9330
374 DEVICE_TITLE := GL.iNet GL-AR150
375 DEVICE_PACKAGES := kmod-usb-chipidea2
376 IMAGE_SIZE := 16000k
377 SUPPORTED_DEVICES += gl-ar150
378 endef
379 TARGET_DEVICES += glinet_gl-ar150
380
381 define Device/glinet_gl-ar300m-common-nor
382 ATH_SOC := qca9531
383 DEVICE_PACKAGES := kmod-usb-core kmod-usb2
384 IMAGE_SIZE := 16000k
385 SUPPORTED_DEVICES += gl-ar300m
386 endef
387
388 define Device/glinet_gl-ar300m-lite
389 $(Device/glinet_gl-ar300m-common-nor)
390 DEVICE_TITLE := GL.iNet GL-AR300M-Lite
391 endef
392 TARGET_DEVICES += glinet_gl-ar300m-lite
393
394 define Device/glinet_gl-ar300m-nor
395 $(Device/glinet_gl-ar300m-common-nor)
396 DEVICE_TITLE := GL.iNet GL-AR300M
397 endef
398 TARGET_DEVICES += glinet_gl-ar300m-nor
399
400 define Device/glinet_gl-ar750s
401 ATH_SOC := qca9563
402 DEVICE_TITLE := GL.iNet GL-AR750S
403 DEVICE_PACKAGES := kmod-usb2 kmod-ath10k-ct ath10k-firmware-qca9887-ct block-mount
404 IMAGE_SIZE := 16000k
405 SUPPORTED_DEVICES += gl-ar750s
406 endef
407 TARGET_DEVICES += glinet_gl-ar750s
408
409 define Device/glinet_gl-x750
410 ATH_SOC := qca9531
411 DEVICE_TITLE := GL.iNet GL-X750
412 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-ath10k-ct ath10k-firmware-qca9887-ct
413 IMAGE_SIZE := 16000k
414 endef
415 TARGET_DEVICES += glinet_gl-x750
416
417 define Device/iodata_etg3-r
418 ATH_SOC := ar9342
419 DEVICE_TITLE := I-O DATA ETG3-R
420 IMAGE_SIZE := 7680k
421 DEVICE_PACKAGES := -iwinfo -kmod-ath9k -wpad-basic
422 endef
423 TARGET_DEVICES += iodata_etg3-r
424
425 define Device/iodata_wn-ac1167dgr
426 ATH_SOC := qca9557
427 DEVICE_TITLE := I-O DATA WN-AC1167DGR
428 IMAGE_SIZE := 14656k
429 IMAGES += factory.bin
430 IMAGE/factory.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | \
431 append-rootfs | pad-rootfs | check-size $$$$(IMAGE_SIZE) | \
432 senao-header -r 0x30a -p 0x61 -t 2
433 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-ath10k-ct ath10k-firmware-qca988x-ct
434 endef
435 TARGET_DEVICES += iodata_wn-ac1167dgr
436
437 define Device/iodata_wn-ac1600dgr
438 ATH_SOC := qca9557
439 DEVICE_TITLE := I-O DATA WN-AC1600DGR
440 IMAGE_SIZE := 14656k
441 IMAGES += factory.bin
442 IMAGE/factory.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | \
443 append-rootfs | pad-rootfs | check-size $$$$(IMAGE_SIZE) | \
444 senao-header -r 0x30a -p 0x60 -t 2 -v 200
445 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-ath10k-ct ath10k-firmware-qca988x-ct
446 endef
447 TARGET_DEVICES += iodata_wn-ac1600dgr
448
449 define Device/iodata_wn-ac1600dgr2
450 ATH_SOC := qca9557
451 DEVICE_TITLE := I-O DATA WN-AC1600DGR2
452 IMAGE_SIZE := 14656k
453 IMAGES += factory.bin
454 IMAGE/factory.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | \
455 append-rootfs | pad-rootfs | check-size $$$$(IMAGE_SIZE) | \
456 senao-header -r 0x30a -p 0x60 -t 2 -v 200
457 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-ath10k-ct ath10k-firmware-qca988x-ct
458 endef
459 TARGET_DEVICES += iodata_wn-ac1600dgr2
460
461 define Device/iodata_wn-ag300dgr
462 ATH_SOC := ar1022
463 DEVICE_TITLE := I-O DATA WN-AG300DGR
464 IMAGE_SIZE := 15424k
465 IMAGES += factory.bin
466 IMAGE/factory.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | \
467 append-rootfs | pad-rootfs | check-size $$$$(IMAGE_SIZE) | \
468 senao-header -r 0x30a -p 0x47 -t 2
469 DEVICE_PACKAGES := kmod-usb-core kmod-usb2
470 endef
471 TARGET_DEVICES += iodata_wn-ag300dgr
472
473 define Device/jjplus_ja76pf2
474 ATH_SOC := ar7161
475 DEVICE_TITLE := jjPlus JA76PF2
476 DEVICE_PACKAGES += -kmod-ath9k -swconfig -wpad-mini -uboot-envtools fconfig
477 IMAGE/sysupgrade.bin := append-rootfs | pad-rootfs | combined-image | append-metadata | check-size $$$$(IMAGE_SIZE)
478 # IMAGE/sysupgrade.bin := append-rootfs | pad-rootfs | check-size $$$$(IMAGE_SIZE) | sysupgrade-tar rootfs=$$$$@ | append-metadata
479 KERNEL := kernel-bin | append-dtb | lzma | pad-to $$(BLOCKSIZE)
480 KERNEL_INITRAMFS := kernel-bin | append-dtb
481 IMAGE_SIZE := 16000k
482 SUPPORTED_DEVICES += ja76pf2
483 endef
484 TARGET_DEVICES += jjplus_ja76pf2
485
486 define Device/librerouter_librerouter-v1
487 ATH_SOC := qca9558
488 DEVICE_TITLE := LibreRouter v1
489 IMAGE_SIZE := 7936k
490 DEVICE_PACKAGES := kmod-usb-core kmod-usb2
491 endef
492 TARGET_DEVICES += librerouter_librerouter-v1
493
494 define Device/nec_wg1200cr
495 ATH_SOC := qca9563
496 DEVICE_TITLE := NEC Aterm WG1200CR
497 IMAGE_SIZE := 7616k
498 SEAMA_MTDBLOCK := 6
499 SEAMA_SIGNATURE := wrgac72_necpf.2016gui_wg1200cr
500 IMAGES += factory.bin
501 IMAGE/default := \
502 append-kernel | pad-offset $$$$(BLOCKSIZE) 64 | append-rootfs
503 IMAGE/sysupgrade.bin := \
504 $$(IMAGE/default) | seama | pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE)
505 IMAGE/factory.bin := \
506 $$(IMAGE/default) | pad-rootfs -x 64 | seama | seama-seal | nec-enc 9gsiy9nzep452pad | \
507 check-size $$$$(IMAGE_SIZE)
508 DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca9888-ct
509 endef
510 TARGET_DEVICES += nec_wg1200cr
511
512 define Device/nec_wg800hp
513 ATH_SOC := qca9563
514 DEVICE_TITLE := NEC Aterm WG800HP
515 IMAGE_SIZE := 7104k
516 IMAGES += factory.bin
517 IMAGE/factory.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | \
518 append-rootfs | pad-rootfs | check-size $$$$(IMAGE_SIZE) | \
519 xor-image -p 6A57190601121E4C004C1E1201061957 -x | \
520 nec-fw LASER_ATERM
521 DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca9887-ct-htt
522 endef
523 TARGET_DEVICES += nec_wg800hp
524
525 define Device/ocedo_koala
526 ATH_SOC := qca9558
527 DEVICE_TITLE := OCEDO Koala
528 DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca988x-ct
529 SUPPORTED_DEVICES += koala
530 IMAGE_SIZE := 7424k
531 IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE)
532 endef
533 TARGET_DEVICES += ocedo_koala
534
535 define Device/ocedo_raccoon
536 ATH_SOC := ar9344
537 DEVICE_TITLE := OCEDO Raccoon
538 IMAGE_SIZE := 7424k
539 IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE)
540 endef
541 TARGET_DEVICES += ocedo_raccoon
542
543 define Device/ocedo_ursus
544 ATH_SOC := qca9558
545 DEVICE_TITLE := OCEDO Ursus
546 DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca988x-ct
547 IMAGE_SIZE := 7424k
548 IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE)
549 endef
550 TARGET_DEVICES += ocedo_ursus
551
552 define Device/openmesh_om5p-ac-v2
553 ATH_SOC := qca9558
554 DEVICE_TITLE := OpenMesh OM5P-AC v2
555 DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca988x-ct om-watchdog
556 IMAGE_SIZE := 7808k
557 SUPPORTED_DEVICES += om5p-acv2
558 endef
559 TARGET_DEVICES += openmesh_om5p-ac-v2
560
561 define Device/pcs_cap324
562 ATH_SOC := ar9344
563 DEVICE_TITLE := PowerCloud Systems CAP324
564 IMAGE_SIZE := 16000k
565 SUPPORTED_DEVICES += cap324
566 endef
567 TARGET_DEVICES += pcs_cap324
568
569 define Device/pcs_cr3000
570 ATH_SOC := ar9341
571 DEVICE_TITLE := PowerCloud Systems CR3000
572 IMAGE_SIZE := 7808k
573 SUPPORTED_DEVICES += cr3000
574 endef
575 TARGET_DEVICES += pcs_cr3000
576
577 define Device/pcs_cr5000
578 ATH_SOC := ar9344
579 DEVICE_TITLE := PowerCloud Systems CR5000
580 DEVICE_PACKAGES := kmod-usb2 kmod-usb-core
581 IMAGE_SIZE := 7808k
582 SUPPORTED_DEVICES += cr5000
583 endef
584 TARGET_DEVICES += pcs_cr5000
585
586 define Device/netgear_wndr3x00
587 ATH_SOC := ar7161
588 IMAGE/default := append-kernel | pad-to $$$$(BLOCKSIZE) | netgear-squashfs | append-rootfs | pad-rootfs
589 DEVICE_PACKAGES := kmod-usb-core kmod-usb-ohci kmod-usb2 kmod-usb-ledtrig-usbport kmod-leds-reset kmod-owl-loader
590 $(Device/netgear_ath79)
591 endef
592
593 define Device/netgear_ex7300_ex6400
594 ATH_SOC := qca9558
595 NETGEAR_KERNEL_MAGIC := 0x27051956
596 NETGEAR_BOARD_ID := EX7300series
597 NETGEAR_HW_ID := 29765104+16+0+128
598 IMAGE_SIZE := 15552k
599 IMAGE/default := append-kernel | pad-offset $$$$(BLOCKSIZE) 64 | netgear-rootfs | pad-rootfs
600 DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca99x0-ct
601 $(Device/netgear_ath79)
602 endef
603
604 define Device/netgear_ex6400
605 $(Device/netgear_ex7300_ex6400)
606 DEVICE_TITLE := NETGEAR EX6400
607 endef
608 TARGET_DEVICES += netgear_ex6400
609
610 define Device/netgear_ex7300
611 $(Device/netgear_ex7300_ex6400)
612 DEVICE_TITLE := NETGEAR EX7300
613 endef
614 TARGET_DEVICES += netgear_ex7300
615
616 define Device/netgear_wndr3700
617 $(Device/netgear_wndr3x00)
618 DEVICE_TITLE := NETGEAR WNDR3700
619 NETGEAR_KERNEL_MAGIC := 0x33373030
620 NETGEAR_BOARD_ID := WNDR3700
621 IMAGE_SIZE := 7680k
622 IMAGES += factory-NA.img
623 IMAGE/factory-NA.img := $$(IMAGE/default) | netgear-dni NA | check-size $$$$(IMAGE_SIZE)
624 SUPPORTED_DEVICES += wndr3700
625 endef
626 TARGET_DEVICES += netgear_wndr3700
627
628 define Device/netgear_wndr3700v2
629 $(Device/netgear_wndr3x00)
630 DEVICE_TITLE := NETGEAR WNDR3700v2
631 NETGEAR_KERNEL_MAGIC := 0x33373031
632 NETGEAR_BOARD_ID := WNDR3700v2
633 NETGEAR_HW_ID := 29763654+16+64
634 IMAGE_SIZE := 15872k
635 SUPPORTED_DEVICES += wndr3700v2
636 endef
637 TARGET_DEVICES += netgear_wndr3700v2
638
639 define Device/pisen_wmm003n
640 $(Device/tplink-8mlzma)
641 ATH_SOC := ar9331
642 DEVICE_TITLE := Pisen WMM003N (Cloud Easy Power)
643 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-chipidea2
644 TPLINK_HWID := 0x07030101
645 endef
646 TARGET_DEVICES += pisen_wmm003n
647
648 define Device/netgear_wndr3800
649 $(Device/netgear_wndr3x00)
650 DEVICE_TITLE := NETGEAR WNDR3800
651 NETGEAR_KERNEL_MAGIC := 0x33373031
652 NETGEAR_BOARD_ID := WNDR3800
653 NETGEAR_HW_ID := 29763654+16+128
654 IMAGE_SIZE := 15872k
655 SUPPORTED_DEVICES += wndr3800
656 endef
657 TARGET_DEVICES += netgear_wndr3800
658
659 define Device/phicomm_k2t
660 ATH_SOC := qca9563
661 DEVICE_TITLE := Phicomm K2T
662 IMAGE_SIZE := 15744k
663 IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE)
664 DEVICE_PACKAGES := kmod-leds-reset kmod-ath10k-ct ath10k-firmware-qca9888-ct
665 endef
666 TARGET_DEVICES += phicomm_k2t
667
668 define Device/rosinson_wr818
669 ATH_SOC := qca9563
670 DEVICE_TITLE := ROSINSON WR818
671 IMAGE_SIZE := 15872k
672 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport
673 endef
674 TARGET_DEVICES += rosinson_wr818
675
676 define Device/wd_mynet-n750
677 $(Device/seama)
678 ATH_SOC := ar9344
679 DEVICE_TITLE := Western Digital My Net N750
680 IMAGE_SIZE := 15872k
681 DEVICE_PACKAGES := kmod-usb-core kmod-usb2
682 SEAMA_SIGNATURE := wrgnd13_wd_av
683 SUPPORTED_DEVICES += mynet-n750
684 endef
685 TARGET_DEVICES += wd_mynet-n750
686
687 define Device/wd_mynet-wifi-rangeextender
688 ATH_SOC := ar9344
689 DEVICE_TITLE := Western Digital My Net Wi-Fi Range Extender
690 DEVICE_PACKAGES := rssileds nvram -swconfig
691 IMAGE_SIZE := 7808k
692 ADDPATTERN_ID := mynet-rext
693 ADDPATTERN_VERSION := 1.00.01
694 IMAGE/sysupgrade.bin := append-rootfs | pad-rootfs | cybertan-trx | \
695 addpattern | append-metadata
696 SUPPORTED_DEVICES += mynet-rext
697 endef
698 TARGET_DEVICES += wd_mynet-wifi-rangeextender
699
700 define Device/winchannel_wb2000
701 ATH_SOC := ar9344
702 DEVICE_TITLE := Winchannel WB2000
703 IMAGE_SIZE := 15872k
704 DEVICE_PACKAGES := kmod-i2c-core kmod-i2c-gpio kmod-rtc-ds1307 kmod-usb2 kmod-usb-ledtrig-usbport
705 endef
706 TARGET_DEVICES += winchannel_wb2000
707
708 define Device/xiaomi_mi-router-4q
709 ATH_SOC := qca9561
710 DEVICE_TITLE := Xiaomi Mi Router 4Q
711 IMAGE_SIZE := 14336k
712 endef
713 TARGET_DEVICES += xiaomi_mi-router-4q
714
715 define Device/yuncore_a770
716 ATH_SOC := qca9531
717 DEVICE_TITLE := YunCore A770
718 DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca9887-ct
719 IMAGE_SIZE := 16000k
720 endef
721 TARGET_DEVICES += yuncore_a770
722
723 define Device/zbtlink_zbt-wd323
724 ATH_SOC := ar9344
725 DEVICE_TITLE := ZBT WD323
726 IMAGE_SIZE := 16000k
727 DEVICE_PACKAGES := kmod-usb2 kmod-i2c-core kmod-i2c-gpio kmod-rtc-pcf8563 \
728 kmod-usb-serial kmod-usb-serial-cp210x uqmi
729 endef
730 TARGET_DEVICES += zbtlink_zbt-wd323