From 198eae28623e9e422fe3b52ac53632fab980a561 Mon Sep 17 00:00:00 2001 From: Adrian Schmutzler Date: Sat, 20 Jul 2019 11:59:07 +0200 Subject: [PATCH] ath79: create common definition tplink-loader-okli The loader-okli is shared by several TP-Link CPExxx devices, so give it its own definition to prevent too much code duplication. Signed-off-by: Adrian Schmutzler --- target/linux/ath79/image/common-tp-link.mk | 9 +++++++++ target/linux/ath79/image/generic-tp-link.mk | 21 +++------------------ 2 files changed, 12 insertions(+), 18 deletions(-) diff --git a/target/linux/ath79/image/common-tp-link.mk b/target/linux/ath79/image/common-tp-link.mk index da4616482a..d1d4a8940d 100644 --- a/target/linux/ath79/image/common-tp-link.mk +++ b/target/linux/ath79/image/common-tp-link.mk @@ -110,3 +110,12 @@ define Device/tplink-safeloader-uimage $(Device/tplink-safeloader) KERNEL := kernel-bin | append-dtb | lzma | uImageArcher lzma endef + +define Device/tplink-loader-okli + $(Device/tplink-safeloader) + LOADER_TYPE := elf + LOADER_FLASH_OFFS := 0x43000 + COMPILE := loader-$(1).elf + COMPILE/loader-$(1).elf := loader-okli-compile + KERNEL := kernel-bin | append-dtb | lzma | uImage lzma -M 0x4f4b4c49 | loader-okli $(1) 12288 +endef diff --git a/target/linux/ath79/image/generic-tp-link.mk b/target/linux/ath79/image/generic-tp-link.mk index ba9f06adf6..006831ff52 100644 --- a/target/linux/ath79/image/generic-tp-link.mk +++ b/target/linux/ath79/image/generic-tp-link.mk @@ -184,51 +184,36 @@ endef TARGET_DEVICES += tplink_cpe210-v3 define Device/tplink_cpe510-v2 - $(Device/tplink-safeloader) + $(Device/tplink-loader-okli) ATH_SOC := ar9344 IMAGE_SIZE := 7680k DEVICE_MODEL := CPE510 DEVICE_VARIANT := v2 DEVICE_PACKAGES := rssileds TPLINK_BOARD_ID := CPE510V2 - LOADER_TYPE := elf - LOADER_FLASH_OFFS := 0x43000 - COMPILE := loader-$(1).elf - COMPILE/loader-$(1).elf := loader-okli-compile - KERNEL := kernel-bin | append-dtb | lzma | uImage lzma -M 0x4f4b4c49 | loader-okli $(1) 12288 SUPPORTED_DEVICES += cpe510-v2 endef TARGET_DEVICES += tplink_cpe510-v2 define Device/tplink_cpe510-v3 - $(Device/tplink-safeloader) + $(Device/tplink-loader-okli) ATH_SOC := ar9344 IMAGE_SIZE := 7680k DEVICE_MODEL := CPE510 DEVICE_VARIANT := v3 DEVICE_PACKAGES := rssileds TPLINK_BOARD_ID := CPE510V3 - LOADER_TYPE := elf - LOADER_FLASH_OFFS := 0x43000 - COMPILE := loader-$(1).elf - COMPILE/loader-$(1).elf := loader-okli-compile - KERNEL := kernel-bin | append-dtb | lzma | uImage lzma -M 0x4f4b4c49 | loader-okli $(1) 12288 SUPPORTED_DEVICES += cpe510-v3 endef TARGET_DEVICES += tplink_cpe510-v3 define Device/tplink_cpe610-v1 - $(Device/tplink-safeloader) + $(Device/tplink-loader-okli) ATH_SOC := ar9344 IMAGE_SIZE := 7680k DEVICE_MODEL := CPE610 DEVICE_VARIANT := v1 TPLINK_BOARD_ID := CPE610V1 - LOADER_TYPE := elf - LOADER_FLASH_OFFS := 0x43000 - COMPILE := loader-$(1).elf - COMPILE/loader-$(1).elf := loader-okli-compile - KERNEL := kernel-bin | append-dtb | lzma | uImage lzma -M 0x4f4b4c49 | loader-okli $(1) 12288 endef TARGET_DEVICES += tplink_cpe610-v1