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