5 define Build/tplink-header
6 $(STAGING_DIR_HOST)/bin/mktplinkfw2 -a 0x4 -V "ver. 2.0" -B $(1) \
7 -o $@.new -k $@ && mv $@.new $@
10 define Build/pad-kernel-ex2700
11 cp $@ $@.tmp && dd if=/dev/zero bs=64 count=1 >> $@.tmp \
12 && dd if=$@.tmp of=$@.new bs=64k conv=sync && truncate -s -64 $@.new \
13 && cat ex2700-fakeroot.uImage >> $@.new && rm $@.tmp && mv $@.new $@
16 define Build/netgear-header
17 $(STAGING_DIR_HOST)/bin/mkdniimg \
18 $(1) -v OpenWrt -i $@ \
19 -o $@.new && mv $@.new $@
22 define Build/poray-header
29 define Build/elecom-header
30 cp $@ $(KDIR)/v_0.0.0.bin
32 $(STAGING_DIR_HOST)/bin/md5sum $(KDIR)/v_0.0.0.bin | \
35 ) | $(STAGING_DIR_HOST)/bin/md5sum | \
36 sed 's/ .*//' > $(KDIR)/v_0.0.0.md5
37 $(STAGING_DIR_HOST)/bin/tar -cf $@ -C $(KDIR) v_0.0.0.bin v_0.0.0.md5
41 $(STAGING_DIR_HOST)/bin/zyimage $(1) $@
44 define Device/ArcherC20i
46 KERNEL := $(KERNEL_DTB)
47 KERNEL_INITRAMFS := $(KERNEL_DTB) | tplink-header ArcherC20i -c
48 IMAGE/sysupgrade.bin := append-kernel | tplink-header ArcherC20i -j -r $(KDIR)/root.squashfs | append-metadata
49 DEVICE_TITLE := TP-Link ArcherC20i
51 TARGET_DEVICES += ArcherC20i
53 define Device/ArcherC50
55 KERNEL := $(KERNEL_DTB)
56 KERNEL_INITRAMFS := $(KERNEL_DTB) | tplink-header ArcherC50 -c
57 IMAGE/sysupgrade.bin := append-kernel | tplink-header ArcherC50 -j -r $(KDIR)/root.squashfs | append-metadata
58 DEVICE_TITLE := TP-Link ArcherC50
60 TARGET_DEVICES += ArcherC50
65 IMAGE_SIZE := $(ralink_default_fw_size_4M)
67 KERNEL := $(KERNEL_DTB) | uImage lzma | pad-kernel-ex2700
68 IMAGE/factory.bin := $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | \
69 netgear-header -B EX2700 -H 29764623+4+0+32+2x2+0
70 DEVICE_TITLE := Netgear EX2700
72 TARGET_DEVICES += ex2700
74 define Device/wt3020-4M
77 IMAGE_SIZE := $(ralink_default_fw_size_4M)
79 SUPPORTED_DEVICES := wt3020
80 IMAGE/factory.bin := $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | \
81 poray-header -B WT3020 -F 4M
82 DEVICE_TITLE := Nexx WT3020 (4MB)
84 TARGET_DEVICES += wt3020-4M
86 define Device/wt3020-8M
89 SUPPORTED_DEVICES := wt3020
90 IMAGE/factory.bin := $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | \
91 poray-header -B WT3020 -F 8M
92 DEVICE_TITLE := Nexx WT3020 (8MB)
94 TARGET_DEVICES += wt3020-8M
96 define Device/wrh-300cr
98 IMAGE_SIZE := $(ralink_default_fw_size_16M)
100 IMAGE/factory.bin := $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | \
102 DEVICE_TITLE := Elecom WRH-300CR
103 DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci
105 TARGET_DEVICES += wrh-300cr
109 IMAGES += factory.bin
110 IMAGE/factory.bin := $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | \
111 umedia-header 0x013326
112 DEVICE_TITLE := Linksys E1700
114 TARGET_DEVICES += e1700
116 define Device/ai-br100
119 DEVICE_TITLE := Aigale Ai-BR100
120 DEVICE_PACKAGES:= kmod-usb2 kmod-usb-ohci
122 TARGET_DEVICES += ai-br100
124 define Device/whr-300hp2
127 DEVICE_TITLE := Buffalo WHR-300HP2
129 TARGET_DEVICES += whr-300hp2
131 define Device/whr-600d
134 DEVICE_TITLE := Buffalo WHR-600D
136 TARGET_DEVICES += whr-600d
138 define Device/whr-1166d
141 DEVICE_TITLE := Buffalo WHR-1166D
143 TARGET_DEVICES += whr-1166d
145 define Device/dir-810l
148 DEVICE_TITLE := D-Link DIR-810L
150 TARGET_DEVICES += dir-810l
155 DEVICE_TITLE := Sercomm NA930
157 TARGET_DEVICES += na930
159 define Device/microwrt
162 DEVICE_TITLE := Microduino MicroWRT
164 TARGET_DEVICES += microwrt
166 define Device/mt7620a
168 DEVICE_TITLE := MediaTek MT7620a EVB
170 TARGET_DEVICES += mt7620a
172 define Device/mt7620a_mt7610e
173 DTS := MT7620a_MT7610e
174 DEVICE_TITLE := MediaTek MT7620a + MT7610e EVB
176 TARGET_DEVICES += mt7620a_mt7610e
178 define Device/mt7620a_mt7530
179 DTS := MT7620a_MT7530
180 DEVICE_TITLE := MediaTek MT7620a + MT7530 EVB
182 TARGET_DEVICES += mt7620a_mt7530
184 define Device/mt7620a_v22sg
186 DEVICE_TITLE := MediaTek MT7620a V22SG
188 TARGET_DEVICES += mt7620a_v22sg
192 DEVICE_TITLE := Asus RP-N53
194 TARGET_DEVICES += rp-n53
196 define Device/cf-wr800n
198 DEVICE_TITLE := Comfast CF-WR800N
200 TARGET_DEVICES += cf-wr800n
202 define Device/cs-qr10
204 DEVICE_TITLE := Planex CS-QR10
205 DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-i2c-core kmod-i2c-ralink kmod-sound-core kmod-sound-mtk kmod-sdhci-mt7620
207 TARGET_DEVICES += cs-qr10
209 define Device/db-wrt01
211 DEVICE_TITLE := Planex DB-WRT01
213 TARGET_DEVICES += db-wrt01
215 define Device/mzk-750dhp
217 DEVICE_TITLE := Planex MZK-750DHP
218 DEVICE_PACKAGES := kmod-mt76
220 TARGET_DEVICES += mzk-750dhp
222 define Device/mzk-ex300np
224 DEVICE_TITLE := Planex MZK-EX300NP
226 TARGET_DEVICES += mzk-ex300np
228 define Device/mzk-ex750np
230 DEVICE_TITLE := Planex MZK-EX750NP
231 DEVICE_PACKAGES := kmod-mt76
233 TARGET_DEVICES += mzk-ex750np
237 IMAGE_SIZE := $(ralink_default_fw_size_16M)
238 DEVICE_TITLE := HiWiFi HC5661
239 DEVICE_PACKAGES := kmod-usb2 kmod-sdhci kmod-sdhci-mt7620 kmod-usb-ledtrig-usbport
241 TARGET_DEVICES += hc5661
245 IMAGE_SIZE := $(ralink_default_fw_size_16M)
246 DEVICE_TITLE := HiWiFi HC5761
247 DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-sdhci kmod-sdhci-mt7620 kmod-usb-ledtrig-usbport
249 TARGET_DEVICES += hc5761
253 IMAGE_SIZE := $(ralink_default_fw_size_16M)
254 DEVICE_TITLE := HiWiFi HC5861
255 DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-sdhci kmod-sdhci-mt7620 kmod-usb-ledtrig-usbport
257 TARGET_DEVICES += hc5861
259 define Device/oy-0001
261 IMAGE_SIZE := $(ralink_default_fw_size_16M)
262 DEVICE_TITLE := Oh Yeah OY-0001
264 TARGET_DEVICES += oy-0001
266 define Device/psg1208
268 DEVICE_TITLE := Phicomm PSG1208
269 DEVICE_PACKAGES := kmod-mt76
271 TARGET_DEVICES += psg1208
273 define Device/psg1218
275 DEVICE_TITLE := Phicomm PSG1218
276 DEVICE_PACKAGES := kmod-mt76
278 TARGET_DEVICES += psg1218
282 IMAGE_SIZE := $(ralink_default_fw_size_16M)
283 DEVICE_TITLE := Lenovo Y1
289 IMAGE_SIZE := $(ralink_default_fw_size_16M)
290 DEVICE_TITLE := Lenovo Y1S
292 TARGET_DEVICES += y1s
296 IMAGE_SIZE := $(ralink_default_fw_size_16M)
297 DEVICE_TITLE := Kingston MLW221
299 TARGET_DEVICES += mlw221
303 IMAGE_SIZE := $(ralink_default_fw_size_16M)
304 DEVICE_TITLE := Kingston MLWG2
306 TARGET_DEVICES += mlwg2
308 define Device/wmr-300
310 DEVICE_TITLE := Buffalo WMR-300
312 TARGET_DEVICES += wmr-300
314 define Device/rt-n14u
316 DEVICE_TITLE := Asus RT-N14u
318 TARGET_DEVICES += rt-n14u
320 define Device/wrtnode
322 IMAGE_SIZE := $(ralink_default_fw_size_16M)
323 DEVICE_TITLE := WRTNode
325 TARGET_DEVICES += wrtnode
327 define Device/miwifi-mini
329 IMAGE_SIZE := $(ralink_default_fw_size_16M)
330 DEVICE_TITLE := Xiaomi MiWiFi Mini
331 DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci
333 TARGET_DEVICES += miwifi-mini
335 define Device/gl-mt300a
337 IMAGE_SIZE := $(ralink_default_fw_size_16M)
338 DEVICE_TITLE := GL-Inet GL-MT300A
339 DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-mt76
341 TARGET_DEVICES += gl-mt300a
343 define Device/gl-mt300n
345 IMAGE_SIZE := $(ralink_default_fw_size_16M)
346 DEVICE_TITLE := GL-Inet GL-MT300N
347 DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-mt76
349 TARGET_DEVICES += gl-mt300n
351 define Device/gl-mt750
353 IMAGE_SIZE := $(ralink_default_fw_size_16M)
354 DEVICE_TITLE := GL-Inet GL-MT750
355 DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-mt76
357 TARGET_DEVICES += gl-mt750
361 DEVICE_TITLE := ZTE Q7
363 TARGET_DEVICES += zte-q7
365 define Device/youku-yk1
367 IMAGE_SIZE := $(ralink_default_fw_size_16M)
368 DEVICE_TITLE := YOUKU YK1
370 TARGET_DEVICES += youku-yk1
372 define Device/zbt-ape522ii
374 DEVICE_TITLE := Zbtlink ZBT-APE522II
375 DEVICE_PACKAGES := kmod-mt76
377 TARGET_DEVICES += zbt-ape522ii
379 define Device/zbt-cpe102
381 DEVICE_TITLE := Zbtlink ZBT-CPE102
382 DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci
384 TARGET_DEVICES += zbt-cpe102
386 define Device/zbt-wa05
388 DEVICE_TITLE := Zbtlink ZBT-WA05
390 TARGET_DEVICES += zbt-wa05
392 define Device/zbt-we826
394 IMAGE_SIZE := $(ralink_default_fw_size_16M)
395 DEVICE_TITLE := Zbtlink ZBT-WE826
396 DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-mt76 kmod-sdhci-mt7620
398 TARGET_DEVICES += zbt-we826
400 define Device/zbt-wr8305rt
402 DEVICE_TITLE := Zbtlink ZBT-WR8305RT
404 TARGET_DEVICES += zbt-wr8305rt
406 define Device/tiny-ac
408 DEVICE_TITLE := Dovado Tiny AC
409 DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci
411 TARGET_DEVICES += tiny-ac
413 define Device/dch-m225
416 IMAGES += factory.bin
418 IMAGE/sysupgrade.bin := \
419 append-kernel | pad-offset $$$$(BLOCKSIZE) 64 | append-rootfs | \
420 seama -m "dev=/dev/mtdblock/2" -m "type=firmware" | \
421 pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE)
422 IMAGE/factory.bin := \
423 append-kernel | pad-offset $$$$(BLOCKSIZE) 64 | \
424 append-rootfs | pad-rootfs -x 64 | \
425 seama -m "dev=/dev/mtdblock/2" -m "type=firmware" | \
426 seama-seal -m "signature=wapn22_dlink.2013gui_dap1320b" | \
427 check-size $$$$(IMAGE_SIZE)
428 DEVICE_TITLE := D-Link DCH-M225
429 DEVICE_PACKAGES := kmod-mt76
431 TARGET_DEVICES += dch-m225
435 IMAGE_SIZE := $(ralink_default_fw_size_16M)
436 DEVICE_TITLE := ZyXEL Keenetic Viva
437 DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-usb-ledtrig-usbport kmod-switch-rtl8366-smi kmod-switch-rtl8367b
438 IMAGES += factory.bin
439 IMAGE/factory.bin := $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | \
440 zyimage -d 8997 -v "ZyXEL Keenetic Viva"
442 TARGET_DEVICES += kng_rc