ramips: add support for UniElec U7621-01
[openwrt/openwrt.git] / target / linux / ramips / image / mt7621.mk
1 #
2 # MT7621 Profiles
3 #
4
5 include ./common-tp-link.mk
6
7 DEFAULT_SOC := mt7621
8
9 KERNEL_DTB += -d21
10 DEVICE_VARS += ELECOM_HWNAME LINKSYS_HWNAME
11
12 define Build/elecom-wrc-gs-factory
13 $(eval product=$(word 1,$(1)))
14 $(eval version=$(word 2,$(1)))
15 $(eval hash_opt=$(word 3,$(1)))
16 $(STAGING_DIR_HOST)/bin/mkhash md5 $(hash_opt) $@ >> $@
17 ( \
18 echo -n "ELECOM $(product) v$(version)" | \
19 dd bs=32 count=1 conv=sync; \
20 dd if=$@; \
21 ) > $@.new
22 mv $@.new $@
23 endef
24
25 define Build/iodata-factory
26 $(eval fw_size=$(word 1,$(1)))
27 $(eval fw_type=$(word 2,$(1)))
28 $(eval product=$(word 3,$(1)))
29 $(eval factory_bin=$(word 4,$(1)))
30 if [ -e $(KDIR)/tmp/$(KERNEL_INITRAMFS_IMAGE) -a "$$(stat -c%s $@)" -lt "$(fw_size)" ]; then \
31 $(CP) $(KDIR)/tmp/$(KERNEL_INITRAMFS_IMAGE) $(factory_bin); \
32 $(STAGING_DIR_HOST)/bin/mksenaofw \
33 -r 0x30a -p $(product) -t $(fw_type) \
34 -e $(factory_bin) -o $(factory_bin).new; \
35 mv $(factory_bin).new $(factory_bin); \
36 $(CP) $(factory_bin) $(BIN_DIR)/; \
37 else \
38 echo "WARNING: initramfs kernel image too big, cannot generate factory image" >&2; \
39 fi
40 endef
41
42 define Build/iodata-mstc-header
43 ( \
44 data_size_crc="$$(dd if=$@ ibs=64 skip=1 2>/dev/null | gzip -c | \
45 tail -c 8 | od -An -tx8 --endian little | tr -d ' \n')"; \
46 echo -ne "$$(echo $$data_size_crc | sed 's/../\\x&/g')" | \
47 dd of=$@ bs=8 count=1 seek=7 conv=notrunc 2>/dev/null; \
48 )
49 dd if=/dev/zero of=$@ bs=4 count=1 seek=1 conv=notrunc 2>/dev/null
50 ( \
51 header_crc="$$(dd if=$@ bs=64 count=1 2>/dev/null | gzip -c | \
52 tail -c 8 | od -An -N4 -tx4 --endian little | tr -d ' \n')"; \
53 echo -ne "$$(echo $$header_crc | sed 's/../\\x&/g')" | \
54 dd of=$@ bs=4 count=1 seek=1 conv=notrunc 2>/dev/null; \
55 )
56 endef
57
58 define Build/ubnt-erx-factory-image
59 if [ -e $(KDIR)/tmp/$(KERNEL_INITRAMFS_IMAGE) -a "$$(stat -c%s $@)" -lt "$(KERNEL_SIZE)" ]; then \
60 echo '21001:7' > $(1).compat; \
61 $(TAR) -cf $(1) --transform='s/^.*/compat/' $(1).compat; \
62 \
63 $(TAR) -rf $(1) --transform='s/^.*/vmlinux.tmp/' $(KDIR)/tmp/$(KERNEL_INITRAMFS_IMAGE); \
64 mkhash md5 $(KDIR)/tmp/$(KERNEL_INITRAMFS_IMAGE) > $(1).md5; \
65 $(TAR) -rf $(1) --transform='s/^.*/vmlinux.tmp.md5/' $(1).md5; \
66 \
67 echo "dummy" > $(1).rootfs; \
68 $(TAR) -rf $(1) --transform='s/^.*/squashfs.tmp/' $(1).rootfs; \
69 \
70 mkhash md5 $(1).rootfs > $(1).md5; \
71 $(TAR) -rf $(1) --transform='s/^.*/squashfs.tmp.md5/' $(1).md5; \
72 \
73 echo '$(BOARD) $(VERSION_CODE) $(VERSION_NUMBER)' > $(1).version; \
74 $(TAR) -rf $(1) --transform='s/^.*/version.tmp/' $(1).version; \
75 \
76 $(CP) $(1) $(BIN_DIR)/; \
77 else \
78 echo "WARNING: initramfs kernel image too big, cannot generate factory image" >&2; \
79 fi
80 endef
81
82 define Device/dsa-migration
83 DEVICE_COMPAT_VERSION := 1.1
84 DEVICE_COMPAT_MESSAGE := Config cannot be migrated from swconfig to DSA
85 endef
86
87 define Device/adslr_g7
88 $(Device/dsa-migration)
89 IMAGE_SIZE := 16064k
90 DEVICE_VENDOR := ADSLR
91 DEVICE_MODEL := G7
92 DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware
93 endef
94 TARGET_DEVICES += adslr_g7
95
96 define Device/afoundry_ew1200
97 $(Device/dsa-migration)
98 IMAGE_SIZE := 16064k
99 DEVICE_VENDOR := AFOUNDRY
100 DEVICE_MODEL := EW1200
101 DEVICE_PACKAGES := kmod-ata-ahci kmod-mt76x2 kmod-mt7603 kmod-usb3 \
102 kmod-usb-ledtrig-usbport
103 SUPPORTED_DEVICES += ew1200
104 endef
105 TARGET_DEVICES += afoundry_ew1200
106
107 define Device/alfa-network_quad-e4g
108 $(Device/dsa-migration)
109 IMAGE_SIZE := 16064k
110 DEVICE_VENDOR := ALFA Network
111 DEVICE_MODEL := Quad-E4G
112 DEVICE_PACKAGES := kmod-ata-ahci kmod-sdhci-mt7620 kmod-usb3 uboot-envtools \
113 -wpad-basic-wolfssl
114 endef
115 TARGET_DEVICES += alfa-network_quad-e4g
116
117 define Device/asiarf_ap7621-001
118 $(Device/dsa-migration)
119 IMAGE_SIZE := 16000k
120 DEVICE_VENDOR := AsiaRF
121 DEVICE_MODEL := AP7621-001
122 DEVICE_PACKAGES := kmod-sdhci-mt7620 kmod-mt76x2 kmod-usb3 -wpad-basic-wolfssl
123 endef
124 TARGET_DEVICES += asiarf_ap7621-001
125
126 define Device/asiarf_ap7621-nv1
127 $(Device/dsa-migration)
128 IMAGE_SIZE := 16000k
129 DEVICE_VENDOR := AsiaRF
130 DEVICE_MODEL := AP7621-NV1
131 DEVICE_PACKAGES := kmod-sdhci-mt7620 kmod-mt76x2 kmod-usb3 -wpad-basic-wolfssl
132 endef
133 TARGET_DEVICES += asiarf_ap7621-nv1
134
135 define Device/asus_rt-ac57u
136 $(Device/dsa-migration)
137 DEVICE_VENDOR := ASUS
138 DEVICE_MODEL := RT-AC57U
139 IMAGE_SIZE := 16064k
140 DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 \
141 kmod-usb-ledtrig-usbport
142 endef
143 TARGET_DEVICES += asus_rt-ac57u
144
145 define Device/asus_rt-ac65p
146 $(Device/dsa-migration)
147 DEVICE_VENDOR := ASUS
148 DEVICE_MODEL := RT-AC65P
149 IMAGE_SIZE := 51200k
150 UBINIZE_OPTS := -E 5
151 BLOCKSIZE := 128k
152 PAGESIZE := 2048
153 KERNEL_SIZE := 4096k
154 IMAGES += factory.bin
155 IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
156 IMAGE/factory.bin := append-kernel | pad-to $$(KERNEL_SIZE) | append-ubi | \
157 check-size
158 DEVICE_PACKAGES := kmod-usb3 kmod-mt7615e kmod-mt7615-firmware uboot-envtools
159 endef
160 TARGET_DEVICES += asus_rt-ac65p
161
162 define Device/asus_rt-ac85p
163 $(Device/dsa-migration)
164 DEVICE_VENDOR := ASUS
165 DEVICE_MODEL := RT-AC85P
166 IMAGE_SIZE := 51200k
167 UBINIZE_OPTS := -E 5
168 BLOCKSIZE := 128k
169 PAGESIZE := 2048
170 KERNEL_SIZE := 4096k
171 IMAGES += factory.bin
172 IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
173 IMAGE/factory.bin := append-kernel | pad-to $$(KERNEL_SIZE) | append-ubi | \
174 check-size
175 DEVICE_PACKAGES := kmod-usb3 kmod-mt7615e kmod-mt7615-firmware uboot-envtools
176 endef
177 TARGET_DEVICES += asus_rt-ac85p
178
179 define Device/asus_rt-n56u-b1
180 $(Device/dsa-migration)
181 DEVICE_VENDOR := ASUS
182 DEVICE_MODEL := RT-N56U
183 DEVICE_VARIANT := B1
184 IMAGE_SIZE := 16064k
185 DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 \
186 kmod-usb-ledtrig-usbport
187 endef
188 TARGET_DEVICES += asus_rt-n56u-b1
189
190 define Device/buffalo_wsr-1166dhp
191 $(Device/dsa-migration)
192 $(Device/uimage-lzma-loader)
193 IMAGE/sysupgrade.bin := trx | pad-rootfs | append-metadata
194 IMAGE_SIZE := 15936k
195 DEVICE_VENDOR := Buffalo
196 DEVICE_MODEL := WSR-1166DHP
197 DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2
198 SUPPORTED_DEVICES += wsr-1166
199 endef
200 TARGET_DEVICES += buffalo_wsr-1166dhp
201
202 define Device/buffalo_wsr-2533dhpl
203 $(Device/dsa-migration)
204 $(Device/uimage-lzma-loader)
205 IMAGE_SIZE := 7936k
206 DEVICE_VENDOR := Buffalo
207 DEVICE_MODEL := WSR-2533DHPL
208 DEVICE_ALT0_VENDOR := Buffalo
209 DEVICE_ALT0_MODEL := WSR-2533DHP
210 IMAGE/sysupgrade.bin := trx | pad-rootfs | append-metadata
211 DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware
212 endef
213 TARGET_DEVICES += buffalo_wsr-2533dhpl
214
215 define Device/buffalo_wsr-600dhp
216 $(Device/dsa-migration)
217 IMAGE_SIZE := 16064k
218 DEVICE_VENDOR := Buffalo
219 DEVICE_MODEL := WSR-600DHP
220 DEVICE_PACKAGES := kmod-mt7603 kmod-rt2800-pci
221 SUPPORTED_DEVICES += wsr-600
222 endef
223 TARGET_DEVICES += buffalo_wsr-600dhp
224
225 define Device/dlink_dir-8xx-a1
226 $(Device/dsa-migration)
227 IMAGE_SIZE := 16000k
228 DEVICE_VENDOR := D-Link
229 DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware
230 KERNEL_INITRAMFS := $$(KERNEL) | uimage-padhdr 96
231 IMAGES += factory.bin
232 IMAGE/sysupgrade.bin := append-kernel | append-rootfs | uimage-padhdr 96 |\
233 pad-rootfs | append-metadata | check-size
234 IMAGE/factory.bin := append-kernel | append-rootfs | uimage-padhdr 96 |\
235 check-size
236 endef
237
238 define Device/dlink_dir-8xx-r1
239 $(Device/dsa-migration)
240 IMAGE_SIZE := 16064k
241 DEVICE_VENDOR := D-Link
242 DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware
243 KERNEL_INITRAMFS := $$(KERNEL)
244 IMAGES += factory.bin
245 IMAGE/sysupgrade.bin := append-kernel | append-rootfs |\
246 pad-rootfs | append-metadata | check-size
247 endef
248
249 define Device/dlink_dir-xx60-a1
250 $(Device/dsa-migration)
251 BLOCKSIZE := 128k
252 PAGESIZE := 2048
253 KERNEL_SIZE := 4096k
254 IMAGE_SIZE := 40960k
255 UBINIZE_OPTS := -E 5
256 DEVICE_VENDOR := D-Link
257 DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware kmod-usb3 \
258 kmod-usb-ledtrig-usbport
259 KERNEL := $$(KERNEL) | uimage-padhdr 96
260 IMAGES += factory.bin
261 IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
262 IMAGE/factory.bin := append-kernel | pad-to $$(KERNEL_SIZE) | append-ubi | \
263 check-size
264 endef
265
266 define Device/dlink_dir-1960-a1
267 $(Device/dlink_dir-xx60-a1)
268 DEVICE_MODEL := DIR-1960
269 DEVICE_VARIANT := A1
270 endef
271 TARGET_DEVICES += dlink_dir-1960-a1
272
273 define Device/dlink_dir-2640-a1
274 $(Device/dlink_dir-xx60-a1)
275 DEVICE_MODEL := DIR-2640
276 DEVICE_VARIANT := A1
277 endef
278 TARGET_DEVICES += dlink_dir-2640-a1
279
280 define Device/dlink_dir-2660-a1
281 $(Device/dlink_dir-xx60-a1)
282 DEVICE_MODEL := DIR-2660
283 DEVICE_VARIANT := A1
284 endef
285 TARGET_DEVICES += dlink_dir-2660-a1
286
287 define Device/dlink_dir-860l-b1
288 $(Device/dsa-migration)
289 $(Device/seama)
290 BLOCKSIZE := 64k
291 SEAMA_SIGNATURE := wrgac13_dlink.2013gui_dir860lb
292 LOADER_TYPE := bin
293 KERNEL := kernel-bin | append-dtb | lzma | loader-kernel | relocate-kernel | \
294 lzma -a0 | uImage lzma
295 IMAGE_SIZE := 16064k
296 DEVICE_VENDOR := D-Link
297 DEVICE_MODEL := DIR-860L
298 DEVICE_VARIANT := B1
299 DEVICE_PACKAGES := kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport
300 SUPPORTED_DEVICES += dir-860l-b1
301 endef
302 TARGET_DEVICES += dlink_dir-860l-b1
303
304 define Device/dlink_dir-867-a1
305 $(Device/dlink_dir-8xx-a1)
306 DEVICE_MODEL := DIR-867
307 DEVICE_VARIANT := A1
308 endef
309 TARGET_DEVICES += dlink_dir-867-a1
310
311 define Device/dlink_dir-878-a1
312 $(Device/dlink_dir-8xx-a1)
313 DEVICE_MODEL := DIR-878
314 DEVICE_VARIANT := A1
315 endef
316 TARGET_DEVICES += dlink_dir-878-a1
317
318 define Device/dlink_dir-882-a1
319 $(Device/dlink_dir-8xx-a1)
320 DEVICE_MODEL := DIR-882
321 DEVICE_VARIANT := A1
322 DEVICE_PACKAGES += kmod-usb3 kmod-usb-ledtrig-usbport
323 endef
324 TARGET_DEVICES += dlink_dir-882-a1
325
326 define Device/dlink_dir-882-r1
327 $(Device/dlink_dir-8xx-r1)
328 DEVICE_MODEL := DIR-882
329 DEVICE_VARIANT := R1
330 DEVICE_PACKAGES += kmod-usb3 kmod-usb-ledtrig-usbport
331 IMAGE/factory.bin := append-kernel | append-rootfs | check-size | \
332 sign-dlink-ru 57c5375741c30ca9ebcb36713db4ba51 \
333 ab0dff19af8842cdb70a86b4b68d23f7
334 endef
335 TARGET_DEVICES += dlink_dir-882-r1
336
337 define Device/d-team_newifi-d2
338 $(Device/dsa-migration)
339 $(Device/uimage-lzma-loader)
340 IMAGE_SIZE := 32448k
341 DEVICE_VENDOR := Newifi
342 DEVICE_MODEL := D2
343 DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 \
344 kmod-usb-ledtrig-usbport
345 endef
346 TARGET_DEVICES += d-team_newifi-d2
347
348 define Device/d-team_pbr-m1
349 $(Device/dsa-migration)
350 IMAGE_SIZE := 32448k
351 DEVICE_VENDOR := PandoraBox
352 DEVICE_MODEL := PBR-M1
353 DEVICE_PACKAGES := kmod-ata-ahci kmod-mt7603 kmod-mt76x2 kmod-sdhci-mt7620 \
354 kmod-usb3 kmod-usb-ledtrig-usbport
355 SUPPORTED_DEVICES += pbr-m1
356 endef
357 TARGET_DEVICES += d-team_pbr-m1
358
359 define Device/edimax_ra21s
360 $(Device/dsa-migration)
361 $(Device/uimage-lzma-loader)
362 IMAGE_SIZE := 16064k
363 DEVICE_VENDOR := Edimax
364 DEVICE_MODEL := RA21S
365 DEVICE_ALT0_VENDOR := Edimax
366 DEVICE_ALT0_MODEL := Gemini RA21S
367 IMAGES += factory.bin
368 IMAGE/factory.bin := $$(sysupgrade_bin) | check-size | \
369 elx-header 02020040 8844A2D168B45A2D
370 DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware
371 endef
372 TARGET_DEVICES += edimax_ra21s
373
374 define Device/edimax_re23s
375 $(Device/dsa-migration)
376 $(Device/uimage-lzma-loader)
377 IMAGE_SIZE := 15680k
378 DEVICE_VENDOR := Edimax
379 DEVICE_MODEL := RE23S
380 DEVICE_ALT0_VENDOR := Edimax
381 DEVICE_ALT0_MODEL := Gemini RE23S
382 IMAGE/sysupgrade.bin := append-kernel | append-rootfs | \
383 edimax-header -s CSYS -m RN76 -f 0x70000 -S 0x01100000 | pad-rootfs | \
384 append-metadata | check-size
385 IMAGES += factory.bin
386 IMAGE/factory.bin := append-kernel | append-rootfs | \
387 edimax-header -s CSYS -m RN76 -f 0x70000 -S 0x01100000 | pad-rootfs | \
388 check-size
389 DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware
390 endef
391 TARGET_DEVICES += edimax_re23s
392
393 define Device/edimax_rg21s
394 $(Device/dsa-migration)
395 $(Device/uimage-lzma-loader)
396 IMAGE_SIZE := 16064k
397 DEVICE_VENDOR := Edimax
398 DEVICE_MODEL := Gemini AC2600 RG21S
399 IMAGES += factory.bin
400 IMAGE/factory.bin := $$(sysupgrade_bin) | check-size | \
401 elx-header 02020038 8844A2D168B45A2D
402 DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware
403 endef
404 TARGET_DEVICES += edimax_rg21s
405
406 define Device/elecom_wrc-1167ghbk2-s
407 $(Device/dsa-migration)
408 IMAGE_SIZE := 15488k
409 DEVICE_VENDOR := ELECOM
410 DEVICE_MODEL := WRC-1167GHBK2-S
411 IMAGES += factory.bin
412 IMAGE/factory.bin := $$(sysupgrade_bin) | check-size | \
413 elecom-wrc-gs-factory WRC-1167GHBK2-S 0.00
414 DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware
415 endef
416 TARGET_DEVICES += elecom_wrc-1167ghbk2-s
417
418 define Device/elecom_wrc-gs
419 $(Device/dsa-migration)
420 $(Device/uimage-lzma-loader)
421 DEVICE_VENDOR := ELECOM
422 IMAGES += factory.bin
423 IMAGE/factory.bin := $$(sysupgrade_bin) | check-size | \
424 elecom-wrc-gs-factory $$$$(ELECOM_HWNAME) 0.00 -N | \
425 append-string MT7621_ELECOM_$$$$(ELECOM_HWNAME)
426 DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware
427 endef
428
429 define Device/elecom_wrc-1167gs2-b
430 $(Device/elecom_wrc-gs)
431 IMAGE_SIZE := 11264k
432 DEVICE_MODEL := WRC-1167GS2-B
433 ELECOM_HWNAME := WRC-1167GS2
434 endef
435 TARGET_DEVICES += elecom_wrc-1167gs2-b
436
437 define Device/elecom_wrc-1167gst2
438 $(Device/elecom_wrc-gs)
439 IMAGE_SIZE := 24576k
440 DEVICE_MODEL := WRC-1167GST2
441 ELECOM_HWNAME := WRC-1167GST2
442 endef
443 TARGET_DEVICES += elecom_wrc-1167gst2
444
445 define Device/elecom_wrc-1750gs
446 $(Device/elecom_wrc-gs)
447 IMAGE_SIZE := 11264k
448 DEVICE_MODEL := WRC-1750GS
449 ELECOM_HWNAME := WRC-1750GS
450 endef
451 TARGET_DEVICES += elecom_wrc-1750gs
452
453 define Device/elecom_wrc-1750gsv
454 $(Device/elecom_wrc-gs)
455 IMAGE_SIZE := 11264k
456 DEVICE_MODEL := WRC-1750GSV
457 ELECOM_HWNAME := WRC-1750GSV
458 endef
459 TARGET_DEVICES += elecom_wrc-1750gsv
460
461 define Device/elecom_wrc-1900gst
462 $(Device/elecom_wrc-gs)
463 IMAGE_SIZE := 11264k
464 DEVICE_MODEL := WRC-1900GST
465 ELECOM_HWNAME := WRC-1900GST
466 endef
467 TARGET_DEVICES += elecom_wrc-1900gst
468
469 define Device/elecom_wrc-2533ghbk-i
470 $(Device/dsa-migration)
471 $(Device/uimage-lzma-loader)
472 DEVICE_VENDOR := ELECOM
473 DEVICE_MODEL := WRC-2533GHBK-I
474 IMAGE_SIZE := 9856k
475 IMAGES += factory.bin
476 IMAGE/factory.bin := $$(sysupgrade_bin) | check-size | \
477 elx-header 0107002d 8844A2D168B45A2D | \
478 elecom-product-header WRC-2533GHBK-I
479 DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware
480 endef
481 TARGET_DEVICES += elecom_wrc-2533ghbk-i
482
483 define Device/elecom_wrc-2533gst
484 $(Device/elecom_wrc-gs)
485 IMAGE_SIZE := 11264k
486 DEVICE_MODEL := WRC-2533GST
487 ELECOM_HWNAME := WRC-2533GST
488 endef
489 TARGET_DEVICES += elecom_wrc-2533gst
490
491 define Device/elecom_wrc-2533gst2
492 $(Device/elecom_wrc-gs)
493 IMAGE_SIZE := 24576k
494 DEVICE_MODEL := WRC-2533GST2
495 ELECOM_HWNAME := WRC-2533GST2
496 endef
497 TARGET_DEVICES += elecom_wrc-2533gst2
498
499 define Device/firefly_firewrt
500 $(Device/dsa-migration)
501 IMAGE_SIZE := 16064k
502 DEVICE_VENDOR := Firefly
503 DEVICE_MODEL := FireWRT
504 DEVICE_PACKAGES := kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport
505 SUPPORTED_DEVICES += firewrt
506 endef
507 TARGET_DEVICES += firefly_firewrt
508
509 define Device/gehua_ghl-r-001
510 $(Device/dsa-migration)
511 IMAGE_SIZE := 32448k
512 DEVICE_VENDOR := GeHua
513 DEVICE_MODEL := GHL-R-001
514 DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 \
515 kmod-usb-ledtrig-usbport
516 endef
517 TARGET_DEVICES += gehua_ghl-r-001
518
519 define Device/glinet_gl-mt1300
520 $(Device/dsa-migration)
521 IMAGE_SIZE := 32448k
522 DEVICE_VENDOR := GL.iNet
523 DEVICE_MODEL := GL-MT1300
524 DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware kmod-usb3
525 endef
526 TARGET_DEVICES += glinet_gl-mt1300
527
528 define Device/gnubee_gb-pc1
529 $(Device/dsa-migration)
530 DEVICE_VENDOR := GnuBee
531 DEVICE_MODEL := Personal Cloud One
532 DEVICE_PACKAGES := kmod-ata-ahci kmod-usb3 kmod-sdhci-mt7620 -wpad-basic-wolfssl
533 IMAGE_SIZE := 32448k
534 endef
535 TARGET_DEVICES += gnubee_gb-pc1
536
537 define Device/gnubee_gb-pc2
538 $(Device/dsa-migration)
539 DEVICE_VENDOR := GnuBee
540 DEVICE_MODEL := Personal Cloud Two
541 DEVICE_PACKAGES := kmod-ata-ahci kmod-usb3 kmod-sdhci-mt7620 -wpad-basic-wolfssl
542 IMAGE_SIZE := 32448k
543 endef
544 TARGET_DEVICES += gnubee_gb-pc2
545
546 define Device/hiwifi_hc5962
547 $(Device/dsa-migration)
548 BLOCKSIZE := 128k
549 PAGESIZE := 2048
550 KERNEL_SIZE := 4096k
551 UBINIZE_OPTS := -E 5
552 IMAGE_SIZE := 32768k
553 IMAGES += factory.bin
554 IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
555 IMAGE/factory.bin := append-kernel | pad-to $$(KERNEL_SIZE) | append-ubi | \
556 check-size
557 DEVICE_VENDOR := HiWiFi
558 DEVICE_MODEL := HC5962
559 DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3
560 endef
561 TARGET_DEVICES += hiwifi_hc5962
562
563 define Device/iodata_wn-ax1167gr
564 $(Device/dsa-migration)
565 $(Device/uimage-lzma-loader)
566 IMAGE_SIZE := 15552k
567 KERNEL_INITRAMFS := $$(KERNEL) | \
568 iodata-factory 7864320 4 0x1055 $(KDIR)/tmp/$$(KERNEL_INITRAMFS_PREFIX)-factory.bin
569 DEVICE_VENDOR := I-O DATA
570 DEVICE_MODEL := WN-AX1167GR
571 DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2
572 endef
573 TARGET_DEVICES += iodata_wn-ax1167gr
574
575 define Device/iodata_nand
576 $(Device/dsa-migration)
577 DEVICE_VENDOR := I-O DATA
578 BLOCKSIZE := 128k
579 PAGESIZE := 2048
580 UBINIZE_OPTS := -E 5
581 KERNEL_SIZE := 4096k
582 IMAGE_SIZE := 51200k
583 LOADER_TYPE := bin
584 KERNEL := kernel-bin | append-dtb | lzma | loader-kernel | lzma | uImage lzma
585 IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
586 endef
587
588 # The OEM webinterface expects an kernel with initramfs which has the uImage
589 # header field ih_name.
590 # We don't want to set the header name field for the kernel include in the
591 # sysupgrade image as well, as this image shouldn't be accepted by the OEM
592 # webinterface. It will soft-brick the board.
593
594 define Device/iodata_wn-ax1167gr2
595 $(Device/iodata_nand)
596 DEVICE_MODEL := WN-AX1167GR2
597 KERNEL_INITRAMFS := $(KERNEL_DTB) | loader-kernel | lzma | \
598 uImage lzma -M 0x434f4d42 -n '3.10(XBC.1)b10' | iodata-mstc-header
599 DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware
600 endef
601 TARGET_DEVICES += iodata_wn-ax1167gr2
602
603 define Device/iodata_wn-ax2033gr
604 $(Device/iodata_nand)
605 DEVICE_MODEL := WN-AX2033GR
606 KERNEL_INITRAMFS := $(KERNEL_DTB) | loader-kernel | lzma | \
607 uImage lzma -M 0x434f4d42 -n '3.10(VST.1)C10' | iodata-mstc-header
608 DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615e kmod-mt7615-firmware
609 endef
610 TARGET_DEVICES += iodata_wn-ax2033gr
611
612 define Device/iodata_wn-dx1167r
613 $(Device/iodata_nand)
614 DEVICE_MODEL := WN-DX1167R
615 KERNEL_INITRAMFS := $(KERNEL_DTB) | loader-kernel | lzma | \
616 uImage lzma -M 0x434f4d43 -n '3.10(XIK.1)b10' | iodata-mstc-header
617 DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware
618 endef
619 TARGET_DEVICES += iodata_wn-dx1167r
620
621 define Device/iodata_wn-gx300gr
622 $(Device/dsa-migration)
623 $(Device/uimage-lzma-loader)
624 IMAGE_SIZE := 7616k
625 DEVICE_VENDOR := I-O DATA
626 DEVICE_MODEL := WN-GX300GR
627 DEVICE_PACKAGES := kmod-mt7603
628 endef
629 TARGET_DEVICES += iodata_wn-gx300gr
630
631 define Device/iodata_wnpr2600g
632 $(Device/dsa-migration)
633 $(Device/uimage-lzma-loader)
634 DEVICE_VENDOR := I-O DATA
635 DEVICE_MODEL := WNPR2600G
636 IMAGE_SIZE := 13952k
637 IMAGES += factory.bin
638 IMAGE/factory.bin := $$(sysupgrade_bin) | check-size | \
639 elx-header 0104003a 8844A2D168B45A2D
640 DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware
641 endef
642 TARGET_DEVICES += iodata_wnpr2600g
643
644 define Device/iptime_a6ns-m
645 $(Device/dsa-migration)
646 IMAGE_SIZE := 16128k
647 UIMAGE_NAME := a6nm
648 DEVICE_VENDOR := ipTIME
649 DEVICE_MODEL := A6ns-M
650 DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware kmod-usb3 \
651 kmod-usb-ledtrig-usbport
652 endef
653 TARGET_DEVICES += iptime_a6ns-m
654
655 define Device/iptime_a8004t
656 $(Device/dsa-migration)
657 IMAGE_SIZE := 16128k
658 UIMAGE_NAME := a8004t
659 DEVICE_VENDOR := ipTIME
660 DEVICE_MODEL := A8004T
661 DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware kmod-usb3
662 endef
663 TARGET_DEVICES += iptime_a8004t
664
665 define Device/jcg_jhr-ac876m
666 $(Device/dsa-migration)
667 IMAGE_SIZE := 16064k
668 IMAGES += factory.bin
669 IMAGE/factory.bin := $$(sysupgrade_bin) | check-size | jcg-header 89.1
670 JCG_MAXSIZE := 16064k
671 DEVICE_VENDOR := JCG
672 DEVICE_MODEL := JHR-AC876M
673 DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware kmod-usb3 \
674 kmod-usb-ledtrig-usbport
675 endef
676 TARGET_DEVICES += jcg_jhr-ac876m
677
678 define Device/lenovo_newifi-d1
679 $(Device/dsa-migration)
680 $(Device/uimage-lzma-loader)
681 IMAGE_SIZE := 32448k
682 DEVICE_VENDOR := Newifi
683 DEVICE_MODEL := D1
684 DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 kmod-sdhci-mt7620 \
685 kmod-usb-ledtrig-usbport
686 SUPPORTED_DEVICES += newifi-d1
687 endef
688 TARGET_DEVICES += lenovo_newifi-d1
689
690 define Device/linksys_ea7xxx
691 $(Device/dsa-migration)
692 $(Device/uimage-lzma-loader)
693 BLOCKSIZE := 128k
694 PAGESIZE := 2048
695 KERNEL_SIZE := 4096k
696 IMAGE_SIZE := 36864k
697 DEVICE_VENDOR := Linksys
698 DEVICE_PACKAGES := kmod-usb3 kmod-mt7615e kmod-mt7615-firmware \
699 uboot-envtools
700 UBINIZE_OPTS := -E 5
701 IMAGES := sysupgrade.bin factory.bin
702 IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata | check-size
703 IMAGE/factory.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | \
704 append-ubi | check-size | linksys-image type=$$$$(LINKSYS_HWNAME)
705 endef
706
707 define Device/linksys_ea7300-v1
708 $(Device/linksys_ea7xxx)
709 DEVICE_MODEL := EA7300
710 DEVICE_VARIANT := v1
711 LINKSYS_HWNAME := EA7300
712 endef
713 TARGET_DEVICES += linksys_ea7300-v1
714
715 define Device/linksys_ea7300-v2
716 $(Device/linksys_ea7xxx)
717 DEVICE_MODEL := EA7300
718 DEVICE_VARIANT := v2
719 LINKSYS_HWNAME := EA7300v2
720 DEVICE_PACKAGES += kmod-mt7603
721 endef
722 TARGET_DEVICES += linksys_ea7300-v2
723
724 define Device/linksys_ea7500-v2
725 $(Device/linksys_ea7xxx)
726 DEVICE_MODEL := EA7500
727 DEVICE_VARIANT := v2
728 LINKSYS_HWNAME := EA7500v2
729 endef
730 TARGET_DEVICES += linksys_ea7500-v2
731
732 define Device/linksys_re6500
733 $(Device/dsa-migration)
734 IMAGE_SIZE := 7872k
735 DEVICE_VENDOR := Linksys
736 DEVICE_MODEL := RE6500
737 DEVICE_PACKAGES := kmod-mt76x2
738 SUPPORTED_DEVICES += re6500
739 endef
740 TARGET_DEVICES += linksys_re6500
741
742 define Device/mediatek_ap-mt7621a-v60
743 $(Device/dsa-migration)
744 IMAGE_SIZE := 7872k
745 DEVICE_VENDOR := Mediatek
746 DEVICE_MODEL := AP-MT7621A-V60 EVB
747 DEVICE_PACKAGES := kmod-usb3 kmod-sdhci-mt7620 kmod-sound-mt7620 -wpad-basic-wolfssl
748 endef
749 TARGET_DEVICES += mediatek_ap-mt7621a-v60
750
751 define Device/mediatek_mt7621-eval-board
752 $(Device/dsa-migration)
753 BLOCKSIZE := 64k
754 IMAGE_SIZE := 15104k
755 DEVICE_VENDOR := MediaTek
756 DEVICE_MODEL := MT7621 EVB
757 DEVICE_PACKAGES := -wpad-basic-wolfssl
758 SUPPORTED_DEVICES += mt7621
759 endef
760 TARGET_DEVICES += mediatek_mt7621-eval-board
761
762 define Device/MikroTik
763 $(Device/dsa-migration)
764 DEVICE_VENDOR := MikroTik
765 BLOCKSIZE := 64k
766 IMAGE_SIZE := 16128k
767 DEVICE_PACKAGES := kmod-usb3
768 KERNEL_NAME := vmlinuz
769 KERNEL := kernel-bin | append-dtb-elf
770 IMAGE/sysupgrade.bin := append-kernel | kernel2minor -s 1024 | \
771 pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs | append-metadata | \
772 check-size
773 endef
774
775 define Device/mikrotik_routerboard-750gr3
776 $(Device/MikroTik)
777 DEVICE_MODEL := RouterBOARD 750Gr3
778 DEVICE_PACKAGES += -wpad-basic-wolfssl
779 SUPPORTED_DEVICES += mikrotik,rb750gr3
780 endef
781 TARGET_DEVICES += mikrotik_routerboard-750gr3
782
783 define Device/mikrotik_routerboard-760igs
784 $(Device/MikroTik)
785 DEVICE_MODEL := RouterBOARD 760iGS
786 DEVICE_PACKAGES += kmod-sfp -wpad-basic-wolfssl
787 endef
788 TARGET_DEVICES += mikrotik_routerboard-760igs
789
790 define Device/mikrotik_routerboard-m11g
791 $(Device/MikroTik)
792 DEVICE_MODEL := RouterBOARD M11G
793 DEVICE_PACKAGES := -wpad-basic-wolfssl
794 SUPPORTED_DEVICES += mikrotik,rbm11g
795 endef
796 TARGET_DEVICES += mikrotik_routerboard-m11g
797
798 define Device/mikrotik_routerboard-m33g
799 $(Device/MikroTik)
800 DEVICE_MODEL := RouterBOARD M33G
801 DEVICE_PACKAGES := -wpad-basic-wolfssl
802 SUPPORTED_DEVICES += mikrotik,rbm33g
803 endef
804 TARGET_DEVICES += mikrotik_routerboard-m33g
805
806 define Device/mqmaker_witi
807 $(Device/dsa-migration)
808 IMAGE_SIZE := 16064k
809 DEVICE_VENDOR := MQmaker
810 DEVICE_MODEL := WiTi
811 DEVICE_PACKAGES := kmod-ata-ahci kmod-mt76x2 kmod-sdhci-mt7620 kmod-usb3 \
812 kmod-usb-ledtrig-usbport
813 SUPPORTED_DEVICES += witi mqmaker,witi-256m mqmaker,witi-512m
814 endef
815 TARGET_DEVICES += mqmaker_witi
816
817 define Device/mtc_wr1201
818 $(Device/dsa-migration)
819 IMAGE_SIZE := 16000k
820 DEVICE_VENDOR := MTC
821 DEVICE_MODEL := Wireless Router WR1201
822 KERNEL_INITRAMFS := $(KERNEL_DTB) | uImage lzma -n 'WR1201_8_128'
823 DEVICE_PACKAGES := kmod-sdhci-mt7620 kmod-mt76x2 kmod-usb3 \
824 kmod-usb-ledtrig-usbport
825 endef
826 TARGET_DEVICES += mtc_wr1201
827
828 define Device/netgear_ex6150
829 $(Device/dsa-migration)
830 DEVICE_VENDOR := NETGEAR
831 DEVICE_MODEL := EX6150
832 DEVICE_PACKAGES := kmod-mt76x2
833 NETGEAR_BOARD_ID := U12H318T00_NETGEAR
834 IMAGE_SIZE := 14848k
835 IMAGES += factory.chk
836 IMAGE/factory.chk := $$(sysupgrade_bin) | check-size | netgear-chk
837 endef
838 TARGET_DEVICES += netgear_ex6150
839
840 define Device/netgear_sercomm_nand
841 $(Device/dsa-migration)
842 $(Device/uimage-lzma-loader)
843 BLOCKSIZE := 128k
844 PAGESIZE := 2048
845 KERNEL_SIZE := 4096k
846 UBINIZE_OPTS := -E 5
847 IMAGES += factory.img kernel.bin rootfs.bin
848 IMAGE/factory.img := pad-extra 2048k | append-kernel | pad-to 6144k | \
849 append-ubi | pad-to $$$$(BLOCKSIZE) | sercom-footer | pad-to 128 | \
850 zip $$$$(SERCOMM_HWNAME).bin | sercom-seal
851 IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
852 IMAGE/kernel.bin := append-kernel
853 IMAGE/rootfs.bin := append-ubi | check-size
854 DEVICE_VENDOR := NETGEAR
855 DEVICE_PACKAGES := kmod-mt7603 kmod-usb3 kmod-usb-ledtrig-usbport
856 endef
857
858 define Device/netgear_r6220
859 $(Device/netgear_sercomm_nand)
860 DEVICE_MODEL := R6220
861 SERCOMM_HWNAME := R6220
862 SERCOMM_HWID := AYA
863 SERCOMM_HWVER := A001
864 SERCOMM_SWVER := 0x0086
865 IMAGE_SIZE := 28672k
866 DEVICE_PACKAGES += kmod-mt76x2
867 SUPPORTED_DEVICES += r6220
868 endef
869 TARGET_DEVICES += netgear_r6220
870
871
872 define Device/netgear_r6260
873 $(Device/netgear_sercomm_nand)
874 DEVICE_MODEL := R6260
875 SERCOMM_HWNAME := R6260
876 SERCOMM_HWID := CHJ
877 SERCOMM_HWVER := A001
878 SERCOMM_SWVER := 0x0052
879 IMAGE_SIZE := 40960k
880 DEVICE_PACKAGES += kmod-mt7615e kmod-mt7615-firmware
881 endef
882 TARGET_DEVICES += netgear_r6260
883
884 define Device/netgear_r6350
885 $(Device/netgear_sercomm_nand)
886 DEVICE_MODEL := R6350
887 SERCOMM_HWNAME := R6350
888 SERCOMM_HWID := CHJ
889 SERCOMM_HWVER := A001
890 SERCOMM_SWVER := 0x0052
891 IMAGE_SIZE := 40960k
892 DEVICE_PACKAGES += kmod-mt7615e kmod-mt7615-firmware
893 endef
894 TARGET_DEVICES += netgear_r6350
895
896 define Device/netgear_r6700-v2
897 $(Device/netgear_sercomm_nand)
898 DEVICE_MODEL := R6700
899 DEVICE_VARIANT := v2
900 DEVICE_ALT0_VENDOR := NETGEAR
901 DEVICE_ALT0_MODEL := Nighthawk AC2400
902 DEVICE_ALT0_VARIANT := v1
903 DEVICE_ALT1_VENDOR := NETGEAR
904 DEVICE_ALT1_MODEL := R7200
905 DEVICE_ALT1_VARIANT := v1
906 SERCOMM_HWNAME := R6950
907 SERCOMM_HWID := BZV
908 SERCOMM_HWVER := A001
909 SERCOMM_SWVER := 0x1032
910 IMAGE_SIZE := 40960k
911 DEVICE_PACKAGES += kmod-mt7615e kmod-mt7615-firmware
912 endef
913 TARGET_DEVICES += netgear_r6700-v2
914
915 define Device/netgear_r6800
916 $(Device/netgear_sercomm_nand)
917 DEVICE_MODEL := R6800
918 SERCOMM_HWNAME := R6950
919 SERCOMM_HWID := BZV
920 SERCOMM_HWVER := A001
921 SERCOMM_SWVER := 0x0062
922 IMAGE_SIZE := 40960k
923 DEVICE_PACKAGES += kmod-mt7615e kmod-mt7615-firmware
924 endef
925 TARGET_DEVICES += netgear_r6800
926
927 define Device/netgear_r6850
928 $(Device/netgear_sercomm_nand)
929 DEVICE_MODEL := R6850
930 SERCOMM_HWNAME := R6850
931 SERCOMM_HWID := CHJ
932 SERCOMM_HWVER := A001
933 SERCOMM_SWVER := 0x0052
934 IMAGE_SIZE := 40960k
935 DEVICE_PACKAGES += kmod-mt7615e kmod-mt7615-firmware
936 endef
937 TARGET_DEVICES += netgear_r6850
938
939 define Device/netgear_wac104
940 $(Device/netgear_sercomm_nand)
941 DEVICE_MODEL := WAC104
942 SERCOMM_HWNAME := WAC104
943 SERCOMM_HWID := CAY
944 SERCOMM_HWVER := A001
945 SERCOMM_SWVER := 0x0006
946 IMAGE_SIZE := 28672k
947 DEVICE_PACKAGES += kmod-mt76x2
948 endef
949 TARGET_DEVICES += netgear_wac104
950
951 define Device/netgear_wac124
952 $(Device/netgear_sercomm_nand)
953 DEVICE_MODEL := WAC124
954 SERCOMM_HWNAME := WAC124
955 SERCOMM_HWID := CTL
956 SERCOMM_HWVER := A003
957 SERCOMM_SWVER := 0x0402
958 IMAGE_SIZE := 40960k
959 DEVICE_PACKAGES += kmod-mt7615e kmod-mt7615-firmware
960 endef
961 TARGET_DEVICES += netgear_wac124
962
963 define Device/netgear_wndr3700-v5
964 $(Device/dsa-migration)
965 $(Device/netgear_sercomm_nor)
966 $(Device/uimage-lzma-loader)
967 IMAGE_SIZE := 15232k
968 DEVICE_MODEL := WNDR3700
969 DEVICE_VARIANT := v5
970 SERCOMM_HWNAME := WNDR3700v5
971 SERCOMM_HWID := AYB
972 SERCOMM_HWVER := A001
973 SERCOMM_SWVER := 0x1054
974 SERCOMM_PAD := 320k
975 DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 \
976 kmod-usb-ledtrig-usbport
977 SUPPORTED_DEVICES += wndr3700v5
978 endef
979 TARGET_DEVICES += netgear_wndr3700-v5
980
981 define Device/netis_wf2881
982 $(Device/dsa-migration)
983 BLOCKSIZE := 128k
984 PAGESIZE := 2048
985 FILESYSTEMS := squashfs
986 KERNEL_SIZE := 4096k
987 IMAGE_SIZE := 129280k
988 UBINIZE_OPTS := -E 5
989 UIMAGE_NAME := WF2881_0.0.00
990 KERNEL_INITRAMFS := $(KERNEL_DTB) | netis-tail WF2881 | uImage lzma
991 IMAGES += factory.bin
992 IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
993 IMAGE/factory.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi | \
994 check-size
995 DEVICE_VENDOR := NETIS
996 DEVICE_MODEL := WF2881
997 DEVICE_PACKAGES := kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport
998 endef
999 TARGET_DEVICES += netis_wf2881
1000
1001 define Device/phicomm_k2p
1002 $(Device/dsa-migration)
1003 IMAGE_SIZE := 15744k
1004 DEVICE_VENDOR := Phicomm
1005 DEVICE_MODEL := K2P
1006 DEVICE_ALT0_VENDOR := Phicomm
1007 DEVICE_ALT0_MODEL := KE 2P
1008 SUPPORTED_DEVICES += k2p
1009 DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware
1010 endef
1011 TARGET_DEVICES += phicomm_k2p
1012
1013 define Device/planex_vr500
1014 $(Device/dsa-migration)
1015 $(Device/uimage-lzma-loader)
1016 IMAGE_SIZE := 65216k
1017 DEVICE_VENDOR := Planex
1018 DEVICE_MODEL := VR500
1019 DEVICE_PACKAGES := kmod-usb3 -wpad-basic-wolfssl
1020 SUPPORTED_DEVICES += vr500
1021 endef
1022 TARGET_DEVICES += planex_vr500
1023
1024 define Device/samknows_whitebox-v8
1025 $(Device/dsa-migration)
1026 IMAGE_SIZE := 16064k
1027 DEVICE_VENDOR := SamKnows
1028 DEVICE_MODEL := Whitebox 8
1029 DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 \
1030 kmod-usb-ledtrig-usbport uboot-envtools
1031 SUPPORTED_DEVICES += sk-wb8
1032 endef
1033 TARGET_DEVICES += samknows_whitebox-v8
1034
1035 define Device/storylink_sap-g3200u3
1036 $(Device/dsa-migration)
1037 IMAGE_SIZE := 7872k
1038 DEVICE_VENDOR := STORYLiNK
1039 DEVICE_MODEL := SAP-G3200U3
1040 DEVICE_PACKAGES := kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport
1041 SUPPORTED_DEVICES += sap-g3200u3
1042 endef
1043 TARGET_DEVICES += storylink_sap-g3200u3
1044
1045 define Device/telco-electronics_x1
1046 $(Device/dsa-migration)
1047 IMAGE_SIZE := 16064k
1048 DEVICE_VENDOR := Telco Electronics
1049 DEVICE_MODEL := X1
1050 DEVICE_PACKAGES := kmod-usb3 kmod-mt76
1051 endef
1052 TARGET_DEVICES += telco-electronics_x1
1053
1054 define Device/thunder_timecloud
1055 $(Device/dsa-migration)
1056 $(Device/uimage-lzma-loader)
1057 IMAGE_SIZE := 16064k
1058 DEVICE_VENDOR := Thunder
1059 DEVICE_MODEL := Timecloud
1060 DEVICE_PACKAGES := kmod-usb3 -wpad-basic-wolfssl
1061 SUPPORTED_DEVICES += timecloud
1062 endef
1063 TARGET_DEVICES += thunder_timecloud
1064
1065 define Device/totolink_a7000r
1066 $(Device/dsa-migration)
1067 IMAGE_SIZE := 16064k
1068 UIMAGE_NAME := C8340R1C-9999
1069 DEVICE_VENDOR := TOTOLINK
1070 DEVICE_MODEL := A7000R
1071 DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware
1072 endef
1073 TARGET_DEVICES += totolink_a7000r
1074
1075 define Device/totolink_x5000r
1076 $(Device/dsa-migration)
1077 IMAGE_SIZE := 16064k
1078 UIMAGE_NAME := C8343R-9999
1079 DEVICE_VENDOR := TOTOLINK
1080 DEVICE_MODEL := X5000R
1081 DEVICE_PACKAGES := kmod-mt7915e
1082 endef
1083 TARGET_DEVICES += totolink_x5000r
1084
1085 define Device/tplink_re350-v1
1086 $(Device/dsa-migration)
1087 $(Device/tplink-safeloader)
1088 DEVICE_MODEL := RE350
1089 DEVICE_VARIANT := v1
1090 DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2
1091 TPLINK_BOARD_ID := RE350-V1
1092 IMAGE_SIZE := 6016k
1093 SUPPORTED_DEVICES += re350-v1
1094 endef
1095 TARGET_DEVICES += tplink_re350-v1
1096
1097 define Device/tplink_re500-v1
1098 $(Device/dsa-migration)
1099 $(Device/tplink-safeloader)
1100 DEVICE_MODEL := RE500
1101 DEVICE_VARIANT := v1
1102 DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware
1103 TPLINK_BOARD_ID := RE500-V1
1104 IMAGE_SIZE := 14208k
1105 endef
1106 TARGET_DEVICES += tplink_re500-v1
1107
1108 define Device/tplink_re650-v1
1109 $(Device/dsa-migration)
1110 $(Device/tplink-safeloader)
1111 DEVICE_MODEL := RE650
1112 DEVICE_VARIANT := v1
1113 DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware
1114 TPLINK_BOARD_ID := RE650-V1
1115 IMAGE_SIZE := 14208k
1116 endef
1117 TARGET_DEVICES += tplink_re650-v1
1118
1119 define Device/ubnt_edgerouter_common
1120 $(Device/dsa-migration)
1121 $(Device/uimage-lzma-loader)
1122 DEVICE_VENDOR := Ubiquiti
1123 IMAGE_SIZE := 256768k
1124 FILESYSTEMS := squashfs
1125 KERNEL_SIZE := 3145728
1126 KERNEL_INITRAMFS := $$(KERNEL) | \
1127 ubnt-erx-factory-image $(KDIR)/tmp/$$(KERNEL_INITRAMFS_PREFIX)-factory.tar
1128 IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
1129 DEVICE_PACKAGES += -wpad-basic-wolfssl
1130 endef
1131
1132 define Device/ubnt_edgerouter-x
1133 $(Device/ubnt_edgerouter_common)
1134 DEVICE_MODEL := EdgeRouter X
1135 SUPPORTED_DEVICES += ubnt-erx ubiquiti,edgerouterx
1136 endef
1137 TARGET_DEVICES += ubnt_edgerouter-x
1138
1139 define Device/ubnt_edgerouter-x-sfp
1140 $(Device/ubnt_edgerouter_common)
1141 DEVICE_MODEL := EdgeRouter X SFP
1142 DEVICE_PACKAGES += kmod-i2c-algo-pca kmod-gpio-pca953x kmod-sfp
1143 SUPPORTED_DEVICES += ubnt-erx-sfp ubiquiti,edgerouterx-sfp
1144 endef
1145 TARGET_DEVICES += ubnt_edgerouter-x-sfp
1146
1147 define Device/ubnt_unifi-6-lite
1148 $(Device/dsa-migration)
1149 DEVICE_VENDOR := Ubiquiti
1150 DEVICE_MODEL := UniFi 6 Lite
1151 DEVICE_PACKAGES += kmod-mt7603 kmod-mt7915e
1152 KERNEL := kernel-bin | lzma | fit lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb
1153 IMAGE_SIZE := 15424k
1154 endef
1155 TARGET_DEVICES += ubnt_unifi-6-lite
1156
1157 define Device/ubnt_unifi-nanohd
1158 $(Device/dsa-migration)
1159 DEVICE_VENDOR := Ubiquiti
1160 DEVICE_MODEL := UniFi nanoHD
1161 DEVICE_PACKAGES += kmod-mt7603 kmod-mt7615e kmod-mt7615-firmware
1162 IMAGE_SIZE := 15552k
1163 endef
1164 TARGET_DEVICES += ubnt_unifi-nanohd
1165
1166 define Device/unielec_u7621-01-16m
1167 $(Device/dsa-migration)
1168 $(Device/uimage-lzma-loader)
1169 IMAGE_SIZE := 16064k
1170 DEVICE_VENDOR := UniElec
1171 DEVICE_MODEL := U7621-01
1172 DEVICE_VARIANT := 16M
1173 DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3
1174 endef
1175 TARGET_DEVICES += unielec_u7621-01-16m
1176
1177 define Device/unielec_u7621-06-16m
1178 $(Device/dsa-migration)
1179 $(Device/uimage-lzma-loader)
1180 IMAGE_SIZE := 16064k
1181 DEVICE_VENDOR := UniElec
1182 DEVICE_MODEL := U7621-06
1183 DEVICE_VARIANT := 16M
1184 DEVICE_PACKAGES := kmod-ata-ahci kmod-sdhci-mt7620 kmod-usb3 -wpad-basic-wolfssl
1185 SUPPORTED_DEVICES += u7621-06-256M-16M unielec,u7621-06-256m-16m
1186 endef
1187 TARGET_DEVICES += unielec_u7621-06-16m
1188
1189 define Device/unielec_u7621-06-64m
1190 $(Device/dsa-migration)
1191 $(Device/uimage-lzma-loader)
1192 IMAGE_SIZE := 65216k
1193 DEVICE_VENDOR := UniElec
1194 DEVICE_MODEL := U7621-06
1195 DEVICE_VARIANT := 64M
1196 DEVICE_PACKAGES := kmod-ata-ahci kmod-sdhci-mt7620 kmod-usb3 -wpad-basic-wolfssl
1197 SUPPORTED_DEVICES += unielec,u7621-06-512m-64m
1198 endef
1199 TARGET_DEVICES += unielec_u7621-06-64m
1200
1201 define Device/wavlink_wl-wn531a6
1202 $(Device/dsa-migration)
1203 DEVICE_VENDOR := Wavlink
1204 DEVICE_MODEL := WL-WN531A6
1205 DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615e kmod-mt7615-firmware kmod-usb3
1206 IMAGE_SIZE := 15040k
1207 endef
1208 TARGET_DEVICES += wavlink_wl-wn531a6
1209
1210 define Device/wevo_11acnas
1211 $(Device/dsa-migration)
1212 IMAGE_SIZE := 16064k
1213 UIMAGE_NAME := 11AC-NAS-Router(0.0.0)
1214 DEVICE_VENDOR := WeVO
1215 DEVICE_MODEL := 11AC NAS Router
1216 DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 \
1217 kmod-usb-ledtrig-usbport
1218 SUPPORTED_DEVICES += 11acnas
1219 endef
1220 TARGET_DEVICES += wevo_11acnas
1221
1222 define Device/wevo_w2914ns-v2
1223 $(Device/dsa-migration)
1224 IMAGE_SIZE := 16064k
1225 UIMAGE_NAME := W2914NS-V2(0.0.0)
1226 DEVICE_VENDOR := WeVO
1227 DEVICE_MODEL := W2914NS
1228 DEVICE_VARIANT := v2
1229 DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 \
1230 kmod-usb-ledtrig-usbport
1231 SUPPORTED_DEVICES += w2914nsv2
1232 endef
1233 TARGET_DEVICES += wevo_w2914ns-v2
1234
1235 define Device/winstars_ws-wn583a6
1236 $(Device/dsa-migration)
1237 $(Device/uimage-lzma-loader)
1238 IMAGE_SIZE := 7872k
1239 DEVICE_VENDOR := Winstars
1240 DEVICE_MODEL := WS-WN583A6
1241 DEVICE_ALT0_VENDOR := Gemeita
1242 DEVICE_ALT0_MODEL := AC2100
1243 KERNEL_INITRAMFS_SUFFIX := -WN583A6$$(KERNEL_SUFFIX)
1244 DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615e kmod-mt7615-firmware
1245 endef
1246 TARGET_DEVICES += winstars_ws-wn583a6
1247
1248 define Device/xiaomi_nand_separate
1249 $(Device/dsa-migration)
1250 $(Device/uimage-lzma-loader)
1251 DEVICE_VENDOR := Xiaomi
1252 DEVICE_PACKAGES := uboot-envtools
1253 BLOCKSIZE := 128k
1254 PAGESIZE := 2048
1255 KERNEL_SIZE := 4096k
1256 UBINIZE_OPTS := -E 5
1257 IMAGES += kernel1.bin rootfs0.bin
1258 IMAGE/kernel1.bin := append-kernel
1259 IMAGE/rootfs0.bin := append-ubi | check-size
1260 IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
1261 endef
1262
1263 define Device/xiaomi_mi-router-3g
1264 $(Device/xiaomi_nand_separate)
1265 DEVICE_MODEL := Mi Router 3G
1266 IMAGE_SIZE := 124416k
1267 DEVICE_PACKAGES += kmod-mt7603 kmod-mt76x2 kmod-usb3 \
1268 kmod-usb-ledtrig-usbport
1269 SUPPORTED_DEVICES += R3G mir3g xiaomi,mir3g
1270 endef
1271 TARGET_DEVICES += xiaomi_mi-router-3g
1272
1273 define Device/xiaomi_mi-router-3g-v2
1274 $(Device/dsa-migration)
1275 $(Device/uimage-lzma-loader)
1276 IMAGE_SIZE := 14848k
1277 DEVICE_VENDOR := Xiaomi
1278 DEVICE_MODEL := Mi Router 3G
1279 DEVICE_VARIANT := v2
1280 DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2
1281 SUPPORTED_DEVICES += xiaomi,mir3g-v2
1282 endef
1283 TARGET_DEVICES += xiaomi_mi-router-3g-v2
1284
1285 define Device/xiaomi_mi-router-3-pro
1286 $(Device/dsa-migration)
1287 $(Device/uimage-lzma-loader)
1288 BLOCKSIZE := 128k
1289 PAGESIZE := 2048
1290 KERNEL_SIZE:= 4096k
1291 UBINIZE_OPTS := -E 5
1292 IMAGE_SIZE := 255488k
1293 DEVICE_VENDOR := Xiaomi
1294 DEVICE_MODEL := Mi Router 3 Pro
1295 IMAGES += factory.bin
1296 IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
1297 IMAGE/factory.bin := append-kernel | pad-to $$(KERNEL_SIZE) | append-ubi | \
1298 check-size
1299 DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware kmod-usb3 \
1300 kmod-usb-ledtrig-usbport uboot-envtools
1301 SUPPORTED_DEVICES += xiaomi,mir3p
1302 endef
1303 TARGET_DEVICES += xiaomi_mi-router-3-pro
1304
1305 define Device/xiaomi_mi-router-4
1306 $(Device/xiaomi_nand_separate)
1307 DEVICE_MODEL := Mi Router 4
1308 IMAGE_SIZE := 124416k
1309 DEVICE_PACKAGES += kmod-mt7603 kmod-mt76x2
1310 endef
1311 TARGET_DEVICES += xiaomi_mi-router-4
1312
1313 define Device/xiaomi_mi-router-4a-gigabit
1314 $(Device/dsa-migration)
1315 $(Device/uimage-lzma-loader)
1316 IMAGE_SIZE := 14848k
1317 DEVICE_VENDOR := Xiaomi
1318 DEVICE_MODEL := Mi Router 4A
1319 DEVICE_VARIANT := Gigabit Edition
1320 DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2
1321 endef
1322 TARGET_DEVICES += xiaomi_mi-router-4a-gigabit
1323
1324 define Device/xiaomi_mi-router-ac2100
1325 $(Device/xiaomi_nand_separate)
1326 DEVICE_MODEL := Mi Router AC2100
1327 IMAGE_SIZE := 120320k
1328 DEVICE_PACKAGES += kmod-mt7603 kmod-mt7615e kmod-mt7615-firmware
1329 endef
1330 TARGET_DEVICES += xiaomi_mi-router-ac2100
1331
1332 define Device/xiaomi_redmi-router-ac2100
1333 $(Device/xiaomi_nand_separate)
1334 DEVICE_MODEL := Redmi Router AC2100
1335 IMAGE_SIZE := 120320k
1336 DEVICE_PACKAGES += kmod-mt7603 kmod-mt7615e kmod-mt7615-firmware
1337 endef
1338 TARGET_DEVICES += xiaomi_redmi-router-ac2100
1339
1340 define Device/xiaoyu_xy-c5
1341 $(Device/dsa-migration)
1342 IMAGE_SIZE := 32448k
1343 DEVICE_VENDOR := XiaoYu
1344 DEVICE_MODEL := XY-C5
1345 DEVICE_PACKAGES := kmod-ata-ahci kmod-usb3 -wpad-basic-wolfssl
1346 endef
1347 TARGET_DEVICES += xiaoyu_xy-c5
1348
1349 define Device/xzwifi_creativebox-v1
1350 $(Device/dsa-migration)
1351 IMAGE_SIZE := 32448k
1352 DEVICE_VENDOR := CreativeBox
1353 DEVICE_MODEL := v1
1354 DEVICE_PACKAGES := kmod-ata-ahci kmod-mt7603 kmod-mt76x2 kmod-sdhci-mt7620 \
1355 kmod-usb3 -wpad-basic-wolfssl
1356 endef
1357 TARGET_DEVICES += xzwifi_creativebox-v1
1358
1359 define Device/youhua_wr1200js
1360 $(Device/dsa-migration)
1361 IMAGE_SIZE := 16064k
1362 DEVICE_VENDOR := YouHua
1363 DEVICE_MODEL := WR1200JS
1364 DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 \
1365 kmod-usb-ledtrig-usbport
1366 endef
1367 TARGET_DEVICES += youhua_wr1200js
1368
1369 define Device/youku_yk-l2
1370 $(Device/dsa-migration)
1371 IMAGE_SIZE := 16064k
1372 DEVICE_VENDOR := Youku
1373 DEVICE_MODEL := YK-L2
1374 DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 \
1375 kmod-usb-ledtrig-usbport
1376 endef
1377 TARGET_DEVICES += youku_yk-l2
1378
1379 define Device/zbtlink_zbt-we1326
1380 $(Device/dsa-migration)
1381 $(Device/uimage-lzma-loader)
1382 IMAGE_SIZE := 16064k
1383 DEVICE_VENDOR := Zbtlink
1384 DEVICE_MODEL := ZBT-WE1326
1385 DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 kmod-sdhci-mt7620
1386 SUPPORTED_DEVICES += zbt-we1326
1387 endef
1388 TARGET_DEVICES += zbtlink_zbt-we1326
1389
1390 define Device/zbtlink_zbt-we3526
1391 $(Device/dsa-migration)
1392 $(Device/uimage-lzma-loader)
1393 IMAGE_SIZE := 16064k
1394 DEVICE_VENDOR := Zbtlink
1395 DEVICE_MODEL := ZBT-WE3526
1396 DEVICE_PACKAGES := kmod-sdhci-mt7620 kmod-mt7603 kmod-mt76x2 kmod-usb3 \
1397 kmod-usb-ledtrig-usbport
1398 endef
1399 TARGET_DEVICES += zbtlink_zbt-we3526
1400
1401 define Device/zbtlink_zbt-wg2626
1402 $(Device/dsa-migration)
1403 $(Device/uimage-lzma-loader)
1404 IMAGE_SIZE := 16064k
1405 DEVICE_VENDOR := Zbtlink
1406 DEVICE_MODEL := ZBT-WG2626
1407 DEVICE_PACKAGES := kmod-ata-ahci kmod-sdhci-mt7620 kmod-mt76x2 kmod-usb3 \
1408 kmod-usb-ledtrig-usbport
1409 SUPPORTED_DEVICES += zbt-wg2626
1410 endef
1411 TARGET_DEVICES += zbtlink_zbt-wg2626
1412
1413 define Device/zbtlink_zbt-wg3526-16m
1414 $(Device/dsa-migration)
1415 $(Device/uimage-lzma-loader)
1416 IMAGE_SIZE := 16064k
1417 DEVICE_VENDOR := Zbtlink
1418 DEVICE_MODEL := ZBT-WG3526
1419 DEVICE_VARIANT := 16M
1420 DEVICE_PACKAGES := kmod-ata-ahci kmod-sdhci-mt7620 kmod-mt7603 kmod-mt76x2 \
1421 kmod-usb3 kmod-usb-ledtrig-usbport
1422 SUPPORTED_DEVICES += zbt-wg3526 zbt-wg3526-16M
1423 endef
1424 TARGET_DEVICES += zbtlink_zbt-wg3526-16m
1425
1426 define Device/zbtlink_zbt-wg3526-32m
1427 $(Device/dsa-migration)
1428 $(Device/uimage-lzma-loader)
1429 IMAGE_SIZE := 32448k
1430 DEVICE_VENDOR := Zbtlink
1431 DEVICE_MODEL := ZBT-WG3526
1432 DEVICE_VARIANT := 32M
1433 DEVICE_PACKAGES := kmod-ata-ahci kmod-sdhci-mt7620 kmod-mt7603 kmod-mt76x2 \
1434 kmod-usb3 kmod-usb-ledtrig-usbport
1435 SUPPORTED_DEVICES += ac1200pro zbt-wg3526-32M
1436 endef
1437 TARGET_DEVICES += zbtlink_zbt-wg3526-32m
1438
1439 define Device/zio_freezio
1440 $(Device/dsa-migration)
1441 IMAGE_SIZE := 16064k
1442 DEVICE_VENDOR := ZIO
1443 DEVICE_MODEL := FREEZIO
1444 DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 \
1445 kmod-usb-ledtrig-usbport
1446 endef
1447 TARGET_DEVICES += zio_freezio
1448
1449 define Device/zyxel_wap6805
1450 $(Device/dsa-migration)
1451 BLOCKSIZE := 128k
1452 PAGESIZE := 2048
1453 KERNEL_SIZE := 4096k
1454 UBINIZE_OPTS := -E 5
1455 IMAGE_SIZE := 32448k
1456 DEVICE_VENDOR := ZyXEL
1457 DEVICE_MODEL := WAP6805
1458 DEVICE_PACKAGES := kmod-mt7603 kmod-mt7621-qtn-rgmii
1459 KERNEL := $(KERNEL_DTB) | uImage lzma | uimage-padhdr 160
1460 IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
1461 endef
1462 TARGET_DEVICES += zyxel_wap6805