fad18552c9be193fe3c330736fc8deb44119aad8
[openwrt/openwrt.git] / target / linux / ramips / image / mt7621.mk
1 #
2 # MT7621 Profiles
3 #
4
5 include ./common-tp-link.mk
6
7 DEFAULT_SOC := mt7621
8
9 KERNEL_DTB += -d21
10 DEVICE_VARS += ELECOM_HWNAME LINKSYS_HWNAME
11
12 define Build/elecom-wrc-gs-factory
13 $(eval product=$(word 1,$(1)))
14 $(eval version=$(word 2,$(1)))
15 ( $(STAGING_DIR_HOST)/bin/mkhash md5 $@ | tr -d '\n' ) >> $@
16 ( \
17 echo -n "ELECOM $(product) v$(version)" | \
18 dd bs=32 count=1 conv=sync; \
19 dd if=$@; \
20 ) > $@.new
21 mv $@.new $@
22 echo -n "MT7621_ELECOM_$(product)" >> $@
23 endef
24
25 define Build/elecom-wrc-factory
26 $(eval product=$(word 1,$(1)))
27 $(eval version=$(word 2,$(1)))
28 $(STAGING_DIR_HOST)/bin/mkhash md5 $@ >> $@
29 ( \
30 echo -n "ELECOM $(product) v$(version)" | \
31 dd bs=32 count=1 conv=sync; \
32 dd if=$@; \
33 ) > $@.new
34 mv $@.new $@
35 endef
36
37 define Build/iodata-factory
38 $(eval fw_size=$(word 1,$(1)))
39 $(eval fw_type=$(word 2,$(1)))
40 $(eval product=$(word 3,$(1)))
41 $(eval factory_bin=$(word 4,$(1)))
42 if [ -e $(KDIR)/tmp/$(KERNEL_INITRAMFS_IMAGE) -a "$$(stat -c%s $@)" -lt "$(fw_size)" ]; then \
43 $(CP) $(KDIR)/tmp/$(KERNEL_INITRAMFS_IMAGE) $(factory_bin); \
44 $(STAGING_DIR_HOST)/bin/mksenaofw \
45 -r 0x30a -p $(product) -t $(fw_type) \
46 -e $(factory_bin) -o $(factory_bin).new; \
47 mv $(factory_bin).new $(factory_bin); \
48 $(CP) $(factory_bin) $(BIN_DIR)/; \
49 else \
50 echo "WARNING: initramfs kernel image too big, cannot generate factory image" >&2; \
51 fi
52 endef
53
54 define Build/iodata-mstc-header
55 ( \
56 data_size_crc="$$(dd if=$@ ibs=64 skip=1 2>/dev/null | gzip -c | \
57 tail -c 8 | od -An -tx8 --endian little | tr -d ' \n')"; \
58 echo -ne "$$(echo $$data_size_crc | sed 's/../\\x&/g')" | \
59 dd of=$@ bs=8 count=1 seek=7 conv=notrunc 2>/dev/null; \
60 )
61 dd if=/dev/zero of=$@ bs=4 count=1 seek=1 conv=notrunc 2>/dev/null
62 ( \
63 header_crc="$$(dd if=$@ bs=64 count=1 2>/dev/null | gzip -c | \
64 tail -c 8 | od -An -N4 -tx4 --endian little | tr -d ' \n')"; \
65 echo -ne "$$(echo $$header_crc | sed 's/../\\x&/g')" | \
66 dd of=$@ bs=4 count=1 seek=1 conv=notrunc 2>/dev/null; \
67 )
68 endef
69
70 define Build/ubnt-erx-factory-image
71 if [ -e $(KDIR)/tmp/$(KERNEL_INITRAMFS_IMAGE) -a "$$(stat -c%s $@)" -lt "$(KERNEL_SIZE)" ]; then \
72 echo '21001:7' > $(1).compat; \
73 $(TAR) -cf $(1) --transform='s/^.*/compat/' $(1).compat; \
74 \
75 $(TAR) -rf $(1) --transform='s/^.*/vmlinux.tmp/' $(KDIR)/tmp/$(KERNEL_INITRAMFS_IMAGE); \
76 mkhash md5 $(KDIR)/tmp/$(KERNEL_INITRAMFS_IMAGE) > $(1).md5; \
77 $(TAR) -rf $(1) --transform='s/^.*/vmlinux.tmp.md5/' $(1).md5; \
78 \
79 echo "dummy" > $(1).rootfs; \
80 $(TAR) -rf $(1) --transform='s/^.*/squashfs.tmp/' $(1).rootfs; \
81 \
82 mkhash md5 $(1).rootfs > $(1).md5; \
83 $(TAR) -rf $(1) --transform='s/^.*/squashfs.tmp.md5/' $(1).md5; \
84 \
85 echo '$(BOARD) $(VERSION_CODE) $(VERSION_NUMBER)' > $(1).version; \
86 $(TAR) -rf $(1) --transform='s/^.*/version.tmp/' $(1).version; \
87 \
88 $(CP) $(1) $(BIN_DIR)/; \
89 else \
90 echo "WARNING: initramfs kernel image too big, cannot generate factory image" >&2; \
91 fi
92 endef
93
94 define Device/dsa-migration
95 DEVICE_COMPAT_VERSION := 1.1
96 DEVICE_COMPAT_MESSAGE := Config cannot be migrated from swconfig to DSA
97 endef
98
99 define Device/adslr_g7
100 $(Device/dsa-migration)
101 IMAGE_SIZE := 16064k
102 DEVICE_VENDOR := ADSLR
103 DEVICE_MODEL := G7
104 DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware
105 endef
106 TARGET_DEVICES += adslr_g7
107
108 define Device/afoundry_ew1200
109 $(Device/dsa-migration)
110 IMAGE_SIZE := 16064k
111 DEVICE_VENDOR := AFOUNDRY
112 DEVICE_MODEL := EW1200
113 DEVICE_PACKAGES := kmod-ata-ahci kmod-mt76x2 kmod-mt7603 kmod-usb3 \
114 kmod-usb-ledtrig-usbport
115 SUPPORTED_DEVICES += ew1200
116 endef
117 TARGET_DEVICES += afoundry_ew1200
118
119 define Device/alfa-network_quad-e4g
120 $(Device/dsa-migration)
121 IMAGE_SIZE := 16064k
122 DEVICE_VENDOR := ALFA Network
123 DEVICE_MODEL := Quad-E4G
124 DEVICE_PACKAGES := kmod-ata-ahci kmod-sdhci-mt7620 kmod-usb3 uboot-envtools \
125 -wpad-basic-wolfssl
126 endef
127 TARGET_DEVICES += alfa-network_quad-e4g
128
129 define Device/asiarf_ap7621-001
130 $(Device/dsa-migration)
131 IMAGE_SIZE := 16000k
132 DEVICE_VENDOR := AsiaRF
133 DEVICE_MODEL := AP7621-001
134 DEVICE_PACKAGES := kmod-sdhci-mt7620 kmod-mt76x2 kmod-usb3 -wpad-basic-wolfssl
135 endef
136 TARGET_DEVICES += asiarf_ap7621-001
137
138 define Device/asiarf_ap7621-nv1
139 $(Device/dsa-migration)
140 IMAGE_SIZE := 16000k
141 DEVICE_VENDOR := AsiaRF
142 DEVICE_MODEL := AP7621-NV1
143 DEVICE_PACKAGES := kmod-sdhci-mt7620 kmod-mt76x2 kmod-usb3 -wpad-basic-wolfssl
144 endef
145 TARGET_DEVICES += asiarf_ap7621-nv1
146
147 define Device/asus_rt-ac57u
148 $(Device/dsa-migration)
149 DEVICE_VENDOR := ASUS
150 DEVICE_MODEL := RT-AC57U
151 IMAGE_SIZE := 16064k
152 DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 \
153 kmod-usb-ledtrig-usbport
154 endef
155 TARGET_DEVICES += asus_rt-ac57u
156
157 define Device/asus_rt-ac65p
158 $(Device/dsa-migration)
159 DEVICE_VENDOR := ASUS
160 DEVICE_MODEL := RT-AC65P
161 IMAGE_SIZE := 51200k
162 UBINIZE_OPTS := -E 5
163 BLOCKSIZE := 128k
164 PAGESIZE := 2048
165 KERNEL_SIZE := 4096k
166 IMAGES += factory.bin
167 IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
168 IMAGE/factory.bin := append-kernel | pad-to $$(KERNEL_SIZE) | append-ubi | \
169 check-size
170 DEVICE_PACKAGES := kmod-usb3 kmod-mt7615e kmod-mt7615-firmware uboot-envtools
171 endef
172 TARGET_DEVICES += asus_rt-ac65p
173
174 define Device/asus_rt-ac85p
175 $(Device/dsa-migration)
176 DEVICE_VENDOR := ASUS
177 DEVICE_MODEL := RT-AC85P
178 IMAGE_SIZE := 51200k
179 UBINIZE_OPTS := -E 5
180 BLOCKSIZE := 128k
181 PAGESIZE := 2048
182 KERNEL_SIZE := 4096k
183 IMAGES += factory.bin
184 IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
185 IMAGE/factory.bin := append-kernel | pad-to $$(KERNEL_SIZE) | append-ubi | \
186 check-size
187 DEVICE_PACKAGES := kmod-usb3 kmod-mt7615e kmod-mt7615-firmware uboot-envtools
188 endef
189 TARGET_DEVICES += asus_rt-ac85p
190
191 define Device/asus_rt-n56u-b1
192 $(Device/dsa-migration)
193 DEVICE_VENDOR := ASUS
194 DEVICE_MODEL := RT-N56U
195 DEVICE_VARIANT := B1
196 IMAGE_SIZE := 16064k
197 DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 \
198 kmod-usb-ledtrig-usbport
199 endef
200 TARGET_DEVICES += asus_rt-n56u-b1
201
202 define Device/buffalo_wsr-1166dhp
203 $(Device/dsa-migration)
204 $(Device/uimage-lzma-loader)
205 IMAGE/sysupgrade.bin := trx | pad-rootfs | append-metadata
206 IMAGE_SIZE := 15936k
207 DEVICE_VENDOR := Buffalo
208 DEVICE_MODEL := WSR-1166DHP
209 DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2
210 SUPPORTED_DEVICES += wsr-1166
211 endef
212 TARGET_DEVICES += buffalo_wsr-1166dhp
213
214 define Device/buffalo_wsr-2533dhpl
215 $(Device/dsa-migration)
216 $(Device/uimage-lzma-loader)
217 IMAGE_SIZE := 7936k
218 DEVICE_VENDOR := Buffalo
219 DEVICE_MODEL := WSR-2533DHPL
220 DEVICE_ALT0_VENDOR := Buffalo
221 DEVICE_ALT0_MODEL := WSR-2533DHP
222 IMAGE/sysupgrade.bin := trx | pad-rootfs | append-metadata
223 DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware
224 endef
225 TARGET_DEVICES += buffalo_wsr-2533dhpl
226
227 define Device/buffalo_wsr-600dhp
228 $(Device/dsa-migration)
229 IMAGE_SIZE := 16064k
230 DEVICE_VENDOR := Buffalo
231 DEVICE_MODEL := WSR-600DHP
232 DEVICE_PACKAGES := kmod-mt7603 kmod-rt2800-pci
233 SUPPORTED_DEVICES += wsr-600
234 endef
235 TARGET_DEVICES += buffalo_wsr-600dhp
236
237 define Device/dlink_dir-8xx-a1
238 $(Device/dsa-migration)
239 IMAGE_SIZE := 16000k
240 DEVICE_VENDOR := D-Link
241 DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware
242 KERNEL_INITRAMFS := $$(KERNEL) | uimage-padhdr 96
243 IMAGES += factory.bin
244 IMAGE/sysupgrade.bin := append-kernel | append-rootfs | uimage-padhdr 96 |\
245 pad-rootfs | append-metadata | check-size
246 IMAGE/factory.bin := append-kernel | append-rootfs | uimage-padhdr 96 |\
247 check-size
248 endef
249
250 define Device/dlink_dir-xx60-a1
251 $(Device/dsa-migration)
252 BLOCKSIZE := 128k
253 PAGESIZE := 2048
254 KERNEL_SIZE := 4096k
255 IMAGE_SIZE := 40960k
256 UBINIZE_OPTS := -E 5
257 DEVICE_VENDOR := D-Link
258 DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware kmod-usb3 \
259 kmod-usb-ledtrig-usbport
260 KERNEL := $$(KERNEL) | uimage-padhdr 96
261 IMAGES += factory.bin
262 IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
263 IMAGE/factory.bin := append-kernel | pad-to $$(KERNEL_SIZE) | append-ubi | \
264 check-size
265 endef
266
267 define Device/dlink_dir-1960-a1
268 $(Device/dlink_dir-xx60-a1)
269 DEVICE_MODEL := DIR-1960
270 DEVICE_VARIANT := A1
271 endef
272 TARGET_DEVICES += dlink_dir-1960-a1
273
274 define Device/dlink_dir-2640-a1
275 $(Device/dlink_dir-xx60-a1)
276 DEVICE_MODEL := DIR-2640
277 DEVICE_VARIANT := A1
278 endef
279 TARGET_DEVICES += dlink_dir-2640-a1
280
281 define Device/dlink_dir-2660-a1
282 $(Device/dlink_dir-xx60-a1)
283 DEVICE_MODEL := DIR-2660
284 DEVICE_VARIANT := A1
285 endef
286 TARGET_DEVICES += dlink_dir-2660-a1
287
288 define Device/dlink_dir-860l-b1
289 $(Device/dsa-migration)
290 $(Device/seama)
291 BLOCKSIZE := 64k
292 SEAMA_SIGNATURE := wrgac13_dlink.2013gui_dir860lb
293 LOADER_TYPE := bin
294 KERNEL := kernel-bin | append-dtb | lzma | loader-kernel | relocate-kernel | \
295 lzma -a0 | uImage lzma
296 IMAGE_SIZE := 16064k
297 DEVICE_VENDOR := D-Link
298 DEVICE_MODEL := DIR-860L
299 DEVICE_VARIANT := B1
300 DEVICE_PACKAGES := kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport
301 SUPPORTED_DEVICES += dir-860l-b1
302 endef
303 TARGET_DEVICES += dlink_dir-860l-b1
304
305 define Device/dlink_dir-867-a1
306 $(Device/dlink_dir-8xx-a1)
307 DEVICE_MODEL := DIR-867
308 DEVICE_VARIANT := A1
309 endef
310 TARGET_DEVICES += dlink_dir-867-a1
311
312 define Device/dlink_dir-878-a1
313 $(Device/dlink_dir-8xx-a1)
314 DEVICE_MODEL := DIR-878
315 DEVICE_VARIANT := A1
316 endef
317 TARGET_DEVICES += dlink_dir-878-a1
318
319 define Device/dlink_dir-882-a1
320 $(Device/dlink_dir-8xx-a1)
321 DEVICE_MODEL := DIR-882
322 DEVICE_VARIANT := A1
323 DEVICE_PACKAGES += kmod-usb3 kmod-usb-ledtrig-usbport
324 endef
325 TARGET_DEVICES += dlink_dir-882-a1
326
327 define Device/d-team_newifi-d2
328 $(Device/dsa-migration)
329 $(Device/uimage-lzma-loader)
330 IMAGE_SIZE := 32448k
331 DEVICE_VENDOR := Newifi
332 DEVICE_MODEL := D2
333 DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 \
334 kmod-usb-ledtrig-usbport
335 endef
336 TARGET_DEVICES += d-team_newifi-d2
337
338 define Device/d-team_pbr-m1
339 $(Device/dsa-migration)
340 IMAGE_SIZE := 32448k
341 DEVICE_VENDOR := PandoraBox
342 DEVICE_MODEL := PBR-M1
343 DEVICE_PACKAGES := kmod-ata-ahci kmod-mt7603 kmod-mt76x2 kmod-sdhci-mt7620 \
344 kmod-usb3 kmod-usb-ledtrig-usbport
345 SUPPORTED_DEVICES += pbr-m1
346 endef
347 TARGET_DEVICES += d-team_pbr-m1
348
349 define Device/edimax_ra21s
350 $(Device/dsa-migration)
351 $(Device/uimage-lzma-loader)
352 IMAGE_SIZE := 16064k
353 DEVICE_VENDOR := Edimax
354 DEVICE_MODEL := RA21S
355 DEVICE_ALT0_VENDOR := Edimax
356 DEVICE_ALT0_MODEL := Gemini RA21S
357 IMAGES += factory.bin
358 IMAGE/factory.bin := $$(sysupgrade_bin) | check-size | \
359 elx-header 02020040 8844A2D168B45A2D
360 DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware
361 endef
362 TARGET_DEVICES += edimax_ra21s
363
364 define Device/edimax_re23s
365 $(Device/dsa-migration)
366 $(Device/uimage-lzma-loader)
367 IMAGE_SIZE := 15680k
368 DEVICE_VENDOR := Edimax
369 DEVICE_MODEL := RE23S
370 DEVICE_ALT0_VENDOR := Edimax
371 DEVICE_ALT0_MODEL := Gemini RE23S
372 IMAGE/sysupgrade.bin := append-kernel | append-rootfs | \
373 edimax-header -s CSYS -m RN76 -f 0x70000 -S 0x01100000 | pad-rootfs | \
374 append-metadata | check-size
375 IMAGES += factory.bin
376 IMAGE/factory.bin := append-kernel | append-rootfs | \
377 edimax-header -s CSYS -m RN76 -f 0x70000 -S 0x01100000 | pad-rootfs | \
378 check-size
379 DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware
380 endef
381 TARGET_DEVICES += edimax_re23s
382
383 define Device/edimax_rg21s
384 $(Device/dsa-migration)
385 $(Device/uimage-lzma-loader)
386 IMAGE_SIZE := 16064k
387 DEVICE_VENDOR := Edimax
388 DEVICE_MODEL := Gemini AC2600 RG21S
389 IMAGES += factory.bin
390 IMAGE/factory.bin := $$(sysupgrade_bin) | check-size | \
391 elx-header 02020038 8844A2D168B45A2D
392 DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware
393 endef
394 TARGET_DEVICES += edimax_rg21s
395
396 define Device/elecom_wrc-1167ghbk2-s
397 $(Device/dsa-migration)
398 IMAGE_SIZE := 15488k
399 DEVICE_VENDOR := ELECOM
400 DEVICE_MODEL := WRC-1167GHBK2-S
401 IMAGES += factory.bin
402 IMAGE/factory.bin := $$(sysupgrade_bin) | check-size | \
403 elecom-wrc-factory WRC-1167GHBK2-S 0.00
404 DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware
405 endef
406 TARGET_DEVICES += elecom_wrc-1167ghbk2-s
407
408 define Device/elecom_wrc-gs
409 $(Device/dsa-migration)
410 $(Device/uimage-lzma-loader)
411 DEVICE_VENDOR := ELECOM
412 IMAGES += factory.bin
413 IMAGE/factory.bin := $$(sysupgrade_bin) | check-size | \
414 elecom-wrc-gs-factory $$$$(ELECOM_HWNAME) 0.00
415 DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware
416 endef
417
418 define Device/elecom_wrc-1750gs
419 $(Device/elecom_wrc-gs)
420 IMAGE_SIZE := 11264k
421 DEVICE_MODEL := WRC-1750GS
422 ELECOM_HWNAME := WRC-1750GS
423 endef
424 TARGET_DEVICES += elecom_wrc-1750gs
425
426 define Device/elecom_wrc-1750gsv
427 $(Device/elecom_wrc-gs)
428 IMAGE_SIZE := 11264k
429 DEVICE_MODEL := WRC-1750GSV
430 ELECOM_HWNAME := WRC-1750GSV
431 endef
432 TARGET_DEVICES += elecom_wrc-1750gsv
433
434 define Device/elecom_wrc-1900gst
435 $(Device/elecom_wrc-gs)
436 IMAGE_SIZE := 11264k
437 DEVICE_MODEL := WRC-1900GST
438 ELECOM_HWNAME := WRC-1900GST
439 endef
440 TARGET_DEVICES += elecom_wrc-1900gst
441
442 define Device/elecom_wrc-2533gst
443 $(Device/elecom_wrc-gs)
444 IMAGE_SIZE := 11264k
445 DEVICE_MODEL := WRC-2533GST
446 ELECOM_HWNAME := WRC-2533GST
447 endef
448 TARGET_DEVICES += elecom_wrc-2533gst
449
450 define Device/elecom_wrc-2533gst2
451 $(Device/elecom_wrc-gs)
452 IMAGE_SIZE := 24576k
453 DEVICE_MODEL := WRC-2533GST2
454 ELECOM_HWNAME := WRC-2533GST2
455 endef
456 TARGET_DEVICES += elecom_wrc-2533gst2
457
458 define Device/firefly_firewrt
459 $(Device/dsa-migration)
460 IMAGE_SIZE := 16064k
461 DEVICE_VENDOR := Firefly
462 DEVICE_MODEL := FireWRT
463 DEVICE_PACKAGES := kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport
464 SUPPORTED_DEVICES += firewrt
465 endef
466 TARGET_DEVICES += firefly_firewrt
467
468 define Device/gehua_ghl-r-001
469 $(Device/dsa-migration)
470 IMAGE_SIZE := 32448k
471 DEVICE_VENDOR := GeHua
472 DEVICE_MODEL := GHL-R-001
473 DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 \
474 kmod-usb-ledtrig-usbport
475 endef
476 TARGET_DEVICES += gehua_ghl-r-001
477
478 define Device/gnubee_gb-pc1
479 $(Device/dsa-migration)
480 DEVICE_VENDOR := GnuBee
481 DEVICE_MODEL := Personal Cloud One
482 DEVICE_PACKAGES := kmod-ata-ahci kmod-usb3 kmod-sdhci-mt7620 -wpad-basic-wolfssl
483 IMAGE_SIZE := 32448k
484 endef
485 TARGET_DEVICES += gnubee_gb-pc1
486
487 define Device/gnubee_gb-pc2
488 $(Device/dsa-migration)
489 DEVICE_VENDOR := GnuBee
490 DEVICE_MODEL := Personal Cloud Two
491 DEVICE_PACKAGES := kmod-ata-ahci kmod-usb3 kmod-sdhci-mt7620 -wpad-basic-wolfssl
492 IMAGE_SIZE := 32448k
493 endef
494 TARGET_DEVICES += gnubee_gb-pc2
495
496 define Device/hiwifi_hc5962
497 $(Device/dsa-migration)
498 BLOCKSIZE := 128k
499 PAGESIZE := 2048
500 KERNEL_SIZE := 4096k
501 UBINIZE_OPTS := -E 5
502 IMAGE_SIZE := 32768k
503 IMAGES += factory.bin
504 IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
505 IMAGE/factory.bin := append-kernel | pad-to $$(KERNEL_SIZE) | append-ubi | \
506 check-size
507 DEVICE_VENDOR := HiWiFi
508 DEVICE_MODEL := HC5962
509 DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3
510 endef
511 TARGET_DEVICES += hiwifi_hc5962
512
513 define Device/iodata_wn-ax1167gr
514 $(Device/dsa-migration)
515 $(Device/uimage-lzma-loader)
516 IMAGE_SIZE := 15552k
517 KERNEL_INITRAMFS := $$(KERNEL) | \
518 iodata-factory 7864320 4 0x1055 $(KDIR)/tmp/$$(KERNEL_INITRAMFS_PREFIX)-factory.bin
519 DEVICE_VENDOR := I-O DATA
520 DEVICE_MODEL := WN-AX1167GR
521 DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2
522 endef
523 TARGET_DEVICES += iodata_wn-ax1167gr
524
525 define Device/iodata_nand
526 $(Device/dsa-migration)
527 DEVICE_VENDOR := I-O DATA
528 BLOCKSIZE := 128k
529 PAGESIZE := 2048
530 UBINIZE_OPTS := -E 5
531 KERNEL_SIZE := 4096k
532 IMAGE_SIZE := 51200k
533 LOADER_TYPE := bin
534 KERNEL := kernel-bin | append-dtb | lzma | loader-kernel | lzma | uImage lzma
535 IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
536 endef
537
538 # The OEM webinterface expects an kernel with initramfs which has the uImage
539 # header field ih_name.
540 # We don't want to set the header name field for the kernel include in the
541 # sysupgrade image as well, as this image shouldn't be accepted by the OEM
542 # webinterface. It will soft-brick the board.
543
544 define Device/iodata_wn-ax1167gr2
545 $(Device/iodata_nand)
546 DEVICE_MODEL := WN-AX1167GR2
547 KERNEL_INITRAMFS := $(KERNEL_DTB) | loader-kernel | lzma | \
548 uImage lzma -M 0x434f4d42 -n '3.10(XBC.1)b10' | iodata-mstc-header
549 DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware
550 endef
551 TARGET_DEVICES += iodata_wn-ax1167gr2
552
553 define Device/iodata_wn-ax2033gr
554 $(Device/iodata_nand)
555 DEVICE_MODEL := WN-AX2033GR
556 KERNEL_INITRAMFS := $(KERNEL_DTB) | loader-kernel | lzma | \
557 uImage lzma -M 0x434f4d42 -n '3.10(VST.1)C10' | iodata-mstc-header
558 DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615e kmod-mt7615-firmware
559 endef
560 TARGET_DEVICES += iodata_wn-ax2033gr
561
562 define Device/iodata_wn-dx1167r
563 $(Device/iodata_nand)
564 DEVICE_MODEL := WN-DX1167R
565 KERNEL_INITRAMFS := $(KERNEL_DTB) | loader-kernel | lzma | \
566 uImage lzma -M 0x434f4d43 -n '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) | uImage lzma -n '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-3g
1195 $(Device/dsa-migration)
1196 $(Device/uimage-lzma-loader)
1197 BLOCKSIZE := 128k
1198 PAGESIZE := 2048
1199 KERNEL_SIZE := 4096k
1200 IMAGE_SIZE := 124416k
1201 UBINIZE_OPTS := -E 5
1202 IMAGES += kernel1.bin rootfs0.bin
1203 IMAGE/kernel1.bin := append-kernel
1204 IMAGE/rootfs0.bin := append-ubi | check-size
1205 IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
1206 DEVICE_VENDOR := Xiaomi
1207 DEVICE_MODEL := Mi Router 3G
1208 DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 \
1209 kmod-usb-ledtrig-usbport uboot-envtools
1210 SUPPORTED_DEVICES += R3G mir3g xiaomi,mir3g
1211 endef
1212 TARGET_DEVICES += xiaomi_mi-router-3g
1213
1214 define Device/xiaomi_mi-router-3g-v2
1215 $(Device/dsa-migration)
1216 $(Device/uimage-lzma-loader)
1217 IMAGE_SIZE := 14848k
1218 DEVICE_VENDOR := Xiaomi
1219 DEVICE_MODEL := Mi Router 3G
1220 DEVICE_VARIANT := v2
1221 DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2
1222 SUPPORTED_DEVICES += xiaomi,mir3g-v2
1223 endef
1224 TARGET_DEVICES += xiaomi_mi-router-3g-v2
1225
1226 define Device/xiaomi_mi-router-3-pro
1227 $(Device/dsa-migration)
1228 $(Device/uimage-lzma-loader)
1229 BLOCKSIZE := 128k
1230 PAGESIZE := 2048
1231 KERNEL_SIZE:= 4096k
1232 UBINIZE_OPTS := -E 5
1233 IMAGE_SIZE := 255488k
1234 DEVICE_VENDOR := Xiaomi
1235 DEVICE_MODEL := Mi Router 3 Pro
1236 IMAGES += factory.bin
1237 IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
1238 IMAGE/factory.bin := append-kernel | pad-to $$(KERNEL_SIZE) | append-ubi | \
1239 check-size
1240 DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware kmod-usb3 \
1241 kmod-usb-ledtrig-usbport uboot-envtools
1242 SUPPORTED_DEVICES += xiaomi,mir3p
1243 endef
1244 TARGET_DEVICES += xiaomi_mi-router-3-pro
1245
1246 define Device/xiaomi_mi-router-4a-gigabit
1247 $(Device/dsa-migration)
1248 $(Device/uimage-lzma-loader)
1249 IMAGE_SIZE := 14848k
1250 DEVICE_VENDOR := Xiaomi
1251 DEVICE_MODEL := Mi Router 4A
1252 DEVICE_VARIANT := Gigabit Edition
1253 DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2
1254 endef
1255 TARGET_DEVICES += xiaomi_mi-router-4a-gigabit
1256
1257 define Device/xiaomi_mi-router-ac2100
1258 $(Device/xiaomi-ac2100)
1259 DEVICE_MODEL := Mi Router AC2100
1260 endef
1261 TARGET_DEVICES += xiaomi_mi-router-ac2100
1262
1263 define Device/xiaomi_redmi-router-ac2100
1264 $(Device/xiaomi-ac2100)
1265 DEVICE_MODEL := Redmi Router AC2100
1266 endef
1267 TARGET_DEVICES += xiaomi_redmi-router-ac2100
1268
1269 define Device/xiaoyu_xy-c5
1270 $(Device/dsa-migration)
1271 IMAGE_SIZE := 32448k
1272 DEVICE_VENDOR := XiaoYu
1273 DEVICE_MODEL := XY-C5
1274 DEVICE_PACKAGES := kmod-ata-ahci kmod-usb3 -wpad-basic-wolfssl
1275 endef
1276 TARGET_DEVICES += xiaoyu_xy-c5
1277
1278 define Device/xzwifi_creativebox-v1
1279 $(Device/dsa-migration)
1280 IMAGE_SIZE := 32448k
1281 DEVICE_VENDOR := CreativeBox
1282 DEVICE_MODEL := v1
1283 DEVICE_PACKAGES := kmod-ata-ahci kmod-mt7603 kmod-mt76x2 kmod-sdhci-mt7620 \
1284 kmod-usb3 -wpad-basic-wolfssl
1285 endef
1286 TARGET_DEVICES += xzwifi_creativebox-v1
1287
1288 define Device/youhua_wr1200js
1289 $(Device/dsa-migration)
1290 IMAGE_SIZE := 16064k
1291 DEVICE_VENDOR := YouHua
1292 DEVICE_MODEL := WR1200JS
1293 DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 \
1294 kmod-usb-ledtrig-usbport
1295 endef
1296 TARGET_DEVICES += youhua_wr1200js
1297
1298 define Device/youku_yk-l2
1299 $(Device/dsa-migration)
1300 IMAGE_SIZE := 16064k
1301 DEVICE_VENDOR := Youku
1302 DEVICE_MODEL := YK-L2
1303 DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 \
1304 kmod-usb-ledtrig-usbport
1305 endef
1306 TARGET_DEVICES += youku_yk-l2
1307
1308 define Device/zbtlink_zbt-we1326
1309 $(Device/dsa-migration)
1310 IMAGE_SIZE := 16064k
1311 DEVICE_VENDOR := Zbtlink
1312 DEVICE_MODEL := ZBT-WE1326
1313 DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 kmod-sdhci-mt7620
1314 SUPPORTED_DEVICES += zbt-we1326
1315 endef
1316 TARGET_DEVICES += zbtlink_zbt-we1326
1317
1318 define Device/zbtlink_zbt-we3526
1319 $(Device/dsa-migration)
1320 IMAGE_SIZE := 16064k
1321 DEVICE_VENDOR := Zbtlink
1322 DEVICE_MODEL := ZBT-WE3526
1323 DEVICE_PACKAGES := kmod-sdhci-mt7620 kmod-mt7603 kmod-mt76x2 kmod-usb3 \
1324 kmod-usb-ledtrig-usbport
1325 endef
1326 TARGET_DEVICES += zbtlink_zbt-we3526
1327
1328 define Device/zbtlink_zbt-wg2626
1329 $(Device/dsa-migration)
1330 IMAGE_SIZE := 16064k
1331 DEVICE_VENDOR := Zbtlink
1332 DEVICE_MODEL := ZBT-WG2626
1333 DEVICE_PACKAGES := kmod-ata-ahci kmod-sdhci-mt7620 kmod-mt76x2 kmod-usb3 \
1334 kmod-usb-ledtrig-usbport
1335 SUPPORTED_DEVICES += zbt-wg2626
1336 endef
1337 TARGET_DEVICES += zbtlink_zbt-wg2626
1338
1339 define Device/zbtlink_zbt-wg3526-16m
1340 $(Device/dsa-migration)
1341 $(Device/uimage-lzma-loader)
1342 IMAGE_SIZE := 16064k
1343 DEVICE_VENDOR := Zbtlink
1344 DEVICE_MODEL := ZBT-WG3526
1345 DEVICE_VARIANT := 16M
1346 DEVICE_PACKAGES := kmod-ata-ahci kmod-sdhci-mt7620 kmod-mt7603 kmod-mt76x2 \
1347 kmod-usb3 kmod-usb-ledtrig-usbport
1348 SUPPORTED_DEVICES += zbt-wg3526 zbt-wg3526-16M
1349 endef
1350 TARGET_DEVICES += zbtlink_zbt-wg3526-16m
1351
1352 define Device/zbtlink_zbt-wg3526-32m
1353 $(Device/dsa-migration)
1354 $(Device/uimage-lzma-loader)
1355 IMAGE_SIZE := 32448k
1356 DEVICE_VENDOR := Zbtlink
1357 DEVICE_MODEL := ZBT-WG3526
1358 DEVICE_VARIANT := 32M
1359 DEVICE_PACKAGES := kmod-ata-ahci kmod-sdhci-mt7620 kmod-mt7603 kmod-mt76x2 \
1360 kmod-usb3 kmod-usb-ledtrig-usbport
1361 SUPPORTED_DEVICES += ac1200pro zbt-wg3526-32M
1362 endef
1363 TARGET_DEVICES += zbtlink_zbt-wg3526-32m
1364
1365 define Device/zio_freezio
1366 $(Device/dsa-migration)
1367 IMAGE_SIZE := 16064k
1368 DEVICE_VENDOR := ZIO
1369 DEVICE_MODEL := FREEZIO
1370 DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 \
1371 kmod-usb-ledtrig-usbport
1372 endef
1373 TARGET_DEVICES += zio_freezio
1374
1375 define Device/zyxel_wap6805
1376 $(Device/dsa-migration)
1377 BLOCKSIZE := 128k
1378 PAGESIZE := 2048
1379 KERNEL_SIZE := 4096k
1380 UBINIZE_OPTS := -E 5
1381 IMAGE_SIZE := 32448k
1382 DEVICE_VENDOR := ZyXEL
1383 DEVICE_MODEL := WAP6805
1384 DEVICE_PACKAGES := kmod-mt7603 kmod-mt7621-qtn-rgmii
1385 KERNEL := $(KERNEL_DTB) | uImage lzma | uimage-padhdr 160
1386 IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
1387 endef
1388 TARGET_DEVICES += zyxel_wap6805