[Buildroot] [PATCH v2 3/7] optee-os: Add support for custom license files
Kory Maincent
kory.maincent at bootlin.com
Wed Oct 1 14:58:25 UTC 2025
The OP-TEE OS 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 <kory.maincent at bootlin.com>
---
Change in v2:
- Do not show license option if it is not a custom repo version
---
boot/optee-os/Config.in | 16 ++++++++++++++++
boot/optee-os/optee-os.mk | 4 +---
2 files changed, 17 insertions(+), 3 deletions(-)
diff --git a/boot/optee-os/Config.in b/boot/optee-os/Config.in
index e737d2a0acd7ecc335a9b00cf9b1daa98d866e92..22e63c0265595e272c49ea368026ebc13e8b8838 100644
--- a/boot/optee-os/Config.in
+++ b/boot/optee-os/Config.in
@@ -86,6 +86,22 @@ config BR2_TARGET_OPTEE_OS_VERSION
default BR2_TARGET_OPTEE_OS_CUSTOM_REPO_VERSION \
if BR2_TARGET_OPTEE_OS_CUSTOM_GIT
+config BR2_TARGET_OPTEE_OS_CUSTOM_LICENSE_FILES
+ string "OP-TEE OS license files"
+ default "LICENSE"
+ depends on BR2_TARGET_OPTEE_OS_CUSTOM_GIT || \
+ BR2_TARGET_OPTEE_OS_CUSTOM_TARBALL
+ help
+ A space-separated list of license files related to the
+ OPTEE-OS package.
+
+config BR2_TARGET_OPTEE_OS_LICENSE_FILES
+ string
+ default BR2_TARGET_OPTEE_OS_CUSTOM_LICENSE_FILES \
+ if BR2_TARGET_OPTEE_OS_CUSTOM_GIT || \
+ BR2_TARGET_OPTEE_OS_CUSTOM_TARBALL
+ default "LICENSE"
+
config BR2_TARGET_OPTEE_OS_NEEDS_DTC
bool "OP-TEE OS needs dtc"
select BR2_PACKAGE_HOST_DTC
diff --git a/boot/optee-os/optee-os.mk b/boot/optee-os/optee-os.mk
index 25c917e2fce7af850521111681dd8ecd66efe554..16395974079298a8d33da3fbcc06371c2ca051b4 100644
--- a/boot/optee-os/optee-os.mk
+++ b/boot/optee-os/optee-os.mk
@@ -6,9 +6,7 @@
OPTEE_OS_VERSION = $(call qstrip,$(BR2_TARGET_OPTEE_OS_VERSION))
OPTEE_OS_LICENSE = BSD-2-Clause
-ifeq ($(BR2_TARGET_OPTEE_OS_LATEST),y)
-OPTEE_OS_LICENSE_FILES = LICENSE
-endif
+OPTEE_OS_LICENSE_FILES = $(call qstrip,$(BR2_TARGET_OPTEE_OS_LICENSE_FILES))
OPTEE_OS_CPE_ID_PREFIX = cpe:2.3:o
OPTEE_OS_CPE_ID_VENDOR = linaro
--
2.43.0
More information about the buildroot
mailing list