From 0184df5bb9074f3dfc12a02e760acdf36a9f7603 Mon Sep 17 00:00:00 2001 From: Kory Maincent Date: Wed, 1 Oct 2025 14:58:28 +0000 Subject: [PATCH] arm-trusted-firmware: Add support for custom license files The ATF package was not providing any license file when a custom Linux version was selected. Fix this by adding a Kconfig option to specify the license file, with a default value set to the commonly used license paths. Signed-off-by: Kory Maincent [Arnout: use a single Kconfig option with conditional prompt] Signed-off-by: Arnout Vandecappelle (cherry picked from commit 77670c33d24b7766bf3d7a090510e2863180d286) Signed-off-by: Thomas Perale --- boot/arm-trusted-firmware/Config.in | 8 ++++++++ boot/arm-trusted-firmware/arm-trusted-firmware.mk | 9 +++------ 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/boot/arm-trusted-firmware/Config.in b/boot/arm-trusted-firmware/Config.in index 72684e5974..5eee2362ea 100644 --- a/boot/arm-trusted-firmware/Config.in +++ b/boot/arm-trusted-firmware/Config.in @@ -80,6 +80,14 @@ config BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_VERSION endif +config BR2_TARGET_ARM_TRUSTED_FIRMWARE_LICENSE_FILES + string "ATF license files" if BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_GIT || \ + BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_TARBALL + default "docs/license.rst" + help + A space-separated list of license files related to the ATF + package. + config BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM string "ATF platform" help diff --git a/boot/arm-trusted-firmware/arm-trusted-firmware.mk b/boot/arm-trusted-firmware/arm-trusted-firmware.mk index f5b1e5030e..bb113741d6 100644 --- a/boot/arm-trusted-firmware/arm-trusted-firmware.mk +++ b/boot/arm-trusted-firmware/arm-trusted-firmware.mk @@ -18,13 +18,10 @@ else # Handle stable official ATF versions ARM_TRUSTED_FIRMWARE_SITE = https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git ARM_TRUSTED_FIRMWARE_SITE_METHOD = git -# The licensing of custom or from-git versions is unknown. -# This is valid only for the latest (i.e. known) version. -ifeq ($(BR2_TARGET_ARM_TRUSTED_FIRMWARE_LATEST_VERSION)$(BR2_TARGET_ARM_TRUSTED_FIRMWARE_LATEST_LTS_2_10_VERSION)$(BR2_TARGET_ARM_TRUSTED_FIRMWARE_LATEST_LTS_2_8_VERSION)$(BR2_TARGET_ARM_TRUSTED_FIRMWARE_LATEST_LTS_2_12_VERSION),y) +endif + ARM_TRUSTED_FIRMWARE_LICENSE = BSD-3-Clause -ARM_TRUSTED_FIRMWARE_LICENSE_FILES = docs/license.rst -endif -endif +ARM_TRUSTED_FIRMWARE_LICENSE_FILES = $(call qstrip,$(BR2_TARGET_ARM_TRUSTED_FIRMWARE_LICENSE_FILES)) ifeq ($(BR2_TARGET_ARM_TRUSTED_FIRMWARE):$(BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION)$(BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_TARBALL)$(BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_GIT),y:y) BR_NO_CHECK_HASH_FOR += $(ARM_TRUSTED_FIRMWARE_SOURCE)