+DEVICE_VARS += BUFFALO_PRODUCT BUFFALO_HWVER
+
define Build/buffalo-tag
$(eval product=$(word 1,$(1)))
$(eval hwver=$(word 2,$(1)))
) > $@.new
mv $@.new $@
endef
+
+
+define Device/buffalo_common
+ DEVICE_VENDOR := Buffalo
+ BUFFALO_PRODUCT :=
+ BUFFALO_HWVER := 3
+ IMAGES += factory.bin tftp.bin
+ IMAGE/default := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | \
+ pad-rootfs | check-size
+ IMAGE/factory.bin := $$(IMAGE/default) | buffalo-enc $$$$(BUFFALO_PRODUCT) 1.99 | \
+ buffalo-tag $$$$(BUFFALO_PRODUCT) $$$$(BUFFALO_HWVER)
+ IMAGE/tftp.bin := $$(IMAGE/default) | buffalo-tftp-header
+endef
TARGET_DEVICES += avm_fritzdvbc
define Device/buffalo_bhr-4grv
+ $(Device/buffalo_common)
SOC := ar7242
- DEVICE_VENDOR := Buffalo
DEVICE_MODEL := BHR-4GRV
+ BUFFALO_PRODUCT := BHR-4GRV
DEVICE_PACKAGES := kmod-usb2 kmod-usb-ledtrig-usbport
IMAGE_SIZE := 32256k
- IMAGES += factory.bin tftp.bin
- IMAGE/default := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | \
- pad-rootfs | check-size
- IMAGE/factory.bin := $$(IMAGE/default) | buffalo-enc BHR-4GRV 1.99 | \
- buffalo-tag BHR-4GRV 3
- IMAGE/tftp.bin := $$(IMAGE/default) | buffalo-tftp-header
SUPPORTED_DEVICES += wzr-hp-g450h
endef
TARGET_DEVICES += buffalo_bhr-4grv
TARGET_DEVICES += buffalo_bhr-4grv2
define Device/buffalo_wzr-hp-ag300h
+ $(Device/buffalo_common)
SOC := ar7161
- DEVICE_VENDOR := Buffalo
DEVICE_MODEL := WZR-HP-AG300H
- IMAGE_SIZE := 32320k
- IMAGES += factory.bin tftp.bin
- IMAGE/default := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | \
- pad-rootfs | check-size
- IMAGE/factory.bin := $$(IMAGE/default) | buffalo-enc WZR-HP-AG300H 1.99 | \
- buffalo-tag WZR-HP-AG300H 3
- IMAGE/tftp.bin := $$(IMAGE/default) | buffalo-tftp-header
+ BUFFALO_PRODUCT := WZR-HP-AG300H
DEVICE_PACKAGES := kmod-usb-ohci kmod-usb2 kmod-usb-ledtrig-usbport \
kmod-leds-reset kmod-owl-loader
+ IMAGE_SIZE := 32320k
SUPPORTED_DEVICES += wzr-hp-ag300h
endef
TARGET_DEVICES += buffalo_wzr-hp-ag300h
define Device/buffalo_wzr-hp-g302h-a1a0
+ $(Device/buffalo_common)
SOC := ar7242
- DEVICE_VENDOR := Buffalo
DEVICE_MODEL := WZR-HP-G302H
DEVICE_VARIANT := A1A0
+ BUFFALO_PRODUCT := WZR-HP-G302H
+ BUFFALO_HWVER := 4
DEVICE_PACKAGES := kmod-usb2 kmod-usb-ledtrig-usbport
IMAGE_SIZE := 32128k
- IMAGES += factory.bin tftp.bin
- IMAGE/default := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | \
- pad-rootfs | check-size
- IMAGE/factory.bin := $$(IMAGE/default) | buffalo-enc WZR-HP-G302H 1.99 | \
- buffalo-tag WZR-HP-G302H 4
- IMAGE/tftp.bin := $$(IMAGE/default) | buffalo-tftp-header
SUPPORTED_DEVICES += wzr-hp-g300nh2
endef
TARGET_DEVICES += buffalo_wzr-hp-g302h-a1a0
define Device/buffalo_wzr-hp-g450h
+ $(Device/buffalo_common)
SOC := ar7242
- DEVICE_VENDOR := Buffalo
DEVICE_MODEL := WZR-HP-G450H/WZR-450HP
+ BUFFALO_PRODUCT := WZR-HP-G450H
DEVICE_PACKAGES := kmod-usb2 kmod-usb-ledtrig-usbport
IMAGE_SIZE := 32256k
- IMAGES += factory.bin tftp.bin
- IMAGE/default := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | \
- pad-rootfs | check-size
- IMAGE/factory.bin := $$(IMAGE/default) | buffalo-enc WZR-HP-G450H 1.99 | \
- buffalo-tag WZR-HP-G450H 3
- IMAGE/tftp.bin := $$(IMAGE/default) | buffalo-tftp-header
SUPPORTED_DEVICES += wzr-hp-g450h
endef
TARGET_DEVICES += buffalo_wzr-hp-g450h
include ./common-buffalo.mk
define Device/buffalo_whr-g301n
+ $(Device/buffalo_common)
SOC := ar7240
- DEVICE_VENDOR := Buffalo
DEVICE_MODEL := WHR-G301N
+ BUFFALO_PRODUCT := WHR-G301N
IMAGE_SIZE := 3712k
- IMAGES += factory.bin tftp.bin
- IMAGE/default := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | \
- pad-rootfs | check-size
- IMAGE/factory.bin := $$(IMAGE/default) | buffalo-enc WHR-G301N 1.99 | \
- buffalo-tag WHR-G301N 3
- IMAGE/tftp.bin := $$(IMAGE/default) | buffalo-tftp-header
SUPPORTED_DEVICES += whr-g301n
DEFAULT := n
endef