From 563ece8a85dad24e8c3ce55af51938a4d37405f0 Mon Sep 17 00:00:00 2001 From: Martin Blumenstingl Date: Sat, 28 Nov 2020 12:04:00 +0100 Subject: 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 [drop duplicate TARGET_DEVICES, add EDIMAX_* to DEVICE_VARS, edit title] Signed-off-by: Adrian Schmutzler --- target/linux/ath79/image/generic.mk | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'target/linux/ath79/image') 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 -- cgit v1.2.3