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