ramips: add support for Buffalo WSR-2533DHPL
[openwrt/staging/mkresin.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-dx1167r
385 BLOCKSIZE := 128k
386 PAGESIZE := 2048
387 UBINIZE_OPTS := -E 5
388 UIMAGE_MAGIC := 0x434f4d43
389 KERNEL_SIZE := 4096k
390 IMAGE_SIZE := 51200k
391 DEVICE_VENDOR := I-O DATA
392 DEVICE_MODEL := WN-DX1167R
393 KERNEL_INITRAMFS := $(KERNEL_DTB) | custom-initramfs-uimage 3.10(XIK.1)b10 | \
394 iodata-mstc-header
395 IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
396 DEVICE_PACKAGES := kmod-mt7615e wpad-basic
397 endef
398 TARGET_DEVICES += iodata_wn-dx1167r
399
400 define Device/iodata_wn-gx300gr
401 IMAGE_SIZE := 7616k
402 DEVICE_VENDOR := I-O DATA
403 DEVICE_MODEL := WN-GX300GR
404 DEVICE_PACKAGES := kmod-mt7603 wpad-basic
405 endef
406 TARGET_DEVICES += iodata_wn-gx300gr
407
408 define Device/iodata_wnpr2600g
409 DEVICE_VENDOR := I-O DATA
410 DEVICE_MODEL := WNPR2600G
411 IMAGE_SIZE := 13952k
412 IMAGES += factory.bin
413 IMAGE/factory.bin := $$(sysupgrade_bin) | check-size | \
414 elx-header 0104003a 8844A2D168B45A2D
415 DEVICE_PACKAGES := kmod-mt7615e wpad-basic
416 endef
417 TARGET_DEVICES += iodata_wnpr2600g
418
419 define Device/iptime_a6ns-m
420 IMAGE_SIZE := 16128k
421 UIMAGE_NAME := a6nm
422 DEVICE_VENDOR := ipTIME
423 DEVICE_MODEL := A6ns-M
424 DEVICE_PACKAGES := kmod-mt7615e kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic
425 endef
426 TARGET_DEVICES += iptime_a6ns-m
427
428 define Device/iptime_a8004t
429 IMAGE_SIZE := 16128k
430 UIMAGE_NAME := a8004t
431 DEVICE_VENDOR := ipTIME
432 DEVICE_MODEL := A8004T
433 DEVICE_PACKAGES := kmod-mt7615e kmod-usb3 wpad-basic
434 endef
435 TARGET_DEVICES += iptime_a8004t
436
437 define Device/jcg_jhr-ac876m
438 IMAGE_SIZE := 16064k
439 IMAGES += factory.bin
440 IMAGE/factory.bin := $$(sysupgrade_bin) | check-size | \
441 jcg-header 89.1
442 JCG_MAXSIZE := 16064k
443 DEVICE_VENDOR := JCG
444 DEVICE_MODEL := JHR-AC876M
445 DEVICE_PACKAGES := kmod-mt7615e kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic
446 endef
447 TARGET_DEVICES += jcg_jhr-ac876m
448
449 define Device/lenovo_newifi-d1
450 IMAGE_SIZE := 32448k
451 DEVICE_VENDOR := Newifi
452 DEVICE_MODEL := D1
453 DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 kmod-sdhci-mt7620 \
454 kmod-usb-ledtrig-usbport wpad-basic
455 SUPPORTED_DEVICES += newifi-d1
456 endef
457 TARGET_DEVICES += lenovo_newifi-d1
458
459 define Device/linksys_re6500
460 IMAGE_SIZE := 7872k
461 DEVICE_VENDOR := Linksys
462 DEVICE_MODEL := RE6500
463 DEVICE_PACKAGES := kmod-mt76x2 wpad-basic
464 SUPPORTED_DEVICES += re6500
465 endef
466 TARGET_DEVICES += linksys_re6500
467
468 define Device/mediatek_ap-mt7621a-v60
469 IMAGE_SIZE := 7872k
470 DEVICE_VENDOR := Mediatek
471 DEVICE_MODEL := AP-MT7621A-V60 EVB
472 DEVICE_PACKAGES := kmod-usb3 kmod-sdhci-mt7620 kmod-sound-mt7620
473 endef
474 TARGET_DEVICES += mediatek_ap-mt7621a-v60
475
476 define Device/mediatek_mt7621-eval-board
477 BLOCKSIZE := 64k
478 IMAGE_SIZE := 15104k
479 DEVICE_VENDOR := MediaTek
480 DEVICE_MODEL := MT7621 EVB
481 SUPPORTED_DEVICES += mt7621
482 endef
483 TARGET_DEVICES += mediatek_mt7621-eval-board
484
485 define Device/MikroTik
486 DEVICE_VENDOR := MikroTik
487 BLOCKSIZE := 64k
488 IMAGE_SIZE := 16128k
489 DEVICE_PACKAGES := kmod-usb3
490 LOADER_TYPE := elf
491 PLATFORM := mt7621
492 KERNEL := $(KERNEL_DTB) | loader-kernel
493 IMAGE/sysupgrade.bin := append-kernel | kernel2minor -s 1024 | \
494 pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs | append-metadata | \
495 check-size
496 endef
497
498 define Device/mikrotik_rb750gr3
499 $(Device/MikroTik)
500 DEVICE_MODEL := RouterBOARD RB750G
501 DEVICE_VARIANT := r3
502 DEVICE_PACKAGES += kmod-gpio-beeper
503 endef
504 TARGET_DEVICES += mikrotik_rb750gr3
505
506 define Device/mikrotik_rbm11g
507 $(Device/MikroTik)
508 DEVICE_MODEL := RouterBOARD M11G
509 DEFAULT := n # disabled due to unknown port assignment
510 endef
511 TARGET_DEVICES += mikrotik_rbm11g
512
513 define Device/mikrotik_rbm33g
514 $(Device/MikroTik)
515 DEVICE_MODEL := RouterBOARD M33G
516 endef
517 TARGET_DEVICES += mikrotik_rbm33g
518
519 define Device/mqmaker_witi
520 IMAGE_SIZE := 16064k
521 DEVICE_VENDOR := MQmaker
522 DEVICE_MODEL := WiTi
523 DEVICE_PACKAGES := kmod-ata-ahci kmod-mt76x2 kmod-sdhci-mt7620 kmod-usb3 \
524 kmod-usb-ledtrig-usbport wpad-basic
525 SUPPORTED_DEVICES += witi mqmaker,witi-256m mqmaker,witi-512m
526 endef
527 TARGET_DEVICES += mqmaker_witi
528
529 define Device/mtc_wr1201
530 IMAGE_SIZE := 16000k
531 DEVICE_VENDOR := MTC
532 DEVICE_MODEL := Wireless Router WR1201
533 KERNEL_INITRAMFS := $(KERNEL_DTB) | custom-initramfs-uimage WR1201_8_128
534 DEVICE_PACKAGES := kmod-sdhci-mt7620 kmod-mt76x2 kmod-usb3 \
535 kmod-usb-ledtrig-usbport wpad-basic
536 endef
537 TARGET_DEVICES += mtc_wr1201
538
539 define Device/netgear_ex6150
540 DEVICE_VENDOR := NETGEAR
541 DEVICE_MODEL := EX6150
542 DEVICE_PACKAGES := kmod-mt76x2 wpad-basic
543 NETGEAR_BOARD_ID := U12H318T00_NETGEAR
544 IMAGE_SIZE := 14848k
545 IMAGES += factory.chk
546 IMAGE/factory.chk := $$(sysupgrade_bin) | check-size | \
547 netgear-chk
548 endef
549 TARGET_DEVICES += netgear_ex6150
550
551 define Device/netgear_sercomm_nand
552 BLOCKSIZE := 128k
553 PAGESIZE := 2048
554 KERNEL_SIZE := 4096k
555 UBINIZE_OPTS := -E 5
556 IMAGES += factory.img kernel.bin rootfs.bin
557 IMAGE/factory.img := pad-extra 2048k | append-kernel | pad-to 6144k | \
558 append-ubi | pad-to $$$$(BLOCKSIZE) | sercom-footer | pad-to 128 | \
559 zip $$$$(SERCOMM_HWNAME).bin | sercom-seal
560 IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
561 IMAGE/kernel.bin := append-kernel
562 IMAGE/rootfs.bin := append-ubi | check-size
563 DEVICE_VENDOR := NETGEAR
564 DEVICE_PACKAGES := kmod-mt7603 kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic
565 endef
566
567 define Device/netgear_r6220
568 $(Device/netgear_sercomm_nand)
569 DEVICE_MODEL := R6220
570 SERCOMM_HWNAME := R6220
571 SERCOMM_HWID := AYA
572 SERCOMM_HWVER := A001
573 SERCOMM_SWVER := 0x0086
574 IMAGE_SIZE := 28672k
575 DEVICE_PACKAGES += kmod-mt76x2
576 SUPPORTED_DEVICES += r6220
577 endef
578 TARGET_DEVICES += netgear_r6220
579
580
581 define Device/netgear_r6260
582 $(Device/netgear_sercomm_nand)
583 DEVICE_MODEL := R6260
584 SERCOMM_HWNAME := R6260
585 SERCOMM_HWID := CHJ
586 SERCOMM_HWVER := A001
587 SERCOMM_SWVER := 0x0052
588 IMAGE_SIZE := 40960k
589 DEVICE_PACKAGES += kmod-mt7615e
590 endef
591 TARGET_DEVICES += netgear_r6260
592
593 define Device/netgear_r6350
594 $(Device/netgear_sercomm_nand)
595 DEVICE_MODEL := R6350
596 SERCOMM_HWNAME := R6350
597 SERCOMM_HWID := CHJ
598 SERCOMM_HWVER := A001
599 SERCOMM_SWVER := 0x0052
600 IMAGE_SIZE := 40960k
601 DEVICE_PACKAGES += kmod-mt7615e
602 endef
603 TARGET_DEVICES += netgear_r6350
604
605 define Device/netgear_r6700-v2
606 $(Device/netgear_sercomm_nand)
607 DEVICE_MODEL := R6700
608 DEVICE_VARIANT := v2
609 DEVICE_ALT0_VENDOR := NETGEAR
610 DEVICE_ALT0_MODEL := Nighthawk AC2400
611 SERCOMM_HWNAME := R6950
612 SERCOMM_HWID := BZV
613 SERCOMM_HWVER := A001
614 SERCOMM_SWVER := 0x1032
615 IMAGE_SIZE := 40960k
616 DEVICE_PACKAGES += kmod-mt7615e
617 endef
618 TARGET_DEVICES += netgear_r6700-v2
619
620 define Device/netgear_r6800
621 $(Device/netgear_sercomm_nand)
622 DEVICE_MODEL := R6800
623 SERCOMM_HWNAME := R6950
624 SERCOMM_HWID := BZV
625 SERCOMM_HWVER := A001
626 SERCOMM_SWVER := 0x0062
627 IMAGE_SIZE := 40960k
628 DEVICE_PACKAGES += kmod-mt7615e
629 endef
630 TARGET_DEVICES += netgear_r6800
631
632 define Device/netgear_r6850
633 $(Device/netgear_sercomm_nand)
634 DEVICE_MODEL := R6850
635 SERCOMM_HWNAME := R6850
636 SERCOMM_HWID := CHJ
637 SERCOMM_HWVER := A001
638 SERCOMM_SWVER := 0x0052
639 IMAGE_SIZE := 40960k
640 DEVICE_PACKAGES += kmod-mt7615e
641 endef
642 TARGET_DEVICES += netgear_r6850
643
644 define Device/netgear_wndr3700-v5
645 BLOCKSIZE := 64k
646 IMAGE_SIZE := 15232k
647 SERCOMM_HWID := AYB
648 SERCOMM_HWVER := A001
649 SERCOMM_SWVER := 0x1054
650 IMAGES += factory.img
651 IMAGE/default := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | \
652 pad-rootfs
653 IMAGE/sysupgrade.bin := $$(IMAGE/default) | append-metadata | \
654 check-size
655 IMAGE/factory.img := pad-extra 320k | $$(IMAGE/default) | \
656 pad-to $$$$(BLOCKSIZE) | sercom-footer | pad-to 128 | \
657 zip WNDR3700v5.bin | sercom-seal
658 DEVICE_VENDOR := NETGEAR
659 DEVICE_MODEL := WNDR3700
660 DEVICE_VARIANT := v5
661 DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 \
662 kmod-usb-ledtrig-usbport wpad-basic
663 SUPPORTED_DEVICES += wndr3700v5
664 endef
665 TARGET_DEVICES += netgear_wndr3700-v5
666
667 define Device/netis_wf2881
668 BLOCKSIZE := 128k
669 PAGESIZE := 2048
670 FILESYSTEMS := squashfs
671 KERNEL_SIZE := 4096k
672 IMAGE_SIZE := 129280k
673 UBINIZE_OPTS := -E 5
674 UIMAGE_NAME := WF2881_0.0.00
675 KERNEL_INITRAMFS := $(KERNEL_DTB) | netis-tail WF2881 | uImage lzma
676 IMAGES += factory.bin
677 IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
678 IMAGE/factory.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi | \
679 check-size
680 DEVICE_VENDOR := NETIS
681 DEVICE_MODEL := WF2881
682 DEVICE_PACKAGES := kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic
683 endef
684 TARGET_DEVICES += netis_wf2881
685
686 define Device/phicomm_k2p
687 IMAGE_SIZE := 15744k
688 DEVICE_VENDOR := Phicomm
689 DEVICE_MODEL := K2P
690 DEVICE_ALT0_VENDOR := Phicomm
691 DEVICE_ALT0_MODEL := KE 2P
692 SUPPORTED_DEVICES += k2p
693 DEVICE_PACKAGES := kmod-mt7615e wpad-basic
694 endef
695 TARGET_DEVICES += phicomm_k2p
696
697 define Device/planex_vr500
698 IMAGE_SIZE := 65216k
699 DEVICE_VENDOR := Planex
700 DEVICE_MODEL := VR500
701 DEVICE_PACKAGES := kmod-usb3
702 SUPPORTED_DEVICES += vr500
703 endef
704 TARGET_DEVICES += planex_vr500
705
706 define Device/samknows_whitebox-v8
707 IMAGE_SIZE := 16064k
708 DEVICE_VENDOR := SamKnows
709 DEVICE_MODEL := Whitebox 8
710 DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 \
711 kmod-usb-ledtrig-usbport uboot-envtools wpad-basic
712 SUPPORTED_DEVICES += sk-wb8
713 endef
714 TARGET_DEVICES += samknows_whitebox-v8
715
716 define Device/storylink_sap-g3200u3
717 IMAGE_SIZE := 7872k
718 DEVICE_VENDOR := STORYLiNK
719 DEVICE_MODEL := SAP-G3200U3
720 DEVICE_PACKAGES := kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic
721 SUPPORTED_DEVICES += sap-g3200u3
722 endef
723 TARGET_DEVICES += storylink_sap-g3200u3
724
725 define Device/telco-electronics_x1
726 IMAGE_SIZE := 16064k
727 DEVICE_VENDOR := Telco Electronics
728 DEVICE_MODEL := X1
729 DEVICE_PACKAGES := kmod-usb3 kmod-mt76 wpad-basic
730 endef
731 TARGET_DEVICES += telco-electronics_x1
732
733 define Device/thunder_timecloud
734 IMAGE_SIZE := 16064k
735 DEVICE_VENDOR := Thunder
736 DEVICE_MODEL := Timecloud
737 DEVICE_PACKAGES := kmod-usb3
738 SUPPORTED_DEVICES += timecloud
739 endef
740 TARGET_DEVICES += thunder_timecloud
741
742 define Device/totolink_a7000r
743 IMAGE_SIZE := 16064k
744 UIMAGE_NAME := C8340R1C-9999
745 DEVICE_VENDOR := TOTOLINK
746 DEVICE_MODEL := A7000R
747 DEVICE_PACKAGES := kmod-mt7615e wpad-basic
748 endef
749 TARGET_DEVICES += totolink_a7000r
750
751 define Device/adslr_g7
752 IMAGE_SIZE := 16064k
753 DEVICE_VENDOR := ADSLR
754 DEVICE_MODEL := G7
755 DEVICE_PACKAGES := kmod-mt7615e wpad-basic
756 endef
757 TARGET_DEVICES += adslr_g7
758
759 define Device/tplink_re350-v1
760 $(Device/tplink-safeloader)
761 DEVICE_MODEL := RE350
762 DEVICE_VARIANT := v1
763 DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 wpad-basic
764 TPLINK_BOARD_ID := RE350-V1
765 IMAGE_SIZE := 6016k
766 SUPPORTED_DEVICES += re350-v1
767 endef
768 TARGET_DEVICES += tplink_re350-v1
769
770 define Device/tplink_re650-v1
771 $(Device/tplink-safeloader)
772 DEVICE_MODEL := RE650
773 DEVICE_VARIANT := v1
774 DEVICE_PACKAGES := kmod-mt7615e wpad-basic
775 TPLINK_BOARD_ID := RE650-V1
776 IMAGE_SIZE := 14208k
777 endef
778 TARGET_DEVICES += tplink_re650-v1
779
780 define Device/ubiquiti_edgerouterx
781 IMAGE_SIZE := 256768k
782 FILESYSTEMS := squashfs
783 KERNEL_SIZE := 3145728
784 KERNEL_INITRAMFS := $$(KERNEL) | \
785 ubnt-erx-factory-image $(KDIR)/tmp/$$(KERNEL_INITRAMFS_PREFIX)-factory.tar
786 IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
787 DEVICE_VENDOR := Ubiquiti
788 DEVICE_MODEL := EdgeRouter X
789 SUPPORTED_DEVICES += ubnt-erx
790 endef
791 TARGET_DEVICES += ubiquiti_edgerouterx
792
793 define Device/ubiquiti_edgerouterx-sfp
794 $(Device/ubiquiti_edgerouterx)
795 DEVICE_VENDOR := Ubiquiti
796 DEVICE_MODEL := EdgeRouter X-SFP
797 DEVICE_PACKAGES += kmod-i2c-algo-pca kmod-gpio-pca953x
798 SUPPORTED_DEVICES += ubnt-erx-sfp
799 endef
800 TARGET_DEVICES += ubiquiti_edgerouterx-sfp
801
802 define Device/ubnt_unifi-nanohd
803 DEVICE_VENDOR := Ubiquiti
804 DEVICE_MODEL := UniFi nanoHD
805 DEVICE_PACKAGES += kmod-mt7603 kmod-mt7615e wpad-basic
806 IMAGE_SIZE := 15552k
807 endef
808 TARGET_DEVICES += ubnt_unifi-nanohd
809
810 define Device/unielec_u7621-06-16m
811 IMAGE_SIZE := 16064k
812 DEVICE_VENDOR := UniElec
813 DEVICE_MODEL := U7621-06
814 DEVICE_VARIANT := 16M
815 DEVICE_PACKAGES := kmod-ata-ahci kmod-sdhci-mt7620 kmod-usb3
816 SUPPORTED_DEVICES += u7621-06-256M-16M unielec,u7621-06-256m-16m
817 endef
818 TARGET_DEVICES += unielec_u7621-06-16m
819
820 define Device/unielec_u7621-06-64m
821 IMAGE_SIZE := 65216k
822 DEVICE_VENDOR := UniElec
823 DEVICE_MODEL := U7621-06
824 DEVICE_VARIANT := 64M
825 DEVICE_PACKAGES := kmod-ata-ahci kmod-sdhci-mt7620 kmod-usb3
826 SUPPORTED_DEVICES += unielec,u7621-06-512m-64m
827 endef
828 TARGET_DEVICES += unielec_u7621-06-64m
829
830 define Device/wevo_11acnas
831 IMAGE_SIZE := 16064k
832 UIMAGE_NAME := 11AC-NAS-Router(0.0.0)
833 DEVICE_VENDOR := WeVO
834 DEVICE_MODEL := 11AC NAS Router
835 DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 \
836 kmod-usb-ledtrig-usbport wpad-basic
837 SUPPORTED_DEVICES += 11acnas
838 endef
839 TARGET_DEVICES += wevo_11acnas
840
841 define Device/wevo_w2914ns-v2
842 IMAGE_SIZE := 16064k
843 UIMAGE_NAME := W2914NS-V2(0.0.0)
844 DEVICE_VENDOR := WeVO
845 DEVICE_MODEL := W2914NS
846 DEVICE_VARIANT := v2
847 DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 \
848 kmod-usb-ledtrig-usbport wpad-basic
849 SUPPORTED_DEVICES += w2914nsv2
850 endef
851 TARGET_DEVICES += wevo_w2914ns-v2
852
853 define Device/xiaomi_mir3g
854 BLOCKSIZE := 128k
855 PAGESIZE := 2048
856 KERNEL_SIZE := 4096k
857 IMAGE_SIZE := 124416k
858 UBINIZE_OPTS := -E 5
859 IMAGES += kernel1.bin rootfs0.bin
860 IMAGE/kernel1.bin := append-kernel
861 IMAGE/rootfs0.bin := append-ubi | check-size
862 IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
863 DEVICE_VENDOR := Xiaomi
864 DEVICE_MODEL := Mi Router 3G
865 SUPPORTED_DEVICES += R3G
866 SUPPORTED_DEVICES += mir3g
867 DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 \
868 kmod-usb-ledtrig-usbport wpad-basic uboot-envtools
869 endef
870 TARGET_DEVICES += xiaomi_mir3g
871
872 define Device/xiaomi_mir3g-v2
873 IMAGE_SIZE := 14848k
874 DEVICE_VENDOR := Xiaomi
875 DEVICE_MODEL := Mi Router 3G
876 DEVICE_VARIANT := v2
877 DEVICE_ALT0_VENDOR := Xiaomi
878 DEVICE_ALT0_MODEL := Mi Router 4A
879 DEVICE_ALT0_VARIANT := Gigabit Edition
880 DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 wpad-basic
881 endef
882 TARGET_DEVICES += xiaomi_mir3g-v2
883
884 define Device/xiaomi_mir3p
885 BLOCKSIZE := 128k
886 PAGESIZE := 2048
887 KERNEL_SIZE:= 4096k
888 UBINIZE_OPTS := -E 5
889 IMAGE_SIZE := 255488k
890 DEVICE_VENDOR := Xiaomi
891 DEVICE_MODEL := Mi Router 3 Pro
892 IMAGES += factory.bin
893 IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
894 IMAGE/factory.bin := append-kernel | pad-to $$(KERNEL_SIZE) | append-ubi | \
895 check-size
896 DEVICE_PACKAGES := kmod-mt7615e kmod-usb3 kmod-usb-ledtrig-usbport \
897 wpad-basic uboot-envtools
898 endef
899 TARGET_DEVICES += xiaomi_mir3p
900
901 define Device/xiaoyu_xy-c5
902 IMAGE_SIZE := 32448k
903 DEVICE_VENDOR := XiaoYu
904 DEVICE_MODEL := XY-C5
905 DEVICE_PACKAGES := kmod-ata-ahci kmod-usb3
906 endef
907 TARGET_DEVICES += xiaoyu_xy-c5
908
909 define Device/xzwifi_creativebox-v1
910 IMAGE_SIZE := 32448k
911 DEVICE_VENDOR := CreativeBox
912 DEVICE_MODEL := v1
913 DEVICE_PACKAGES := kmod-ata-ahci kmod-mt7603 kmod-mt76x2 kmod-sdhci-mt7620 \
914 kmod-usb3
915 endef
916 TARGET_DEVICES += xzwifi_creativebox-v1
917
918 define Device/youhua_wr1200js
919 IMAGE_SIZE := 16064k
920 DEVICE_VENDOR := YouHua
921 DEVICE_MODEL := WR1200JS
922 DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 \
923 kmod-usb-ledtrig-usbport wpad-basic
924 endef
925 TARGET_DEVICES += youhua_wr1200js
926
927 define Device/youku_yk-l2
928 IMAGE_SIZE := 16064k
929 DEVICE_VENDOR := Youku
930 DEVICE_MODEL := YK-L2
931 DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 \
932 kmod-usb-ledtrig-usbport wpad-basic
933 endef
934 TARGET_DEVICES += youku_yk-l2
935
936 define Device/zbtlink_zbt-we1326
937 IMAGE_SIZE := 16064k
938 DEVICE_VENDOR := Zbtlink
939 DEVICE_MODEL := ZBT-WE1326
940 DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 kmod-sdhci-mt7620 \
941 wpad-basic
942 SUPPORTED_DEVICES += zbt-we1326
943 endef
944 TARGET_DEVICES += zbtlink_zbt-we1326
945
946 define Device/zbtlink_zbt-we3526
947 IMAGE_SIZE := 16064k
948 DEVICE_VENDOR := Zbtlink
949 DEVICE_MODEL := ZBT-WE3526
950 DEVICE_PACKAGES := kmod-sdhci-mt7620 kmod-mt7603 kmod-mt76x2 kmod-usb3 \
951 kmod-usb-ledtrig-usbport wpad-basic
952 endef
953 TARGET_DEVICES += zbtlink_zbt-we3526
954
955 define Device/zbtlink_zbt-wg2626
956 IMAGE_SIZE := 16064k
957 DEVICE_VENDOR := Zbtlink
958 DEVICE_MODEL := ZBT-WG2626
959 DEVICE_PACKAGES := kmod-ata-ahci kmod-sdhci-mt7620 kmod-mt76x2 kmod-usb3 \
960 kmod-usb-ledtrig-usbport wpad-basic
961 SUPPORTED_DEVICES += zbt-wg2626
962 endef
963 TARGET_DEVICES += zbtlink_zbt-wg2626
964
965 define Device/zbtlink_zbt-wg3526-16m
966 IMAGE_SIZE := 16064k
967 DEVICE_VENDOR := Zbtlink
968 DEVICE_MODEL := ZBT-WG3526
969 DEVICE_VARIANT := 16M
970 DEVICE_PACKAGES := kmod-ata-ahci kmod-sdhci-mt7620 kmod-mt7603 kmod-mt76x2 \
971 kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic
972 SUPPORTED_DEVICES += zbt-wg3526 zbt-wg3526-16M
973 endef
974 TARGET_DEVICES += zbtlink_zbt-wg3526-16m
975
976 define Device/zbtlink_zbt-wg3526-32m
977 IMAGE_SIZE := 32448k
978 DEVICE_VENDOR := Zbtlink
979 DEVICE_MODEL := ZBT-WG3526
980 DEVICE_VARIANT := 32M
981 DEVICE_PACKAGES := kmod-ata-ahci kmod-sdhci-mt7620 kmod-mt7603 kmod-mt76x2 \
982 kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic
983 SUPPORTED_DEVICES += ac1200pro zbt-wg3526-32M
984 endef
985 TARGET_DEVICES += zbtlink_zbt-wg3526-32m
986
987 define Device/zio_freezio
988 IMAGE_SIZE := 16064k
989 DEVICE_VENDOR := ZIO
990 DEVICE_MODEL := FREEZIO
991 DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 \
992 kmod-usb-ledtrig-usbport wpad-basic
993 endef
994 TARGET_DEVICES += zio_freezio