brcm2708: fix Hifiberry DAC+DSP package definition
[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/asus_rt-ac57u
110 MTK_SOC := mt7621
111 DEVICE_VENDOR := ASUS
112 DEVICE_MODEL := RT-AC57U
113 IMAGE_SIZE := 16064k
114 DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic
115 endef
116 TARGET_DEVICES += asus_rt-ac57u
117
118 define Device/buffalo_wsr-1166dhp
119 MTK_SOC := mt7621
120 IMAGE/sysupgrade.bin := trx | pad-rootfs | append-metadata
121 IMAGE_SIZE := 15936k
122 DEVICE_VENDOR := Buffalo
123 DEVICE_MODEL := WSR-1166DHP
124 DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 wpad-basic
125 SUPPORTED_DEVICES += wsr-1166
126 endef
127 TARGET_DEVICES += buffalo_wsr-1166dhp
128
129 define Device/buffalo_wsr-600dhp
130 MTK_SOC := mt7621
131 IMAGE_SIZE := 16064k
132 DEVICE_VENDOR := Buffalo
133 DEVICE_MODEL := WSR-600DHP
134 DEVICE_PACKAGES := kmod-mt7603 kmod-rt2800-pci wpad-basic
135 SUPPORTED_DEVICES += wsr-600
136 endef
137 TARGET_DEVICES += buffalo_wsr-600dhp
138
139 define Device/dlink_dir-860l-b1
140 $(Device/seama)
141 MTK_SOC := mt7621
142 BLOCKSIZE := 64k
143 SEAMA_SIGNATURE := wrgac13_dlink.2013gui_dir860lb
144 KERNEL := kernel-bin | append-dtb | relocate-kernel | lzma | uImage lzma
145 IMAGE_SIZE := 16064k
146 DEVICE_VENDOR := D-Link
147 DEVICE_MODEL := DIR-860L
148 DEVICE_VARIANT := B1
149 DEVICE_PACKAGES := kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic
150 SUPPORTED_DEVICES += dir-860l-b1
151 endef
152 TARGET_DEVICES += dlink_dir-860l-b1
153
154 define Device/d-team_newifi-d2
155 MTK_SOC := mt7621
156 IMAGE_SIZE := 32448k
157 DEVICE_VENDOR := Newifi
158 DEVICE_MODEL := D2
159 DEVICE_PACKAGES := \
160 kmod-mt7603 kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic
161 endef
162 TARGET_DEVICES += d-team_newifi-d2
163
164 define Device/d-team_pbr-m1
165 MTK_SOC := mt7621
166 IMAGE_SIZE := 16064k
167 DEVICE_VENDOR := PandoraBox
168 DEVICE_MODEL := PBR-M1
169 DEVICE_PACKAGES := \
170 kmod-ata-core kmod-ata-ahci kmod-mt7603 kmod-mt76x2 kmod-sdhci-mt7620 \
171 kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic
172 SUPPORTED_DEVICES += pbr-m1
173 endef
174 TARGET_DEVICES += d-team_pbr-m1
175
176 define Device/elecom_wrc-1167ghbk2-s
177 MTK_SOC := mt7621
178 IMAGE_SIZE := 15488k
179 DEVICE_VENDOR := ELECOM
180 DEVICE_MODEL := WRC-1167GHBK2-S
181 IMAGES += factory.bin
182 IMAGE/factory.bin := $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) |\
183 elecom-wrc-factory WRC-1167GHBK2-S 0.00
184 DEVICE_PACKAGES := kmod-mt7615e wpad-basic
185 endef
186 TARGET_DEVICES += elecom_wrc-1167ghbk2-s
187
188 define Device/elecom_wrc-1900gst
189 MTK_SOC := mt7621
190 IMAGE_SIZE := 11264k
191 DEVICE_VENDOR := ELECOM
192 DEVICE_MODEL := WRC-1900GST
193 IMAGES += factory.bin
194 IMAGE/factory.bin := $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) |\
195 elecom-gst-factory WRC-1900GST 0.00
196 endef
197 TARGET_DEVICES += elecom_wrc-1900gst
198
199 define Device/elecom_wrc-2533gst
200 MTK_SOC := mt7621
201 IMAGE_SIZE := 11264k
202 DEVICE_VENDOR := ELECOM
203 DEVICE_MODEL := WRC-2533GST
204 IMAGES += factory.bin
205 IMAGE/factory.bin := $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) |\
206 elecom-gst-factory WRC-2533GST 0.00
207 endef
208 TARGET_DEVICES += elecom_wrc-2533gst
209
210 define Device/firefly_firewrt
211 MTK_SOC := mt7621
212 IMAGE_SIZE := 16064k
213 DEVICE_VENDOR := Firefly
214 DEVICE_MODEL := FireWRT
215 DEVICE_PACKAGES := kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic
216 SUPPORTED_DEVICES += firewrt
217 endef
218 TARGET_DEVICES += firefly_firewrt
219
220 define Device/gehua_ghl-r-001
221 MTK_SOC := mt7621
222 IMAGE_SIZE := 32448k
223 DEVICE_VENDOR := GeHua
224 DEVICE_MODEL := GHL-R-001
225 DEVICE_PACKAGES := \
226 kmod-mt7603 kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic
227 endef
228 TARGET_DEVICES += gehua_ghl-r-001
229
230 define Device/gnubee_gb-pc1
231 MTK_SOC := mt7621
232 DEVICE_VENDOR := GnuBee
233 DEVICE_MODEL := Personal Cloud One
234 DEVICE_PACKAGES := kmod-ata-core kmod-ata-ahci kmod-usb3 kmod-sdhci-mt7620
235 IMAGE_SIZE := 32448k
236 endef
237 TARGET_DEVICES += gnubee_gb-pc1
238
239 define Device/gnubee_gb-pc2
240 MTK_SOC := mt7621
241 DEVICE_VENDOR := GnuBee
242 DEVICE_MODEL := Personal Cloud Two
243 DEVICE_PACKAGES := kmod-ata-core kmod-ata-ahci kmod-usb3 kmod-sdhci-mt7620
244 IMAGE_SIZE := 32448k
245 endef
246 TARGET_DEVICES += gnubee_gb-pc2
247
248 define Device/hiwifi_hc5962
249 MTK_SOC := mt7621
250 BLOCKSIZE := 128k
251 PAGESIZE := 2048
252 KERNEL_SIZE := 2097152
253 UBINIZE_OPTS := -E 5
254 IMAGE_SIZE := 32768k
255 IMAGES += factory.bin
256 IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
257 IMAGE/factory.bin := append-kernel | pad-to $$(KERNEL_SIZE) | append-ubi | check-size $$$$(IMAGE_SIZE)
258 DEVICE_VENDOR := HiWiFi
259 DEVICE_MODEL := HC5962
260 DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 wpad-basic
261 SUPPORTED_DEVICES += hc5962
262 endef
263 TARGET_DEVICES += hiwifi_hc5962
264
265 define Device/iodata_wn-ax1167gr
266 MTK_SOC := mt7621
267 IMAGE_SIZE := 15552k
268 KERNEL_INITRAMFS := $$(KERNEL) | \
269 iodata-factory 7864320 4 0x1055 $(KDIR)/tmp/$$(KERNEL_INITRAMFS_PREFIX)-factory.bin
270 DEVICE_VENDOR := I-O DATA
271 DEVICE_MODEL := WN-AX1167GR
272 DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 wpad-basic
273 endef
274 TARGET_DEVICES += iodata_wn-ax1167gr
275
276 define Device/iodata_wn-gx300gr
277 MTK_SOC := mt7621
278 IMAGE_SIZE := 7616k
279 DEVICE_VENDOR := I-O DATA
280 DEVICE_MODEL := WN-GX300GR
281 DEVICE_PACKAGES := kmod-mt7603 wpad-basic
282 endef
283 TARGET_DEVICES += iodata_wn-gx300gr
284
285 define Device/lenovo_newifi-d1
286 MTK_SOC := mt7621
287 IMAGE_SIZE := 32448k
288 DEVICE_VENDOR := Newifi
289 DEVICE_MODEL := D1
290 DEVICE_PACKAGES := \
291 kmod-mt7603 kmod-mt76x2 kmod-usb3 kmod-sdhci-mt7620 kmod-usb-ledtrig-usbport wpad-basic
292 SUPPORTED_DEVICES += newifi-d1
293 endef
294 TARGET_DEVICES += lenovo_newifi-d1
295
296 define Device/linksys_re6500
297 MTK_SOC := mt7621
298 IMAGE_SIZE := 7872k
299 DEVICE_VENDOR := Linksys
300 DEVICE_MODEL := RE6500
301 DEVICE_PACKAGES := kmod-mt76x2 wpad-basic
302 SUPPORTED_DEVICES += re6500
303 endef
304 TARGET_DEVICES += linksys_re6500
305
306 define Device/mediatek_ap-mt7621a-v60
307 MTK_SOC := mt7621
308 IMAGE_SIZE := 7872k
309 DEVICE_VENDOR := Mediatek
310 DEVICE_MODEL := AP-MT7621A-V60 EVB
311 DEVICE_PACKAGES := kmod-usb3 kmod-sdhci-mt7620 kmod-sound-mt7620
312 endef
313 TARGET_DEVICES += mediatek_ap-mt7621a-v60
314
315 define Device/mediatek_mt7621-eval-board
316 MTK_SOC := mt7621
317 BLOCKSIZE := 64k
318 IMAGE_SIZE := 15104k
319 DEVICE_VENDOR := MediaTek
320 DEVICE_MODEL := MT7621 EVB
321 SUPPORTED_DEVICES += mt7621
322 endef
323 TARGET_DEVICES += mediatek_mt7621-eval-board
324
325 define Device/MikroTik
326 MTK_SOC := mt7621
327 DEVICE_VENDOR := MikroTik
328 BLOCKSIZE := 64k
329 IMAGE_SIZE := 16128k
330 DEVICE_PACKAGES := kmod-usb3
331 LOADER_TYPE := elf
332 PLATFORM := mt7621
333 KERNEL := $(KERNEL_DTB) | loader-kernel
334 IMAGE/sysupgrade.bin := append-kernel | kernel2minor -s 1024 | pad-to $$$$(BLOCKSIZE) | \
335 append-rootfs | pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE)
336 endef
337
338 define Device/mikrotik_rb750gr3
339 $(Device/MikroTik)
340 DEVICE_MODEL := RouterBOARD RB750G
341 DEVICE_VARIANT := r3
342 DEVICE_PACKAGES += kmod-gpio-beeper
343 endef
344 TARGET_DEVICES += mikrotik_rb750gr3
345
346 define Device/mikrotik_rbm11g
347 $(Device/MikroTik)
348 DEVICE_MODEL := RouterBOARD M11G
349 endef
350 TARGET_DEVICES += mikrotik_rbm11g
351
352 define Device/mikrotik_rbm33g
353 $(Device/MikroTik)
354 DEVICE_MODEL := RouterBOARD M33G
355 endef
356 TARGET_DEVICES += mikrotik_rbm33g
357
358 define Device/mqmaker_witi
359 MTK_SOC := mt7621
360 IMAGE_SIZE := 16064k
361 DEVICE_VENDOR := MQmaker
362 DEVICE_MODEL := WiTi
363 DEVICE_PACKAGES := \
364 kmod-ata-core kmod-ata-ahci kmod-mt76x2 kmod-sdhci-mt7620 kmod-usb3 \
365 kmod-usb-ledtrig-usbport wpad-basic
366 SUPPORTED_DEVICES += witi mqmaker,witi-256m mqmaker,witi-512m
367 endef
368 TARGET_DEVICES += mqmaker_witi
369
370 define Device/mtc_wr1201
371 MTK_SOC := mt7621
372 IMAGE_SIZE := 16000k
373 DEVICE_VENDOR := MTC
374 DEVICE_MODEL := Wireless Router WR1201
375 KERNEL_INITRAMFS := $(KERNEL_DTB) | wr1201-factory-header
376 DEVICE_PACKAGES := \
377 kmod-sdhci-mt7620 kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic
378 endef
379 TARGET_DEVICES += mtc_wr1201
380
381 define Device/netgear_ex6150
382 MTK_SOC := mt7621
383 DEVICE_VENDOR := NETGEAR
384 DEVICE_MODEL := EX6150
385 DEVICE_PACKAGES := kmod-mt76x2 wpad-basic
386 NETGEAR_BOARD_ID := U12H318T00_NETGEAR
387 IMAGE_SIZE := 14848k
388 IMAGES += factory.chk
389 IMAGE/factory.chk := $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | netgear-chk
390 endef
391 TARGET_DEVICES += netgear_ex6150
392
393 define Device/netgear_r6220
394 MTK_SOC := mt7621
395 BLOCKSIZE := 128k
396 PAGESIZE := 2048
397 KERNEL_SIZE := 4096k
398 IMAGE_SIZE := 28672k
399 UBINIZE_OPTS := -E 5
400 SERCOMM_HWID := AYA
401 SERCOMM_HWVER := A001
402 SERCOMM_SWVER := 0x0086
403 IMAGES += factory.img kernel.bin rootfs.bin
404 IMAGE/factory.img := pad-extra 2048k | append-kernel | pad-to 6144k | append-ubi | \
405 pad-to $$$$(BLOCKSIZE) | sercom-footer | pad-to 128 | zip R6220.bin | sercom-seal
406 IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
407 IMAGE/kernel.bin := append-kernel
408 IMAGE/rootfs.bin := append-ubi | check-size $$$$(IMAGE_SIZE)
409 DEVICE_VENDOR := NETGEAR
410 DEVICE_MODEL := R6220
411 DEVICE_PACKAGES := \
412 kmod-mt7603 kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic
413 SUPPORTED_DEVICES += r6220
414 endef
415 TARGET_DEVICES += netgear_r6220
416
417 define Device/netgear_r6260_r6350_r6850
418 MTK_SOC := mt7621
419 BLOCKSIZE := 128k
420 PAGESIZE := 2048
421 KERNEL_SIZE := 4096k
422 IMAGE_SIZE := 40960k
423 UBINIZE_OPTS := -E 5
424 SERCOMM_HWID := CHJ
425 SERCOMM_HWVER := A001
426 SERCOMM_SWVER := 0x0052
427 IMAGES += factory.img kernel.bin rootfs.bin
428 IMAGE/factory.img := pad-extra 2048k | append-kernel | pad-to 6144k | append-ubi | \
429 pad-to $$$$(BLOCKSIZE) | sercom-footer | pad-to 128 | zip $$$$(DEVICE_MODEL).bin | sercom-seal
430 IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
431 IMAGE/kernel.bin := append-kernel
432 IMAGE/rootfs.bin := append-ubi | check-size $$$$(IMAGE_SIZE)
433 DEVICE_VENDOR := NETGEAR
434 DEVICE_PACKAGES := \
435 kmod-mt7603 kmod-mt7615e kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic
436 endef
437
438 define Device/netgear_r6260
439 $(Device/netgear_r6260_r6350_r6850)
440 DEVICE_MODEL := R6260
441 endef
442 TARGET_DEVICES += netgear_r6260
443
444 define Device/netgear_r6350
445 $(Device/netgear_r6260_r6350_r6850)
446 DEVICE_MODEL := R6350
447 endef
448 TARGET_DEVICES += netgear_r6350
449
450 define Device/netgear_r6850
451 $(Device/netgear_r6260_r6350_r6850)
452 DEVICE_MODEL := R6850
453 endef
454 TARGET_DEVICES += netgear_r6850
455
456 define Device/netgear_wndr3700-v5
457 MTK_SOC := mt7621
458 BLOCKSIZE := 64k
459 IMAGE_SIZE := 15232k
460 SERCOMM_HWID := AYB
461 SERCOMM_HWVER := A001
462 SERCOMM_SWVER := 0x1054
463 IMAGES += factory.img
464 IMAGE/default := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs
465 IMAGE/sysupgrade.bin := $$(IMAGE/default) | append-metadata | check-size $$$$(IMAGE_SIZE)
466 IMAGE/factory.img := pad-extra 320k | $$(IMAGE/default) | pad-to $$$$(BLOCKSIZE) | \
467 sercom-footer | pad-to 128 | zip WNDR3700v5.bin | sercom-seal
468 DEVICE_VENDOR := NETGEAR
469 DEVICE_MODEL := WNDR3700
470 DEVICE_VARIANT := v5
471 DEVICE_PACKAGES := \
472 kmod-mt7603 kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic
473 SUPPORTED_DEVICES += wndr3700v5
474 endef
475 TARGET_DEVICES += netgear_wndr3700-v5
476
477 define Device/netis_wf-2881
478 MTK_SOC := mt7621
479 BLOCKSIZE := 128k
480 PAGESIZE := 2048
481 FILESYSTEMS := squashfs
482 IMAGE_SIZE := 129280k
483 KERNEL := $(KERNEL_DTB) | pad-offset $$(BLOCKSIZE) 64 | uImage lzma
484 UBINIZE_OPTS := -E 5
485 IMAGE/sysupgrade.bin := append-kernel | append-ubi | append-metadata | check-size $$$$(IMAGE_SIZE)
486 DEVICE_VENDOR := NETIS
487 DEVICE_MODEL := WF-2881
488 DEVICE_PACKAGES := kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic
489 SUPPORTED_DEVICES += wf-2881
490 endef
491 TARGET_DEVICES += netis_wf-2881
492
493 define Device/phicomm_k2p
494 MTK_SOC := mt7621
495 IMAGE_SIZE := 15744k
496 DEVICE_VENDOR := Phicomm
497 DEVICE_MODEL := K2P
498 SUPPORTED_DEVICES += k2p
499 DEVICE_PACKAGES := kmod-mt7615e wpad-basic
500 endef
501 TARGET_DEVICES += phicomm_k2p
502
503 define Device/planex_vr500
504 MTK_SOC := mt7621
505 IMAGE_SIZE := 65216k
506 DEVICE_VENDOR := Planex
507 DEVICE_MODEL := VR500
508 DEVICE_PACKAGES := kmod-usb3
509 SUPPORTED_DEVICES += vr500
510 endef
511 TARGET_DEVICES += planex_vr500
512
513 define Device/samknows_whitebox-v8
514 MTK_SOC := mt7621
515 IMAGE_SIZE := 16064k
516 DEVICE_VENDOR := SamKnows
517 DEVICE_MODEL := Whitebox 8
518 DEVICE_PACKAGES := \
519 kmod-mt7603 kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport \
520 uboot-envtools wpad-basic
521 SUPPORTED_DEVICES += sk-wb8
522 endef
523 TARGET_DEVICES += samknows_whitebox-v8
524
525 define Device/storylink_sap-g3200u3
526 MTK_SOC := mt7621
527 IMAGE_SIZE := 7872k
528 DEVICE_VENDOR := STORYLiNK
529 DEVICE_MODEL := SAP-G3200U3
530 DEVICE_PACKAGES := kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic
531 SUPPORTED_DEVICES += sap-g3200u3
532 endef
533 TARGET_DEVICES += storylink_sap-g3200u3
534
535 define Device/telco-electronics_x1
536 MTK_SOC := mt7621
537 IMAGE_SIZE := 16064k
538 DEVICE_VENDOR := Telco Electronics
539 DEVICE_MODEL := X1
540 DEVICE_PACKAGES := kmod-usb3 kmod-mt76 wpad-basic
541 endef
542 TARGET_DEVICES += telco-electronics_x1
543
544 define Device/thunder_timecloud
545 MTK_SOC := mt7621
546 IMAGE_SIZE := 16064k
547 DEVICE_VENDOR := Thunder
548 DEVICE_MODEL := Timecloud
549 DEVICE_PACKAGES := kmod-usb3
550 SUPPORTED_DEVICES += timecloud
551 endef
552 TARGET_DEVICES += thunder_timecloud
553
554 define Device/totolink_a7000r
555 MTK_SOC := mt7621
556 IMAGE_SIZE := 16064k
557 UIMAGE_NAME := C8340R1C-9999
558 DEVICE_VENDOR := TOTOLINK
559 DEVICE_MODEL := A7000R
560 DEVICE_PACKAGES := kmod-mt7615e wpad-basic
561 endef
562 TARGET_DEVICES += totolink_a7000r
563
564 define Device/adslr_g7
565 MTK_SOC := mt7621
566 IMAGE_SIZE := 16064k
567 DEVICE_VENDOR := ADSLR
568 DEVICE_MODEL := G7
569 DEVICE_PACKAGES := kmod-mt7615e wpad-basic
570 endef
571 TARGET_DEVICES += adslr_g7
572
573 define Device/tplink-safeloader
574 MTK_SOC := mt7621
575 DEVICE_VENDOR := TP-Link
576 TPLINK_BOARD_ID :=
577 TPLINK_HWID := 0x0
578 TPLINK_HWREV := 0
579 TPLINK_HEADER_VERSION := 1
580 KERNEL := $(KERNEL_DTB) | tplink-v1-header -e -O
581 IMAGES += factory.bin
582 IMAGE/sysupgrade.bin := append-rootfs | tplink-safeloader sysupgrade | \
583 append-metadata | check-size $$$$(IMAGE_SIZE)
584 IMAGE/factory.bin := append-rootfs | tplink-safeloader factory
585 endef
586
587 define Device/tplink_re350-v1
588 $(Device/tplink-safeloader)
589 DEVICE_MODEL := RE350
590 DEVICE_VARIANT := v1
591 DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 wpad-basic
592 TPLINK_BOARD_ID := RE350-V1
593 IMAGE_SIZE := 6016k
594 SUPPORTED_DEVICES += re350-v1
595 endef
596 TARGET_DEVICES += tplink_re350-v1
597
598 define Device/tplink_re650-v1
599 $(Device/tplink-safeloader)
600 DEVICE_MODEL := RE650
601 DEVICE_VARIANT := v1
602 DEVICE_PACKAGES := kmod-mt7615e wpad-basic
603 TPLINK_BOARD_ID := RE650-V1
604 IMAGE_SIZE := 14208k
605 endef
606 TARGET_DEVICES += tplink_re650-v1
607
608 define Device/ubiquiti_edgerouterx
609 MTK_SOC := mt7621
610 IMAGE_SIZE := 256768k
611 FILESYSTEMS := squashfs
612 KERNEL_SIZE := 3145728
613 KERNEL_INITRAMFS := $$(KERNEL) | ubnt-erx-factory-image $(KDIR)/tmp/$$(KERNEL_INITRAMFS_PREFIX)-factory.tar
614 IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
615 DEVICE_VENDOR := Ubiquiti
616 DEVICE_MODEL := EdgeRouter X
617 SUPPORTED_DEVICES += ubnt-erx
618 endef
619 TARGET_DEVICES += ubiquiti_edgerouterx
620
621 define Device/ubiquiti_edgerouterx-sfp
622 $(Device/ubiquiti_edgerouterx)
623 DEVICE_VENDOR := Ubiquiti
624 DEVICE_MODEL := EdgeRouter X-SFP
625 DEVICE_PACKAGES += kmod-i2c-algo-pca kmod-gpio-pca953x kmod-i2c-gpio-custom
626 SUPPORTED_DEVICES += ubnt-erx-sfp
627 endef
628 TARGET_DEVICES += ubiquiti_edgerouterx-sfp
629
630 define Device/unielec_u7621-06-256m-16m
631 MTK_SOC := mt7621
632 IMAGE_SIZE := 16064k
633 DEVICE_VENDOR := UniElec
634 DEVICE_MODEL := U7621-06
635 DEVICE_VARIANT := 256M RAM/16M flash
636 DEVICE_PACKAGES := kmod-ata-core kmod-ata-ahci kmod-sdhci-mt7620 kmod-usb3
637 SUPPORTED_DEVICES += u7621-06-256M-16M
638 endef
639 TARGET_DEVICES += unielec_u7621-06-256m-16m
640
641 define Device/unielec_u7621-06-512m-64m
642 MTK_SOC := mt7621
643 IMAGE_SIZE := 65216k
644 DEVICE_VENDOR := UniElec
645 DEVICE_MODEL := U7621-06
646 DEVICE_VARIANT := 512M RAM/64M flash
647 DEVICE_PACKAGES := kmod-ata-core kmod-ata-ahci kmod-sdhci-mt7620 kmod-usb3
648 endef
649 TARGET_DEVICES += unielec_u7621-06-512m-64m
650
651 define Device/wevo_11acnas
652 MTK_SOC := mt7621
653 IMAGE_SIZE := 16064k
654 DEVICE_VENDOR := WeVO
655 DEVICE_MODEL := 11AC NAS Router
656 DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic
657 SUPPORTED_DEVICES += 11acnas
658 endef
659 TARGET_DEVICES += wevo_11acnas
660
661 define Device/wevo_w2914ns-v2
662 MTK_SOC := mt7621
663 IMAGE_SIZE := 16064k
664 DEVICE_VENDOR := WeVO
665 DEVICE_MODEL := W2914NS
666 DEVICE_VARIANT := v2
667 DEVICE_PACKAGES := \
668 kmod-mt7603 kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic
669 SUPPORTED_DEVICES += w2914nsv2
670 endef
671 TARGET_DEVICES += wevo_w2914ns-v2
672
673 define Device/xiaomi_mir3g
674 MTK_SOC := mt7621
675 BLOCKSIZE := 128k
676 PAGESIZE := 2048
677 KERNEL_SIZE := 4096k
678 IMAGE_SIZE := 124416k
679 UBINIZE_OPTS := -E 5
680 IMAGES += kernel1.bin rootfs0.bin
681 IMAGE/kernel1.bin := append-kernel
682 IMAGE/rootfs0.bin := append-ubi | check-size $$$$(IMAGE_SIZE)
683 IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
684 DEVICE_VENDOR := Xiaomi
685 DEVICE_MODEL := Mi Router 3G
686 SUPPORTED_DEVICES += R3G
687 SUPPORTED_DEVICES += mir3g
688 DEVICE_PACKAGES := \
689 kmod-mt7603 kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic \
690 uboot-envtools
691 endef
692 TARGET_DEVICES += xiaomi_mir3g
693
694 define Device/xiaomi_mir3p
695 MTK_SOC := mt7621
696 BLOCKSIZE := 128k
697 PAGESIZE := 2048
698 KERNEL_SIZE:= 4096k
699 UBINIZE_OPTS := -E 5
700 IMAGE_SIZE := 255488k
701 DEVICE_VENDOR := Xiaomi
702 DEVICE_MODEL := Mi Router 3 Pro
703 IMAGES += factory.bin
704 IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
705 IMAGE/factory.bin := append-kernel | pad-to $$(KERNEL_SIZE) | append-ubi | check-size $$$$(IMAGE_SIZE)
706 DEVICE_PACKAGES := \
707 kmod-mt7615e kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic \
708 uboot-envtools
709 endef
710 TARGET_DEVICES += xiaomi_mir3p
711
712 define Device/xzwifi_creativebox-v1
713 MTK_SOC := mt7621
714 IMAGE_SIZE := 32448k
715 DEVICE_VENDOR := CreativeBox
716 DEVICE_MODEL := v1
717 DEVICE_PACKAGES := \
718 kmod-ata-core kmod-ata-ahci kmod-mt7603 kmod-mt76x2 kmod-sdhci-mt7620 \
719 kmod-usb3
720 endef
721 TARGET_DEVICES += xzwifi_creativebox-v1
722
723 define Device/youhua_wr1200js
724 MTK_SOC := mt7621
725 IMAGE_SIZE := 16064k
726 DEVICE_VENDOR := YouHua
727 DEVICE_MODEL := WR1200JS
728 DEVICE_PACKAGES := \
729 kmod-mt7603 kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic
730 endef
731 TARGET_DEVICES += youhua_wr1200js
732
733 define Device/youku_yk-l2
734 MTK_SOC := mt7621
735 IMAGE_SIZE := 16064k
736 DEVICE_VENDOR := Youku
737 DEVICE_MODEL := YK-L2
738 DEVICE_PACKAGES := \
739 kmod-mt7603 kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic
740 endef
741 TARGET_DEVICES += youku_yk-l2
742
743 define Device/zbtlink_zbt-we1326
744 MTK_SOC := mt7621
745 IMAGE_SIZE := 16064k
746 DEVICE_VENDOR := ZBT
747 DEVICE_MODEL := ZBT-WE1326
748 DEVICE_PACKAGES := \
749 kmod-mt7603 kmod-mt76x2 kmod-usb3 kmod-sdhci-mt7620 wpad-basic
750 SUPPORTED_DEVICES += zbt-we1326
751 endef
752 TARGET_DEVICES += zbtlink_zbt-we1326
753
754 define Device/zbtlink_zbt-we3526
755 MTK_SOC := mt7621
756 IMAGE_SIZE := 16064k
757 DEVICE_VENDOR := ZBT
758 DEVICE_MODEL := ZBT-WE3526
759 DEVICE_PACKAGES := \
760 kmod-sdhci-mt7620 kmod-mt7603 kmod-mt76x2 \
761 kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic
762 endef
763 TARGET_DEVICES += zbtlink_zbt-we3526
764
765 define Device/zbtlink_zbt-wg2626
766 MTK_SOC := mt7621
767 IMAGE_SIZE := 16064k
768 DEVICE_VENDOR := ZBT
769 DEVICE_MODEL := ZBT-WG2626
770 DEVICE_PACKAGES := \
771 kmod-ata-core kmod-ata-ahci kmod-sdhci-mt7620 kmod-mt76x2 kmod-usb3 \
772 kmod-usb-ledtrig-usbport wpad-basic
773 SUPPORTED_DEVICES += zbt-wg2626
774 endef
775 TARGET_DEVICES += zbtlink_zbt-wg2626
776
777 define Device/zbtlink_zbt-wg3526-16m
778 MTK_SOC := mt7621
779 IMAGE_SIZE := 16064k
780 DEVICE_VENDOR := ZBT
781 DEVICE_MODEL := ZBT-WG3526
782 DEVICE_VARIANT := 16M
783 DEVICE_PACKAGES := \
784 kmod-ata-core kmod-ata-ahci kmod-sdhci-mt7620 kmod-mt7603 kmod-mt76x2 \
785 kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic
786 SUPPORTED_DEVICES += zbt-wg3526 zbt-wg3526-16M
787 endef
788 TARGET_DEVICES += zbtlink_zbt-wg3526-16m
789
790 define Device/zbtlink_zbt-wg3526-32m
791 MTK_SOC := mt7621
792 IMAGE_SIZE := 32448k
793 DEVICE_VENDOR := ZBT
794 DEVICE_MODEL := ZBT-WG3526
795 DEVICE_VARIANT := 32M
796 DEVICE_PACKAGES := \
797 kmod-ata-core kmod-ata-ahci kmod-sdhci-mt7620 kmod-mt7603 kmod-mt76x2 \
798 kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic
799 SUPPORTED_DEVICES += ac1200pro zbt-wg3526-32M
800 endef
801 TARGET_DEVICES += zbtlink_zbt-wg3526-32m