aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ath79/image/generic.mk
diff options
context:
space:
mode:
authorMartin Blumenstingl <martin.blumenstingl@googlemail.com>2020-11-28 12:04:00 +0100
committerAdrian Schmutzler <freifunk@adrianschmutzler.de>2020-12-14 16:57:21 +0100
commit563ece8a85dad24e8c3ce55af51938a4d37405f0 (patch)
tree16a3160704bd730e6e7aaae75b7656f26eb8c4b4 /target/linux/ath79/image/generic.mk
parent33ad0976063330321163ac9bf1fcc3cd81ae31e9 (diff)
downloadupstream-563ece8a85dad24e8c3ce55af51938a4d37405f0.tar.gz
upstream-563ece8a85dad24e8c3ce55af51938a4d37405f0.tar.bz2
upstream-563ece8a85dad24e8c3ce55af51938a4d37405f0.zip
ath79: create shared DTSI/definition for Belkin F9J1108/F9K1115 v2
Belkin F9J1108 v2 and F9K1115 v2 are (seemingly) identical hardware with different model numbers. Extract all non-device specific code to a common .dtsi so it can be re-used when adding support for the F9K1115 v2. Similar to the .dtsi most of the image building recipe code can be re-used. Move everything except the device model, edimax header magic and edimax header model into a shared build recipe. Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> [drop duplicate TARGET_DEVICES, add EDIMAX_* to DEVICE_VARS, edit title] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Diffstat (limited to 'target/linux/ath79/image/generic.mk')
-rw-r--r--target/linux/ath79/image/generic.mk14
1 files changed, 11 insertions, 3 deletions
diff --git a/target/linux/ath79/image/generic.mk b/target/linux/ath79/image/generic.mk
index d5fbd89c26..02fdf8ecad 100644
--- a/target/linux/ath79/image/generic.mk
+++ b/target/linux/ath79/image/generic.mk
@@ -7,6 +7,7 @@ DEVICE_VARS += ADDPATTERN_ID ADDPATTERN_VERSION
DEVICE_VARS += SEAMA_SIGNATURE SEAMA_MTDBLOCK
DEVICE_VARS += KERNEL_INITRAMFS_PREFIX
DEVICE_VARS += DAP_SIGNATURE ENGENIUS_IMGNAME
+DEVICE_VARS += EDIMAX_HEADER_MAGIC EDIMAX_HEADER_MODEL
define Build/add-elecom-factory-initramfs
$(eval edimax_model=$(word 1,$(1)))
@@ -381,10 +382,9 @@ define Device/avm_fritzdvbc
endef
TARGET_DEVICES += avm_fritzdvbc
-define Device/belkin_f9j1108-v2
+define Device/belkin_f9x-v2
SOC := qca9558
DEVICE_VENDOR := Belkin
- DEVICE_MODEL := F9J1108 v2 (AC1750 DB Wi-Fi)
IMAGE_SIZE := 14464k
DEVICE_PACKAGES += kmod-ath10k-ct ath10k-firmware-qca988x-ct kmod-usb2 \
kmod-usb3 kmod-usb-ledtrig-usbport
@@ -398,7 +398,15 @@ define Device/belkin_f9j1108-v2
IMAGES += factory.bin
IMAGE/factory.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | \
append-rootfs | pad-rootfs | check-size | \
- edimax-headers F9J1108v1 BR-6679BAC | pad-to $$$$(BLOCKSIZE)
+ edimax-headers $$$$(EDIMAX_HEADER_MAGIC) $$$$(EDIMAX_HEADER_MODEL) | \
+ pad-to $$$$(BLOCKSIZE)
+endef
+
+define Device/belkin_f9j1108-v2
+ $(Device/belkin_f9x-v2)
+ DEVICE_MODEL := F9J1108 v2 (AC1750 DB Wi-Fi)
+ EDIMAX_HEADER_MAGIC := F9J1108v1
+ EDIMAX_HEADER_MODEL := BR-6679BAC
endef
TARGET_DEVICES += belkin_f9j1108-v2