5 define Build/tplink-header
6 $(STAGING_DIR_HOST)/bin/mktplinkfw2 -a 0x4 -V "ver. 2.0" -B $(1) \
7 -o $@.new -k $@ -r $(IMAGE_ROOTFS) && 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/elecom-header
23 cp $@ $(KDIR)/v_0.0.0.bin
25 mkhash md5 $(KDIR)/v_0.0.0.bin && \
27 ) | mkhash md5 > $(KDIR)/v_0.0.0.md5
28 $(STAGING_DIR_HOST)/bin/tar -cf $@ -C $(KDIR) v_0.0.0.bin v_0.0.0.md5
32 $(STAGING_DIR_HOST)/bin/zyimage $(1) $@
35 define Device/ArcherC20i
37 SUPPORTED_DEVICES := c20i
38 KERNEL := $(KERNEL_DTB)
39 KERNEL_INITRAMFS := $(KERNEL_DTB) | tplink-header ArcherC20i -c
40 IMAGE/sysupgrade.bin := append-kernel | tplink-header ArcherC20i -j | append-metadata
41 DEVICE_TITLE := TP-Link ArcherC20i
43 TARGET_DEVICES += ArcherC20i
45 define Device/ArcherC50
47 SUPPORTED_DEVICES := c50
48 KERNEL := $(KERNEL_DTB)
49 KERNEL_INITRAMFS := $(KERNEL_DTB) | tplink-header ArcherC50 -c
50 IMAGE/sysupgrade.bin := append-kernel | tplink-header ArcherC50 -j | append-metadata
51 DEVICE_TITLE := TP-Link ArcherC50
53 TARGET_DEVICES += ArcherC50
55 define Device/ArcherMR200
57 SUPPORTED_DEVICES := mr200
58 KERNEL := $(KERNEL_DTB)
59 KERNEL_INITRAMFS := $(KERNEL_DTB) | tplink-header ArcherMR200 -c
60 IMAGE/sysupgrade.bin := append-kernel | tplink-header ArcherMR200 -j | append-metadata
61 DEVICE_PACKAGES := kmod-usb2 kmod-usb-net kmod-usb-net-rndis kmod-usb-serial kmod-usb-serial-option adb
62 DEVICE_TITLE := TP-Link ArcherMR200
64 TARGET_DEVICES += ArcherMR200
69 IMAGE_SIZE := $(ralink_default_fw_size_4M)
71 KERNEL := $(KERNEL_DTB) | uImage lzma | pad-kernel-ex2700
72 IMAGE/factory.bin := $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | \
73 netgear-header -B EX2700 -H 29764623+4+0+32+2x2+0
74 DEVICE_TITLE := Netgear EX2700
76 TARGET_DEVICES += ex2700
78 define Device/wn3000rpv3
82 KERNEL := $(KERNEL_DTB) | uImage lzma | pad-kernel-ex2700
83 IMAGE/factory.bin := $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | \
84 netgear-header -B WN3000RPv3 -H 29764836+8+0+32+2x2+0
85 DEVICE_TITLE := Netgear WN3000RPv3
87 TARGET_DEVICES += wn3000rpv3
89 define Device/wt3020-4M
92 IMAGE_SIZE := $(ralink_default_fw_size_4M)
94 IMAGE/factory.bin := $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | \
95 poray-header -B WT3020 -F 4M
96 DEVICE_TITLE := Nexx WT3020 (4MB)
98 TARGET_DEVICES += wt3020-4M
100 define Device/wt3020-8M
102 IMAGES += factory.bin
103 IMAGE/factory.bin := $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | \
104 poray-header -B WT3020 -F 8M
105 DEVICE_TITLE := Nexx WT3020 (8MB)
107 TARGET_DEVICES += wt3020-8M
109 define Device/wrh-300cr
111 IMAGE_SIZE := $(ralink_default_fw_size_16M)
112 IMAGES += factory.bin
113 IMAGE/factory.bin := $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | \
115 DEVICE_TITLE := Elecom WRH-300CR
116 DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci
118 TARGET_DEVICES += wrh-300cr
122 IMAGES += factory.bin
123 IMAGE/factory.bin := $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | \
124 umedia-header 0x013326
125 DEVICE_TITLE := Linksys E1700
127 TARGET_DEVICES += e1700
129 define Device/ai-br100
132 DEVICE_TITLE := Aigale Ai-BR100
133 DEVICE_PACKAGES:= kmod-usb2 kmod-usb-ohci
135 TARGET_DEVICES += ai-br100
137 define Device/whr-300hp2
140 DEVICE_TITLE := Buffalo WHR-300HP2
142 TARGET_DEVICES += whr-300hp2
144 define Device/whr-600d
147 DEVICE_TITLE := Buffalo WHR-600D
149 TARGET_DEVICES += whr-600d
151 define Device/whr-1166d
154 DEVICE_TITLE := Buffalo WHR-1166D
156 TARGET_DEVICES += whr-1166d
158 define Device/dir-810l
161 DEVICE_TITLE := D-Link DIR-810L
163 TARGET_DEVICES += dir-810l
168 DEVICE_TITLE := Sercomm NA930
170 TARGET_DEVICES += na930
172 define Device/microwrt
175 DEVICE_TITLE := Microduino MicroWRT
177 TARGET_DEVICES += microwrt
179 define Device/mt7620a
181 DEVICE_TITLE := MediaTek MT7620a EVB
183 TARGET_DEVICES += mt7620a
185 define Device/mt7620a_mt7610e
186 DTS := MT7620a_MT7610e
187 DEVICE_TITLE := MediaTek MT7620a + MT7610e EVB
189 TARGET_DEVICES += mt7620a_mt7610e
191 define Device/mt7620a_mt7530
192 DTS := MT7620a_MT7530
193 DEVICE_TITLE := MediaTek MT7620a + MT7530 EVB
195 TARGET_DEVICES += mt7620a_mt7530
197 define Device/mt7620a_v22sg
199 DEVICE_TITLE := MediaTek MT7620a V22SG
201 TARGET_DEVICES += mt7620a_v22sg
205 DEVICE_TITLE := Asus RP-N53
207 TARGET_DEVICES += rp-n53
209 define Device/cf-wr800n
211 DEVICE_TITLE := Comfast CF-WR800N
213 TARGET_DEVICES += cf-wr800n
215 define Device/cs-qr10
217 DEVICE_TITLE := Planex CS-QR10
218 DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-i2c-core kmod-i2c-ralink kmod-sound-core kmod-sound-mtk kmod-sdhci-mt7620
220 TARGET_DEVICES += cs-qr10
222 define Device/db-wrt01
224 DEVICE_TITLE := Planex DB-WRT01
226 TARGET_DEVICES += db-wrt01
228 define Device/mzk-750dhp
230 DEVICE_TITLE := Planex MZK-750DHP
231 DEVICE_PACKAGES := kmod-mt76
233 TARGET_DEVICES += mzk-750dhp
235 define Device/mzk-ex300np
237 DEVICE_TITLE := Planex MZK-EX300NP
239 TARGET_DEVICES += mzk-ex300np
241 define Device/mzk-ex750np
243 DEVICE_TITLE := Planex MZK-EX750NP
244 DEVICE_PACKAGES := kmod-mt76
246 TARGET_DEVICES += mzk-ex750np
250 IMAGE_SIZE := $(ralink_default_fw_size_16M)
251 DEVICE_TITLE := HiWiFi HC5661
252 DEVICE_PACKAGES := kmod-usb2 kmod-sdhci kmod-sdhci-mt7620 kmod-usb-ledtrig-usbport
254 TARGET_DEVICES += hc5661
258 IMAGE_SIZE := $(ralink_default_fw_size_16M)
259 DEVICE_TITLE := HiWiFi HC5761
260 DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-sdhci kmod-sdhci-mt7620 kmod-usb-ledtrig-usbport
262 TARGET_DEVICES += hc5761
266 IMAGE_SIZE := $(ralink_default_fw_size_16M)
267 DEVICE_TITLE := HiWiFi HC5861
268 DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-sdhci kmod-sdhci-mt7620 kmod-usb-ledtrig-usbport
270 TARGET_DEVICES += hc5861
272 define Device/oy-0001
274 IMAGE_SIZE := $(ralink_default_fw_size_16M)
275 DEVICE_TITLE := Oh Yeah OY-0001
277 TARGET_DEVICES += oy-0001
279 define Device/psg1208
281 DEVICE_TITLE := Phicomm PSG1208
282 DEVICE_PACKAGES := kmod-mt76
284 TARGET_DEVICES += psg1208
286 define Device/psg1218
288 DEVICE_TITLE := Phicomm PSG1218
289 DEVICE_PACKAGES := kmod-mt76
291 TARGET_DEVICES += psg1218
295 IMAGE_SIZE := $(ralink_default_fw_size_16M)
296 DEVICE_TITLE := Lenovo Y1
302 IMAGE_SIZE := $(ralink_default_fw_size_16M)
303 DEVICE_TITLE := Lenovo Y1S
305 TARGET_DEVICES += y1s
309 IMAGE_SIZE := $(ralink_default_fw_size_16M)
310 DEVICE_TITLE := Kingston MLW221
312 TARGET_DEVICES += mlw221
316 IMAGE_SIZE := $(ralink_default_fw_size_16M)
317 DEVICE_TITLE := Kingston MLWG2
319 TARGET_DEVICES += mlwg2
321 define Device/wmr-300
323 DEVICE_TITLE := Buffalo WMR-300
325 TARGET_DEVICES += wmr-300
327 define Device/rt-n14u
329 DEVICE_TITLE := Asus RT-N14u
331 TARGET_DEVICES += rt-n14u
333 define Device/wrtnode
335 IMAGE_SIZE := $(ralink_default_fw_size_16M)
336 DEVICE_TITLE := WRTNode
338 TARGET_DEVICES += wrtnode
340 define Device/miwifi-mini
342 IMAGE_SIZE := $(ralink_default_fw_size_16M)
343 DEVICE_TITLE := Xiaomi MiWiFi Mini
344 DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci
346 TARGET_DEVICES += miwifi-mini
348 define Device/gl-mt300a
350 IMAGE_SIZE := $(ralink_default_fw_size_16M)
351 DEVICE_TITLE := GL-Inet GL-MT300A
352 DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-mt76
354 TARGET_DEVICES += gl-mt300a
356 define Device/gl-mt300n
358 IMAGE_SIZE := $(ralink_default_fw_size_16M)
359 DEVICE_TITLE := GL-Inet GL-MT300N
360 DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-mt76
362 TARGET_DEVICES += gl-mt300n
364 define Device/gl-mt750
366 IMAGE_SIZE := $(ralink_default_fw_size_16M)
367 DEVICE_TITLE := GL-Inet GL-MT750
368 DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-mt76
370 TARGET_DEVICES += gl-mt750
374 DEVICE_TITLE := ZTE Q7
376 TARGET_DEVICES += zte-q7
378 define Device/youku-yk1
380 IMAGE_SIZE := $(ralink_default_fw_size_16M)
381 DEVICE_TITLE := YOUKU YK1
383 TARGET_DEVICES += youku-yk1
385 define Device/zbt-ape522ii
387 DEVICE_TITLE := Zbtlink ZBT-APE522II
388 DEVICE_PACKAGES := kmod-mt76
390 TARGET_DEVICES += zbt-ape522ii
392 define Device/zbt-cpe102
394 DEVICE_TITLE := Zbtlink ZBT-CPE102
395 DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci
397 TARGET_DEVICES += zbt-cpe102
399 define Device/zbt-wa05
401 DEVICE_TITLE := Zbtlink ZBT-WA05
403 TARGET_DEVICES += zbt-wa05
405 define Device/zbt-we826
407 IMAGE_SIZE := $(ralink_default_fw_size_16M)
408 DEVICE_TITLE := Zbtlink ZBT-WE826
409 DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-mt76 kmod-sdhci-mt7620
411 TARGET_DEVICES += zbt-we826
413 define Device/zbt-wr8305rt
415 DEVICE_TITLE := Zbtlink ZBT-WR8305RT
417 TARGET_DEVICES += zbt-wr8305rt
419 define Device/tiny-ac
421 DEVICE_TITLE := Dovado Tiny AC
422 DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci
424 TARGET_DEVICES += tiny-ac
426 define Device/dch-m225
429 IMAGES += factory.bin
431 IMAGE/sysupgrade.bin := \
432 append-kernel | pad-offset $$$$(BLOCKSIZE) 64 | append-rootfs | \
433 seama -m "dev=/dev/mtdblock/2" -m "type=firmware" | \
434 pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE)
435 IMAGE/factory.bin := \
436 append-kernel | pad-offset $$$$(BLOCKSIZE) 64 | \
437 append-rootfs | pad-rootfs -x 64 | \
438 seama -m "dev=/dev/mtdblock/2" -m "type=firmware" | \
439 seama-seal -m "signature=wapn22_dlink.2013gui_dap1320b" | \
440 check-size $$$$(IMAGE_SIZE)
441 DEVICE_TITLE := D-Link DCH-M225
442 DEVICE_PACKAGES := kmod-mt76
444 TARGET_DEVICES += dch-m225
448 DEVICE_TITLE := ZyXEL Keenetic Omni
449 DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-usb-ledtrig-usbport
450 IMAGES += factory.bin
451 IMAGE/factory.bin := $$(IMAGE/sysupgrade.bin) | pad-to 64k | check-size $$$$(IMAGE_SIZE) | \
452 zyimage -d 4882 -v "ZyXEL Keenetic Omni"
454 TARGET_DEVICES += kn_rc
458 DEVICE_TITLE := ZyXEL Keenetic Omni II
459 DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-usb-ledtrig-usbport
460 IMAGES += factory.bin
461 IMAGE/factory.bin := $$(IMAGE/sysupgrade.bin) | pad-to 64k | check-size $$$$(IMAGE_SIZE) | \
462 zyimage -d 2102034 -v "ZyXEL Keenetic Omni II"
464 TARGET_DEVICES += kn_rf
468 IMAGE_SIZE := $(ralink_default_fw_size_16M)
469 DEVICE_TITLE := ZyXEL Keenetic Viva
470 DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-usb-ledtrig-usbport kmod-switch-rtl8366-smi kmod-switch-rtl8367b
471 IMAGES += factory.bin
472 IMAGE/factory.bin := $$(sysupgrade_bin) | pad-to 64k | check-size $$$$(IMAGE_SIZE) | \
473 zyimage -d 8997 -v "ZyXEL Keenetic Viva"
475 TARGET_DEVICES += kng_rc