From c68105c3b4f616931444174ff6d893c8fbaf9465 Mon Sep 17 00:00:00 2001 From: Adrian Schmutzler Date: Sun, 13 Sep 2020 14:48:26 +0200 Subject: 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 --- target/linux/ath79/image/common-buffalo.mk | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'target/linux/ath79/image/common-buffalo.mk') diff --git a/target/linux/ath79/image/common-buffalo.mk b/target/linux/ath79/image/common-buffalo.mk index d62b7eea94..31936b8234 100644 --- a/target/linux/ath79/image/common-buffalo.mk +++ b/target/linux/ath79/image/common-buffalo.mk @@ -1,3 +1,5 @@ +DEVICE_VARS += BUFFALO_PRODUCT BUFFALO_HWVER + define Build/buffalo-tag $(eval product=$(word 1,$(1))) $(eval hwver=$(word 2,$(1))) @@ -17,3 +19,16 @@ define Build/buffalo-tftp-header ) > $@.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 -- cgit v1.2.3