1 include ./common-buffalo.mk
2 include ./common-netgear.mk
4 DEVICE_VARS += ADDPATTERN_ID ADDPATTERN_VERSION
5 DEVICE_VARS += SEAMA_SIGNATURE SEAMA_MTDBLOCK
6 DEVICE_VARS += KERNEL_INITRAMFS_PREFIX
8 define Build/cybertan-trx
9 @echo -n '' > $@-empty.bin
10 -$(STAGING_DIR_HOST)/bin/trx -o $@.new \
11 -f $(IMAGE_KERNEL) -F $@-empty.bin \
12 -x 32 -a 0x10000 -x -32 -f $@
17 define Build/addpattern
18 -$(STAGING_DIR_HOST)/bin/addpattern -B $(ADDPATTERN_ID) \
19 -v v$(ADDPATTERN_VERSION) -i $@ -o $@.new
23 define Build/add-elecom-factory-initramfs
24 $(eval edimax_model=$(word 1,$(1)))
25 $(eval product=$(word 2,$(1)))
27 $(STAGING_DIR_HOST)/bin/mkedimaximg \
28 -b -s CSYS -m $(edimax_model) \
29 -f 0x70000 -S 0x01100000 \
33 echo -n -e "ELECOM\x00\x00$(product)" | dd bs=40 count=1 conv=sync; \
34 echo -n "0.00" | dd bs=16 count=1 conv=sync; \
38 if [ "$$(stat -c%s $@.factory.new)" -le $$(($(subst k,* 1024,$(subst m, * 1024k,$(IMAGE_SIZE))))) ]; then \
39 mv $@.factory.new $(BIN_DIR)/$(KERNEL_INITRAMFS_PREFIX)-factory.bin; \
41 echo "WARNING: initramfs kernel image too big, cannot generate factory image" >&2; \
46 ( stat -c%s $@ | tr -d "\n" | dd bs=16 count=1 conv=sync; ) >> $@
48 echo -n -e "$(1)" | dd bs=16 count=1 conv=sync; \
49 echo -n "0.0.00" | dd bs=16 count=1 conv=sync; \
56 KERNEL := kernel-bin | append-dtb | relocate-kernel | lzma
57 KERNEL_INITRAMFS := $$(KERNEL) | seama
62 # - 28 bytes seama_header
63 # - 36 bytes of META data (4-bytes aligned)
64 IMAGE/default := append-kernel | pad-offset $$$$(BLOCKSIZE) 64 | append-rootfs
65 IMAGE/sysupgrade.bin := \
66 $$(IMAGE/default) | seama | pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE)
67 IMAGE/factory.bin := \
68 $$(IMAGE/default) | pad-rootfs -x 64 | seama | seama-seal | check-size $$$$(IMAGE_SIZE)
72 define Device/avm_fritz300e
74 DEVICE_TITLE := AVM FRITZ!WLAN Repeater 300E
75 KERNEL := kernel-bin | append-dtb | lzma | eva-image
76 KERNEL_INITRAMFS := $$(KERNEL)
78 IMAGE/sysupgrade.bin := append-kernel | pad-to 64k | \
79 append-squashfs-fakeroot-be | pad-to 256 | \
80 append-rootfs | pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE)
81 DEVICE_PACKAGES := fritz-tffs rssileds -swconfig
83 TARGET_DEVICES += avm_fritz300e
85 define Device/avm_fritz4020
87 DEVICE_TITLE := AVM FRITZ!Box 4020
89 KERNEL := kernel-bin | append-dtb | lzma | eva-image
90 KERNEL_INITRAMFS := $$(KERNEL)
91 IMAGE/sysupgrade.bin := append-kernel | pad-to 64k | \
92 append-squashfs-fakeroot-be | pad-to 256 | \
93 append-rootfs | pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE)
94 DEVICE_PACKAGES := fritz-tffs
95 SUPPORTED_DEVICES += fritz4020
97 TARGET_DEVICES += avm_fritz4020
99 define Device/buffalo_bhr-4grv
101 DEVICE_TITLE := Buffalo BHR-4GRV
102 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport
104 IMAGES += factory.bin tftp.bin
105 IMAGE/default := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs | check-size $$$$(IMAGE_SIZE)
106 IMAGE/factory.bin := $$(IMAGE/default) | buffalo-enc BHR-4GRV 1.99 | buffalo-tag BHR-4GRV 3
107 IMAGE/tftp.bin := $$(IMAGE/default) | buffalo-tftp-header
108 SUPPORTED_DEVICES += wzr-hp-g450h
110 TARGET_DEVICES += buffalo_bhr-4grv
112 define Device/buffalo_bhr-4grv2
114 DEVICE_TITLE := Buffalo BHR-4GRV2
117 TARGET_DEVICES += buffalo_bhr-4grv2
119 define Device/buffalo_wzr-hp-ag300h
121 DEVICE_TITLE := Buffalo WZR-HP-AG300H
123 IMAGES += factory.bin tftp.bin
124 IMAGE/default := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs | check-size $$$$(IMAGE_SIZE)
125 IMAGE/factory.bin := $$(IMAGE/default) | buffalo-enc WZR-HP-AG300H 1.99 | buffalo-tag WZR-HP-AG300H 3
126 IMAGE/tftp.bin := $$(IMAGE/default) | buffalo-tftp-header
127 DEVICE_PACKAGES := kmod-usb-core kmod-usb-ohci kmod-usb2 kmod-usb-ledtrig-usbport kmod-leds-reset kmod-owl-loader
128 SUPPORTED_DEVICES += wzr-hp-ag300h
130 TARGET_DEVICES += buffalo_wzr-hp-ag300h
132 define Device/buffalo_wzr-hp-g302h-a1a0
134 DEVICE_TITLE := Buffalo WZR-HP-G302H A1A0
135 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport
137 IMAGES += factory.bin tftp.bin
138 IMAGE/default := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs | check-size $$$$(IMAGE_SIZE)
139 IMAGE/factory.bin := $$(IMAGE/default) | buffalo-enc WZR-HP-G302H 1.99 | buffalo-tag WZR-HP-G302H 4
140 IMAGE/tftp.bin := $$(IMAGE/default) | buffalo-tftp-header
141 SUPPORTED_DEVICES += wzr-hp-g300nh2
143 TARGET_DEVICES += buffalo_wzr-hp-g302h-a1a0
145 define Device/buffalo_wzr-hp-g450h
147 DEVICE_TITLE := Buffalo WZR-HP-G450H/WZR-450HP
148 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport
150 IMAGES += factory.bin tftp.bin
151 IMAGE/default := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs | check-size $$$$(IMAGE_SIZE)
152 IMAGE/factory.bin := $$(IMAGE/default) | buffalo-enc WZR-HP-G450H 1.99 | buffalo-tag WZR-HP-G450H 3
153 IMAGE/tftp.bin := $$(IMAGE/default) | buffalo-tftp-header
154 SUPPORTED_DEVICES += wzr-hp-g450h
156 TARGET_DEVICES += buffalo_wzr-hp-g450h
158 define Device/comfast_cf-e110n-v2
160 DEVICE_TITLE := COMFAST CF-E110N v2
161 DEVICE_PACKAGES := rssileds kmod-leds-gpio -swconfig -uboot-envtools
164 TARGET_DEVICES += comfast_cf-e110n-v2
166 define Device/devolo_dvl1200e
168 DEVICE_TITLE := devolo WiFi pro 1200e
169 DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca988x-ct
172 TARGET_DEVICES += devolo_dvl1200e
174 define Device/devolo_dvl1200i
176 DEVICE_TITLE := devolo WiFi pro 1200i
177 DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca988x-ct
180 TARGET_DEVICES += devolo_dvl1200i
182 define Device/devolo_dvl1750c
184 DEVICE_TITLE := devolo WiFi pro 1750c
185 DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca988x-ct
188 TARGET_DEVICES += devolo_dvl1750c
190 define Device/devolo_dvl1750e
192 DEVICE_TITLE := devolo WiFi pro 1750e
193 DEVICE_PACKAGES := kmod-usb2 kmod-ath10k-ct ath10k-firmware-qca988x-ct
196 TARGET_DEVICES += devolo_dvl1750e
198 define Device/devolo_dvl1750i
200 DEVICE_TITLE := devolo WiFi pro 1750i
201 DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca988x-ct
204 TARGET_DEVICES += devolo_dvl1750i
206 define Device/dlink_dir-825-b1
208 DEVICE_TITLE := D-LINK DIR-825 B1
210 IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE)
211 DEVICE_PACKAGES := kmod-usb-core kmod-usb-ohci kmod-usb2 kmod-usb-ledtrig-usbport kmod-leds-reset kmod-owl-loader
212 SUPPORTED_DEVICES += dir-825-b1
214 TARGET_DEVICES += dlink_dir-825-b1
216 define Device/dlink_dir-825-c1
218 DEVICE_TITLE := D-LINK DIR-825 C1
219 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport kmod-leds-reset kmod-owl-loader
220 SUPPORTED_DEVICES += dir-825-c1
222 IMAGES := factory.bin sysupgrade.bin
223 IMAGE/default := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs
224 IMAGE/factory.bin := $$(IMAGE/default) | pad-offset $$$$(IMAGE_SIZE) 26 | \
225 append-string 00DB120AR9344-RT-101214-00 | check-size $$$$(IMAGE_SIZE)
226 IMAGE/sysupgrade.bin := $$(IMAGE/default) | append-metadata | check-size $$$$(IMAGE_SIZE)
228 TARGET_DEVICES += dlink_dir-825-c1
230 define Device/dlink_dir-835-a1
232 DEVICE_TITLE := D-LINK DIR-835 A1
233 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-leds-reset kmod-owl-loader
234 SUPPORTED_DEVICES += dir-835-a1
236 IMAGES := factory.bin sysupgrade.bin
237 IMAGE/default := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs
238 IMAGE/factory.bin := $$(IMAGE/default) | pad-offset $$$$(IMAGE_SIZE) 26 | \
239 append-string 00DB120AR9344-RT-101214-00 | check-size $$$$(IMAGE_SIZE)
240 IMAGE/sysupgrade.bin := $$(IMAGE/default) | append-metadata | check-size $$$$(IMAGE_SIZE)
242 TARGET_DEVICES += dlink_dir-835-a1
244 define Device/dlink_dir-859-a1
247 DEVICE_TITLE := D-LINK DIR-859 A1
249 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-ath10k-ct ath10k-firmware-qca988x-ct
250 SEAMA_SIGNATURE := wrgac37_dlink.2013gui_dir859
251 SUPPORTED_DEVICES += dir-859-a1
253 TARGET_DEVICES += dlink_dir-859-a1
255 define Device/elecom_wrc-1750ghbk2-i
257 DEVICE_TITLE := ELECOM WRC-1750GHBK2-I/C
259 KERNEL_INITRAMFS := $$(KERNEL) | pad-to 2 | \
260 add-elecom-factory-initramfs RN68 WRC-1750GHBK2
261 DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca988x-ct
263 TARGET_DEVICES += elecom_wrc-1750ghbk2-i
265 define Device/elecom_wrc-300ghbk2-i
267 DEVICE_TITLE := ELECOM WRC-300GHBK2-I
269 KERNEL_INITRAMFS := $$(KERNEL) | pad-to 2 | \
270 add-elecom-factory-initramfs RN51 WRC-300GHBK2-I
272 TARGET_DEVICES += elecom_wrc-300ghbk2-i
274 define Device/embeddedwireless_dorin
276 DEVICE_TITLE := Embedded Wireless Dorin
277 DEVICE_PACKAGES := kmod-usb-chipidea2
280 TARGET_DEVICES += embeddedwireless_dorin
282 define Device/engenius_ews511ap
284 DEVICE_TITLE := EnGenius EWS511AP
285 DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca9887-ct
288 TARGET_DEVICES += engenius_ews511ap
290 define Device/etactica_eg200
292 DEVICE_TITLE := eTactica EG200
293 DEVICE_PACKAGES := kmod-usb-chipidea2 kmod-ledtrig-oneshot \
294 kmod-usb-serial kmod-usb-serial-ftdi kmod-usb-storage kmod-fs-ext4
295 SUPPORTED_DEVICES += rme-eg200
297 TARGET_DEVICES += etactica_eg200
299 define Device/glinet_gl-ar150
301 DEVICE_TITLE := GL.iNet GL-AR150
302 DEVICE_PACKAGES := kmod-usb-chipidea2
304 SUPPORTED_DEVICES += gl-ar150
306 TARGET_DEVICES += glinet_gl-ar150
308 define Device/glinet_gl-ar300m-nor
310 DEVICE_TITLE := GL.iNet GL-AR300M
311 DEVICE_PACKAGES := kmod-usb-core kmod-usb2
313 SUPPORTED_DEVICES += gl-ar300m
315 TARGET_DEVICES += glinet_gl-ar300m-nor
317 define Device/glinet_gl-ar750s
319 DEVICE_TITLE := GL.iNet GL-AR750S
320 DEVICE_PACKAGES := kmod-usb2 kmod-ath10k-ct ath10k-firmware-qca988x-ct
322 SUPPORTED_DEVICES += gl-ar750s
324 TARGET_DEVICES += glinet_gl-ar750s
326 define Device/glinet_gl-x750
328 DEVICE_TITLE := GL.iNet GL-X750
329 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-ath10k-ct ath10k-firmware-qca9887-ct
332 TARGET_DEVICES += glinet_gl-x750
334 define Device/iodata_etg3-r
336 DEVICE_TITLE := I-O DATA ETG3-R
339 TARGET_DEVICES += iodata_etg3-r
341 define Device/iodata_wn-ac1167dgr
343 DEVICE_TITLE := I-O DATA WN-AC1167DGR
345 IMAGES += factory.bin
346 IMAGE/factory.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | \
347 append-rootfs | pad-rootfs | check-size $$$$(IMAGE_SIZE) | \
348 senao-header -r 0x30a -p 0x61 -t 2
349 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-ath10k-ct ath10k-firmware-qca988x-ct
351 TARGET_DEVICES += iodata_wn-ac1167dgr
353 define Device/iodata_wn-ac1600dgr
355 DEVICE_TITLE := I-O DATA WN-AC1600DGR
357 IMAGES += factory.bin
358 IMAGE/factory.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | \
359 append-rootfs | pad-rootfs | check-size $$$$(IMAGE_SIZE) | \
360 senao-header -r 0x30a -p 0x60 -t 2 -v 200
361 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-ath10k-ct ath10k-firmware-qca988x-ct
363 TARGET_DEVICES += iodata_wn-ac1600dgr
365 define Device/iodata_wn-ac1600dgr2
367 DEVICE_TITLE := I-O DATA WN-AC1600DGR2
369 IMAGES += factory.bin
370 IMAGE/factory.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | \
371 append-rootfs | pad-rootfs | check-size $$$$(IMAGE_SIZE) | \
372 senao-header -r 0x30a -p 0x60 -t 2 -v 200
373 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-ath10k-ct ath10k-firmware-qca988x-ct
375 TARGET_DEVICES += iodata_wn-ac1600dgr2
377 define Device/iodata_wn-ag300dgr
379 DEVICE_TITLE := I-O DATA WN-AG300DGR
381 IMAGES += factory.bin
382 IMAGE/factory.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | \
383 append-rootfs | pad-rootfs | check-size $$$$(IMAGE_SIZE) | \
384 senao-header -r 0x30a -p 0x47 -t 2
385 DEVICE_PACKAGES := kmod-usb-core kmod-usb2
387 TARGET_DEVICES += iodata_wn-ag300dgr
389 define Device/nec_wg800hp
391 DEVICE_TITLE := NEC Aterm WG800HP
393 IMAGES += factory.bin
394 IMAGE/factory.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | \
395 append-rootfs | pad-rootfs | check-size $$$$(IMAGE_SIZE) | \
396 xor-image -p 6A57190601121E4C004C1E1201061957 -x | \
398 DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca9887-ct-htt
400 TARGET_DEVICES += nec_wg800hp
402 define Device/ocedo_koala
404 DEVICE_TITLE := OCEDO Koala
405 DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca988x-ct
406 SUPPORTED_DEVICES += koala
408 IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE)
410 TARGET_DEVICES += ocedo_koala
412 define Device/ocedo_raccoon
414 DEVICE_TITLE := OCEDO Raccoon
416 IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE)
418 TARGET_DEVICES += ocedo_raccoon
420 define Device/openmesh_om5p-ac-v2
422 DEVICE_TITLE := OpenMesh OM5P-AC v2
423 DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca988x-ct om-watchdog
425 SUPPORTED_DEVICES += om5p-acv2
427 TARGET_DEVICES += openmesh_om5p-ac-v2
429 define Device/pcs_cap324
431 DEVICE_TITLE := PowerCloud Systems CAP324
433 SUPPORTED_DEVICES += cap324
435 TARGET_DEVICES += pcs_cap324
437 define Device/pcs_cr3000
439 DEVICE_TITLE := PowerCloud Systems CR3000
441 SUPPORTED_DEVICES += cr3000
443 TARGET_DEVICES += pcs_cr3000
445 define Device/pcs_cr5000
447 DEVICE_TITLE := PowerCloud Systems CR5000
448 DEVICE_PACKAGES := kmod-usb2 kmod-usb-core
450 SUPPORTED_DEVICES += cr5000
452 TARGET_DEVICES += pcs_cr5000
454 define Device/netgear_wndr3x00
456 KERNEL := kernel-bin | append-dtb | lzma -d20 | netgear-uImage lzma
457 IMAGES += factory.img
458 IMAGE/default := append-kernel | pad-to $$$$(BLOCKSIZE) | netgear-squashfs | append-rootfs | pad-rootfs
459 IMAGE/sysupgrade.bin := $$(IMAGE/default) | append-metadata | check-size $$$$(IMAGE_SIZE)
460 IMAGE/factory.img := $$(IMAGE/default) | netgear-dni | check-size $$$$(IMAGE_SIZE)
461 DEVICE_PACKAGES := kmod-usb-core kmod-usb-ohci kmod-usb2 kmod-usb-ledtrig-usbport kmod-leds-reset kmod-owl-loader
464 define Device/netgear_wndr3700
465 $(Device/netgear_wndr3x00)
466 DEVICE_TITLE := NETGEAR WNDR3700
467 NETGEAR_KERNEL_MAGIC := 0x33373030
468 NETGEAR_BOARD_ID := WNDR3700
470 IMAGES += factory-NA.img
471 IMAGE/factory-NA.img := $$(IMAGE/default) | netgear-dni NA | check-size $$$$(IMAGE_SIZE)
472 SUPPORTED_DEVICES += wndr3700
474 TARGET_DEVICES += netgear_wndr3700
476 define Device/netgear_wndr3700v2
477 $(Device/netgear_wndr3x00)
478 DEVICE_TITLE := NETGEAR WNDR3700v2
479 NETGEAR_KERNEL_MAGIC := 0x33373031
480 NETGEAR_BOARD_ID := WNDR3700v2
481 NETGEAR_HW_ID := 29763654+16+64
483 SUPPORTED_DEVICES += wndr3700v2
485 TARGET_DEVICES += netgear_wndr3700v2
487 define Device/pisen_wmm003n
488 $(Device/tplink-8mlzma)
490 DEVICE_TITLE := Pisen WMM003N (Cloud Easy Power)
491 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-chipidea2
492 TPLINK_HWID := 0x07030101
494 TARGET_DEVICES += pisen_wmm003n
496 define Device/netgear_wndr3800
497 $(Device/netgear_wndr3x00)
498 DEVICE_TITLE := NETGEAR WNDR3800
499 NETGEAR_KERNEL_MAGIC := 0x33373031
500 NETGEAR_BOARD_ID := WNDR3800
501 NETGEAR_HW_ID := 29763654+16+128
503 SUPPORTED_DEVICES += wndr3800
505 TARGET_DEVICES += netgear_wndr3800
507 define Device/phicomm_k2t
509 DEVICE_TITLE := Phicomm K2T
511 IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE)
512 DEVICE_PACKAGES := kmod-leds-reset kmod-ath10k-ct ath10k-firmware-qca9888-ct
514 TARGET_DEVICES += phicomm_k2t
516 define Device/rosinson_wr818
518 DEVICE_TITLE := ROSINSON WR818
520 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport
522 TARGET_DEVICES += rosinson_wr818
524 define Device/wd_mynet-wifi-rangeextender
526 DEVICE_TITLE := Western Digital My Net Wi-Fi Range Extender
527 DEVICE_PACKAGES := rssileds nvram -swconfig
529 ADDPATTERN_ID := mynet-rext
530 ADDPATTERN_VERSION := 1.00.01
531 IMAGE/sysupgrade.bin := append-rootfs | pad-rootfs | cybertan-trx | \
532 addpattern | append-metadata
533 SUPPORTED_DEVICES += mynet-rext
535 TARGET_DEVICES += wd_mynet-wifi-rangeextender
537 define Device/winchannel_wb2000
539 DEVICE_TITLE := Winchannel WB2000
541 DEVICE_PACKAGES := kmod-i2c-core kmod-i2c-gpio kmod-rtc-ds1307 kmod-usb2 kmod-usb-ledtrig-usbport
543 TARGET_DEVICES += winchannel_wb2000
545 define Device/xiaomi_mi-router-4q
547 DEVICE_TITLE := Xiaomi Mi Router 4Q
550 TARGET_DEVICES += xiaomi_mi-router-4q