ath79: use common device definition for Buffalo devices
The Buffalo devices in ath79 share their image generation code, so let's create a shared Device definition for them. Since most of them use BUFFALO_HWVER := 3, this is moved as default to the shared definition as well. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
This commit is contained in:
parent
a99614a44f
commit
c68105c3b4
@ -1,3 +1,5 @@
|
|||||||
|
DEVICE_VARS += BUFFALO_PRODUCT BUFFALO_HWVER
|
||||||
|
|
||||||
define Build/buffalo-tag
|
define Build/buffalo-tag
|
||||||
$(eval product=$(word 1,$(1)))
|
$(eval product=$(word 1,$(1)))
|
||||||
$(eval hwver=$(word 2,$(1)))
|
$(eval hwver=$(word 2,$(1)))
|
||||||
@ -17,3 +19,16 @@ define Build/buffalo-tftp-header
|
|||||||
) > $@.new
|
) > $@.new
|
||||||
mv $@.new $@
|
mv $@.new $@
|
||||||
endef
|
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
|
||||||
|
@ -315,17 +315,12 @@ endef
|
|||||||
TARGET_DEVICES += avm_fritzdvbc
|
TARGET_DEVICES += avm_fritzdvbc
|
||||||
|
|
||||||
define Device/buffalo_bhr-4grv
|
define Device/buffalo_bhr-4grv
|
||||||
|
$(Device/buffalo_common)
|
||||||
SOC := ar7242
|
SOC := ar7242
|
||||||
DEVICE_VENDOR := Buffalo
|
|
||||||
DEVICE_MODEL := BHR-4GRV
|
DEVICE_MODEL := BHR-4GRV
|
||||||
|
BUFFALO_PRODUCT := BHR-4GRV
|
||||||
DEVICE_PACKAGES := kmod-usb2 kmod-usb-ledtrig-usbport
|
DEVICE_PACKAGES := kmod-usb2 kmod-usb-ledtrig-usbport
|
||||||
IMAGE_SIZE := 32256k
|
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
|
SUPPORTED_DEVICES += wzr-hp-g450h
|
||||||
endef
|
endef
|
||||||
TARGET_DEVICES += buffalo_bhr-4grv
|
TARGET_DEVICES += buffalo_bhr-4grv
|
||||||
@ -339,51 +334,37 @@ endef
|
|||||||
TARGET_DEVICES += buffalo_bhr-4grv2
|
TARGET_DEVICES += buffalo_bhr-4grv2
|
||||||
|
|
||||||
define Device/buffalo_wzr-hp-ag300h
|
define Device/buffalo_wzr-hp-ag300h
|
||||||
|
$(Device/buffalo_common)
|
||||||
SOC := ar7161
|
SOC := ar7161
|
||||||
DEVICE_VENDOR := Buffalo
|
|
||||||
DEVICE_MODEL := WZR-HP-AG300H
|
DEVICE_MODEL := WZR-HP-AG300H
|
||||||
IMAGE_SIZE := 32320k
|
BUFFALO_PRODUCT := WZR-HP-AG300H
|
||||||
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
|
|
||||||
DEVICE_PACKAGES := kmod-usb-ohci kmod-usb2 kmod-usb-ledtrig-usbport \
|
DEVICE_PACKAGES := kmod-usb-ohci kmod-usb2 kmod-usb-ledtrig-usbport \
|
||||||
kmod-leds-reset kmod-owl-loader
|
kmod-leds-reset kmod-owl-loader
|
||||||
|
IMAGE_SIZE := 32320k
|
||||||
SUPPORTED_DEVICES += wzr-hp-ag300h
|
SUPPORTED_DEVICES += wzr-hp-ag300h
|
||||||
endef
|
endef
|
||||||
TARGET_DEVICES += buffalo_wzr-hp-ag300h
|
TARGET_DEVICES += buffalo_wzr-hp-ag300h
|
||||||
|
|
||||||
define Device/buffalo_wzr-hp-g302h-a1a0
|
define Device/buffalo_wzr-hp-g302h-a1a0
|
||||||
|
$(Device/buffalo_common)
|
||||||
SOC := ar7242
|
SOC := ar7242
|
||||||
DEVICE_VENDOR := Buffalo
|
|
||||||
DEVICE_MODEL := WZR-HP-G302H
|
DEVICE_MODEL := WZR-HP-G302H
|
||||||
DEVICE_VARIANT := A1A0
|
DEVICE_VARIANT := A1A0
|
||||||
|
BUFFALO_PRODUCT := WZR-HP-G302H
|
||||||
|
BUFFALO_HWVER := 4
|
||||||
DEVICE_PACKAGES := kmod-usb2 kmod-usb-ledtrig-usbport
|
DEVICE_PACKAGES := kmod-usb2 kmod-usb-ledtrig-usbport
|
||||||
IMAGE_SIZE := 32128k
|
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
|
SUPPORTED_DEVICES += wzr-hp-g300nh2
|
||||||
endef
|
endef
|
||||||
TARGET_DEVICES += buffalo_wzr-hp-g302h-a1a0
|
TARGET_DEVICES += buffalo_wzr-hp-g302h-a1a0
|
||||||
|
|
||||||
define Device/buffalo_wzr-hp-g450h
|
define Device/buffalo_wzr-hp-g450h
|
||||||
|
$(Device/buffalo_common)
|
||||||
SOC := ar7242
|
SOC := ar7242
|
||||||
DEVICE_VENDOR := Buffalo
|
|
||||||
DEVICE_MODEL := WZR-HP-G450H/WZR-450HP
|
DEVICE_MODEL := WZR-HP-G450H/WZR-450HP
|
||||||
|
BUFFALO_PRODUCT := WZR-HP-G450H
|
||||||
DEVICE_PACKAGES := kmod-usb2 kmod-usb-ledtrig-usbport
|
DEVICE_PACKAGES := kmod-usb2 kmod-usb-ledtrig-usbport
|
||||||
IMAGE_SIZE := 32256k
|
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
|
SUPPORTED_DEVICES += wzr-hp-g450h
|
||||||
endef
|
endef
|
||||||
TARGET_DEVICES += buffalo_wzr-hp-g450h
|
TARGET_DEVICES += buffalo_wzr-hp-g450h
|
||||||
|
@ -1,16 +1,11 @@
|
|||||||
include ./common-buffalo.mk
|
include ./common-buffalo.mk
|
||||||
|
|
||||||
define Device/buffalo_whr-g301n
|
define Device/buffalo_whr-g301n
|
||||||
|
$(Device/buffalo_common)
|
||||||
SOC := ar7240
|
SOC := ar7240
|
||||||
DEVICE_VENDOR := Buffalo
|
|
||||||
DEVICE_MODEL := WHR-G301N
|
DEVICE_MODEL := WHR-G301N
|
||||||
|
BUFFALO_PRODUCT := WHR-G301N
|
||||||
IMAGE_SIZE := 3712k
|
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
|
SUPPORTED_DEVICES += whr-g301n
|
||||||
DEFAULT := n
|
DEFAULT := n
|
||||||
endef
|
endef
|
||||||
|
Loading…
x
Reference in New Issue
Block a user