ramips: mt7621: Alternative name KE 2P for Phicomm K2P
[openwrt/openwrt.git] / target / linux / ramips / image / mt7621.mk
1 #
2 # MT7621 Profiles
3 #
4
5 KERNEL_DTB += -d21
6 DEVICE_VARS += TPLINK_BOARD_ID TPLINK_HEADER_VERSION TPLINK_HWID TPLINK_HWREV
7
8 define Build/elecom-gst-factory
9 $(eval product=$(word 1,$(1)))
10 $(eval version=$(word 2,$(1)))
11 ( $(STAGING_DIR_HOST)/bin/mkhash md5 $@ | tr -d '\n' ) >> $@
12 ( \
13 echo -n "ELECOM $(product) v$(version)" | \
14 dd bs=32 count=1 conv=sync; \
15 dd if=$@; \
16 ) > $@.new
17 mv $@.new $@
18 echo -n "MT7621_ELECOM_$(product)" >> $@
19 endef
20
21 define Build/elecom-wrc-factory
22 $(eval product=$(word 1,$(1)))
23 $(eval version=$(word 2,$(1)))
24 $(STAGING_DIR_HOST)/bin/mkhash md5 $@ >> $@
25 ( \
26 echo -n "ELECOM $(product) v$(version)" | \
27 dd bs=32 count=1 conv=sync; \
28 dd if=$@; \
29 ) > $@.new
30 mv $@.new $@
31 endef
32
33 define Build/iodata-factory
34 $(eval fw_size=$(word 1,$(1)))
35 $(eval fw_type=$(word 2,$(1)))
36 $(eval product=$(word 3,$(1)))
37 $(eval factory_bin=$(word 4,$(1)))
38 if [ -e $(KDIR)/tmp/$(KERNEL_INITRAMFS_IMAGE) -a "$$(stat -c%s $@)" -lt "$(fw_size)" ]; then \
39 $(CP) $(KDIR)/tmp/$(KERNEL_INITRAMFS_IMAGE) $(factory_bin); \
40 $(STAGING_DIR_HOST)/bin/mksenaofw \
41 -r 0x30a -p $(product) -t $(fw_type) \
42 -e $(factory_bin) -o $(factory_bin).new; \
43 mv $(factory_bin).new $(factory_bin); \
44 $(CP) $(factory_bin) $(BIN_DIR)/; \
45 else \
46 echo "WARNING: initramfs kernel image too big, cannot generate factory image" >&2; \
47 fi
48 endef
49
50 define Build/ubnt-erx-factory-image
51 if [ -e $(KDIR)/tmp/$(KERNEL_INITRAMFS_IMAGE) -a "$$(stat -c%s $@)" -lt "$(KERNEL_SIZE)" ]; then \
52 echo '21001:6' > $(1).compat; \
53 $(TAR) -cf $(1) --transform='s/^.*/compat/' $(1).compat; \
54 \
55 $(TAR) -rf $(1) --transform='s/^.*/vmlinux.tmp/' $(KDIR)/tmp/$(KERNEL_INITRAMFS_IMAGE); \
56 mkhash md5 $(KDIR)/tmp/$(KERNEL_INITRAMFS_IMAGE) > $(1).md5; \
57 $(TAR) -rf $(1) --transform='s/^.*/vmlinux.tmp.md5/' $(1).md5; \
58 \
59 echo "dummy" > $(1).rootfs; \
60 $(TAR) -rf $(1) --transform='s/^.*/squashfs.tmp/' $(1).rootfs; \
61 \
62 mkhash md5 $(1).rootfs > $(1).md5; \
63 $(TAR) -rf $(1) --transform='s/^.*/squashfs.tmp.md5/' $(1).md5; \
64 \
65 echo '$(BOARD) $(VERSION_CODE) $(VERSION_NUMBER)' > $(1).version; \
66 $(TAR) -rf $(1) --transform='s/^.*/version.tmp/' $(1).version; \
67 \
68 $(CP) $(1) $(BIN_DIR)/; \
69 else \
70 echo "WARNING: initramfs kernel image too big, cannot generate factory image" >&2; \
71 fi
72 endef
73
74 # The OEM webinterface expects an kernel with initramfs which has the uImage
75 # header field ih_name.
76 # We don't wan't to set the header name field for the kernel include in the
77 # sysupgrade image as well, as this image shouldn't be accepted by the OEM
78 # webinterface. It will soft-brick the board.
79 define Build/wr1201-factory-header
80 mkimage -A $(LINUX_KARCH) \
81 -O linux -T kernel \
82 -C lzma -a $(KERNEL_LOADADDR) -e $(if $(KERNEL_ENTRY),$(KERNEL_ENTRY),$(KERNEL_LOADADDR)) \
83 -n 'WR1201_8_128' -d $@ $@.new
84 mv $@.new $@
85 endef
86
87 define Device/afoundry_ew1200
88 MTK_SOC := mt7621
89 IMAGE_SIZE := 16064k
90 DEVICE_VENDOR := AFOUNDRY
91 DEVICE_MODEL := EW1200
92 DEVICE_PACKAGES := \
93 kmod-ata-core kmod-ata-ahci kmod-mt76x2 kmod-mt7603 kmod-usb3 \
94 kmod-usb-ledtrig-usbport wpad-basic
95 SUPPORTED_DEVICES += ew1200
96 endef
97 TARGET_DEVICES += afoundry_ew1200
98
99 define Device/asiarf_ap7621-001
100 MTK_SOC := mt7621
101 IMAGE_SIZE := 16000k
102 DEVICE_VENDOR := AsiaRF
103 DEVICE_MODEL := AP7621-001
104 DEVICE_PACKAGES := \
105 kmod-sdhci-mt7620 kmod-mt76x2 kmod-usb3
106 endef
107 TARGET_DEVICES += asiarf_ap7621-001
108
109 define Device/asiarf_ap7621-nv1
110 MTK_SOC := mt7621
111 IMAGE_SIZE := 16000k
112 DEVICE_VENDOR := AsiaRF
113 DEVICE_MODEL := AP7621-NV1
114 DEVICE_PACKAGES := \
115 kmod-sdhci-mt7620 kmod-mt76x2 kmod-usb3
116 endef
117 TARGET_DEVICES += asiarf_ap7621-nv1
118
119 define Device/asus_rt-ac57u
120 MTK_SOC := mt7621
121 DEVICE_VENDOR := ASUS
122 DEVICE_MODEL := RT-AC57U
123 IMAGE_SIZE := 16064k
124 DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic
125 endef
126 TARGET_DEVICES += asus_rt-ac57u
127
128 define Device/asus_rt-ac85p
129 MTK_SOC := mt7621
130 DEVICE_VENDOR := ASUS
131 DEVICE_MODEL := RT-AC85P
132 IMAGE_SIZE := 51200k
133 UBINIZE_OPTS := -E 5
134 BLOCKSIZE := 128k
135 PAGESIZE := 2048
136 KERNEL_SIZE := 4096k
137 IMAGES += factory.bin
138 IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
139 IMAGE/factory.bin := append-kernel | pad-to $$(KERNEL_SIZE) | append-ubi | check-size $$$$(IMAGE_SIZE)
140 DEVICE_PACKAGES := kmod-usb3 kmod-mt7615e wpad-basic uboot-envtools
141 endef
142 TARGET_DEVICES += asus_rt-ac85p
143
144 define Device/buffalo_wsr-1166dhp
145 MTK_SOC := mt7621
146 IMAGE/sysupgrade.bin := trx | pad-rootfs | append-metadata
147 IMAGE_SIZE := 15936k
148 DEVICE_VENDOR := Buffalo
149 DEVICE_MODEL := WSR-1166DHP
150 DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 wpad-basic
151 SUPPORTED_DEVICES += wsr-1166
152 endef
153 TARGET_DEVICES += buffalo_wsr-1166dhp
154
155 define Device/buffalo_wsr-600dhp
156 MTK_SOC := mt7621
157 IMAGE_SIZE := 16064k
158 DEVICE_VENDOR := Buffalo
159 DEVICE_MODEL := WSR-600DHP
160 DEVICE_PACKAGES := kmod-mt7603 kmod-rt2800-pci wpad-basic
161 SUPPORTED_DEVICES += wsr-600
162 endef
163 TARGET_DEVICES += buffalo_wsr-600dhp
164
165 define Device/dlink_dir-860l-b1
166 $(Device/seama)
167 MTK_SOC := mt7621
168 BLOCKSIZE := 64k
169 SEAMA_SIGNATURE := wrgac13_dlink.2013gui_dir860lb
170 KERNEL := kernel-bin | append-dtb | relocate-kernel | lzma | uImage lzma
171 IMAGE_SIZE := 16064k
172 DEVICE_VENDOR := D-Link
173 DEVICE_MODEL := DIR-860L
174 DEVICE_VARIANT := B1
175 DEVICE_PACKAGES := kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic
176 SUPPORTED_DEVICES += dir-860l-b1
177 endef
178 TARGET_DEVICES += dlink_dir-860l-b1
179
180 define Device/d-team_newifi-d2
181 MTK_SOC := mt7621
182 IMAGE_SIZE := 32448k
183 DEVICE_VENDOR := Newifi
184 DEVICE_MODEL := D2
185 DEVICE_PACKAGES := \
186 kmod-mt7603 kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic
187 endef
188 TARGET_DEVICES += d-team_newifi-d2
189
190 define Device/d-team_pbr-m1
191 MTK_SOC := mt7621
192 IMAGE_SIZE := 16064k
193 DEVICE_VENDOR := PandoraBox
194 DEVICE_MODEL := PBR-M1
195 DEVICE_PACKAGES := \
196 kmod-ata-core kmod-ata-ahci kmod-mt7603 kmod-mt76x2 kmod-sdhci-mt7620 \
197 kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic
198 SUPPORTED_DEVICES += pbr-m1
199 endef
200 TARGET_DEVICES += d-team_pbr-m1
201
202 define Device/edimax_rg21s
203 MTK_SOC := mt7621
204 IMAGE_SIZE := 16064k
205 DEVICE_VENDOR := Edimax
206 DEVICE_MODEL := Gemini AC2600 RG21S
207 IMAGES += factory.bin
208 IMAGE/factory.bin := \
209 $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | \
210 elx-header 02020038 8844A2D168B45A2D
211 DEVICE_PACKAGES := \
212 kmod-mt7615e wpad-basic
213 endef
214 TARGET_DEVICES += edimax_rg21s
215
216 define Device/elecom_wrc-1167ghbk2-s
217 MTK_SOC := mt7621
218 IMAGE_SIZE := 15488k
219 DEVICE_VENDOR := ELECOM
220 DEVICE_MODEL := WRC-1167GHBK2-S
221 IMAGES += factory.bin
222 IMAGE/factory.bin := $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) |\
223 elecom-wrc-factory WRC-1167GHBK2-S 0.00
224 DEVICE_PACKAGES := kmod-mt7615e wpad-basic
225 endef
226 TARGET_DEVICES += elecom_wrc-1167ghbk2-s
227
228 define Device/elecom_wrc-1900gst
229 MTK_SOC := mt7621
230 IMAGE_SIZE := 11264k
231 DEVICE_VENDOR := ELECOM
232 DEVICE_MODEL := WRC-1900GST
233 IMAGES += factory.bin
234 IMAGE/factory.bin := $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) |\
235 elecom-gst-factory WRC-1900GST 0.00
236 endef
237 TARGET_DEVICES += elecom_wrc-1900gst
238
239 define Device/elecom_wrc-2533gst
240 MTK_SOC := mt7621
241 IMAGE_SIZE := 11264k
242 DEVICE_VENDOR := ELECOM
243 DEVICE_MODEL := WRC-2533GST
244 IMAGES += factory.bin
245 IMAGE/factory.bin := $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) |\
246 elecom-gst-factory WRC-2533GST 0.00
247 endef
248 TARGET_DEVICES += elecom_wrc-2533gst
249
250 define Device/firefly_firewrt
251 MTK_SOC := mt7621
252 IMAGE_SIZE := 16064k
253 DEVICE_VENDOR := Firefly
254 DEVICE_MODEL := FireWRT
255 DEVICE_PACKAGES := kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic
256 SUPPORTED_DEVICES += firewrt
257 endef
258 TARGET_DEVICES += firefly_firewrt
259
260 define Device/gehua_ghl-r-001
261 MTK_SOC := mt7621
262 IMAGE_SIZE := 32448k
263 DEVICE_VENDOR := GeHua
264 DEVICE_MODEL := GHL-R-001
265 DEVICE_PACKAGES := \
266 kmod-mt7603 kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic
267 endef
268 TARGET_DEVICES += gehua_ghl-r-001
269
270 define Device/gnubee_gb-pc1
271 MTK_SOC := mt7621
272 DEVICE_VENDOR := GnuBee
273 DEVICE_MODEL := Personal Cloud One
274 DEVICE_PACKAGES := kmod-ata-core kmod-ata-ahci kmod-usb3 kmod-sdhci-mt7620
275 IMAGE_SIZE := 32448k
276 endef
277 TARGET_DEVICES += gnubee_gb-pc1
278
279 define Device/gnubee_gb-pc2
280 MTK_SOC := mt7621
281 DEVICE_VENDOR := GnuBee
282 DEVICE_MODEL := Personal Cloud Two
283 DEVICE_PACKAGES := kmod-ata-core kmod-ata-ahci kmod-usb3 kmod-sdhci-mt7620
284 IMAGE_SIZE := 32448k
285 endef
286 TARGET_DEVICES += gnubee_gb-pc2
287
288 define Device/hiwifi_hc5962
289 MTK_SOC := mt7621
290 BLOCKSIZE := 128k
291 PAGESIZE := 2048
292 KERNEL_SIZE := 2097152
293 UBINIZE_OPTS := -E 5
294 IMAGE_SIZE := 32768k
295 IMAGES += factory.bin
296 IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
297 IMAGE/factory.bin := append-kernel | pad-to $$(KERNEL_SIZE) | append-ubi | check-size $$$$(IMAGE_SIZE)
298 DEVICE_VENDOR := HiWiFi
299 DEVICE_MODEL := HC5962
300 DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 wpad-basic
301 SUPPORTED_DEVICES += hc5962
302 endef
303 TARGET_DEVICES += hiwifi_hc5962
304
305 define Device/iodata_wn-ax1167gr
306 MTK_SOC := mt7621
307 IMAGE_SIZE := 15552k
308 KERNEL_INITRAMFS := $$(KERNEL) | \
309 iodata-factory 7864320 4 0x1055 $(KDIR)/tmp/$$(KERNEL_INITRAMFS_PREFIX)-factory.bin
310 DEVICE_VENDOR := I-O DATA
311 DEVICE_MODEL := WN-AX1167GR
312 DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 wpad-basic
313 endef
314 TARGET_DEVICES += iodata_wn-ax1167gr
315
316 define Device/iodata_wn-gx300gr
317 MTK_SOC := mt7621
318 IMAGE_SIZE := 7616k
319 DEVICE_VENDOR := I-O DATA
320 DEVICE_MODEL := WN-GX300GR
321 DEVICE_PACKAGES := kmod-mt7603 wpad-basic
322 endef
323 TARGET_DEVICES += iodata_wn-gx300gr
324
325 define Device/iodata_wnpr2600g
326 MTK_SOC := mt7621
327 DEVICE_VENDOR := I-O DATA
328 DEVICE_MODEL := WNPR2600G
329 IMAGE_SIZE := 13952k
330 IMAGES += factory.bin
331 IMAGE/factory.bin := \
332 $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | \
333 elx-header 0104003a 8844A2D168B45A2D
334 DEVICE_PACKAGES := kmod-mt7615e wpad-basic
335 endef
336 TARGET_DEVICES += iodata_wnpr2600g
337
338 define Device/lenovo_newifi-d1
339 MTK_SOC := mt7621
340 IMAGE_SIZE := 32448k
341 DEVICE_VENDOR := Newifi
342 DEVICE_MODEL := D1
343 DEVICE_PACKAGES := \
344 kmod-mt7603 kmod-mt76x2 kmod-usb3 kmod-sdhci-mt7620 kmod-usb-ledtrig-usbport wpad-basic
345 SUPPORTED_DEVICES += newifi-d1
346 endef
347 TARGET_DEVICES += lenovo_newifi-d1
348
349 define Device/linksys_re6500
350 MTK_SOC := mt7621
351 IMAGE_SIZE := 7872k
352 DEVICE_VENDOR := Linksys
353 DEVICE_MODEL := RE6500
354 DEVICE_PACKAGES := kmod-mt76x2 wpad-basic
355 SUPPORTED_DEVICES += re6500
356 endef
357 TARGET_DEVICES += linksys_re6500
358
359 define Device/mediatek_ap-mt7621a-v60
360 MTK_SOC := mt7621
361 IMAGE_SIZE := 7872k
362 DEVICE_VENDOR := Mediatek
363 DEVICE_MODEL := AP-MT7621A-V60 EVB
364 DEVICE_PACKAGES := kmod-usb3 kmod-sdhci-mt7620 kmod-sound-mt7620
365 endef
366 TARGET_DEVICES += mediatek_ap-mt7621a-v60
367
368 define Device/mediatek_mt7621-eval-board
369 MTK_SOC := mt7621
370 BLOCKSIZE := 64k
371 IMAGE_SIZE := 15104k
372 DEVICE_VENDOR := MediaTek
373 DEVICE_MODEL := MT7621 EVB
374 SUPPORTED_DEVICES += mt7621
375 endef
376 TARGET_DEVICES += mediatek_mt7621-eval-board
377
378 define Device/MikroTik
379 MTK_SOC := mt7621
380 DEVICE_VENDOR := MikroTik
381 BLOCKSIZE := 64k
382 IMAGE_SIZE := 16128k
383 DEVICE_PACKAGES := kmod-usb3
384 LOADER_TYPE := elf
385 PLATFORM := mt7621
386 KERNEL := $(KERNEL_DTB) | loader-kernel
387 IMAGE/sysupgrade.bin := append-kernel | kernel2minor -s 1024 | pad-to $$$$(BLOCKSIZE) | \
388 append-rootfs | pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE)
389 endef
390
391 define Device/mikrotik_rb750gr3
392 $(Device/MikroTik)
393 DEVICE_MODEL := RouterBOARD RB750G
394 DEVICE_VARIANT := r3
395 DEVICE_PACKAGES += kmod-gpio-beeper
396 endef
397 TARGET_DEVICES += mikrotik_rb750gr3
398
399 define Device/mikrotik_rbm11g
400 $(Device/MikroTik)
401 DEVICE_MODEL := RouterBOARD M11G
402 endef
403 TARGET_DEVICES += mikrotik_rbm11g
404
405 define Device/mikrotik_rbm33g
406 $(Device/MikroTik)
407 DEVICE_MODEL := RouterBOARD M33G
408 endef
409 TARGET_DEVICES += mikrotik_rbm33g
410
411 define Device/mqmaker_witi
412 MTK_SOC := mt7621
413 IMAGE_SIZE := 16064k
414 DEVICE_VENDOR := MQmaker
415 DEVICE_MODEL := WiTi
416 DEVICE_PACKAGES := \
417 kmod-ata-core kmod-ata-ahci kmod-mt76x2 kmod-sdhci-mt7620 kmod-usb3 \
418 kmod-usb-ledtrig-usbport wpad-basic
419 SUPPORTED_DEVICES += witi mqmaker,witi-256m mqmaker,witi-512m
420 endef
421 TARGET_DEVICES += mqmaker_witi
422
423 define Device/mtc_wr1201
424 MTK_SOC := mt7621
425 IMAGE_SIZE := 16000k
426 DEVICE_VENDOR := MTC
427 DEVICE_MODEL := Wireless Router WR1201
428 KERNEL_INITRAMFS := $(KERNEL_DTB) | wr1201-factory-header
429 DEVICE_PACKAGES := \
430 kmod-sdhci-mt7620 kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic
431 endef
432 TARGET_DEVICES += mtc_wr1201
433
434 define Device/netgear_ex6150
435 MTK_SOC := mt7621
436 DEVICE_VENDOR := NETGEAR
437 DEVICE_MODEL := EX6150
438 DEVICE_PACKAGES := kmod-mt76x2 wpad-basic
439 NETGEAR_BOARD_ID := U12H318T00_NETGEAR
440 IMAGE_SIZE := 14848k
441 IMAGES += factory.chk
442 IMAGE/factory.chk := $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | netgear-chk
443 endef
444 TARGET_DEVICES += netgear_ex6150
445
446 define Device/netgear_r6220
447 MTK_SOC := mt7621
448 BLOCKSIZE := 128k
449 PAGESIZE := 2048
450 KERNEL_SIZE := 4096k
451 IMAGE_SIZE := 28672k
452 UBINIZE_OPTS := -E 5
453 SERCOMM_HWID := AYA
454 SERCOMM_HWVER := A001
455 SERCOMM_SWVER := 0x0086
456 IMAGES += factory.img kernel.bin rootfs.bin
457 IMAGE/factory.img := pad-extra 2048k | append-kernel | pad-to 6144k | append-ubi | \
458 pad-to $$$$(BLOCKSIZE) | sercom-footer | pad-to 128 | zip R6220.bin | sercom-seal
459 IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
460 IMAGE/kernel.bin := append-kernel
461 IMAGE/rootfs.bin := append-ubi | check-size $$$$(IMAGE_SIZE)
462 DEVICE_VENDOR := NETGEAR
463 DEVICE_MODEL := R6220
464 DEVICE_PACKAGES := \
465 kmod-mt7603 kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic
466 SUPPORTED_DEVICES += r6220
467 endef
468 TARGET_DEVICES += netgear_r6220
469
470 define Device/netgear_r6260_r6350_r6850
471 MTK_SOC := mt7621
472 BLOCKSIZE := 128k
473 PAGESIZE := 2048
474 KERNEL_SIZE := 4096k
475 IMAGE_SIZE := 40960k
476 UBINIZE_OPTS := -E 5
477 SERCOMM_HWID := CHJ
478 SERCOMM_HWVER := A001
479 SERCOMM_SWVER := 0x0052
480 IMAGES += factory.img kernel.bin rootfs.bin
481 IMAGE/factory.img := pad-extra 2048k | append-kernel | pad-to 6144k | append-ubi | \
482 pad-to $$$$(BLOCKSIZE) | sercom-footer | pad-to 128 | zip $$$$(DEVICE_MODEL).bin | sercom-seal
483 IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
484 IMAGE/kernel.bin := append-kernel
485 IMAGE/rootfs.bin := append-ubi | check-size $$$$(IMAGE_SIZE)
486 DEVICE_VENDOR := NETGEAR
487 DEVICE_PACKAGES := \
488 kmod-mt7603 kmod-mt7615e kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic
489 endef
490
491 define Device/netgear_r6260
492 $(Device/netgear_r6260_r6350_r6850)
493 DEVICE_MODEL := R6260
494 endef
495 TARGET_DEVICES += netgear_r6260
496
497 define Device/netgear_r6350
498 $(Device/netgear_r6260_r6350_r6850)
499 DEVICE_MODEL := R6350
500 endef
501 TARGET_DEVICES += netgear_r6350
502
503 define Device/netgear_r6850
504 $(Device/netgear_r6260_r6350_r6850)
505 DEVICE_MODEL := R6850
506 endef
507 TARGET_DEVICES += netgear_r6850
508
509 define Device/netgear_wndr3700-v5
510 MTK_SOC := mt7621
511 BLOCKSIZE := 64k
512 IMAGE_SIZE := 15232k
513 SERCOMM_HWID := AYB
514 SERCOMM_HWVER := A001
515 SERCOMM_SWVER := 0x1054
516 IMAGES += factory.img
517 IMAGE/default := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs
518 IMAGE/sysupgrade.bin := $$(IMAGE/default) | append-metadata | check-size $$$$(IMAGE_SIZE)
519 IMAGE/factory.img := pad-extra 320k | $$(IMAGE/default) | pad-to $$$$(BLOCKSIZE) | \
520 sercom-footer | pad-to 128 | zip WNDR3700v5.bin | sercom-seal
521 DEVICE_VENDOR := NETGEAR
522 DEVICE_MODEL := WNDR3700
523 DEVICE_VARIANT := v5
524 DEVICE_PACKAGES := \
525 kmod-mt7603 kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic
526 SUPPORTED_DEVICES += wndr3700v5
527 endef
528 TARGET_DEVICES += netgear_wndr3700-v5
529
530 define Device/netis_wf-2881
531 MTK_SOC := mt7621
532 BLOCKSIZE := 128k
533 PAGESIZE := 2048
534 FILESYSTEMS := squashfs
535 IMAGE_SIZE := 129280k
536 KERNEL := $(KERNEL_DTB) | pad-offset $$(BLOCKSIZE) 64 | uImage lzma
537 UBINIZE_OPTS := -E 5
538 IMAGE/sysupgrade.bin := append-kernel | append-ubi | append-metadata | check-size $$$$(IMAGE_SIZE)
539 DEVICE_VENDOR := NETIS
540 DEVICE_MODEL := WF-2881
541 DEVICE_PACKAGES := kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic
542 SUPPORTED_DEVICES += wf-2881
543 endef
544 TARGET_DEVICES += netis_wf-2881
545
546 define Device/phicomm_k2p
547 MTK_SOC := mt7621
548 IMAGE_SIZE := 15744k
549 DEVICE_VENDOR := Phicomm
550 DEVICE_MODEL := K2P
551 DEVICE_ALT0_VENDOR := Phicomm
552 DEVICE_ALT0_MODEL := KE 2P
553 SUPPORTED_DEVICES += k2p
554 DEVICE_PACKAGES := kmod-mt7615e wpad-basic
555 endef
556 TARGET_DEVICES += phicomm_k2p
557
558 define Device/planex_vr500
559 MTK_SOC := mt7621
560 IMAGE_SIZE := 65216k
561 DEVICE_VENDOR := Planex
562 DEVICE_MODEL := VR500
563 DEVICE_PACKAGES := kmod-usb3
564 SUPPORTED_DEVICES += vr500
565 endef
566 TARGET_DEVICES += planex_vr500
567
568 define Device/samknows_whitebox-v8
569 MTK_SOC := mt7621
570 IMAGE_SIZE := 16064k
571 DEVICE_VENDOR := SamKnows
572 DEVICE_MODEL := Whitebox 8
573 DEVICE_PACKAGES := \
574 kmod-mt7603 kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport \
575 uboot-envtools wpad-basic
576 SUPPORTED_DEVICES += sk-wb8
577 endef
578 TARGET_DEVICES += samknows_whitebox-v8
579
580 define Device/storylink_sap-g3200u3
581 MTK_SOC := mt7621
582 IMAGE_SIZE := 7872k
583 DEVICE_VENDOR := STORYLiNK
584 DEVICE_MODEL := SAP-G3200U3
585 DEVICE_PACKAGES := kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic
586 SUPPORTED_DEVICES += sap-g3200u3
587 endef
588 TARGET_DEVICES += storylink_sap-g3200u3
589
590 define Device/telco-electronics_x1
591 MTK_SOC := mt7621
592 IMAGE_SIZE := 16064k
593 DEVICE_VENDOR := Telco Electronics
594 DEVICE_MODEL := X1
595 DEVICE_PACKAGES := kmod-usb3 kmod-mt76 wpad-basic
596 endef
597 TARGET_DEVICES += telco-electronics_x1
598
599 define Device/thunder_timecloud
600 MTK_SOC := mt7621
601 IMAGE_SIZE := 16064k
602 DEVICE_VENDOR := Thunder
603 DEVICE_MODEL := Timecloud
604 DEVICE_PACKAGES := kmod-usb3
605 SUPPORTED_DEVICES += timecloud
606 endef
607 TARGET_DEVICES += thunder_timecloud
608
609 define Device/totolink_a7000r
610 MTK_SOC := mt7621
611 IMAGE_SIZE := 16064k
612 UIMAGE_NAME := C8340R1C-9999
613 DEVICE_VENDOR := TOTOLINK
614 DEVICE_MODEL := A7000R
615 DEVICE_PACKAGES := kmod-mt7615e wpad-basic
616 endef
617 TARGET_DEVICES += totolink_a7000r
618
619 define Device/adslr_g7
620 MTK_SOC := mt7621
621 IMAGE_SIZE := 16064k
622 DEVICE_VENDOR := ADSLR
623 DEVICE_MODEL := G7
624 DEVICE_PACKAGES := kmod-mt7615e wpad-basic
625 endef
626 TARGET_DEVICES += adslr_g7
627
628 define Device/tplink-safeloader
629 MTK_SOC := mt7621
630 DEVICE_VENDOR := TP-Link
631 TPLINK_BOARD_ID :=
632 TPLINK_HWID := 0x0
633 TPLINK_HWREV := 0
634 TPLINK_HEADER_VERSION := 1
635 KERNEL := $(KERNEL_DTB) | tplink-v1-header -e -O
636 IMAGES += factory.bin
637 IMAGE/sysupgrade.bin := append-rootfs | tplink-safeloader sysupgrade | \
638 append-metadata | check-size $$$$(IMAGE_SIZE)
639 IMAGE/factory.bin := append-rootfs | tplink-safeloader factory
640 endef
641
642 define Device/tplink_re350-v1
643 $(Device/tplink-safeloader)
644 DEVICE_MODEL := RE350
645 DEVICE_VARIANT := v1
646 DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 wpad-basic
647 TPLINK_BOARD_ID := RE350-V1
648 IMAGE_SIZE := 6016k
649 SUPPORTED_DEVICES += re350-v1
650 endef
651 TARGET_DEVICES += tplink_re350-v1
652
653 define Device/tplink_re650-v1
654 $(Device/tplink-safeloader)
655 DEVICE_MODEL := RE650
656 DEVICE_VARIANT := v1
657 DEVICE_PACKAGES := kmod-mt7615e wpad-basic
658 TPLINK_BOARD_ID := RE650-V1
659 IMAGE_SIZE := 14208k
660 endef
661 TARGET_DEVICES += tplink_re650-v1
662
663 define Device/ubiquiti_edgerouterx
664 MTK_SOC := mt7621
665 IMAGE_SIZE := 256768k
666 FILESYSTEMS := squashfs
667 KERNEL_SIZE := 3145728
668 KERNEL_INITRAMFS := $$(KERNEL) | ubnt-erx-factory-image $(KDIR)/tmp/$$(KERNEL_INITRAMFS_PREFIX)-factory.tar
669 IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
670 DEVICE_VENDOR := Ubiquiti
671 DEVICE_MODEL := EdgeRouter X
672 SUPPORTED_DEVICES += ubnt-erx
673 endef
674 TARGET_DEVICES += ubiquiti_edgerouterx
675
676 define Device/ubiquiti_edgerouterx-sfp
677 $(Device/ubiquiti_edgerouterx)
678 DEVICE_VENDOR := Ubiquiti
679 DEVICE_MODEL := EdgeRouter X-SFP
680 DEVICE_PACKAGES += kmod-i2c-algo-pca kmod-gpio-pca953x kmod-i2c-gpio-custom
681 SUPPORTED_DEVICES += ubnt-erx-sfp
682 endef
683 TARGET_DEVICES += ubiquiti_edgerouterx-sfp
684
685 define Device/unielec_u7621-06-256m-16m
686 MTK_SOC := mt7621
687 IMAGE_SIZE := 16064k
688 DEVICE_VENDOR := UniElec
689 DEVICE_MODEL := U7621-06
690 DEVICE_VARIANT := 256M RAM/16M flash
691 DEVICE_PACKAGES := kmod-ata-core kmod-ata-ahci kmod-sdhci-mt7620 kmod-usb3
692 SUPPORTED_DEVICES += u7621-06-256M-16M
693 endef
694 TARGET_DEVICES += unielec_u7621-06-256m-16m
695
696 define Device/unielec_u7621-06-512m-64m
697 MTK_SOC := mt7621
698 IMAGE_SIZE := 65216k
699 DEVICE_VENDOR := UniElec
700 DEVICE_MODEL := U7621-06
701 DEVICE_VARIANT := 512M RAM/64M flash
702 DEVICE_PACKAGES := kmod-ata-core kmod-ata-ahci kmod-sdhci-mt7620 kmod-usb3
703 endef
704 TARGET_DEVICES += unielec_u7621-06-512m-64m
705
706 define Device/wevo_11acnas
707 MTK_SOC := mt7621
708 IMAGE_SIZE := 16064k
709 DEVICE_VENDOR := WeVO
710 DEVICE_MODEL := 11AC NAS Router
711 DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic
712 SUPPORTED_DEVICES += 11acnas
713 endef
714 TARGET_DEVICES += wevo_11acnas
715
716 define Device/wevo_w2914ns-v2
717 MTK_SOC := mt7621
718 IMAGE_SIZE := 16064k
719 DEVICE_VENDOR := WeVO
720 DEVICE_MODEL := W2914NS
721 DEVICE_VARIANT := v2
722 DEVICE_PACKAGES := \
723 kmod-mt7603 kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic
724 SUPPORTED_DEVICES += w2914nsv2
725 endef
726 TARGET_DEVICES += wevo_w2914ns-v2
727
728 define Device/xiaomi_mir3g
729 MTK_SOC := mt7621
730 BLOCKSIZE := 128k
731 PAGESIZE := 2048
732 KERNEL_SIZE := 4096k
733 IMAGE_SIZE := 124416k
734 UBINIZE_OPTS := -E 5
735 IMAGES += kernel1.bin rootfs0.bin
736 IMAGE/kernel1.bin := append-kernel
737 IMAGE/rootfs0.bin := append-ubi | check-size $$$$(IMAGE_SIZE)
738 IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
739 DEVICE_VENDOR := Xiaomi
740 DEVICE_MODEL := Mi Router 3G
741 SUPPORTED_DEVICES += R3G
742 SUPPORTED_DEVICES += mir3g
743 DEVICE_PACKAGES := \
744 kmod-mt7603 kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic \
745 uboot-envtools
746 endef
747 TARGET_DEVICES += xiaomi_mir3g
748
749 define Device/xiaomi_mir3p
750 MTK_SOC := mt7621
751 BLOCKSIZE := 128k
752 PAGESIZE := 2048
753 KERNEL_SIZE:= 4096k
754 UBINIZE_OPTS := -E 5
755 IMAGE_SIZE := 255488k
756 DEVICE_VENDOR := Xiaomi
757 DEVICE_MODEL := Mi Router 3 Pro
758 IMAGES += factory.bin
759 IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
760 IMAGE/factory.bin := append-kernel | pad-to $$(KERNEL_SIZE) | append-ubi | check-size $$$$(IMAGE_SIZE)
761 DEVICE_PACKAGES := \
762 kmod-mt7615e kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic \
763 uboot-envtools
764 endef
765 TARGET_DEVICES += xiaomi_mir3p
766
767 define Device/xiaoyu_xy-c5
768 MTK_SOC := mt7621
769 IMAGE_SIZE := 32448k
770 DEVICE_VENDOR := XiaoYu
771 DEVICE_MODEL := XY-C5
772 DEVICE_PACKAGES := kmod-ata-core kmod-ata-ahci kmod-usb3
773 endef
774 TARGET_DEVICES += xiaoyu_xy-c5
775
776 define Device/xzwifi_creativebox-v1
777 MTK_SOC := mt7621
778 IMAGE_SIZE := 32448k
779 DEVICE_VENDOR := CreativeBox
780 DEVICE_MODEL := v1
781 DEVICE_PACKAGES := \
782 kmod-ata-core kmod-ata-ahci kmod-mt7603 kmod-mt76x2 kmod-sdhci-mt7620 \
783 kmod-usb3
784 endef
785 TARGET_DEVICES += xzwifi_creativebox-v1
786
787 define Device/youhua_wr1200js
788 MTK_SOC := mt7621
789 IMAGE_SIZE := 16064k
790 DEVICE_VENDOR := YouHua
791 DEVICE_MODEL := WR1200JS
792 DEVICE_PACKAGES := \
793 kmod-mt7603 kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic
794 endef
795 TARGET_DEVICES += youhua_wr1200js
796
797 define Device/youku_yk-l2
798 MTK_SOC := mt7621
799 IMAGE_SIZE := 16064k
800 DEVICE_VENDOR := Youku
801 DEVICE_MODEL := YK-L2
802 DEVICE_PACKAGES := \
803 kmod-mt7603 kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic
804 endef
805 TARGET_DEVICES += youku_yk-l2
806
807 define Device/zbtlink_zbt-we1326
808 MTK_SOC := mt7621
809 IMAGE_SIZE := 16064k
810 DEVICE_VENDOR := Zbtlink
811 DEVICE_MODEL := ZBT-WE1326
812 DEVICE_PACKAGES := \
813 kmod-mt7603 kmod-mt76x2 kmod-usb3 kmod-sdhci-mt7620 wpad-basic
814 SUPPORTED_DEVICES += zbt-we1326
815 endef
816 TARGET_DEVICES += zbtlink_zbt-we1326
817
818 define Device/zbtlink_zbt-we3526
819 MTK_SOC := mt7621
820 IMAGE_SIZE := 16064k
821 DEVICE_VENDOR := Zbtlink
822 DEVICE_MODEL := ZBT-WE3526
823 DEVICE_PACKAGES := \
824 kmod-sdhci-mt7620 kmod-mt7603 kmod-mt76x2 \
825 kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic
826 endef
827 TARGET_DEVICES += zbtlink_zbt-we3526
828
829 define Device/zbtlink_zbt-wg2626
830 MTK_SOC := mt7621
831 IMAGE_SIZE := 16064k
832 DEVICE_VENDOR := Zbtlink
833 DEVICE_MODEL := ZBT-WG2626
834 DEVICE_PACKAGES := \
835 kmod-ata-core kmod-ata-ahci kmod-sdhci-mt7620 kmod-mt76x2 kmod-usb3 \
836 kmod-usb-ledtrig-usbport wpad-basic
837 SUPPORTED_DEVICES += zbt-wg2626
838 endef
839 TARGET_DEVICES += zbtlink_zbt-wg2626
840
841 define Device/zbtlink_zbt-wg3526-16m
842 MTK_SOC := mt7621
843 IMAGE_SIZE := 16064k
844 DEVICE_VENDOR := Zbtlink
845 DEVICE_MODEL := ZBT-WG3526
846 DEVICE_VARIANT := 16M
847 DEVICE_PACKAGES := \
848 kmod-ata-core kmod-ata-ahci kmod-sdhci-mt7620 kmod-mt7603 kmod-mt76x2 \
849 kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic
850 SUPPORTED_DEVICES += zbt-wg3526 zbt-wg3526-16M
851 endef
852 TARGET_DEVICES += zbtlink_zbt-wg3526-16m
853
854 define Device/zbtlink_zbt-wg3526-32m
855 MTK_SOC := mt7621
856 IMAGE_SIZE := 32448k
857 DEVICE_VENDOR := Zbtlink
858 DEVICE_MODEL := ZBT-WG3526
859 DEVICE_VARIANT := 32M
860 DEVICE_PACKAGES := \
861 kmod-ata-core kmod-ata-ahci kmod-sdhci-mt7620 kmod-mt7603 kmod-mt76x2 \
862 kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic
863 SUPPORTED_DEVICES += ac1200pro zbt-wg3526-32M
864 endef
865 TARGET_DEVICES += zbtlink_zbt-wg3526-32m