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