ramips: mt7621: drop custom uImage function
[openwrt/openwrt.git] / target / linux / ramips / image / mt7621.mk
1 #
2 # MT7621 Profiles
3 #
4
5 include ./common-tp-link.mk
6
7 DEFAULT_SOC := mt7621
8
9 KERNEL_DTB += -d21
10 DEVICE_VARS += ELECOM_HWNAME LINKSYS_HWNAME
11
12 define Build/elecom-wrc-gs-factory
13 $(eval product=$(word 1,$(1)))
14 $(eval version=$(word 2,$(1)))
15 ( $(STAGING_DIR_HOST)/bin/mkhash md5 $@ | tr -d '\n' ) >> $@
16 ( \
17 echo -n "ELECOM $(product) v$(version)" | \
18 dd bs=32 count=1 conv=sync; \
19 dd if=$@; \
20 ) > $@.new
21 mv $@.new $@
22 echo -n "MT7621_ELECOM_$(product)" >> $@
23 endef
24
25 define Build/elecom-wrc-factory
26 $(eval product=$(word 1,$(1)))
27 $(eval version=$(word 2,$(1)))
28 $(STAGING_DIR_HOST)/bin/mkhash md5 $@ >> $@
29 ( \
30 echo -n "ELECOM $(product) v$(version)" | \
31 dd bs=32 count=1 conv=sync; \
32 dd if=$@; \
33 ) > $@.new
34 mv $@.new $@
35 endef
36
37 define Build/iodata-factory
38 $(eval fw_size=$(word 1,$(1)))
39 $(eval fw_type=$(word 2,$(1)))
40 $(eval product=$(word 3,$(1)))
41 $(eval factory_bin=$(word 4,$(1)))
42 if [ -e $(KDIR)/tmp/$(KERNEL_INITRAMFS_IMAGE) -a "$$(stat -c%s $@)" -lt "$(fw_size)" ]; then \
43 $(CP) $(KDIR)/tmp/$(KERNEL_INITRAMFS_IMAGE) $(factory_bin); \
44 $(STAGING_DIR_HOST)/bin/mksenaofw \
45 -r 0x30a -p $(product) -t $(fw_type) \
46 -e $(factory_bin) -o $(factory_bin).new; \
47 mv $(factory_bin).new $(factory_bin); \
48 $(CP) $(factory_bin) $(BIN_DIR)/; \
49 else \
50 echo "WARNING: initramfs kernel image too big, cannot generate factory image" >&2; \
51 fi
52 endef
53
54 define Build/iodata-mstc-header
55 ( \
56 data_size_crc="$$(dd if=$@ ibs=64 skip=1 2>/dev/null | gzip -c | \
57 tail -c 8 | od -An -tx8 --endian little | tr -d ' \n')"; \
58 echo -ne "$$(echo $$data_size_crc | sed 's/../\\x&/g')" | \
59 dd of=$@ bs=8 count=1 seek=7 conv=notrunc 2>/dev/null; \
60 )
61 dd if=/dev/zero of=$@ bs=4 count=1 seek=1 conv=notrunc 2>/dev/null
62 ( \
63 header_crc="$$(dd if=$@ bs=64 count=1 2>/dev/null | gzip -c | \
64 tail -c 8 | od -An -N4 -tx4 --endian little | tr -d ' \n')"; \
65 echo -ne "$$(echo $$header_crc | sed 's/../\\x&/g')" | \
66 dd of=$@ bs=4 count=1 seek=1 conv=notrunc 2>/dev/null; \
67 )
68 endef
69
70 define Build/ubnt-erx-factory-image
71 if [ -e $(KDIR)/tmp/$(KERNEL_INITRAMFS_IMAGE) -a "$$(stat -c%s $@)" -lt "$(KERNEL_SIZE)" ]; then \
72 echo '21001:7' > $(1).compat; \
73 $(TAR) -cf $(1) --transform='s/^.*/compat/' $(1).compat; \
74 \
75 $(TAR) -rf $(1) --transform='s/^.*/vmlinux.tmp/' $(KDIR)/tmp/$(KERNEL_INITRAMFS_IMAGE); \
76 mkhash md5 $(KDIR)/tmp/$(KERNEL_INITRAMFS_IMAGE) > $(1).md5; \
77 $(TAR) -rf $(1) --transform='s/^.*/vmlinux.tmp.md5/' $(1).md5; \
78 \
79 echo "dummy" > $(1).rootfs; \
80 $(TAR) -rf $(1) --transform='s/^.*/squashfs.tmp/' $(1).rootfs; \
81 \
82 mkhash md5 $(1).rootfs > $(1).md5; \
83 $(TAR) -rf $(1) --transform='s/^.*/squashfs.tmp.md5/' $(1).md5; \
84 \
85 echo '$(BOARD) $(VERSION_CODE) $(VERSION_NUMBER)' > $(1).version; \
86 $(TAR) -rf $(1) --transform='s/^.*/version.tmp/' $(1).version; \
87 \
88 $(CP) $(1) $(BIN_DIR)/; \
89 else \
90 echo "WARNING: initramfs kernel image too big, cannot generate factory image" >&2; \
91 fi
92 endef
93
94 define Device/dsa-migration
95 DEVICE_COMPAT_VERSION := 1.1
96 DEVICE_COMPAT_MESSAGE := Config cannot be migrated from swconfig to DSA
97 endef
98
99 define Device/adslr_g7
100 $(Device/dsa-migration)
101 IMAGE_SIZE := 16064k
102 DEVICE_VENDOR := ADSLR
103 DEVICE_MODEL := G7
104 DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware
105 endef
106 TARGET_DEVICES += adslr_g7
107
108 define Device/afoundry_ew1200
109 $(Device/dsa-migration)
110 IMAGE_SIZE := 16064k
111 DEVICE_VENDOR := AFOUNDRY
112 DEVICE_MODEL := EW1200
113 DEVICE_PACKAGES := kmod-ata-ahci kmod-mt76x2 kmod-mt7603 kmod-usb3 \
114 kmod-usb-ledtrig-usbport
115 SUPPORTED_DEVICES += ew1200
116 endef
117 TARGET_DEVICES += afoundry_ew1200
118
119 define Device/alfa-network_quad-e4g
120 $(Device/dsa-migration)
121 IMAGE_SIZE := 16064k
122 DEVICE_VENDOR := ALFA Network
123 DEVICE_MODEL := Quad-E4G
124 DEVICE_PACKAGES := kmod-ata-ahci kmod-sdhci-mt7620 kmod-usb3 uboot-envtools \
125 -wpad-basic-wolfssl
126 endef
127 TARGET_DEVICES += alfa-network_quad-e4g
128
129 define Device/asiarf_ap7621-001
130 $(Device/dsa-migration)
131 IMAGE_SIZE := 16000k
132 DEVICE_VENDOR := AsiaRF
133 DEVICE_MODEL := AP7621-001
134 DEVICE_PACKAGES := kmod-sdhci-mt7620 kmod-mt76x2 kmod-usb3 -wpad-basic-wolfssl
135 endef
136 TARGET_DEVICES += asiarf_ap7621-001
137
138 define Device/asiarf_ap7621-nv1
139 $(Device/dsa-migration)
140 IMAGE_SIZE := 16000k
141 DEVICE_VENDOR := AsiaRF
142 DEVICE_MODEL := AP7621-NV1
143 DEVICE_PACKAGES := kmod-sdhci-mt7620 kmod-mt76x2 kmod-usb3 -wpad-basic-wolfssl
144 endef
145 TARGET_DEVICES += asiarf_ap7621-nv1
146
147 define Device/asus_rt-ac57u
148 $(Device/dsa-migration)
149 DEVICE_VENDOR := ASUS
150 DEVICE_MODEL := RT-AC57U
151 IMAGE_SIZE := 16064k
152 DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 \
153 kmod-usb-ledtrig-usbport
154 endef
155 TARGET_DEVICES += asus_rt-ac57u
156
157 define Device/asus_rt-ac65p
158 $(Device/dsa-migration)
159 DEVICE_VENDOR := ASUS
160 DEVICE_MODEL := RT-AC65P
161 IMAGE_SIZE := 51200k
162 UBINIZE_OPTS := -E 5
163 BLOCKSIZE := 128k
164 PAGESIZE := 2048
165 KERNEL_SIZE := 4096k
166 IMAGES += factory.bin
167 IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
168 IMAGE/factory.bin := append-kernel | pad-to $$(KERNEL_SIZE) | append-ubi | \
169 check-size
170 DEVICE_PACKAGES := kmod-usb3 kmod-mt7615e kmod-mt7615-firmware uboot-envtools
171 endef
172 TARGET_DEVICES += asus_rt-ac65p
173
174 define Device/asus_rt-ac85p
175 $(Device/dsa-migration)
176 DEVICE_VENDOR := ASUS
177 DEVICE_MODEL := RT-AC85P
178 IMAGE_SIZE := 51200k
179 UBINIZE_OPTS := -E 5
180 BLOCKSIZE := 128k
181 PAGESIZE := 2048
182 KERNEL_SIZE := 4096k
183 IMAGES += factory.bin
184 IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
185 IMAGE/factory.bin := append-kernel | pad-to $$(KERNEL_SIZE) | append-ubi | \
186 check-size
187 DEVICE_PACKAGES := kmod-usb3 kmod-mt7615e kmod-mt7615-firmware uboot-envtools
188 endef
189 TARGET_DEVICES += asus_rt-ac85p
190
191 define Device/buffalo_wsr-1166dhp
192 $(Device/dsa-migration)
193 $(Device/uimage-lzma-loader)
194 IMAGE/sysupgrade.bin := trx | pad-rootfs | append-metadata
195 IMAGE_SIZE := 15936k
196 DEVICE_VENDOR := Buffalo
197 DEVICE_MODEL := WSR-1166DHP
198 DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2
199 SUPPORTED_DEVICES += wsr-1166
200 endef
201 TARGET_DEVICES += buffalo_wsr-1166dhp
202
203 define Device/buffalo_wsr-2533dhpl
204 $(Device/dsa-migration)
205 $(Device/uimage-lzma-loader)
206 IMAGE_SIZE := 7936k
207 DEVICE_VENDOR := Buffalo
208 DEVICE_MODEL := WSR-2533DHPL
209 DEVICE_ALT0_VENDOR := Buffalo
210 DEVICE_ALT0_MODEL := WSR-2533DHP
211 IMAGE/sysupgrade.bin := trx | pad-rootfs | append-metadata
212 DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware
213 endef
214 TARGET_DEVICES += buffalo_wsr-2533dhpl
215
216 define Device/buffalo_wsr-600dhp
217 $(Device/dsa-migration)
218 IMAGE_SIZE := 16064k
219 DEVICE_VENDOR := Buffalo
220 DEVICE_MODEL := WSR-600DHP
221 DEVICE_PACKAGES := kmod-mt7603 kmod-rt2800-pci
222 SUPPORTED_DEVICES += wsr-600
223 endef
224 TARGET_DEVICES += buffalo_wsr-600dhp
225
226 define Device/dlink_dir-8xx-a1
227 $(Device/dsa-migration)
228 IMAGE_SIZE := 16000k
229 DEVICE_VENDOR := D-Link
230 DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware
231 KERNEL_INITRAMFS := $$(KERNEL) | uimage-padhdr 96
232 IMAGES += factory.bin
233 IMAGE/sysupgrade.bin := append-kernel | append-rootfs | uimage-padhdr 96 |\
234 pad-rootfs | append-metadata | check-size
235 IMAGE/factory.bin := append-kernel | append-rootfs | uimage-padhdr 96 |\
236 check-size
237 endef
238
239 define Device/dlink_dir-xx60-a1
240 $(Device/dsa-migration)
241 BLOCKSIZE := 128k
242 PAGESIZE := 2048
243 KERNEL_SIZE := 4096k
244 IMAGE_SIZE := 40960k
245 UBINIZE_OPTS := -E 5
246 DEVICE_VENDOR := D-Link
247 DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware kmod-usb3 \
248 kmod-usb-ledtrig-usbport
249 KERNEL := $$(KERNEL) | uimage-padhdr 96
250 IMAGES += factory.bin
251 IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
252 IMAGE/factory.bin := append-kernel | pad-to $$(KERNEL_SIZE) | append-ubi | \
253 check-size
254 endef
255
256 define Device/dlink_dir-1960-a1
257 $(Device/dlink_dir-xx60-a1)
258 DEVICE_MODEL := DIR-1960
259 DEVICE_VARIANT := A1
260 endef
261 TARGET_DEVICES += dlink_dir-1960-a1
262
263 define Device/dlink_dir-2640-a1
264 $(Device/dlink_dir-xx60-a1)
265 DEVICE_MODEL := DIR-2640
266 DEVICE_VARIANT := A1
267 endef
268 TARGET_DEVICES += dlink_dir-2640-a1
269
270 define Device/dlink_dir-2660-a1
271 $(Device/dlink_dir-xx60-a1)
272 DEVICE_MODEL := DIR-2660
273 DEVICE_VARIANT := A1
274 endef
275 TARGET_DEVICES += dlink_dir-2660-a1
276
277 define Device/dlink_dir-860l-b1
278 $(Device/dsa-migration)
279 $(Device/seama)
280 BLOCKSIZE := 64k
281 SEAMA_SIGNATURE := wrgac13_dlink.2013gui_dir860lb
282 LOADER_TYPE := bin
283 KERNEL := kernel-bin | append-dtb | lzma | loader-kernel | relocate-kernel | \
284 lzma -a0 | uImage lzma
285 IMAGE_SIZE := 16064k
286 DEVICE_VENDOR := D-Link
287 DEVICE_MODEL := DIR-860L
288 DEVICE_VARIANT := B1
289 DEVICE_PACKAGES := kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport
290 SUPPORTED_DEVICES += dir-860l-b1
291 endef
292 TARGET_DEVICES += dlink_dir-860l-b1
293
294 define Device/dlink_dir-867-a1
295 $(Device/dlink_dir-8xx-a1)
296 DEVICE_MODEL := DIR-867
297 DEVICE_VARIANT := A1
298 endef
299 TARGET_DEVICES += dlink_dir-867-a1
300
301 define Device/dlink_dir-878-a1
302 $(Device/dlink_dir-8xx-a1)
303 DEVICE_MODEL := DIR-878
304 DEVICE_VARIANT := A1
305 endef
306 TARGET_DEVICES += dlink_dir-878-a1
307
308 define Device/dlink_dir-882-a1
309 $(Device/dlink_dir-8xx-a1)
310 DEVICE_MODEL := DIR-882
311 DEVICE_VARIANT := A1
312 DEVICE_PACKAGES += kmod-usb3 kmod-usb-ledtrig-usbport
313 endef
314 TARGET_DEVICES += dlink_dir-882-a1
315
316 define Device/d-team_newifi-d2
317 $(Device/dsa-migration)
318 $(Device/uimage-lzma-loader)
319 IMAGE_SIZE := 32448k
320 DEVICE_VENDOR := Newifi
321 DEVICE_MODEL := D2
322 DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 \
323 kmod-usb-ledtrig-usbport
324 endef
325 TARGET_DEVICES += d-team_newifi-d2
326
327 define Device/d-team_pbr-m1
328 $(Device/dsa-migration)
329 IMAGE_SIZE := 32448k
330 DEVICE_VENDOR := PandoraBox
331 DEVICE_MODEL := PBR-M1
332 DEVICE_PACKAGES := kmod-ata-ahci kmod-mt7603 kmod-mt76x2 kmod-sdhci-mt7620 \
333 kmod-usb3 kmod-usb-ledtrig-usbport
334 SUPPORTED_DEVICES += pbr-m1
335 endef
336 TARGET_DEVICES += d-team_pbr-m1
337
338 define Device/edimax_ra21s
339 $(Device/dsa-migration)
340 $(Device/uimage-lzma-loader)
341 IMAGE_SIZE := 16064k
342 DEVICE_VENDOR := Edimax
343 DEVICE_MODEL := RA21S
344 DEVICE_ALT0_VENDOR := Edimax
345 DEVICE_ALT0_MODEL := Gemini RA21S
346 IMAGES += factory.bin
347 IMAGE/factory.bin := $$(sysupgrade_bin) | check-size | \
348 elx-header 02020040 8844A2D168B45A2D
349 DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware
350 endef
351 TARGET_DEVICES += edimax_ra21s
352
353 define Device/edimax_re23s
354 $(Device/dsa-migration)
355 $(Device/uimage-lzma-loader)
356 IMAGE_SIZE := 15680k
357 DEVICE_VENDOR := Edimax
358 DEVICE_MODEL := RE23S
359 DEVICE_ALT0_VENDOR := Edimax
360 DEVICE_ALT0_MODEL := Gemini RE23S
361 IMAGE/sysupgrade.bin := append-kernel | append-rootfs | \
362 edimax-header -s CSYS -m RN76 -f 0x70000 -S 0x01100000 | pad-rootfs | \
363 append-metadata | check-size
364 IMAGES += factory.bin
365 IMAGE/factory.bin := append-kernel | append-rootfs | \
366 edimax-header -s CSYS -m RN76 -f 0x70000 -S 0x01100000 | pad-rootfs | \
367 check-size
368 DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware
369 endef
370 TARGET_DEVICES += edimax_re23s
371
372 define Device/edimax_rg21s
373 $(Device/dsa-migration)
374 $(Device/uimage-lzma-loader)
375 IMAGE_SIZE := 16064k
376 DEVICE_VENDOR := Edimax
377 DEVICE_MODEL := Gemini AC2600 RG21S
378 IMAGES += factory.bin
379 IMAGE/factory.bin := $$(sysupgrade_bin) | check-size | \
380 elx-header 02020038 8844A2D168B45A2D
381 DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware
382 endef
383 TARGET_DEVICES += edimax_rg21s
384
385 define Device/elecom_wrc-1167ghbk2-s
386 $(Device/dsa-migration)
387 IMAGE_SIZE := 15488k
388 DEVICE_VENDOR := ELECOM
389 DEVICE_MODEL := WRC-1167GHBK2-S
390 IMAGES += factory.bin
391 IMAGE/factory.bin := $$(sysupgrade_bin) | check-size | \
392 elecom-wrc-factory WRC-1167GHBK2-S 0.00
393 DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware
394 endef
395 TARGET_DEVICES += elecom_wrc-1167ghbk2-s
396
397 define Device/elecom_wrc-gs
398 $(Device/dsa-migration)
399 $(Device/uimage-lzma-loader)
400 DEVICE_VENDOR := ELECOM
401 IMAGES += factory.bin
402 IMAGE/factory.bin := $$(sysupgrade_bin) | check-size | \
403 elecom-wrc-gs-factory $$$$(ELECOM_HWNAME) 0.00
404 DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware
405 endef
406
407 define Device/elecom_wrc-1750gs
408 $(Device/elecom_wrc-gs)
409 IMAGE_SIZE := 11264k
410 DEVICE_MODEL := WRC-1750GS
411 ELECOM_HWNAME := WRC-1750GS
412 endef
413 TARGET_DEVICES += elecom_wrc-1750gs
414
415 define Device/elecom_wrc-1750gsv
416 $(Device/elecom_wrc-gs)
417 IMAGE_SIZE := 11264k
418 DEVICE_MODEL := WRC-1750GSV
419 ELECOM_HWNAME := WRC-1750GSV
420 endef
421 TARGET_DEVICES += elecom_wrc-1750gsv
422
423 define Device/elecom_wrc-1900gst
424 $(Device/elecom_wrc-gs)
425 IMAGE_SIZE := 11264k
426 DEVICE_MODEL := WRC-1900GST
427 ELECOM_HWNAME := WRC-1900GST
428 endef
429 TARGET_DEVICES += elecom_wrc-1900gst
430
431 define Device/elecom_wrc-2533gst
432 $(Device/elecom_wrc-gs)
433 IMAGE_SIZE := 11264k
434 DEVICE_MODEL := WRC-2533GST
435 ELECOM_HWNAME := WRC-2533GST
436 endef
437 TARGET_DEVICES += elecom_wrc-2533gst
438
439 define Device/elecom_wrc-2533gst2
440 $(Device/elecom_wrc-gs)
441 IMAGE_SIZE := 24576k
442 DEVICE_MODEL := WRC-2533GST2
443 ELECOM_HWNAME := WRC-2533GST2
444 endef
445 TARGET_DEVICES += elecom_wrc-2533gst2
446
447 define Device/firefly_firewrt
448 $(Device/dsa-migration)
449 IMAGE_SIZE := 16064k
450 DEVICE_VENDOR := Firefly
451 DEVICE_MODEL := FireWRT
452 DEVICE_PACKAGES := kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport
453 SUPPORTED_DEVICES += firewrt
454 endef
455 TARGET_DEVICES += firefly_firewrt
456
457 define Device/gehua_ghl-r-001
458 $(Device/dsa-migration)
459 IMAGE_SIZE := 32448k
460 DEVICE_VENDOR := GeHua
461 DEVICE_MODEL := GHL-R-001
462 DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 \
463 kmod-usb-ledtrig-usbport
464 endef
465 TARGET_DEVICES += gehua_ghl-r-001
466
467 define Device/gnubee_gb-pc1
468 $(Device/dsa-migration)
469 DEVICE_VENDOR := GnuBee
470 DEVICE_MODEL := Personal Cloud One
471 DEVICE_PACKAGES := kmod-ata-ahci kmod-usb3 kmod-sdhci-mt7620 -wpad-basic-wolfssl
472 IMAGE_SIZE := 32448k
473 endef
474 TARGET_DEVICES += gnubee_gb-pc1
475
476 define Device/gnubee_gb-pc2
477 $(Device/dsa-migration)
478 DEVICE_VENDOR := GnuBee
479 DEVICE_MODEL := Personal Cloud Two
480 DEVICE_PACKAGES := kmod-ata-ahci kmod-usb3 kmod-sdhci-mt7620 -wpad-basic-wolfssl
481 IMAGE_SIZE := 32448k
482 endef
483 TARGET_DEVICES += gnubee_gb-pc2
484
485 define Device/hiwifi_hc5962
486 $(Device/dsa-migration)
487 BLOCKSIZE := 128k
488 PAGESIZE := 2048
489 KERNEL_SIZE := 4096k
490 UBINIZE_OPTS := -E 5
491 IMAGE_SIZE := 32768k
492 IMAGES += factory.bin
493 IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
494 IMAGE/factory.bin := append-kernel | pad-to $$(KERNEL_SIZE) | append-ubi | \
495 check-size
496 DEVICE_VENDOR := HiWiFi
497 DEVICE_MODEL := HC5962
498 DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3
499 endef
500 TARGET_DEVICES += hiwifi_hc5962
501
502 define Device/iodata_wn-ax1167gr
503 $(Device/dsa-migration)
504 $(Device/uimage-lzma-loader)
505 IMAGE_SIZE := 15552k
506 KERNEL_INITRAMFS := $$(KERNEL) | \
507 iodata-factory 7864320 4 0x1055 $(KDIR)/tmp/$$(KERNEL_INITRAMFS_PREFIX)-factory.bin
508 DEVICE_VENDOR := I-O DATA
509 DEVICE_MODEL := WN-AX1167GR
510 DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2
511 endef
512 TARGET_DEVICES += iodata_wn-ax1167gr
513
514 define Device/iodata_nand
515 $(Device/dsa-migration)
516 DEVICE_VENDOR := I-O DATA
517 BLOCKSIZE := 128k
518 PAGESIZE := 2048
519 UBINIZE_OPTS := -E 5
520 KERNEL_SIZE := 4096k
521 IMAGE_SIZE := 51200k
522 LOADER_TYPE := bin
523 KERNEL := kernel-bin | append-dtb | lzma | loader-kernel | lzma | uImage lzma
524 IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
525 endef
526
527 # The OEM webinterface expects an kernel with initramfs which has the uImage
528 # header field ih_name.
529 # We don't want to set the header name field for the kernel include in the
530 # sysupgrade image as well, as this image shouldn't be accepted by the OEM
531 # webinterface. It will soft-brick the board.
532
533 define Device/iodata_wn-ax1167gr2
534 $(Device/iodata_nand)
535 DEVICE_MODEL := WN-AX1167GR2
536 KERNEL_INITRAMFS := $(KERNEL_DTB) | loader-kernel | lzma | \
537 uImage lzma -M 0x434f4d42 -n '3.10(XBC.1)b10' | iodata-mstc-header
538 DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware
539 endef
540 TARGET_DEVICES += iodata_wn-ax1167gr2
541
542 define Device/iodata_wn-ax2033gr
543 $(Device/iodata_nand)
544 DEVICE_MODEL := WN-AX2033GR
545 KERNEL_INITRAMFS := $(KERNEL_DTB) | loader-kernel | lzma | \
546 uImage lzma -M 0x434f4d42 -n '3.10(VST.1)C10' | iodata-mstc-header
547 DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615e kmod-mt7615-firmware
548 endef
549 TARGET_DEVICES += iodata_wn-ax2033gr
550
551 define Device/iodata_wn-dx1167r
552 $(Device/iodata_nand)
553 DEVICE_MODEL := WN-DX1167R
554 KERNEL_INITRAMFS := $(KERNEL_DTB) | loader-kernel | lzma | \
555 uImage lzma -M 0x434f4d43 -n '3.10(XIK.1)b10' | iodata-mstc-header
556 DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware
557 endef
558 TARGET_DEVICES += iodata_wn-dx1167r
559
560 define Device/iodata_wn-gx300gr
561 $(Device/dsa-migration)
562 $(Device/uimage-lzma-loader)
563 IMAGE_SIZE := 7616k
564 DEVICE_VENDOR := I-O DATA
565 DEVICE_MODEL := WN-GX300GR
566 DEVICE_PACKAGES := kmod-mt7603
567 endef
568 TARGET_DEVICES += iodata_wn-gx300gr
569
570 define Device/iodata_wnpr2600g
571 $(Device/dsa-migration)
572 $(Device/uimage-lzma-loader)
573 DEVICE_VENDOR := I-O DATA
574 DEVICE_MODEL := WNPR2600G
575 IMAGE_SIZE := 13952k
576 IMAGES += factory.bin
577 IMAGE/factory.bin := $$(sysupgrade_bin) | check-size | \
578 elx-header 0104003a 8844A2D168B45A2D
579 DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware
580 endef
581 TARGET_DEVICES += iodata_wnpr2600g
582
583 define Device/iptime_a6ns-m
584 $(Device/dsa-migration)
585 IMAGE_SIZE := 16128k
586 UIMAGE_NAME := a6nm
587 DEVICE_VENDOR := ipTIME
588 DEVICE_MODEL := A6ns-M
589 DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware kmod-usb3 \
590 kmod-usb-ledtrig-usbport
591 endef
592 TARGET_DEVICES += iptime_a6ns-m
593
594 define Device/iptime_a8004t
595 $(Device/dsa-migration)
596 IMAGE_SIZE := 16128k
597 UIMAGE_NAME := a8004t
598 DEVICE_VENDOR := ipTIME
599 DEVICE_MODEL := A8004T
600 DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware kmod-usb3
601 endef
602 TARGET_DEVICES += iptime_a8004t
603
604 define Device/jcg_jhr-ac876m
605 $(Device/dsa-migration)
606 IMAGE_SIZE := 16064k
607 IMAGES += factory.bin
608 IMAGE/factory.bin := $$(sysupgrade_bin) | check-size | jcg-header 89.1
609 JCG_MAXSIZE := 16064k
610 DEVICE_VENDOR := JCG
611 DEVICE_MODEL := JHR-AC876M
612 DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware kmod-usb3 \
613 kmod-usb-ledtrig-usbport
614 endef
615 TARGET_DEVICES += jcg_jhr-ac876m
616
617 define Device/lenovo_newifi-d1
618 $(Device/dsa-migration)
619 $(Device/uimage-lzma-loader)
620 IMAGE_SIZE := 32448k
621 DEVICE_VENDOR := Newifi
622 DEVICE_MODEL := D1
623 DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 kmod-sdhci-mt7620 \
624 kmod-usb-ledtrig-usbport
625 SUPPORTED_DEVICES += newifi-d1
626 endef
627 TARGET_DEVICES += lenovo_newifi-d1
628
629 define Device/linksys_ea7xxx
630 $(Device/dsa-migration)
631 $(Device/uimage-lzma-loader)
632 BLOCKSIZE := 128k
633 PAGESIZE := 2048
634 KERNEL_SIZE := 4096k
635 IMAGE_SIZE := 36864k
636 DEVICE_VENDOR := Linksys
637 DEVICE_PACKAGES := kmod-usb3 kmod-mt7615e kmod-mt7615-firmware \
638 uboot-envtools
639 UBINIZE_OPTS := -E 5
640 IMAGES := sysupgrade.bin factory.bin
641 IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata | check-size
642 IMAGE/factory.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | \
643 append-ubi | check-size | linksys-image type=$$$$(LINKSYS_HWNAME)
644 endef
645
646 define Device/linksys_ea7300-v1
647 $(Device/linksys_ea7xxx)
648 DEVICE_MODEL := EA7300
649 DEVICE_VARIANT := v1
650 LINKSYS_HWNAME := EA7300
651 endef
652 TARGET_DEVICES += linksys_ea7300-v1
653
654 define Device/linksys_ea7300-v2
655 $(Device/linksys_ea7xxx)
656 DEVICE_MODEL := EA7300
657 DEVICE_VARIANT := v2
658 LINKSYS_HWNAME := EA7300v2
659 DEVICE_PACKAGES += kmod-mt7603
660 endef
661 TARGET_DEVICES += linksys_ea7300-v2
662
663 define Device/linksys_ea7500-v2
664 $(Device/linksys_ea7xxx)
665 DEVICE_MODEL := EA7500
666 DEVICE_VARIANT := v2
667 LINKSYS_HWNAME := EA7500v2
668 endef
669 TARGET_DEVICES += linksys_ea7500-v2
670
671 define Device/linksys_re6500
672 $(Device/dsa-migration)
673 IMAGE_SIZE := 7872k
674 DEVICE_VENDOR := Linksys
675 DEVICE_MODEL := RE6500
676 DEVICE_PACKAGES := kmod-mt76x2
677 SUPPORTED_DEVICES += re6500
678 endef
679 TARGET_DEVICES += linksys_re6500
680
681 define Device/mediatek_ap-mt7621a-v60
682 $(Device/dsa-migration)
683 IMAGE_SIZE := 7872k
684 DEVICE_VENDOR := Mediatek
685 DEVICE_MODEL := AP-MT7621A-V60 EVB
686 DEVICE_PACKAGES := kmod-usb3 kmod-sdhci-mt7620 kmod-sound-mt7620 -wpad-basic-wolfssl
687 endef
688 TARGET_DEVICES += mediatek_ap-mt7621a-v60
689
690 define Device/mediatek_mt7621-eval-board
691 $(Device/dsa-migration)
692 BLOCKSIZE := 64k
693 IMAGE_SIZE := 15104k
694 DEVICE_VENDOR := MediaTek
695 DEVICE_MODEL := MT7621 EVB
696 DEVICE_PACKAGES := -wpad-basic-wolfssl
697 SUPPORTED_DEVICES += mt7621
698 endef
699 TARGET_DEVICES += mediatek_mt7621-eval-board
700
701 define Device/MikroTik
702 $(Device/dsa-migration)
703 DEVICE_VENDOR := MikroTik
704 BLOCKSIZE := 64k
705 IMAGE_SIZE := 16128k
706 DEVICE_PACKAGES := kmod-usb3
707 KERNEL_NAME := vmlinuz
708 KERNEL := kernel-bin | append-dtb-elf
709 IMAGE/sysupgrade.bin := append-kernel | kernel2minor -s 1024 | \
710 pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs | append-metadata | \
711 check-size
712 endef
713
714 define Device/mikrotik_routerboard-750gr3
715 $(Device/MikroTik)
716 DEVICE_MODEL := RouterBOARD 750Gr3
717 DEVICE_PACKAGES += -wpad-basic-wolfssl
718 SUPPORTED_DEVICES += mikrotik,rb750gr3
719 endef
720 TARGET_DEVICES += mikrotik_routerboard-750gr3
721
722 define Device/mikrotik_routerboard-760igs
723 $(Device/MikroTik)
724 DEVICE_MODEL := RouterBOARD 760iGS
725 DEVICE_PACKAGES += kmod-sfp -wpad-basic-wolfssl
726 endef
727 TARGET_DEVICES += mikrotik_routerboard-760igs
728
729 define Device/mikrotik_routerboard-m11g
730 $(Device/MikroTik)
731 DEVICE_MODEL := RouterBOARD M11G
732 DEVICE_PACKAGES := -wpad-basic-wolfssl
733 SUPPORTED_DEVICES += mikrotik,rbm11g
734 endef
735 TARGET_DEVICES += mikrotik_routerboard-m11g
736
737 define Device/mikrotik_routerboard-m33g
738 $(Device/MikroTik)
739 DEVICE_MODEL := RouterBOARD M33G
740 DEVICE_PACKAGES := -wpad-basic-wolfssl
741 SUPPORTED_DEVICES += mikrotik,rbm33g
742 endef
743 TARGET_DEVICES += mikrotik_routerboard-m33g
744
745 define Device/mqmaker_witi
746 $(Device/dsa-migration)
747 IMAGE_SIZE := 16064k
748 DEVICE_VENDOR := MQmaker
749 DEVICE_MODEL := WiTi
750 DEVICE_PACKAGES := kmod-ata-ahci kmod-mt76x2 kmod-sdhci-mt7620 kmod-usb3 \
751 kmod-usb-ledtrig-usbport
752 SUPPORTED_DEVICES += witi mqmaker,witi-256m mqmaker,witi-512m
753 endef
754 TARGET_DEVICES += mqmaker_witi
755
756 define Device/mtc_wr1201
757 $(Device/dsa-migration)
758 IMAGE_SIZE := 16000k
759 DEVICE_VENDOR := MTC
760 DEVICE_MODEL := Wireless Router WR1201
761 KERNEL_INITRAMFS := $(KERNEL_DTB) | custom-initramfs-uimage WR1201_8_128
762 DEVICE_PACKAGES := kmod-sdhci-mt7620 kmod-mt76x2 kmod-usb3 \
763 kmod-usb-ledtrig-usbport
764 endef
765 TARGET_DEVICES += mtc_wr1201
766
767 define Device/netgear_ex6150
768 $(Device/dsa-migration)
769 DEVICE_VENDOR := NETGEAR
770 DEVICE_MODEL := EX6150
771 DEVICE_PACKAGES := kmod-mt76x2
772 NETGEAR_BOARD_ID := U12H318T00_NETGEAR
773 IMAGE_SIZE := 14848k
774 IMAGES += factory.chk
775 IMAGE/factory.chk := $$(sysupgrade_bin) | check-size | netgear-chk
776 endef
777 TARGET_DEVICES += netgear_ex6150
778
779 define Device/netgear_sercomm_nand
780 $(Device/dsa-migration)
781 $(Device/uimage-lzma-loader)
782 BLOCKSIZE := 128k
783 PAGESIZE := 2048
784 KERNEL_SIZE := 4096k
785 UBINIZE_OPTS := -E 5
786 IMAGES += factory.img kernel.bin rootfs.bin
787 IMAGE/factory.img := pad-extra 2048k | append-kernel | pad-to 6144k | \
788 append-ubi | pad-to $$$$(BLOCKSIZE) | sercom-footer | pad-to 128 | \
789 zip $$$$(SERCOMM_HWNAME).bin | sercom-seal
790 IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
791 IMAGE/kernel.bin := append-kernel
792 IMAGE/rootfs.bin := append-ubi | check-size
793 DEVICE_VENDOR := NETGEAR
794 DEVICE_PACKAGES := kmod-mt7603 kmod-usb3 kmod-usb-ledtrig-usbport
795 endef
796
797 define Device/netgear_r6220
798 $(Device/netgear_sercomm_nand)
799 DEVICE_MODEL := R6220
800 SERCOMM_HWNAME := R6220
801 SERCOMM_HWID := AYA
802 SERCOMM_HWVER := A001
803 SERCOMM_SWVER := 0x0086
804 IMAGE_SIZE := 28672k
805 DEVICE_PACKAGES += kmod-mt76x2
806 SUPPORTED_DEVICES += r6220
807 endef
808 TARGET_DEVICES += netgear_r6220
809
810
811 define Device/netgear_r6260
812 $(Device/netgear_sercomm_nand)
813 DEVICE_MODEL := R6260
814 SERCOMM_HWNAME := R6260
815 SERCOMM_HWID := CHJ
816 SERCOMM_HWVER := A001
817 SERCOMM_SWVER := 0x0052
818 IMAGE_SIZE := 40960k
819 DEVICE_PACKAGES += kmod-mt7615e kmod-mt7615-firmware
820 endef
821 TARGET_DEVICES += netgear_r6260
822
823 define Device/netgear_r6350
824 $(Device/netgear_sercomm_nand)
825 DEVICE_MODEL := R6350
826 SERCOMM_HWNAME := R6350
827 SERCOMM_HWID := CHJ
828 SERCOMM_HWVER := A001
829 SERCOMM_SWVER := 0x0052
830 IMAGE_SIZE := 40960k
831 DEVICE_PACKAGES += kmod-mt7615e kmod-mt7615-firmware
832 endef
833 TARGET_DEVICES += netgear_r6350
834
835 define Device/netgear_r6700-v2
836 $(Device/netgear_sercomm_nand)
837 DEVICE_MODEL := R6700
838 DEVICE_VARIANT := v2
839 DEVICE_ALT0_VENDOR := NETGEAR
840 DEVICE_ALT0_MODEL := Nighthawk AC2400
841 DEVICE_ALT0_VARIANT := v1
842 DEVICE_ALT1_VENDOR := NETGEAR
843 DEVICE_ALT1_MODEL := R7200
844 DEVICE_ALT1_VARIANT := v1
845 SERCOMM_HWNAME := R6950
846 SERCOMM_HWID := BZV
847 SERCOMM_HWVER := A001
848 SERCOMM_SWVER := 0x1032
849 IMAGE_SIZE := 40960k
850 DEVICE_PACKAGES += kmod-mt7615e kmod-mt7615-firmware
851 endef
852 TARGET_DEVICES += netgear_r6700-v2
853
854 define Device/netgear_r6800
855 $(Device/netgear_sercomm_nand)
856 DEVICE_MODEL := R6800
857 SERCOMM_HWNAME := R6950
858 SERCOMM_HWID := BZV
859 SERCOMM_HWVER := A001
860 SERCOMM_SWVER := 0x0062
861 IMAGE_SIZE := 40960k
862 DEVICE_PACKAGES += kmod-mt7615e kmod-mt7615-firmware
863 endef
864 TARGET_DEVICES += netgear_r6800
865
866 define Device/netgear_r6850
867 $(Device/netgear_sercomm_nand)
868 DEVICE_MODEL := R6850
869 SERCOMM_HWNAME := R6850
870 SERCOMM_HWID := CHJ
871 SERCOMM_HWVER := A001
872 SERCOMM_SWVER := 0x0052
873 IMAGE_SIZE := 40960k
874 DEVICE_PACKAGES += kmod-mt7615e kmod-mt7615-firmware
875 endef
876 TARGET_DEVICES += netgear_r6850
877
878 define Device/netgear_wac104
879 $(Device/netgear_sercomm_nand)
880 DEVICE_MODEL := WAC104
881 SERCOMM_HWNAME := WAC104
882 SERCOMM_HWID := CAY
883 SERCOMM_HWVER := A001
884 SERCOMM_SWVER := 0x0006
885 IMAGE_SIZE := 28672k
886 DEVICE_PACKAGES += kmod-mt76x2
887 endef
888 TARGET_DEVICES += netgear_wac104
889
890 define Device/netgear_wac124
891 $(Device/netgear_sercomm_nand)
892 DEVICE_MODEL := WAC124
893 SERCOMM_HWNAME := WAC124
894 SERCOMM_HWID := CTL
895 SERCOMM_HWVER := A003
896 SERCOMM_SWVER := 0x0402
897 IMAGE_SIZE := 40960k
898 DEVICE_PACKAGES += kmod-mt7615e kmod-mt7615-firmware
899 endef
900 TARGET_DEVICES += netgear_wac124
901
902 define Device/netgear_wndr3700-v5
903 $(Device/dsa-migration)
904 $(Device/netgear_sercomm_nor)
905 $(Device/uimage-lzma-loader)
906 IMAGE_SIZE := 15232k
907 DEVICE_MODEL := WNDR3700
908 DEVICE_VARIANT := v5
909 SERCOMM_HWNAME := WNDR3700v5
910 SERCOMM_HWID := AYB
911 SERCOMM_HWVER := A001
912 SERCOMM_SWVER := 0x1054
913 SERCOMM_PAD := 320k
914 DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 \
915 kmod-usb-ledtrig-usbport
916 SUPPORTED_DEVICES += wndr3700v5
917 endef
918 TARGET_DEVICES += netgear_wndr3700-v5
919
920 define Device/netis_wf2881
921 $(Device/dsa-migration)
922 BLOCKSIZE := 128k
923 PAGESIZE := 2048
924 FILESYSTEMS := squashfs
925 KERNEL_SIZE := 4096k
926 IMAGE_SIZE := 129280k
927 UBINIZE_OPTS := -E 5
928 UIMAGE_NAME := WF2881_0.0.00
929 KERNEL_INITRAMFS := $(KERNEL_DTB) | netis-tail WF2881 | uImage lzma
930 IMAGES += factory.bin
931 IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
932 IMAGE/factory.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi | \
933 check-size
934 DEVICE_VENDOR := NETIS
935 DEVICE_MODEL := WF2881
936 DEVICE_PACKAGES := kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport
937 endef
938 TARGET_DEVICES += netis_wf2881
939
940 define Device/phicomm_k2p
941 $(Device/dsa-migration)
942 IMAGE_SIZE := 15744k
943 DEVICE_VENDOR := Phicomm
944 DEVICE_MODEL := K2P
945 DEVICE_ALT0_VENDOR := Phicomm
946 DEVICE_ALT0_MODEL := KE 2P
947 SUPPORTED_DEVICES += k2p
948 DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware
949 endef
950 TARGET_DEVICES += phicomm_k2p
951
952 define Device/planex_vr500
953 $(Device/dsa-migration)
954 $(Device/uimage-lzma-loader)
955 IMAGE_SIZE := 65216k
956 DEVICE_VENDOR := Planex
957 DEVICE_MODEL := VR500
958 DEVICE_PACKAGES := kmod-usb3 -wpad-basic-wolfssl
959 SUPPORTED_DEVICES += vr500
960 endef
961 TARGET_DEVICES += planex_vr500
962
963 define Device/samknows_whitebox-v8
964 $(Device/dsa-migration)
965 IMAGE_SIZE := 16064k
966 DEVICE_VENDOR := SamKnows
967 DEVICE_MODEL := Whitebox 8
968 DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 \
969 kmod-usb-ledtrig-usbport uboot-envtools
970 SUPPORTED_DEVICES += sk-wb8
971 endef
972 TARGET_DEVICES += samknows_whitebox-v8
973
974 define Device/storylink_sap-g3200u3
975 $(Device/dsa-migration)
976 IMAGE_SIZE := 7872k
977 DEVICE_VENDOR := STORYLiNK
978 DEVICE_MODEL := SAP-G3200U3
979 DEVICE_PACKAGES := kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport
980 SUPPORTED_DEVICES += sap-g3200u3
981 endef
982 TARGET_DEVICES += storylink_sap-g3200u3
983
984 define Device/telco-electronics_x1
985 $(Device/dsa-migration)
986 IMAGE_SIZE := 16064k
987 DEVICE_VENDOR := Telco Electronics
988 DEVICE_MODEL := X1
989 DEVICE_PACKAGES := kmod-usb3 kmod-mt76
990 endef
991 TARGET_DEVICES += telco-electronics_x1
992
993 define Device/thunder_timecloud
994 $(Device/dsa-migration)
995 $(Device/uimage-lzma-loader)
996 IMAGE_SIZE := 16064k
997 DEVICE_VENDOR := Thunder
998 DEVICE_MODEL := Timecloud
999 DEVICE_PACKAGES := kmod-usb3 -wpad-basic-wolfssl
1000 SUPPORTED_DEVICES += timecloud
1001 endef
1002 TARGET_DEVICES += thunder_timecloud
1003
1004 define Device/totolink_a7000r
1005 $(Device/dsa-migration)
1006 IMAGE_SIZE := 16064k
1007 UIMAGE_NAME := C8340R1C-9999
1008 DEVICE_VENDOR := TOTOLINK
1009 DEVICE_MODEL := A7000R
1010 DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware
1011 endef
1012 TARGET_DEVICES += totolink_a7000r
1013
1014 define Device/totolink_x5000r
1015 $(Device/dsa-migration)
1016 IMAGE_SIZE := 16064k
1017 UIMAGE_NAME := C8343R-9999
1018 DEVICE_VENDOR := TOTOLINK
1019 DEVICE_MODEL := X5000R
1020 DEVICE_PACKAGES := kmod-mt7915e
1021 endef
1022 TARGET_DEVICES += totolink_x5000r
1023
1024 define Device/tplink_re350-v1
1025 $(Device/dsa-migration)
1026 $(Device/tplink-safeloader)
1027 DEVICE_MODEL := RE350
1028 DEVICE_VARIANT := v1
1029 DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2
1030 TPLINK_BOARD_ID := RE350-V1
1031 IMAGE_SIZE := 6016k
1032 SUPPORTED_DEVICES += re350-v1
1033 endef
1034 TARGET_DEVICES += tplink_re350-v1
1035
1036 define Device/tplink_re500-v1
1037 $(Device/dsa-migration)
1038 $(Device/tplink-safeloader)
1039 DEVICE_MODEL := RE500
1040 DEVICE_VARIANT := v1
1041 DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware
1042 TPLINK_BOARD_ID := RE500-V1
1043 IMAGE_SIZE := 14208k
1044 endef
1045 TARGET_DEVICES += tplink_re500-v1
1046
1047 define Device/tplink_re650-v1
1048 $(Device/dsa-migration)
1049 $(Device/tplink-safeloader)
1050 DEVICE_MODEL := RE650
1051 DEVICE_VARIANT := v1
1052 DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware
1053 TPLINK_BOARD_ID := RE650-V1
1054 IMAGE_SIZE := 14208k
1055 endef
1056 TARGET_DEVICES += tplink_re650-v1
1057
1058 define Device/ubnt_edgerouter_common
1059 $(Device/dsa-migration)
1060 $(Device/uimage-lzma-loader)
1061 DEVICE_VENDOR := Ubiquiti
1062 IMAGE_SIZE := 256768k
1063 FILESYSTEMS := squashfs
1064 KERNEL_SIZE := 3145728
1065 KERNEL_INITRAMFS := $$(KERNEL) | \
1066 ubnt-erx-factory-image $(KDIR)/tmp/$$(KERNEL_INITRAMFS_PREFIX)-factory.tar
1067 IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
1068 DEVICE_PACKAGES += -wpad-basic-wolfssl
1069 endef
1070
1071 define Device/ubnt_edgerouter-x
1072 $(Device/ubnt_edgerouter_common)
1073 DEVICE_MODEL := EdgeRouter X
1074 SUPPORTED_DEVICES += ubnt-erx ubiquiti,edgerouterx
1075 endef
1076 TARGET_DEVICES += ubnt_edgerouter-x
1077
1078 define Device/ubnt_edgerouter-x-sfp
1079 $(Device/ubnt_edgerouter_common)
1080 DEVICE_MODEL := EdgeRouter X SFP
1081 DEVICE_PACKAGES += kmod-i2c-algo-pca kmod-gpio-pca953x kmod-sfp
1082 SUPPORTED_DEVICES += ubnt-erx-sfp ubiquiti,edgerouterx-sfp
1083 endef
1084 TARGET_DEVICES += ubnt_edgerouter-x-sfp
1085
1086 define Device/ubnt_unifi-nanohd
1087 $(Device/dsa-migration)
1088 DEVICE_VENDOR := Ubiquiti
1089 DEVICE_MODEL := UniFi nanoHD
1090 DEVICE_PACKAGES += kmod-mt7603 kmod-mt7615e kmod-mt7615-firmware
1091 IMAGE_SIZE := 15552k
1092 endef
1093 TARGET_DEVICES += ubnt_unifi-nanohd
1094
1095 define Device/unielec_u7621-06-16m
1096 $(Device/dsa-migration)
1097 $(Device/uimage-lzma-loader)
1098 IMAGE_SIZE := 16064k
1099 DEVICE_VENDOR := UniElec
1100 DEVICE_MODEL := U7621-06
1101 DEVICE_VARIANT := 16M
1102 DEVICE_PACKAGES := kmod-ata-ahci kmod-sdhci-mt7620 kmod-usb3 -wpad-basic-wolfssl
1103 SUPPORTED_DEVICES += u7621-06-256M-16M unielec,u7621-06-256m-16m
1104 endef
1105 TARGET_DEVICES += unielec_u7621-06-16m
1106
1107 define Device/unielec_u7621-06-64m
1108 $(Device/dsa-migration)
1109 $(Device/uimage-lzma-loader)
1110 IMAGE_SIZE := 65216k
1111 DEVICE_VENDOR := UniElec
1112 DEVICE_MODEL := U7621-06
1113 DEVICE_VARIANT := 64M
1114 DEVICE_PACKAGES := kmod-ata-ahci kmod-sdhci-mt7620 kmod-usb3 -wpad-basic-wolfssl
1115 SUPPORTED_DEVICES += unielec,u7621-06-512m-64m
1116 endef
1117 TARGET_DEVICES += unielec_u7621-06-64m
1118
1119 define Device/wavlink_wl-wn531a6
1120 $(Device/dsa-migration)
1121 DEVICE_VENDOR := Wavlink
1122 DEVICE_MODEL := WL-WN531A6
1123 DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615e kmod-mt7615-firmware kmod-usb3
1124 IMAGE_SIZE := 15040k
1125 endef
1126 TARGET_DEVICES += wavlink_wl-wn531a6
1127
1128 define Device/wevo_11acnas
1129 $(Device/dsa-migration)
1130 IMAGE_SIZE := 16064k
1131 UIMAGE_NAME := 11AC-NAS-Router(0.0.0)
1132 DEVICE_VENDOR := WeVO
1133 DEVICE_MODEL := 11AC NAS Router
1134 DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 \
1135 kmod-usb-ledtrig-usbport
1136 SUPPORTED_DEVICES += 11acnas
1137 endef
1138 TARGET_DEVICES += wevo_11acnas
1139
1140 define Device/wevo_w2914ns-v2
1141 $(Device/dsa-migration)
1142 IMAGE_SIZE := 16064k
1143 UIMAGE_NAME := W2914NS-V2(0.0.0)
1144 DEVICE_VENDOR := WeVO
1145 DEVICE_MODEL := W2914NS
1146 DEVICE_VARIANT := v2
1147 DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 \
1148 kmod-usb-ledtrig-usbport
1149 SUPPORTED_DEVICES += w2914nsv2
1150 endef
1151 TARGET_DEVICES += wevo_w2914ns-v2
1152
1153 define Device/winstars_ws-wn583a6
1154 $(Device/dsa-migration)
1155 $(Device/uimage-lzma-loader)
1156 IMAGE_SIZE := 7872k
1157 DEVICE_VENDOR := Winstars
1158 DEVICE_MODEL := WS-WN583A6
1159 DEVICE_ALT0_VENDOR := Gemeita
1160 DEVICE_ALT0_MODEL := AC2100
1161 KERNEL_INITRAMFS_SUFFIX := -WN583A6$$(KERNEL_SUFFIX)
1162 DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615e kmod-mt7615-firmware
1163 endef
1164 TARGET_DEVICES += winstars_ws-wn583a6
1165
1166 define Device/xiaomi-ac2100
1167 $(Device/dsa-migration)
1168 $(Device/uimage-lzma-loader)
1169 BLOCKSIZE := 128k
1170 PAGESIZE := 2048
1171 KERNEL_SIZE := 4096k
1172 IMAGE_SIZE := 120320k
1173 UBINIZE_OPTS := -E 5
1174 IMAGES += kernel1.bin rootfs0.bin
1175 IMAGE/kernel1.bin := append-kernel
1176 IMAGE/rootfs0.bin := append-ubi | check-size
1177 IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
1178 DEVICE_VENDOR := Xiaomi
1179 DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615e kmod-mt7615-firmware \
1180 uboot-envtools
1181 endef
1182
1183 define Device/xiaomi_mi-router-ac2100
1184 $(Device/xiaomi-ac2100)
1185 DEVICE_MODEL := Mi Router AC2100
1186 endef
1187 TARGET_DEVICES += xiaomi_mi-router-ac2100
1188
1189 define Device/xiaomi_mir3g
1190 $(Device/dsa-migration)
1191 $(Device/uimage-lzma-loader)
1192 BLOCKSIZE := 128k
1193 PAGESIZE := 2048
1194 KERNEL_SIZE := 4096k
1195 IMAGE_SIZE := 124416k
1196 UBINIZE_OPTS := -E 5
1197 IMAGES += kernel1.bin rootfs0.bin
1198 IMAGE/kernel1.bin := append-kernel
1199 IMAGE/rootfs0.bin := append-ubi | check-size
1200 IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
1201 DEVICE_VENDOR := Xiaomi
1202 DEVICE_MODEL := Mi Router 3G
1203 SUPPORTED_DEVICES += R3G
1204 SUPPORTED_DEVICES += mir3g
1205 DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 \
1206 kmod-usb-ledtrig-usbport uboot-envtools
1207 endef
1208 TARGET_DEVICES += xiaomi_mir3g
1209
1210 define Device/xiaomi_mir3g-v2
1211 $(Device/dsa-migration)
1212 $(Device/uimage-lzma-loader)
1213 IMAGE_SIZE := 14848k
1214 DEVICE_VENDOR := Xiaomi
1215 DEVICE_MODEL := Mi Router 3G
1216 DEVICE_VARIANT := v2
1217 DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2
1218 endef
1219 TARGET_DEVICES += xiaomi_mir3g-v2
1220
1221 define Device/xiaomi_mir3p
1222 $(Device/dsa-migration)
1223 $(Device/uimage-lzma-loader)
1224 BLOCKSIZE := 128k
1225 PAGESIZE := 2048
1226 KERNEL_SIZE:= 4096k
1227 UBINIZE_OPTS := -E 5
1228 IMAGE_SIZE := 255488k
1229 DEVICE_VENDOR := Xiaomi
1230 DEVICE_MODEL := Mi Router 3 Pro
1231 IMAGES += factory.bin
1232 IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
1233 IMAGE/factory.bin := append-kernel | pad-to $$(KERNEL_SIZE) | append-ubi | \
1234 check-size
1235 DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware kmod-usb3 \
1236 kmod-usb-ledtrig-usbport uboot-envtools
1237 endef
1238 TARGET_DEVICES += xiaomi_mir3p
1239
1240 define Device/xiaomi_mi-router-4a-gigabit
1241 $(Device/dsa-migration)
1242 $(Device/uimage-lzma-loader)
1243 IMAGE_SIZE := 14848k
1244 DEVICE_VENDOR := Xiaomi
1245 DEVICE_MODEL := Mi Router 4A
1246 DEVICE_VARIANT := Gigabit Edition
1247 DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2
1248 endef
1249 TARGET_DEVICES += xiaomi_mi-router-4a-gigabit
1250
1251 define Device/xiaomi_redmi-router-ac2100
1252 $(Device/xiaomi-ac2100)
1253 DEVICE_MODEL := Redmi Router AC2100
1254 endef
1255 TARGET_DEVICES += xiaomi_redmi-router-ac2100
1256
1257 define Device/xiaoyu_xy-c5
1258 $(Device/dsa-migration)
1259 IMAGE_SIZE := 32448k
1260 DEVICE_VENDOR := XiaoYu
1261 DEVICE_MODEL := XY-C5
1262 DEVICE_PACKAGES := kmod-ata-ahci kmod-usb3 -wpad-basic-wolfssl
1263 endef
1264 TARGET_DEVICES += xiaoyu_xy-c5
1265
1266 define Device/xzwifi_creativebox-v1
1267 $(Device/dsa-migration)
1268 IMAGE_SIZE := 32448k
1269 DEVICE_VENDOR := CreativeBox
1270 DEVICE_MODEL := v1
1271 DEVICE_PACKAGES := kmod-ata-ahci kmod-mt7603 kmod-mt76x2 kmod-sdhci-mt7620 \
1272 kmod-usb3 -wpad-basic-wolfssl
1273 endef
1274 TARGET_DEVICES += xzwifi_creativebox-v1
1275
1276 define Device/youhua_wr1200js
1277 $(Device/dsa-migration)
1278 IMAGE_SIZE := 16064k
1279 DEVICE_VENDOR := YouHua
1280 DEVICE_MODEL := WR1200JS
1281 DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 \
1282 kmod-usb-ledtrig-usbport
1283 endef
1284 TARGET_DEVICES += youhua_wr1200js
1285
1286 define Device/youku_yk-l2
1287 $(Device/dsa-migration)
1288 IMAGE_SIZE := 16064k
1289 DEVICE_VENDOR := Youku
1290 DEVICE_MODEL := YK-L2
1291 DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 \
1292 kmod-usb-ledtrig-usbport
1293 endef
1294 TARGET_DEVICES += youku_yk-l2
1295
1296 define Device/zbtlink_zbt-we1326
1297 $(Device/dsa-migration)
1298 IMAGE_SIZE := 16064k
1299 DEVICE_VENDOR := Zbtlink
1300 DEVICE_MODEL := ZBT-WE1326
1301 DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 kmod-sdhci-mt7620
1302 SUPPORTED_DEVICES += zbt-we1326
1303 endef
1304 TARGET_DEVICES += zbtlink_zbt-we1326
1305
1306 define Device/zbtlink_zbt-we3526
1307 $(Device/dsa-migration)
1308 IMAGE_SIZE := 16064k
1309 DEVICE_VENDOR := Zbtlink
1310 DEVICE_MODEL := ZBT-WE3526
1311 DEVICE_PACKAGES := kmod-sdhci-mt7620 kmod-mt7603 kmod-mt76x2 kmod-usb3 \
1312 kmod-usb-ledtrig-usbport
1313 endef
1314 TARGET_DEVICES += zbtlink_zbt-we3526
1315
1316 define Device/zbtlink_zbt-wg2626
1317 $(Device/dsa-migration)
1318 IMAGE_SIZE := 16064k
1319 DEVICE_VENDOR := Zbtlink
1320 DEVICE_MODEL := ZBT-WG2626
1321 DEVICE_PACKAGES := kmod-ata-ahci kmod-sdhci-mt7620 kmod-mt76x2 kmod-usb3 \
1322 kmod-usb-ledtrig-usbport
1323 SUPPORTED_DEVICES += zbt-wg2626
1324 endef
1325 TARGET_DEVICES += zbtlink_zbt-wg2626
1326
1327 define Device/zbtlink_zbt-wg3526-16m
1328 $(Device/dsa-migration)
1329 $(Device/uimage-lzma-loader)
1330 IMAGE_SIZE := 16064k
1331 DEVICE_VENDOR := Zbtlink
1332 DEVICE_MODEL := ZBT-WG3526
1333 DEVICE_VARIANT := 16M
1334 DEVICE_PACKAGES := kmod-ata-ahci kmod-sdhci-mt7620 kmod-mt7603 kmod-mt76x2 \
1335 kmod-usb3 kmod-usb-ledtrig-usbport
1336 SUPPORTED_DEVICES += zbt-wg3526 zbt-wg3526-16M
1337 endef
1338 TARGET_DEVICES += zbtlink_zbt-wg3526-16m
1339
1340 define Device/zbtlink_zbt-wg3526-32m
1341 $(Device/dsa-migration)
1342 $(Device/uimage-lzma-loader)
1343 IMAGE_SIZE := 32448k
1344 DEVICE_VENDOR := Zbtlink
1345 DEVICE_MODEL := ZBT-WG3526
1346 DEVICE_VARIANT := 32M
1347 DEVICE_PACKAGES := kmod-ata-ahci kmod-sdhci-mt7620 kmod-mt7603 kmod-mt76x2 \
1348 kmod-usb3 kmod-usb-ledtrig-usbport
1349 SUPPORTED_DEVICES += ac1200pro zbt-wg3526-32M
1350 endef
1351 TARGET_DEVICES += zbtlink_zbt-wg3526-32m
1352
1353 define Device/zio_freezio
1354 $(Device/dsa-migration)
1355 IMAGE_SIZE := 16064k
1356 DEVICE_VENDOR := ZIO
1357 DEVICE_MODEL := FREEZIO
1358 DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 \
1359 kmod-usb-ledtrig-usbport
1360 endef
1361 TARGET_DEVICES += zio_freezio
1362
1363 define Device/zyxel_wap6805
1364 $(Device/dsa-migration)
1365 BLOCKSIZE := 128k
1366 PAGESIZE := 2048
1367 KERNEL_SIZE := 4096k
1368 UBINIZE_OPTS := -E 5
1369 IMAGE_SIZE := 32448k
1370 DEVICE_VENDOR := ZyXEL
1371 DEVICE_MODEL := WAP6805
1372 DEVICE_PACKAGES := kmod-mt7603 kmod-mt7621-qtn-rgmii
1373 KERNEL := $(KERNEL_DTB) | uImage lzma | uimage-padhdr 160
1374 IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
1375 endef
1376 TARGET_DEVICES += zyxel_wap6805