ath79: add support for LibreRouter v1
[openwrt/staging/dedeckeh.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-fw
46 ( stat -c%s $@ | tr -d "\n" | dd bs=16 count=1 conv=sync; ) >> $@
47 ( \
48 echo -n -e "$(1)" | dd bs=16 count=1 conv=sync; \
49 echo -n "0.0.00" | dd bs=16 count=1 conv=sync; \
50 dd if=$@; \
51 ) > $@.new
52 mv $@.new $@
53 endef
54
55 define Device/seama
56 KERNEL := kernel-bin | append-dtb | relocate-kernel | lzma
57 KERNEL_INITRAMFS := $$(KERNEL) | seama
58 IMAGES += factory.bin
59 SEAMA_MTDBLOCK := 1
60
61 # 64 bytes offset:
62 # - 28 bytes seama_header
63 # - 36 bytes of META data (4-bytes aligned)
64 IMAGE/default := append-kernel | pad-offset $$$$(BLOCKSIZE) 64 | append-rootfs
65 IMAGE/sysupgrade.bin := \
66 $$(IMAGE/default) | seama | pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE)
67 IMAGE/factory.bin := \
68 $$(IMAGE/default) | pad-rootfs -x 64 | seama | seama-seal | check-size $$$$(IMAGE_SIZE)
69 SEAMA_SIGNATURE :=
70 endef
71
72 define Device/avm_fritz300e
73 ATH_SOC := ar7242
74 DEVICE_TITLE := AVM FRITZ!WLAN Repeater 300E
75 KERNEL := kernel-bin | append-dtb | lzma | eva-image
76 KERNEL_INITRAMFS := $$(KERNEL)
77 IMAGE_SIZE := 15232k
78 IMAGE/sysupgrade.bin := append-kernel | pad-to 64k | \
79 append-squashfs-fakeroot-be | pad-to 256 | \
80 append-rootfs | pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE)
81 DEVICE_PACKAGES := fritz-tffs rssileds -swconfig
82 endef
83 TARGET_DEVICES += avm_fritz300e
84
85 define Device/avm_fritz4020
86 ATH_SOC := qca9561
87 DEVICE_TITLE := AVM FRITZ!Box 4020
88 IMAGE_SIZE := 15232k
89 KERNEL := kernel-bin | append-dtb | lzma | eva-image
90 KERNEL_INITRAMFS := $$(KERNEL)
91 IMAGE/sysupgrade.bin := append-kernel | pad-to 64k | \
92 append-squashfs-fakeroot-be | pad-to 256 | \
93 append-rootfs | pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE)
94 DEVICE_PACKAGES := fritz-tffs
95 SUPPORTED_DEVICES += fritz4020
96 endef
97 TARGET_DEVICES += avm_fritz4020
98
99 define Device/buffalo_bhr-4grv
100 ATH_SOC := ar7242
101 DEVICE_TITLE := Buffalo BHR-4GRV
102 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport
103 IMAGE_SIZE := 32256k
104 IMAGES += factory.bin tftp.bin
105 IMAGE/default := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs | check-size $$$$(IMAGE_SIZE)
106 IMAGE/factory.bin := $$(IMAGE/default) | buffalo-enc BHR-4GRV 1.99 | buffalo-tag BHR-4GRV 3
107 IMAGE/tftp.bin := $$(IMAGE/default) | buffalo-tftp-header
108 SUPPORTED_DEVICES += wzr-hp-g450h
109 endef
110 TARGET_DEVICES += buffalo_bhr-4grv
111
112 define Device/buffalo_bhr-4grv2
113 ATH_SOC := qca9557
114 DEVICE_TITLE := Buffalo BHR-4GRV2
115 IMAGE_SIZE := 16000k
116 endef
117 TARGET_DEVICES += buffalo_bhr-4grv2
118
119 define Device/buffalo_wzr-hp-ag300h
120 ATH_SOC := ar7161
121 DEVICE_TITLE := Buffalo WZR-HP-AG300H
122 IMAGE_SIZE := 32256k
123 IMAGES += factory.bin tftp.bin
124 IMAGE/default := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs | check-size $$$$(IMAGE_SIZE)
125 IMAGE/factory.bin := $$(IMAGE/default) | buffalo-enc WZR-HP-AG300H 1.99 | buffalo-tag WZR-HP-AG300H 3
126 IMAGE/tftp.bin := $$(IMAGE/default) | buffalo-tftp-header
127 DEVICE_PACKAGES := kmod-usb-core kmod-usb-ohci kmod-usb2 kmod-usb-ledtrig-usbport kmod-leds-reset kmod-owl-loader
128 SUPPORTED_DEVICES += wzr-hp-ag300h
129 endef
130 TARGET_DEVICES += buffalo_wzr-hp-ag300h
131
132 define Device/buffalo_wzr-hp-g302h-a1a0
133 ATH_SOC := ar7242
134 DEVICE_TITLE := Buffalo WZR-HP-G302H A1A0
135 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport
136 IMAGE_SIZE := 32128k
137 IMAGES += factory.bin tftp.bin
138 IMAGE/default := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs | check-size $$$$(IMAGE_SIZE)
139 IMAGE/factory.bin := $$(IMAGE/default) | buffalo-enc WZR-HP-G302H 1.99 | buffalo-tag WZR-HP-G302H 4
140 IMAGE/tftp.bin := $$(IMAGE/default) | buffalo-tftp-header
141 SUPPORTED_DEVICES += wzr-hp-g300nh2
142 endef
143 TARGET_DEVICES += buffalo_wzr-hp-g302h-a1a0
144
145 define Device/buffalo_wzr-hp-g450h
146 ATH_SOC := ar7242
147 DEVICE_TITLE := Buffalo WZR-HP-G450H/WZR-450HP
148 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport
149 IMAGE_SIZE := 32256k
150 IMAGES += factory.bin tftp.bin
151 IMAGE/default := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs | check-size $$$$(IMAGE_SIZE)
152 IMAGE/factory.bin := $$(IMAGE/default) | buffalo-enc WZR-HP-G450H 1.99 | buffalo-tag WZR-HP-G450H 3
153 IMAGE/tftp.bin := $$(IMAGE/default) | buffalo-tftp-header
154 SUPPORTED_DEVICES += wzr-hp-g450h
155 endef
156 TARGET_DEVICES += buffalo_wzr-hp-g450h
157
158 define Device/comfast_cf-e110n-v2
159 ATH_SOC := qca9533
160 DEVICE_TITLE := COMFAST CF-E110N v2
161 DEVICE_PACKAGES := rssileds kmod-leds-gpio -swconfig -uboot-envtools
162 IMAGE_SIZE := 16192k
163 endef
164 TARGET_DEVICES += comfast_cf-e110n-v2
165
166 define Device/comfast_cf-e120a-v3
167 ATH_SOC := ar9344
168 DEVICE_TITLE := COMFAST CF-E120A v3
169 DEVICE_PACKAGES := rssileds kmod-leds-gpio -uboot-envtools
170 IMAGE_SIZE := 8000k
171 endef
172 TARGET_DEVICES += comfast_cf-e120a-v3
173
174 define Device/devolo_dvl1200e
175 ATH_SOC := qca9558
176 DEVICE_TITLE := devolo WiFi pro 1200e
177 DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca988x-ct
178 IMAGE_SIZE := 15936k
179 endef
180 TARGET_DEVICES += devolo_dvl1200e
181
182 define Device/devolo_dvl1200i
183 ATH_SOC := qca9558
184 DEVICE_TITLE := devolo WiFi pro 1200i
185 DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca988x-ct
186 IMAGE_SIZE := 15936k
187 endef
188 TARGET_DEVICES += devolo_dvl1200i
189
190 define Device/devolo_dvl1750c
191 ATH_SOC := qca9558
192 DEVICE_TITLE := devolo WiFi pro 1750c
193 DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca988x-ct
194 IMAGE_SIZE := 15936k
195 endef
196 TARGET_DEVICES += devolo_dvl1750c
197
198 define Device/devolo_dvl1750e
199 ATH_SOC := qca9558
200 DEVICE_TITLE := devolo WiFi pro 1750e
201 DEVICE_PACKAGES := kmod-usb2 kmod-ath10k-ct ath10k-firmware-qca988x-ct
202 IMAGE_SIZE := 15936k
203 endef
204 TARGET_DEVICES += devolo_dvl1750e
205
206 define Device/devolo_dvl1750i
207 ATH_SOC := qca9558
208 DEVICE_TITLE := devolo WiFi pro 1750i
209 DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca988x-ct
210 IMAGE_SIZE := 15936k
211 endef
212 TARGET_DEVICES += devolo_dvl1750i
213
214 define Device/dlink_dir-825-b1
215 ATH_SOC := ar7161
216 DEVICE_TITLE := D-LINK DIR-825 B1
217 IMAGE_SIZE := 6208k
218 IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE)
219 DEVICE_PACKAGES := kmod-usb-core kmod-usb-ohci kmod-usb2 kmod-usb-ledtrig-usbport kmod-leds-reset kmod-owl-loader
220 SUPPORTED_DEVICES += dir-825-b1
221 endef
222 TARGET_DEVICES += dlink_dir-825-b1
223
224 define Device/dlink_dir-825-c1
225 ATH_SOC := ar9344
226 DEVICE_TITLE := D-LINK DIR-825 C1
227 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport kmod-leds-reset kmod-owl-loader
228 SUPPORTED_DEVICES += dir-825-c1
229 IMAGE_SIZE := 15936k
230 IMAGES := factory.bin sysupgrade.bin
231 IMAGE/default := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs
232 IMAGE/factory.bin := $$(IMAGE/default) | pad-offset $$$$(IMAGE_SIZE) 26 | \
233 append-string 00DB120AR9344-RT-101214-00 | check-size $$$$(IMAGE_SIZE)
234 IMAGE/sysupgrade.bin := $$(IMAGE/default) | append-metadata | check-size $$$$(IMAGE_SIZE)
235 endef
236 TARGET_DEVICES += dlink_dir-825-c1
237
238 define Device/dlink_dir-835-a1
239 ATH_SOC := ar9344
240 DEVICE_TITLE := D-LINK DIR-835 A1
241 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-leds-reset kmod-owl-loader
242 SUPPORTED_DEVICES += dir-835-a1
243 IMAGE_SIZE := 15936k
244 IMAGES := factory.bin sysupgrade.bin
245 IMAGE/default := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs
246 IMAGE/factory.bin := $$(IMAGE/default) | pad-offset $$$$(IMAGE_SIZE) 26 | \
247 append-string 00DB120AR9344-RT-101214-00 | check-size $$$$(IMAGE_SIZE)
248 IMAGE/sysupgrade.bin := $$(IMAGE/default) | append-metadata | check-size $$$$(IMAGE_SIZE)
249 endef
250 TARGET_DEVICES += dlink_dir-835-a1
251
252 define Device/dlink_dir-859-a1
253 $(Device/seama)
254 ATH_SOC := qca9563
255 DEVICE_TITLE := D-LINK DIR-859 A1
256 IMAGE_SIZE := 15872k
257 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-ath10k-ct ath10k-firmware-qca988x-ct
258 SEAMA_SIGNATURE := wrgac37_dlink.2013gui_dir859
259 SUPPORTED_DEVICES += dir-859-a1
260 endef
261 TARGET_DEVICES += dlink_dir-859-a1
262
263 define Device/elecom_wrc-1750ghbk2-i
264 ATH_SOC := qca9563
265 DEVICE_TITLE := ELECOM WRC-1750GHBK2-I/C
266 IMAGE_SIZE := 15808k
267 KERNEL_INITRAMFS := $$(KERNEL) | pad-to 2 | \
268 add-elecom-factory-initramfs RN68 WRC-1750GHBK2
269 DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca988x-ct
270 endef
271 TARGET_DEVICES += elecom_wrc-1750ghbk2-i
272
273 define Device/elecom_wrc-300ghbk2-i
274 ATH_SOC := qca9563
275 DEVICE_TITLE := ELECOM WRC-300GHBK2-I
276 IMAGE_SIZE := 7616k
277 KERNEL_INITRAMFS := $$(KERNEL) | pad-to 2 | \
278 add-elecom-factory-initramfs RN51 WRC-300GHBK2-I
279 endef
280 TARGET_DEVICES += elecom_wrc-300ghbk2-i
281
282 define Device/embeddedwireless_dorin
283 ATH_SOC := ar9331
284 DEVICE_TITLE := Embedded Wireless Dorin
285 DEVICE_PACKAGES := kmod-usb-chipidea2
286 IMAGE_SIZE := 16000k
287 endef
288 TARGET_DEVICES += embeddedwireless_dorin
289
290 define Device/engenius_ews511ap
291 ATH_SOC := qca9531
292 DEVICE_TITLE := EnGenius EWS511AP
293 DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca9887-ct
294 IMAGE_SIZE := 16000k
295 endef
296 TARGET_DEVICES += engenius_ews511ap
297
298 define Device/etactica_eg200
299 ATH_SOC := ar9331
300 DEVICE_TITLE := eTactica EG200
301 DEVICE_PACKAGES := kmod-usb-chipidea2 kmod-ledtrig-oneshot \
302 kmod-usb-serial kmod-usb-serial-ftdi kmod-usb-storage kmod-fs-ext4
303 SUPPORTED_DEVICES += rme-eg200
304 endef
305 TARGET_DEVICES += etactica_eg200
306
307 define Device/glinet_gl-ar150
308 ATH_SOC := ar9330
309 DEVICE_TITLE := GL.iNet GL-AR150
310 DEVICE_PACKAGES := kmod-usb-chipidea2
311 IMAGE_SIZE := 16000k
312 SUPPORTED_DEVICES += gl-ar150
313 endef
314 TARGET_DEVICES += glinet_gl-ar150
315
316 define Device/glinet_gl-ar300m-nor
317 ATH_SOC := qca9531
318 DEVICE_TITLE := GL.iNet GL-AR300M
319 DEVICE_PACKAGES := kmod-usb-core kmod-usb2
320 IMAGE_SIZE := 16000k
321 SUPPORTED_DEVICES += gl-ar300m
322 endef
323 TARGET_DEVICES += glinet_gl-ar300m-nor
324
325 define Device/glinet_gl-ar750s
326 ATH_SOC := qca9563
327 DEVICE_TITLE := GL.iNet GL-AR750S
328 DEVICE_PACKAGES := kmod-usb2 kmod-ath10k-ct ath10k-firmware-qca988x-ct
329 IMAGE_SIZE := 16000k
330 SUPPORTED_DEVICES += gl-ar750s
331 endef
332 TARGET_DEVICES += glinet_gl-ar750s
333
334 define Device/glinet_gl-x750
335 ATH_SOC := qca9531
336 DEVICE_TITLE := GL.iNet GL-X750
337 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-ath10k-ct ath10k-firmware-qca9887-ct
338 IMAGE_SIZE := 16000k
339 endef
340 TARGET_DEVICES += glinet_gl-x750
341
342 define Device/iodata_etg3-r
343 ATH_SOC := ar9342
344 DEVICE_TITLE := I-O DATA ETG3-R
345 IMAGE_SIZE := 7680k
346 endef
347 TARGET_DEVICES += iodata_etg3-r
348
349 define Device/iodata_wn-ac1167dgr
350 ATH_SOC := qca9557
351 DEVICE_TITLE := I-O DATA WN-AC1167DGR
352 IMAGE_SIZE := 14656k
353 IMAGES += factory.bin
354 IMAGE/factory.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | \
355 append-rootfs | pad-rootfs | check-size $$$$(IMAGE_SIZE) | \
356 senao-header -r 0x30a -p 0x61 -t 2
357 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-ath10k-ct ath10k-firmware-qca988x-ct
358 endef
359 TARGET_DEVICES += iodata_wn-ac1167dgr
360
361 define Device/iodata_wn-ac1600dgr
362 ATH_SOC := qca9557
363 DEVICE_TITLE := I-O DATA WN-AC1600DGR
364 IMAGE_SIZE := 14656k
365 IMAGES += factory.bin
366 IMAGE/factory.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | \
367 append-rootfs | pad-rootfs | check-size $$$$(IMAGE_SIZE) | \
368 senao-header -r 0x30a -p 0x60 -t 2 -v 200
369 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-ath10k-ct ath10k-firmware-qca988x-ct
370 endef
371 TARGET_DEVICES += iodata_wn-ac1600dgr
372
373 define Device/iodata_wn-ac1600dgr2
374 ATH_SOC := qca9557
375 DEVICE_TITLE := I-O DATA WN-AC1600DGR2
376 IMAGE_SIZE := 14656k
377 IMAGES += factory.bin
378 IMAGE/factory.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | \
379 append-rootfs | pad-rootfs | check-size $$$$(IMAGE_SIZE) | \
380 senao-header -r 0x30a -p 0x60 -t 2 -v 200
381 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-ath10k-ct ath10k-firmware-qca988x-ct
382 endef
383 TARGET_DEVICES += iodata_wn-ac1600dgr2
384
385 define Device/iodata_wn-ag300dgr
386 ATH_SOC := ar1022
387 DEVICE_TITLE := I-O DATA WN-AG300DGR
388 IMAGE_SIZE := 15424k
389 IMAGES += factory.bin
390 IMAGE/factory.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | \
391 append-rootfs | pad-rootfs | check-size $$$$(IMAGE_SIZE) | \
392 senao-header -r 0x30a -p 0x47 -t 2
393 DEVICE_PACKAGES := kmod-usb-core kmod-usb2
394 endef
395 TARGET_DEVICES += iodata_wn-ag300dgr
396
397 define Device/librerouter_librerouter-v1
398 ATH_SOC := qca9558
399 DEVICE_TITLE := LibreRouter v1
400 IMAGE_SIZE := 7936k
401 DEVICE_PACKAGES := kmod-usb-core kmod-usb2
402 endef
403 TARGET_DEVICES += librerouter_librerouter-v1
404
405 define Device/nec_wg800hp
406 ATH_SOC := qca9563
407 DEVICE_TITLE := NEC Aterm WG800HP
408 IMAGE_SIZE := 7104k
409 IMAGES += factory.bin
410 IMAGE/factory.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | \
411 append-rootfs | pad-rootfs | check-size $$$$(IMAGE_SIZE) | \
412 xor-image -p 6A57190601121E4C004C1E1201061957 -x | \
413 nec-fw LASER_ATERM
414 DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca9887-ct-htt
415 endef
416 TARGET_DEVICES += nec_wg800hp
417
418 define Device/ocedo_koala
419 ATH_SOC := qca9558
420 DEVICE_TITLE := OCEDO Koala
421 DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca988x-ct
422 SUPPORTED_DEVICES += koala
423 IMAGE_SIZE := 7424k
424 IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE)
425 endef
426 TARGET_DEVICES += ocedo_koala
427
428 define Device/ocedo_raccoon
429 ATH_SOC := ar9344
430 DEVICE_TITLE := OCEDO Raccoon
431 IMAGE_SIZE := 7424k
432 IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE)
433 endef
434 TARGET_DEVICES += ocedo_raccoon
435
436 define Device/openmesh_om5p-ac-v2
437 ATH_SOC := qca9558
438 DEVICE_TITLE := OpenMesh OM5P-AC v2
439 DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca988x-ct om-watchdog
440 IMAGE_SIZE := 7808k
441 SUPPORTED_DEVICES += om5p-acv2
442 endef
443 TARGET_DEVICES += openmesh_om5p-ac-v2
444
445 define Device/pcs_cap324
446 ATH_SOC := ar9344
447 DEVICE_TITLE := PowerCloud Systems CAP324
448 IMAGE_SIZE := 16000k
449 SUPPORTED_DEVICES += cap324
450 endef
451 TARGET_DEVICES += pcs_cap324
452
453 define Device/pcs_cr3000
454 ATH_SOC := ar9341
455 DEVICE_TITLE := PowerCloud Systems CR3000
456 IMAGE_SIZE := 7808k
457 SUPPORTED_DEVICES += cr3000
458 endef
459 TARGET_DEVICES += pcs_cr3000
460
461 define Device/pcs_cr5000
462 ATH_SOC := ar9344
463 DEVICE_TITLE := PowerCloud Systems CR5000
464 DEVICE_PACKAGES := kmod-usb2 kmod-usb-core
465 IMAGE_SIZE := 7808k
466 SUPPORTED_DEVICES += cr5000
467 endef
468 TARGET_DEVICES += pcs_cr5000
469
470 define Device/netgear_wndr3x00
471 ATH_SOC := ar7161
472 KERNEL := kernel-bin | append-dtb | lzma -d20 | netgear-uImage lzma
473 IMAGES += factory.img
474 IMAGE/default := append-kernel | pad-to $$$$(BLOCKSIZE) | netgear-squashfs | append-rootfs | pad-rootfs
475 IMAGE/sysupgrade.bin := $$(IMAGE/default) | append-metadata | check-size $$$$(IMAGE_SIZE)
476 IMAGE/factory.img := $$(IMAGE/default) | netgear-dni | check-size $$$$(IMAGE_SIZE)
477 DEVICE_PACKAGES := kmod-usb-core kmod-usb-ohci kmod-usb2 kmod-usb-ledtrig-usbport kmod-leds-reset kmod-owl-loader
478 endef
479
480 define Device/netgear_wndr3700
481 $(Device/netgear_wndr3x00)
482 DEVICE_TITLE := NETGEAR WNDR3700
483 NETGEAR_KERNEL_MAGIC := 0x33373030
484 NETGEAR_BOARD_ID := WNDR3700
485 IMAGE_SIZE := 7680k
486 IMAGES += factory-NA.img
487 IMAGE/factory-NA.img := $$(IMAGE/default) | netgear-dni NA | check-size $$$$(IMAGE_SIZE)
488 SUPPORTED_DEVICES += wndr3700
489 endef
490 TARGET_DEVICES += netgear_wndr3700
491
492 define Device/netgear_wndr3700v2
493 $(Device/netgear_wndr3x00)
494 DEVICE_TITLE := NETGEAR WNDR3700v2
495 NETGEAR_KERNEL_MAGIC := 0x33373031
496 NETGEAR_BOARD_ID := WNDR3700v2
497 NETGEAR_HW_ID := 29763654+16+64
498 IMAGE_SIZE := 15872k
499 SUPPORTED_DEVICES += wndr3700v2
500 endef
501 TARGET_DEVICES += netgear_wndr3700v2
502
503 define Device/pisen_wmm003n
504 $(Device/tplink-8mlzma)
505 ATH_SOC := ar9331
506 DEVICE_TITLE := Pisen WMM003N (Cloud Easy Power)
507 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-chipidea2
508 TPLINK_HWID := 0x07030101
509 endef
510 TARGET_DEVICES += pisen_wmm003n
511
512 define Device/netgear_wndr3800
513 $(Device/netgear_wndr3x00)
514 DEVICE_TITLE := NETGEAR WNDR3800
515 NETGEAR_KERNEL_MAGIC := 0x33373031
516 NETGEAR_BOARD_ID := WNDR3800
517 NETGEAR_HW_ID := 29763654+16+128
518 IMAGE_SIZE := 15872k
519 SUPPORTED_DEVICES += wndr3800
520 endef
521 TARGET_DEVICES += netgear_wndr3800
522
523 define Device/phicomm_k2t
524 ATH_SOC := qca9563
525 DEVICE_TITLE := Phicomm K2T
526 IMAGE_SIZE := 15744k
527 IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE)
528 DEVICE_PACKAGES := kmod-leds-reset kmod-ath10k-ct ath10k-firmware-qca9888-ct
529 endef
530 TARGET_DEVICES += phicomm_k2t
531
532 define Device/rosinson_wr818
533 ATH_SOC := qca9563
534 DEVICE_TITLE := ROSINSON WR818
535 IMAGE_SIZE := 15872k
536 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport
537 endef
538 TARGET_DEVICES += rosinson_wr818
539
540 define Device/wd_mynet-wifi-rangeextender
541 ATH_SOC := ar9344
542 DEVICE_TITLE := Western Digital My Net Wi-Fi Range Extender
543 DEVICE_PACKAGES := rssileds nvram -swconfig
544 IMAGE_SIZE := 7808k
545 ADDPATTERN_ID := mynet-rext
546 ADDPATTERN_VERSION := 1.00.01
547 IMAGE/sysupgrade.bin := append-rootfs | pad-rootfs | cybertan-trx | \
548 addpattern | append-metadata
549 SUPPORTED_DEVICES += mynet-rext
550 endef
551 TARGET_DEVICES += wd_mynet-wifi-rangeextender
552
553 define Device/winchannel_wb2000
554 ATH_SOC := ar9344
555 DEVICE_TITLE := Winchannel WB2000
556 IMAGE_SIZE := 15872k
557 DEVICE_PACKAGES := kmod-i2c-core kmod-i2c-gpio kmod-rtc-ds1307 kmod-usb2 kmod-usb-ledtrig-usbport
558 endef
559 TARGET_DEVICES += winchannel_wb2000
560
561 define Device/xiaomi_mi-router-4q
562 ATH_SOC := qca9561
563 DEVICE_TITLE := Xiaomi Mi Router 4Q
564 IMAGE_SIZE := 14336k
565 endef
566 TARGET_DEVICES += xiaomi_mi-router-4q
567
568 define Device/yuncore_a770
569 ATH_SOC := qca9531
570 DEVICE_TITLE := YunCore A770
571 DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca9887-ct
572 IMAGE_SIZE := 16000k
573 endef
574 TARGET_DEVICES += yuncore_a770