ramips: add support for I-O DATA WN-AX2033GR
[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 SERCOMM_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-gst-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 | \
71 gzip -c | 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 | \
78 gzip -c | 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/netis-tail
85 echo -n $(1) >> $@
86 echo -n $(UIMAGE_NAME)-yun | $(STAGING_DIR_HOST)/bin/mkhash md5 | \
87 sed 's/../\\\\x&/g' | xargs echo -ne >> $@
88 endef
89
90 define Build/ubnt-erx-factory-image
91 if [ -e $(KDIR)/tmp/$(KERNEL_INITRAMFS_IMAGE) -a "$$(stat -c%s $@)" -lt "$(KERNEL_SIZE)" ]; then \
92 echo '21001:6' > $(1).compat; \
93 $(TAR) -cf $(1) --transform='s/^.*/compat/' $(1).compat; \
94 \
95 $(TAR) -rf $(1) --transform='s/^.*/vmlinux.tmp/' $(KDIR)/tmp/$(KERNEL_INITRAMFS_IMAGE); \
96 mkhash md5 $(KDIR)/tmp/$(KERNEL_INITRAMFS_IMAGE) > $(1).md5; \
97 $(TAR) -rf $(1) --transform='s/^.*/vmlinux.tmp.md5/' $(1).md5; \
98 \
99 echo "dummy" > $(1).rootfs; \
100 $(TAR) -rf $(1) --transform='s/^.*/squashfs.tmp/' $(1).rootfs; \
101 \
102 mkhash md5 $(1).rootfs > $(1).md5; \
103 $(TAR) -rf $(1) --transform='s/^.*/squashfs.tmp.md5/' $(1).md5; \
104 \
105 echo '$(BOARD) $(VERSION_CODE) $(VERSION_NUMBER)' > $(1).version; \
106 $(TAR) -rf $(1) --transform='s/^.*/version.tmp/' $(1).version; \
107 \
108 $(CP) $(1) $(BIN_DIR)/; \
109 else \
110 echo "WARNING: initramfs kernel image too big, cannot generate factory image" >&2; \
111 fi
112 endef
113
114 define Device/afoundry_ew1200
115 IMAGE_SIZE := 16064k
116 DEVICE_VENDOR := AFOUNDRY
117 DEVICE_MODEL := EW1200
118 DEVICE_PACKAGES := kmod-ata-ahci kmod-mt76x2 kmod-mt7603 kmod-usb3 \
119 kmod-usb-ledtrig-usbport wpad-basic
120 SUPPORTED_DEVICES += ew1200
121 endef
122 TARGET_DEVICES += afoundry_ew1200
123
124 define Device/alfa-network_quad-e4g
125 IMAGE_SIZE := 16064k
126 DEVICE_VENDOR := ALFA Network
127 DEVICE_MODEL := Quad-E4G
128 DEVICE_PACKAGES := kmod-ata-ahci kmod-sdhci-mt7620 kmod-usb3 uboot-envtools
129 endef
130 TARGET_DEVICES += alfa-network_quad-e4g
131
132 define Device/asiarf_ap7621-001
133 IMAGE_SIZE := 16000k
134 DEVICE_VENDOR := AsiaRF
135 DEVICE_MODEL := AP7621-001
136 DEVICE_PACKAGES := kmod-sdhci-mt7620 kmod-mt76x2 kmod-usb3
137 endef
138 TARGET_DEVICES += asiarf_ap7621-001
139
140 define Device/asiarf_ap7621-nv1
141 IMAGE_SIZE := 16000k
142 DEVICE_VENDOR := AsiaRF
143 DEVICE_MODEL := AP7621-NV1
144 DEVICE_PACKAGES := kmod-sdhci-mt7620 kmod-mt76x2 kmod-usb3
145 endef
146 TARGET_DEVICES += asiarf_ap7621-nv1
147
148 define Device/asus_rt-ac57u
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 wpad-basic
154 endef
155 TARGET_DEVICES += asus_rt-ac57u
156
157 define Device/asus_rt-ac65p
158 DEVICE_VENDOR := ASUS
159 DEVICE_MODEL := RT-AC65P
160 IMAGE_SIZE := 51200k
161 UBINIZE_OPTS := -E 5
162 BLOCKSIZE := 128k
163 PAGESIZE := 2048
164 KERNEL_SIZE := 4096k
165 IMAGES += factory.bin
166 IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
167 IMAGE/factory.bin := append-kernel | pad-to $$(KERNEL_SIZE) | append-ubi | \
168 check-size
169 DEVICE_PACKAGES := kmod-usb3 kmod-mt7615e wpad-basic uboot-envtools
170 endef
171 TARGET_DEVICES += asus_rt-ac65p
172
173 define Device/asus_rt-ac85p
174 DEVICE_VENDOR := ASUS
175 DEVICE_MODEL := RT-AC85P
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 wpad-basic uboot-envtools
186 endef
187 TARGET_DEVICES += asus_rt-ac85p
188
189 define Device/buffalo_wsr-1166dhp
190 IMAGE/sysupgrade.bin := trx | pad-rootfs | append-metadata
191 IMAGE_SIZE := 15936k
192 DEVICE_VENDOR := Buffalo
193 DEVICE_MODEL := WSR-1166DHP
194 DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 wpad-basic
195 SUPPORTED_DEVICES += wsr-1166
196 endef
197 TARGET_DEVICES += buffalo_wsr-1166dhp
198
199 define Device/buffalo_wsr-2533dhpl
200 IMAGE_SIZE := 7936k
201 DEVICE_VENDOR := Buffalo
202 DEVICE_MODEL := WSR-2533DHPL
203 IMAGE/sysupgrade.bin := trx | pad-rootfs | append-metadata
204 DEVICE_PACKAGES := kmod-mt7615e wpad-basic
205 endef
206 TARGET_DEVICES += buffalo_wsr-2533dhpl
207
208 define Device/buffalo_wsr-600dhp
209 IMAGE_SIZE := 16064k
210 DEVICE_VENDOR := Buffalo
211 DEVICE_MODEL := WSR-600DHP
212 DEVICE_PACKAGES := kmod-mt7603 kmod-rt2800-pci wpad-basic
213 SUPPORTED_DEVICES += wsr-600
214 endef
215 TARGET_DEVICES += buffalo_wsr-600dhp
216
217 define Device/dlink_dir-860l-b1
218 $(Device/seama)
219 BLOCKSIZE := 64k
220 SEAMA_SIGNATURE := wrgac13_dlink.2013gui_dir860lb
221 KERNEL := kernel-bin | append-dtb | relocate-kernel | lzma | uImage lzma
222 IMAGE_SIZE := 16064k
223 DEVICE_VENDOR := D-Link
224 DEVICE_MODEL := DIR-860L
225 DEVICE_VARIANT := B1
226 DEVICE_PACKAGES := kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic
227 SUPPORTED_DEVICES += dir-860l-b1
228 endef
229 TARGET_DEVICES += dlink_dir-860l-b1
230
231 define Device/d-team_newifi-d2
232 IMAGE_SIZE := 32448k
233 DEVICE_VENDOR := Newifi
234 DEVICE_MODEL := D2
235 DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 \
236 kmod-usb-ledtrig-usbport wpad-basic
237 endef
238 TARGET_DEVICES += d-team_newifi-d2
239
240 define Device/d-team_pbr-m1
241 IMAGE_SIZE := 16064k
242 DEVICE_VENDOR := PandoraBox
243 DEVICE_MODEL := PBR-M1
244 DEVICE_PACKAGES := kmod-ata-ahci kmod-mt7603 kmod-mt76x2 kmod-sdhci-mt7620 \
245 kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic
246 SUPPORTED_DEVICES += pbr-m1
247 endef
248 TARGET_DEVICES += d-team_pbr-m1
249
250 define Device/edimax_ra21s
251 IMAGE_SIZE := 16064k
252 DEVICE_VENDOR := Edimax
253 DEVICE_MODEL := RA21S
254 DEVICE_ALT0_VENDOR := Edimax
255 DEVICE_ALT0_MODEL := Gemini RA21S
256 IMAGES += factory.bin
257 IMAGE/factory.bin := $$(sysupgrade_bin) | check-size | \
258 elx-header 02020040 8844A2D168B45A2D
259 DEVICE_PACKAGES := kmod-mt7615e wpad-basic
260 endef
261 TARGET_DEVICES += edimax_ra21s
262
263 define Device/edimax_rg21s
264 IMAGE_SIZE := 16064k
265 DEVICE_VENDOR := Edimax
266 DEVICE_MODEL := Gemini AC2600 RG21S
267 IMAGES += factory.bin
268 IMAGE/factory.bin := $$(sysupgrade_bin) | check-size | \
269 elx-header 02020038 8844A2D168B45A2D
270 DEVICE_PACKAGES := kmod-mt7615e wpad-basic
271 endef
272 TARGET_DEVICES += edimax_rg21s
273
274 define Device/elecom_wrc-1167ghbk2-s
275 IMAGE_SIZE := 15488k
276 DEVICE_VENDOR := ELECOM
277 DEVICE_MODEL := WRC-1167GHBK2-S
278 IMAGES += factory.bin
279 IMAGE/factory.bin := $$(sysupgrade_bin) | check-size | \
280 elecom-wrc-factory WRC-1167GHBK2-S 0.00
281 DEVICE_PACKAGES := kmod-mt7615e wpad-basic
282 endef
283 TARGET_DEVICES += elecom_wrc-1167ghbk2-s
284
285 define Device/elecom_wrc-1900gst
286 IMAGE_SIZE := 11264k
287 DEVICE_VENDOR := ELECOM
288 DEVICE_MODEL := WRC-1900GST
289 IMAGES += factory.bin
290 IMAGE/factory.bin := $$(sysupgrade_bin) | check-size | \
291 elecom-gst-factory WRC-1900GST 0.00
292 endef
293 TARGET_DEVICES += elecom_wrc-1900gst
294
295 define Device/elecom_wrc-2533gst
296 IMAGE_SIZE := 11264k
297 DEVICE_VENDOR := ELECOM
298 DEVICE_MODEL := WRC-2533GST
299 IMAGES += factory.bin
300 IMAGE/factory.bin := $$(sysupgrade_bin) | check-size | \
301 elecom-gst-factory WRC-2533GST 0.00
302 endef
303 TARGET_DEVICES += elecom_wrc-2533gst
304
305 define Device/firefly_firewrt
306 IMAGE_SIZE := 16064k
307 DEVICE_VENDOR := Firefly
308 DEVICE_MODEL := FireWRT
309 DEVICE_PACKAGES := kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic
310 SUPPORTED_DEVICES += firewrt
311 endef
312 TARGET_DEVICES += firefly_firewrt
313
314 define Device/gehua_ghl-r-001
315 IMAGE_SIZE := 32448k
316 DEVICE_VENDOR := GeHua
317 DEVICE_MODEL := GHL-R-001
318 DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 \
319 kmod-usb-ledtrig-usbport wpad-basic
320 endef
321 TARGET_DEVICES += gehua_ghl-r-001
322
323 define Device/gnubee_gb-pc1
324 DEVICE_VENDOR := GnuBee
325 DEVICE_MODEL := Personal Cloud One
326 DEVICE_PACKAGES := kmod-ata-ahci kmod-usb3 kmod-sdhci-mt7620
327 IMAGE_SIZE := 32448k
328 endef
329 TARGET_DEVICES += gnubee_gb-pc1
330
331 define Device/gnubee_gb-pc2
332 DEVICE_VENDOR := GnuBee
333 DEVICE_MODEL := Personal Cloud Two
334 DEVICE_PACKAGES := kmod-ata-ahci kmod-usb3 kmod-sdhci-mt7620
335 IMAGE_SIZE := 32448k
336 endef
337 TARGET_DEVICES += gnubee_gb-pc2
338
339 define Device/hiwifi_hc5962
340 BLOCKSIZE := 128k
341 PAGESIZE := 2048
342 KERNEL_SIZE := 2097152
343 UBINIZE_OPTS := -E 5
344 IMAGE_SIZE := 32768k
345 IMAGES += factory.bin
346 IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
347 IMAGE/factory.bin := append-kernel | pad-to $$(KERNEL_SIZE) | append-ubi | \
348 check-size
349 DEVICE_VENDOR := HiWiFi
350 DEVICE_MODEL := HC5962
351 DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 wpad-basic
352 SUPPORTED_DEVICES += hc5962
353 # Kernel partition too small
354 DEFAULT := n
355 endef
356 TARGET_DEVICES += hiwifi_hc5962
357
358 define Device/iodata_wn-ax1167gr
359 IMAGE_SIZE := 15552k
360 KERNEL_INITRAMFS := $$(KERNEL) | \
361 iodata-factory 7864320 4 0x1055 $(KDIR)/tmp/$$(KERNEL_INITRAMFS_PREFIX)-factory.bin
362 DEVICE_VENDOR := I-O DATA
363 DEVICE_MODEL := WN-AX1167GR
364 DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 wpad-basic
365 endef
366 TARGET_DEVICES += iodata_wn-ax1167gr
367
368 define Device/iodata_wn-ax1167gr2
369 BLOCKSIZE := 128k
370 PAGESIZE := 2048
371 UBINIZE_OPTS := -E 5
372 UIMAGE_MAGIC := 0x434f4d42
373 KERNEL_SIZE := 4096k
374 IMAGE_SIZE := 51200k
375 DEVICE_VENDOR := I-O DATA
376 DEVICE_MODEL := WN-AX1167GR2
377 KERNEL_INITRAMFS := $(KERNEL_DTB) | custom-initramfs-uimage 3.10(XBC.1)b10 | \
378 iodata-mstc-header
379 IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
380 DEVICE_PACKAGES := kmod-mt7615e wpad-basic
381 endef
382 TARGET_DEVICES += iodata_wn-ax1167gr2
383
384 define Device/iodata_wn-ax2033gr
385 BLOCKSIZE := 128k
386 PAGESIZE := 2048
387 UBINIZE_OPTS := -E 5
388 UIMAGE_MAGIC := 0x434f4d42
389 KERNEL_SIZE := 4096k
390 IMAGE_SIZE := 51200k
391 DEVICE_VENDOR := I-O DATA
392 DEVICE_MODEL := WN-AX2033GR
393 KERNEL_INITRAMFS := $(KERNEL_DTB) | custom-initramfs-uimage 3.10(VST.1)C10 | \
394 iodata-mstc-header
395 IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
396 DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615e wpad-basic
397 endef
398 TARGET_DEVICES += iodata_wn-ax2033gr
399
400 define Device/iodata_wn-dx1167r
401 BLOCKSIZE := 128k
402 PAGESIZE := 2048
403 UBINIZE_OPTS := -E 5
404 UIMAGE_MAGIC := 0x434f4d43
405 KERNEL_SIZE := 4096k
406 IMAGE_SIZE := 51200k
407 DEVICE_VENDOR := I-O DATA
408 DEVICE_MODEL := WN-DX1167R
409 KERNEL_INITRAMFS := $(KERNEL_DTB) | custom-initramfs-uimage 3.10(XIK.1)b10 | \
410 iodata-mstc-header
411 IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
412 DEVICE_PACKAGES := kmod-mt7615e wpad-basic
413 endef
414 TARGET_DEVICES += iodata_wn-dx1167r
415
416 define Device/iodata_wn-gx300gr
417 IMAGE_SIZE := 7616k
418 DEVICE_VENDOR := I-O DATA
419 DEVICE_MODEL := WN-GX300GR
420 DEVICE_PACKAGES := kmod-mt7603 wpad-basic
421 endef
422 TARGET_DEVICES += iodata_wn-gx300gr
423
424 define Device/iodata_wnpr2600g
425 DEVICE_VENDOR := I-O DATA
426 DEVICE_MODEL := WNPR2600G
427 IMAGE_SIZE := 13952k
428 IMAGES += factory.bin
429 IMAGE/factory.bin := $$(sysupgrade_bin) | check-size | \
430 elx-header 0104003a 8844A2D168B45A2D
431 DEVICE_PACKAGES := kmod-mt7615e wpad-basic
432 endef
433 TARGET_DEVICES += iodata_wnpr2600g
434
435 define Device/iptime_a6ns-m
436 IMAGE_SIZE := 16128k
437 UIMAGE_NAME := a6nm
438 DEVICE_VENDOR := ipTIME
439 DEVICE_MODEL := A6ns-M
440 DEVICE_PACKAGES := kmod-mt7615e kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic
441 endef
442 TARGET_DEVICES += iptime_a6ns-m
443
444 define Device/iptime_a8004t
445 IMAGE_SIZE := 16128k
446 UIMAGE_NAME := a8004t
447 DEVICE_VENDOR := ipTIME
448 DEVICE_MODEL := A8004T
449 DEVICE_PACKAGES := kmod-mt7615e kmod-usb3 wpad-basic
450 endef
451 TARGET_DEVICES += iptime_a8004t
452
453 define Device/jcg_jhr-ac876m
454 IMAGE_SIZE := 16064k
455 IMAGES += factory.bin
456 IMAGE/factory.bin := $$(sysupgrade_bin) | check-size | \
457 jcg-header 89.1
458 JCG_MAXSIZE := 16064k
459 DEVICE_VENDOR := JCG
460 DEVICE_MODEL := JHR-AC876M
461 DEVICE_PACKAGES := kmod-mt7615e kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic
462 endef
463 TARGET_DEVICES += jcg_jhr-ac876m
464
465 define Device/lenovo_newifi-d1
466 IMAGE_SIZE := 32448k
467 DEVICE_VENDOR := Newifi
468 DEVICE_MODEL := D1
469 DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 kmod-sdhci-mt7620 \
470 kmod-usb-ledtrig-usbport wpad-basic
471 SUPPORTED_DEVICES += newifi-d1
472 endef
473 TARGET_DEVICES += lenovo_newifi-d1
474
475 define Device/linksys_re6500
476 IMAGE_SIZE := 7872k
477 DEVICE_VENDOR := Linksys
478 DEVICE_MODEL := RE6500
479 DEVICE_PACKAGES := kmod-mt76x2 wpad-basic
480 SUPPORTED_DEVICES += re6500
481 endef
482 TARGET_DEVICES += linksys_re6500
483
484 define Device/mediatek_ap-mt7621a-v60
485 IMAGE_SIZE := 7872k
486 DEVICE_VENDOR := Mediatek
487 DEVICE_MODEL := AP-MT7621A-V60 EVB
488 DEVICE_PACKAGES := kmod-usb3 kmod-sdhci-mt7620 kmod-sound-mt7620
489 endef
490 TARGET_DEVICES += mediatek_ap-mt7621a-v60
491
492 define Device/mediatek_mt7621-eval-board
493 BLOCKSIZE := 64k
494 IMAGE_SIZE := 15104k
495 DEVICE_VENDOR := MediaTek
496 DEVICE_MODEL := MT7621 EVB
497 SUPPORTED_DEVICES += mt7621
498 endef
499 TARGET_DEVICES += mediatek_mt7621-eval-board
500
501 define Device/MikroTik
502 DEVICE_VENDOR := MikroTik
503 BLOCKSIZE := 64k
504 IMAGE_SIZE := 16128k
505 DEVICE_PACKAGES := kmod-usb3
506 LOADER_TYPE := elf
507 PLATFORM := mt7621
508 KERNEL := $(KERNEL_DTB) | loader-kernel
509 IMAGE/sysupgrade.bin := append-kernel | kernel2minor -s 1024 | \
510 pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs | append-metadata | \
511 check-size
512 endef
513
514 define Device/mikrotik_routerboard-750gr3
515 $(Device/MikroTik)
516 DEVICE_MODEL := RouterBOARD 750Gr3
517 DEVICE_PACKAGES += kmod-gpio-beeper
518 SUPPORTED_DEVICES += mikrotik,rb750gr3
519 endef
520 TARGET_DEVICES += mikrotik_routerboard-750gr3
521
522 define Device/mikrotik_routerboard-m11g
523 $(Device/MikroTik)
524 DEVICE_MODEL := RouterBOARD M11G
525 SUPPORTED_DEVICES += mikrotik,rbm11g
526 endef
527 TARGET_DEVICES += mikrotik_routerboard-m11g
528
529 define Device/mikrotik_routerboard-m33g
530 $(Device/MikroTik)
531 DEVICE_MODEL := RouterBOARD M33G
532 SUPPORTED_DEVICES += mikrotik,rbm33g
533 endef
534 TARGET_DEVICES += mikrotik_routerboard-m33g
535
536 define Device/mqmaker_witi
537 IMAGE_SIZE := 16064k
538 DEVICE_VENDOR := MQmaker
539 DEVICE_MODEL := WiTi
540 DEVICE_PACKAGES := kmod-ata-ahci kmod-mt76x2 kmod-sdhci-mt7620 kmod-usb3 \
541 kmod-usb-ledtrig-usbport wpad-basic
542 SUPPORTED_DEVICES += witi mqmaker,witi-256m mqmaker,witi-512m
543 endef
544 TARGET_DEVICES += mqmaker_witi
545
546 define Device/mtc_wr1201
547 IMAGE_SIZE := 16000k
548 DEVICE_VENDOR := MTC
549 DEVICE_MODEL := Wireless Router WR1201
550 KERNEL_INITRAMFS := $(KERNEL_DTB) | custom-initramfs-uimage WR1201_8_128
551 DEVICE_PACKAGES := kmod-sdhci-mt7620 kmod-mt76x2 kmod-usb3 \
552 kmod-usb-ledtrig-usbport wpad-basic
553 endef
554 TARGET_DEVICES += mtc_wr1201
555
556 define Device/netgear_ex6150
557 DEVICE_VENDOR := NETGEAR
558 DEVICE_MODEL := EX6150
559 DEVICE_PACKAGES := kmod-mt76x2 wpad-basic
560 NETGEAR_BOARD_ID := U12H318T00_NETGEAR
561 IMAGE_SIZE := 14848k
562 IMAGES += factory.chk
563 IMAGE/factory.chk := $$(sysupgrade_bin) | check-size | \
564 netgear-chk
565 endef
566 TARGET_DEVICES += netgear_ex6150
567
568 define Device/netgear_sercomm_nand
569 BLOCKSIZE := 128k
570 PAGESIZE := 2048
571 KERNEL_SIZE := 4096k
572 UBINIZE_OPTS := -E 5
573 IMAGES += factory.img kernel.bin rootfs.bin
574 IMAGE/factory.img := pad-extra 2048k | append-kernel | pad-to 6144k | \
575 append-ubi | pad-to $$$$(BLOCKSIZE) | sercom-footer | pad-to 128 | \
576 zip $$$$(SERCOMM_HWNAME).bin | sercom-seal
577 IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
578 IMAGE/kernel.bin := append-kernel
579 IMAGE/rootfs.bin := append-ubi | check-size
580 DEVICE_VENDOR := NETGEAR
581 DEVICE_PACKAGES := kmod-mt7603 kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic
582 endef
583
584 define Device/netgear_r6220
585 $(Device/netgear_sercomm_nand)
586 DEVICE_MODEL := R6220
587 SERCOMM_HWNAME := R6220
588 SERCOMM_HWID := AYA
589 SERCOMM_HWVER := A001
590 SERCOMM_SWVER := 0x0086
591 IMAGE_SIZE := 28672k
592 DEVICE_PACKAGES += kmod-mt76x2
593 SUPPORTED_DEVICES += r6220
594 endef
595 TARGET_DEVICES += netgear_r6220
596
597
598 define Device/netgear_r6260
599 $(Device/netgear_sercomm_nand)
600 DEVICE_MODEL := R6260
601 SERCOMM_HWNAME := R6260
602 SERCOMM_HWID := CHJ
603 SERCOMM_HWVER := A001
604 SERCOMM_SWVER := 0x0052
605 IMAGE_SIZE := 40960k
606 DEVICE_PACKAGES += kmod-mt7615e
607 endef
608 TARGET_DEVICES += netgear_r6260
609
610 define Device/netgear_r6350
611 $(Device/netgear_sercomm_nand)
612 DEVICE_MODEL := R6350
613 SERCOMM_HWNAME := R6350
614 SERCOMM_HWID := CHJ
615 SERCOMM_HWVER := A001
616 SERCOMM_SWVER := 0x0052
617 IMAGE_SIZE := 40960k
618 DEVICE_PACKAGES += kmod-mt7615e
619 endef
620 TARGET_DEVICES += netgear_r6350
621
622 define Device/netgear_r6700-v2
623 $(Device/netgear_sercomm_nand)
624 DEVICE_MODEL := R6700
625 DEVICE_VARIANT := v2
626 DEVICE_ALT0_VENDOR := NETGEAR
627 DEVICE_ALT0_MODEL := Nighthawk AC2400
628 SERCOMM_HWNAME := R6950
629 SERCOMM_HWID := BZV
630 SERCOMM_HWVER := A001
631 SERCOMM_SWVER := 0x1032
632 IMAGE_SIZE := 40960k
633 DEVICE_PACKAGES += kmod-mt7615e
634 endef
635 TARGET_DEVICES += netgear_r6700-v2
636
637 define Device/netgear_r6800
638 $(Device/netgear_sercomm_nand)
639 DEVICE_MODEL := R6800
640 SERCOMM_HWNAME := R6950
641 SERCOMM_HWID := BZV
642 SERCOMM_HWVER := A001
643 SERCOMM_SWVER := 0x0062
644 IMAGE_SIZE := 40960k
645 DEVICE_PACKAGES += kmod-mt7615e
646 endef
647 TARGET_DEVICES += netgear_r6800
648
649 define Device/netgear_r6850
650 $(Device/netgear_sercomm_nand)
651 DEVICE_MODEL := R6850
652 SERCOMM_HWNAME := R6850
653 SERCOMM_HWID := CHJ
654 SERCOMM_HWVER := A001
655 SERCOMM_SWVER := 0x0052
656 IMAGE_SIZE := 40960k
657 DEVICE_PACKAGES += kmod-mt7615e
658 endef
659 TARGET_DEVICES += netgear_r6850
660
661 define Device/netgear_wndr3700-v5
662 BLOCKSIZE := 64k
663 IMAGE_SIZE := 15232k
664 SERCOMM_HWID := AYB
665 SERCOMM_HWVER := A001
666 SERCOMM_SWVER := 0x1054
667 IMAGES += factory.img
668 IMAGE/default := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | \
669 pad-rootfs
670 IMAGE/sysupgrade.bin := $$(IMAGE/default) | append-metadata | \
671 check-size
672 IMAGE/factory.img := pad-extra 320k | $$(IMAGE/default) | \
673 pad-to $$$$(BLOCKSIZE) | sercom-footer | pad-to 128 | \
674 zip WNDR3700v5.bin | sercom-seal
675 DEVICE_VENDOR := NETGEAR
676 DEVICE_MODEL := WNDR3700
677 DEVICE_VARIANT := v5
678 DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 \
679 kmod-usb-ledtrig-usbport wpad-basic
680 SUPPORTED_DEVICES += wndr3700v5
681 endef
682 TARGET_DEVICES += netgear_wndr3700-v5
683
684 define Device/netis_wf2881
685 BLOCKSIZE := 128k
686 PAGESIZE := 2048
687 FILESYSTEMS := squashfs
688 KERNEL_SIZE := 4096k
689 IMAGE_SIZE := 129280k
690 UBINIZE_OPTS := -E 5
691 UIMAGE_NAME := WF2881_0.0.00
692 KERNEL_INITRAMFS := $(KERNEL_DTB) | netis-tail WF2881 | uImage lzma
693 IMAGES += factory.bin
694 IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
695 IMAGE/factory.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi | \
696 check-size
697 DEVICE_VENDOR := NETIS
698 DEVICE_MODEL := WF2881
699 DEVICE_PACKAGES := kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic
700 endef
701 TARGET_DEVICES += netis_wf2881
702
703 define Device/phicomm_k2p
704 IMAGE_SIZE := 15744k
705 DEVICE_VENDOR := Phicomm
706 DEVICE_MODEL := K2P
707 DEVICE_ALT0_VENDOR := Phicomm
708 DEVICE_ALT0_MODEL := KE 2P
709 SUPPORTED_DEVICES += k2p
710 DEVICE_PACKAGES := kmod-mt7615e wpad-basic
711 endef
712 TARGET_DEVICES += phicomm_k2p
713
714 define Device/planex_vr500
715 IMAGE_SIZE := 65216k
716 DEVICE_VENDOR := Planex
717 DEVICE_MODEL := VR500
718 DEVICE_PACKAGES := kmod-usb3
719 SUPPORTED_DEVICES += vr500
720 endef
721 TARGET_DEVICES += planex_vr500
722
723 define Device/samknows_whitebox-v8
724 IMAGE_SIZE := 16064k
725 DEVICE_VENDOR := SamKnows
726 DEVICE_MODEL := Whitebox 8
727 DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 \
728 kmod-usb-ledtrig-usbport uboot-envtools wpad-basic
729 SUPPORTED_DEVICES += sk-wb8
730 endef
731 TARGET_DEVICES += samknows_whitebox-v8
732
733 define Device/storylink_sap-g3200u3
734 IMAGE_SIZE := 7872k
735 DEVICE_VENDOR := STORYLiNK
736 DEVICE_MODEL := SAP-G3200U3
737 DEVICE_PACKAGES := kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic
738 SUPPORTED_DEVICES += sap-g3200u3
739 endef
740 TARGET_DEVICES += storylink_sap-g3200u3
741
742 define Device/telco-electronics_x1
743 IMAGE_SIZE := 16064k
744 DEVICE_VENDOR := Telco Electronics
745 DEVICE_MODEL := X1
746 DEVICE_PACKAGES := kmod-usb3 kmod-mt76 wpad-basic
747 endef
748 TARGET_DEVICES += telco-electronics_x1
749
750 define Device/thunder_timecloud
751 IMAGE_SIZE := 16064k
752 DEVICE_VENDOR := Thunder
753 DEVICE_MODEL := Timecloud
754 DEVICE_PACKAGES := kmod-usb3
755 SUPPORTED_DEVICES += timecloud
756 endef
757 TARGET_DEVICES += thunder_timecloud
758
759 define Device/totolink_a7000r
760 IMAGE_SIZE := 16064k
761 UIMAGE_NAME := C8340R1C-9999
762 DEVICE_VENDOR := TOTOLINK
763 DEVICE_MODEL := A7000R
764 DEVICE_PACKAGES := kmod-mt7615e wpad-basic
765 endef
766 TARGET_DEVICES += totolink_a7000r
767
768 define Device/adslr_g7
769 IMAGE_SIZE := 16064k
770 DEVICE_VENDOR := ADSLR
771 DEVICE_MODEL := G7
772 DEVICE_PACKAGES := kmod-mt7615e wpad-basic
773 endef
774 TARGET_DEVICES += adslr_g7
775
776 define Device/tplink_re350-v1
777 $(Device/tplink-safeloader)
778 DEVICE_MODEL := RE350
779 DEVICE_VARIANT := v1
780 DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 wpad-basic
781 TPLINK_BOARD_ID := RE350-V1
782 IMAGE_SIZE := 6016k
783 SUPPORTED_DEVICES += re350-v1
784 endef
785 TARGET_DEVICES += tplink_re350-v1
786
787 define Device/tplink_re650-v1
788 $(Device/tplink-safeloader)
789 DEVICE_MODEL := RE650
790 DEVICE_VARIANT := v1
791 DEVICE_PACKAGES := kmod-mt7615e wpad-basic
792 TPLINK_BOARD_ID := RE650-V1
793 IMAGE_SIZE := 14208k
794 endef
795 TARGET_DEVICES += tplink_re650-v1
796
797 define Device/ubiquiti_edgerouterx
798 IMAGE_SIZE := 256768k
799 FILESYSTEMS := squashfs
800 KERNEL_SIZE := 3145728
801 KERNEL_INITRAMFS := $$(KERNEL) | \
802 ubnt-erx-factory-image $(KDIR)/tmp/$$(KERNEL_INITRAMFS_PREFIX)-factory.tar
803 IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
804 DEVICE_VENDOR := Ubiquiti
805 DEVICE_MODEL := EdgeRouter X
806 SUPPORTED_DEVICES += ubnt-erx
807 endef
808 TARGET_DEVICES += ubiquiti_edgerouterx
809
810 define Device/ubiquiti_edgerouterx-sfp
811 $(Device/ubiquiti_edgerouterx)
812 DEVICE_VENDOR := Ubiquiti
813 DEVICE_MODEL := EdgeRouter X-SFP
814 DEVICE_PACKAGES += kmod-i2c-algo-pca kmod-gpio-pca953x
815 SUPPORTED_DEVICES += ubnt-erx-sfp
816 endef
817 TARGET_DEVICES += ubiquiti_edgerouterx-sfp
818
819 define Device/ubnt_unifi-nanohd
820 DEVICE_VENDOR := Ubiquiti
821 DEVICE_MODEL := UniFi nanoHD
822 DEVICE_PACKAGES += kmod-mt7603 kmod-mt7615e wpad-basic
823 IMAGE_SIZE := 15552k
824 endef
825 TARGET_DEVICES += ubnt_unifi-nanohd
826
827 define Device/unielec_u7621-06-16m
828 IMAGE_SIZE := 16064k
829 DEVICE_VENDOR := UniElec
830 DEVICE_MODEL := U7621-06
831 DEVICE_VARIANT := 16M
832 DEVICE_PACKAGES := kmod-ata-ahci kmod-sdhci-mt7620 kmod-usb3
833 SUPPORTED_DEVICES += u7621-06-256M-16M unielec,u7621-06-256m-16m
834 endef
835 TARGET_DEVICES += unielec_u7621-06-16m
836
837 define Device/unielec_u7621-06-64m
838 IMAGE_SIZE := 65216k
839 DEVICE_VENDOR := UniElec
840 DEVICE_MODEL := U7621-06
841 DEVICE_VARIANT := 64M
842 DEVICE_PACKAGES := kmod-ata-ahci kmod-sdhci-mt7620 kmod-usb3
843 SUPPORTED_DEVICES += unielec,u7621-06-512m-64m
844 endef
845 TARGET_DEVICES += unielec_u7621-06-64m
846
847 define Device/wevo_11acnas
848 IMAGE_SIZE := 16064k
849 UIMAGE_NAME := 11AC-NAS-Router(0.0.0)
850 DEVICE_VENDOR := WeVO
851 DEVICE_MODEL := 11AC NAS Router
852 DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 \
853 kmod-usb-ledtrig-usbport wpad-basic
854 SUPPORTED_DEVICES += 11acnas
855 endef
856 TARGET_DEVICES += wevo_11acnas
857
858 define Device/wevo_w2914ns-v2
859 IMAGE_SIZE := 16064k
860 UIMAGE_NAME := W2914NS-V2(0.0.0)
861 DEVICE_VENDOR := WeVO
862 DEVICE_MODEL := W2914NS
863 DEVICE_VARIANT := v2
864 DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 \
865 kmod-usb-ledtrig-usbport wpad-basic
866 SUPPORTED_DEVICES += w2914nsv2
867 endef
868 TARGET_DEVICES += wevo_w2914ns-v2
869
870 define Device/xiaomi_mir3g
871 BLOCKSIZE := 128k
872 PAGESIZE := 2048
873 KERNEL_SIZE := 4096k
874 IMAGE_SIZE := 124416k
875 UBINIZE_OPTS := -E 5
876 IMAGES += kernel1.bin rootfs0.bin
877 IMAGE/kernel1.bin := append-kernel
878 IMAGE/rootfs0.bin := append-ubi | check-size
879 IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
880 DEVICE_VENDOR := Xiaomi
881 DEVICE_MODEL := Mi Router 3G
882 SUPPORTED_DEVICES += R3G
883 SUPPORTED_DEVICES += mir3g
884 DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 \
885 kmod-usb-ledtrig-usbport wpad-basic uboot-envtools
886 endef
887 TARGET_DEVICES += xiaomi_mir3g
888
889 define Device/xiaomi_mir3g-v2
890 IMAGE_SIZE := 14848k
891 DEVICE_VENDOR := Xiaomi
892 DEVICE_MODEL := Mi Router 3G
893 DEVICE_VARIANT := v2
894 DEVICE_ALT0_VENDOR := Xiaomi
895 DEVICE_ALT0_MODEL := Mi Router 4A
896 DEVICE_ALT0_VARIANT := Gigabit Edition
897 DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 wpad-basic
898 endef
899 TARGET_DEVICES += xiaomi_mir3g-v2
900
901 define Device/xiaomi_mir3p
902 BLOCKSIZE := 128k
903 PAGESIZE := 2048
904 KERNEL_SIZE:= 4096k
905 UBINIZE_OPTS := -E 5
906 IMAGE_SIZE := 255488k
907 DEVICE_VENDOR := Xiaomi
908 DEVICE_MODEL := Mi Router 3 Pro
909 IMAGES += factory.bin
910 IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
911 IMAGE/factory.bin := append-kernel | pad-to $$(KERNEL_SIZE) | append-ubi | \
912 check-size
913 DEVICE_PACKAGES := kmod-mt7615e kmod-usb3 kmod-usb-ledtrig-usbport \
914 wpad-basic uboot-envtools
915 endef
916 TARGET_DEVICES += xiaomi_mir3p
917
918 define Device/xiaoyu_xy-c5
919 IMAGE_SIZE := 32448k
920 DEVICE_VENDOR := XiaoYu
921 DEVICE_MODEL := XY-C5
922 DEVICE_PACKAGES := kmod-ata-ahci kmod-usb3
923 endef
924 TARGET_DEVICES += xiaoyu_xy-c5
925
926 define Device/xzwifi_creativebox-v1
927 IMAGE_SIZE := 32448k
928 DEVICE_VENDOR := CreativeBox
929 DEVICE_MODEL := v1
930 DEVICE_PACKAGES := kmod-ata-ahci kmod-mt7603 kmod-mt76x2 kmod-sdhci-mt7620 \
931 kmod-usb3
932 endef
933 TARGET_DEVICES += xzwifi_creativebox-v1
934
935 define Device/youhua_wr1200js
936 IMAGE_SIZE := 16064k
937 DEVICE_VENDOR := YouHua
938 DEVICE_MODEL := WR1200JS
939 DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 \
940 kmod-usb-ledtrig-usbport wpad-basic
941 endef
942 TARGET_DEVICES += youhua_wr1200js
943
944 define Device/youku_yk-l2
945 IMAGE_SIZE := 16064k
946 DEVICE_VENDOR := Youku
947 DEVICE_MODEL := YK-L2
948 DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 \
949 kmod-usb-ledtrig-usbport wpad-basic
950 endef
951 TARGET_DEVICES += youku_yk-l2
952
953 define Device/zbtlink_zbt-we1326
954 IMAGE_SIZE := 16064k
955 DEVICE_VENDOR := Zbtlink
956 DEVICE_MODEL := ZBT-WE1326
957 DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 kmod-sdhci-mt7620 \
958 wpad-basic
959 SUPPORTED_DEVICES += zbt-we1326
960 endef
961 TARGET_DEVICES += zbtlink_zbt-we1326
962
963 define Device/zbtlink_zbt-we3526
964 IMAGE_SIZE := 16064k
965 DEVICE_VENDOR := Zbtlink
966 DEVICE_MODEL := ZBT-WE3526
967 DEVICE_PACKAGES := kmod-sdhci-mt7620 kmod-mt7603 kmod-mt76x2 kmod-usb3 \
968 kmod-usb-ledtrig-usbport wpad-basic
969 endef
970 TARGET_DEVICES += zbtlink_zbt-we3526
971
972 define Device/zbtlink_zbt-wg2626
973 IMAGE_SIZE := 16064k
974 DEVICE_VENDOR := Zbtlink
975 DEVICE_MODEL := ZBT-WG2626
976 DEVICE_PACKAGES := kmod-ata-ahci kmod-sdhci-mt7620 kmod-mt76x2 kmod-usb3 \
977 kmod-usb-ledtrig-usbport wpad-basic
978 SUPPORTED_DEVICES += zbt-wg2626
979 endef
980 TARGET_DEVICES += zbtlink_zbt-wg2626
981
982 define Device/zbtlink_zbt-wg3526-16m
983 IMAGE_SIZE := 16064k
984 DEVICE_VENDOR := Zbtlink
985 DEVICE_MODEL := ZBT-WG3526
986 DEVICE_VARIANT := 16M
987 DEVICE_PACKAGES := kmod-ata-ahci kmod-sdhci-mt7620 kmod-mt7603 kmod-mt76x2 \
988 kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic
989 SUPPORTED_DEVICES += zbt-wg3526 zbt-wg3526-16M
990 endef
991 TARGET_DEVICES += zbtlink_zbt-wg3526-16m
992
993 define Device/zbtlink_zbt-wg3526-32m
994 IMAGE_SIZE := 32448k
995 DEVICE_VENDOR := Zbtlink
996 DEVICE_MODEL := ZBT-WG3526
997 DEVICE_VARIANT := 32M
998 DEVICE_PACKAGES := kmod-ata-ahci kmod-sdhci-mt7620 kmod-mt7603 kmod-mt76x2 \
999 kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic
1000 SUPPORTED_DEVICES += ac1200pro zbt-wg3526-32M
1001 endef
1002 TARGET_DEVICES += zbtlink_zbt-wg3526-32m
1003
1004 define Device/zio_freezio
1005 IMAGE_SIZE := 16064k
1006 DEVICE_VENDOR := ZIO
1007 DEVICE_MODEL := FREEZIO
1008 DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 \
1009 kmod-usb-ledtrig-usbport wpad-basic
1010 endef
1011 TARGET_DEVICES += zio_freezio