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