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/seama -i $@ $(1)
45 define Build/seama-seal
46 $(call Build/seama,-s $@.seama $(1))
49 define Device/ArcherC20i
51 KERNEL := $(KERNEL_DTB)
52 KERNEL_INITRAMFS := $(KERNEL_DTB) | tplink-header ArcherC20i -c
53 IMAGE/sysupgrade.bin := append-kernel | tplink-header ArcherC20i -j -r $(KDIR)/root.squashfs
54 DEVICE_TITLE := TP-Link ArcherC20i
56 TARGET_DEVICES += ArcherC20i
58 define Device/ArcherC50
60 KERNEL := $(KERNEL_DTB)
61 KERNEL_INITRAMFS := $(KERNEL_DTB) | tplink-header ArcherC50 -c
62 IMAGE/sysupgrade.bin := append-kernel | tplink-header ArcherC50 -j -r $(KDIR)/root.squashfs
63 DEVICE_TITLE := TP-Link ArcherC50
65 TARGET_DEVICES += ArcherC50
69 IMAGE_SIZE := $(ralink_default_fw_size_4M)
71 KERNEL := $(KERNEL_DTB) | uImage lzma | pad-kernel-ex2700
72 IMAGE/factory.bin := $$(IMAGE/sysupgrade.bin) | netgear-header -B EX2700 -H 29764623+4+0+32+2x2+0
73 DEVICE_TITLE := Netgear EX2700
75 TARGET_DEVICES += ex2700
77 define Device/wt3020-4M
79 IMAGE_SIZE := $(ralink_default_fw_size_4M)
81 IMAGE/factory.bin := $$(IMAGE/sysupgrade.bin) | poray-header -B WT3020 -F 4M
82 DEVICE_TITLE := Nexx WT3020 (4MB)
84 TARGET_DEVICES += wt3020-4M
86 define Device/wt3020-8M
89 IMAGE/factory.bin := $$(IMAGE/sysupgrade.bin) | poray-header -B WT3020 -F 8M
90 DEVICE_TITLE := Nexx WT3020 (8MB)
92 TARGET_DEVICES += wt3020-8M
94 define Device/wrh-300cr
96 IMAGE_SIZE := $(ralink_default_fw_size_16M)
98 IMAGE/factory.bin := $$(IMAGE/sysupgrade.bin) | elecom-header
99 DEVICE_TITLE := Elecom WRH-300CR
100 DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci
102 TARGET_DEVICES += wrh-300cr
106 IMAGES += factory.bin
107 IMAGE/factory.bin := $$(IMAGE/sysupgrade.bin) | umedia-header 0x013326
108 DEVICE_TITLE := Linksys E1700
110 TARGET_DEVICES += e1700
112 define Device/ai-br100
115 DEVICE_TITLE := Aigale Ai-BR100
116 DEVICE_PACKAGES:= kmod-usb2 kmod-usb-ohci
118 TARGET_DEVICES += ai-br100
120 define Device/whr-300hp2
123 DEVICE_TITLE := Buffalo WHR-300HP2
125 TARGET_DEVICES += whr-300hp2
127 define Device/whr-600d
130 DEVICE_TITLE := Buffalo WHR-600D
132 TARGET_DEVICES += whr-600d
134 define Device/whr-1166d
137 DEVICE_TITLE := Buffalo WHR-1166D
139 TARGET_DEVICES += whr-1166d
141 define Device/dir-810l
144 DEVICE_TITLE := D-Link DIR-810L
146 TARGET_DEVICES += dir-810l
151 DEVICE_TITLE := Sercomm NA930
153 TARGET_DEVICES += na930
155 define Device/microwrt
158 DEVICE_TITLE := Microduino MicroWRT
160 TARGET_DEVICES += microwrt
162 define Device/mt7620a
164 DEVICE_TITLE := MediaTek MT7620a EVB
166 TARGET_DEVICES += mt7620a
168 define Device/mt7620a_mt7610e
169 DTS := MT7620a_MT7610e
170 DEVICE_TITLE := MediaTek MT7620a + MT7610e EVB
172 TARGET_DEVICES += mt7620a_mt7610e
174 define Device/mt7620a_mt7530
175 DTS := MT7620a_MT7530
176 DEVICE_TITLE := MediaTek MT7620a + MT7530 EVB
178 TARGET_DEVICES += mt7620a_mt7530
180 define Device/mt7620a_v22sg
182 DEVICE_TITLE := MediaTek MT7620a V22SG
184 TARGET_DEVICES += mt7620a_v22sg
188 DEVICE_TITLE := Asus RP-N53
190 TARGET_DEVICES += rp-n53
192 define Device/cf-wr800n
194 DEVICE_TITLE := Comfast CF-WR800N
196 TARGET_DEVICES += cf-wr800n
198 define Device/cs-qr10
200 DEVICE_TITLE := Planex CS-QR10
201 DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-i2c-core kmod-i2c-ralink kmod-sound-core kmod-sound-mtk kmod-sdhci-mt7620
203 TARGET_DEVICES += cs-qr10
205 define Device/db-wrt01
207 DEVICE_TITLE := Planex DB-WRT01
209 TARGET_DEVICES += db-wrt01
211 define Device/mzk-750dhp
213 DEVICE_TITLE := Planex MZK-750DHP
214 DEVICE_PACKAGES := kmod-mt76
216 TARGET_DEVICES += mzk-750dhp
218 define Device/mzk-ex300np
220 DEVICE_TITLE := Planex MZK-EX300NP
222 TARGET_DEVICES += mzk-ex300np
224 define Device/mzk-ex750np
226 DEVICE_TITLE := Planex MZK-EX750NP
227 DEVICE_PACKAGES := kmod-mt76
229 TARGET_DEVICES += mzk-ex750np
233 IMAGE_SIZE := $(ralink_default_fw_size_16M)
234 DEVICE_TITLE := HiWiFi HC5661
235 DEVICE_PACKAGES := kmod-usb2 kmod-sdhci kmod-sdhci-mt7620 kmod-ledtrig-usbdev
237 TARGET_DEVICES += hc5661
241 IMAGE_SIZE := $(ralink_default_fw_size_16M)
242 DEVICE_TITLE := HiWiFi HC5761
243 DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-sdhci kmod-sdhci-mt7620 kmod-ledtrig-usbdev
245 TARGET_DEVICES += hc5761
249 IMAGE_SIZE := $(ralink_default_fw_size_16M)
250 DEVICE_TITLE := HiWiFi HC5861
251 DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-sdhci kmod-sdhci-mt7620 kmod-ledtrig-usbdev
253 TARGET_DEVICES += hc5861
255 define Device/oy-0001
257 IMAGE_SIZE := $(ralink_default_fw_size_16M)
258 DEVICE_TITLE := Oh Yeah OY-0001
260 TARGET_DEVICES += oy-0001
262 define Device/psg1208
264 DEVICE_TITLE := Phicomm PSG1208
265 DEVICE_PACKAGES := kmod-mt76
267 TARGET_DEVICES += psg1208
271 IMAGE_SIZE := $(ralink_default_fw_size_16M)
272 DEVICE_TITLE := Lenovo Y1
278 IMAGE_SIZE := $(ralink_default_fw_size_16M)
279 DEVICE_TITLE := Lenovo Y1S
281 TARGET_DEVICES += y1s
285 IMAGE_SIZE := $(ralink_default_fw_size_16M)
286 DEVICE_TITLE := Kingston MLW221
288 TARGET_DEVICES += mlw221
292 IMAGE_SIZE := $(ralink_default_fw_size_16M)
293 DEVICE_TITLE := Kingston MLWG2
295 TARGET_DEVICES += mlwg2
297 define Device/wmr-300
299 DEVICE_TITLE := Buffalo WMR-300
301 TARGET_DEVICES += wmr-300
303 define Device/rt-n14u
305 DEVICE_TITLE := Asus RT-N14u
307 TARGET_DEVICES += rt-n14u
309 define Device/wrtnode
311 IMAGE_SIZE := $(ralink_default_fw_size_16M)
312 DEVICE_TITLE := WRTNode
314 TARGET_DEVICES += wrtnode
316 define Device/miwifi-mini
318 IMAGE_SIZE := $(ralink_default_fw_size_16M)
319 DEVICE_TITLE := Xiaomi MiWiFi Mini
320 DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci
322 TARGET_DEVICES += miwifi-mini
324 define Device/gl-mt300a
326 IMAGE_SIZE := $(ralink_default_fw_size_16M)
327 DEVICE_TITLE := GL-Inet GL-MT300A
328 DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-mt76
330 TARGET_DEVICES += gl-mt300a
332 define Device/gl-mt300n
334 IMAGE_SIZE := $(ralink_default_fw_size_16M)
335 DEVICE_TITLE := GL-Inet GL-MT300N
336 DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-mt76
338 TARGET_DEVICES += gl-mt300n
340 define Device/gl-mt750
342 IMAGE_SIZE := $(ralink_default_fw_size_16M)
343 DEVICE_TITLE := GL-Inet GL-MT750
344 DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-mt76
346 TARGET_DEVICES += gl-mt750
350 DEVICE_TITLE := ZTE Q7
352 TARGET_DEVICES += zte-q7
354 define Device/youku-yk1
356 IMAGE_SIZE := $(ralink_default_fw_size_16M)
357 DEVICE_TITLE := YOUKU YK1
359 TARGET_DEVICES += youku-yk1
361 define Device/zbt-ape522ii
363 DEVICE_TITLE := Zbtlink ZBT-APE522II
364 DEVICE_PACKAGES := kmod-mt76
366 TARGET_DEVICES += zbt-ape522ii
368 define Device/zbt-wa05
370 DEVICE_TITLE := Zbtlink ZBT-WA05
372 TARGET_DEVICES += zbt-wa05
374 define Device/zbt-we826
376 IMAGE_SIZE := $(ralink_default_fw_size_16M)
377 DEVICE_TITLE := Zbtlink ZBT-WE826
378 DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-mt76 kmod-sdhci-mt7620
380 TARGET_DEVICES += zbt-we826
382 define Device/zbt-wr8305rt
384 DEVICE_TITLE := Zbtlink ZBT-WR8305RT
386 TARGET_DEVICES += zbt-wr8305rt
388 define Device/tiny-ac
390 DEVICE_TITLE := Dovado Tiny AC
391 DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci
393 TARGET_DEVICES += tiny-ac
395 define Device/dch-m225
397 IMAGES += factory.bin
399 IMAGE/sysupgrade.bin := \
400 append-kernel | pad-offset 65536 64 | append-rootfs | \
401 seama -m "dev=/dev/mtdblock/2" -m "type=firmware" | \
402 pad-rootfs | check-size $$$$(IMAGE_SIZE)
403 IMAGE/factory.bin := \
404 append-kernel | pad-offset 65536 64 | append-rootfs | pad-rootfs -x 64 | \
405 seama -m "dev=/dev/mtdblock/2" -m "type=firmware" | \
406 seama-seal -m "signature=wapn22_dlink.2013gui_dap1320b" | \
407 check-size $$$$(IMAGE_SIZE)
408 DEVICE_TITLE := D-Link DCH-M225
409 DEVICE_PACKAGES := kmod-mt76
411 TARGET_DEVICES += dch-m225