Skip to contentSkip to conversation

opensbi: Add support for custom license files

Buildroot Arnout Vandecappelle via buildroot 1 participant 1 message Feb 2

lore
Share & tools
lore
#0 lore raw

commit: https://git.buildroot.net/buildroot/commit/?id=399cc39621673c6b81c15c8d768ed1081648364f
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master

The OpenSBI 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.

[Arnout: use a single Kconfig option with conditional prompt]
---
 boot/opensbi/Config.in  | 8 ++++++++
 boot/opensbi/opensbi.mk | 4 +---
 2 files changed, 9 insertions(+), 3 deletions(-)
boot/opensbi/Config.in +8 -0
index 9c6047df5e..986e380b48 100644
@@ -64,6 +64,14 @@ config BR2_TARGET_OPENSBI_VERSION
 	default BR2_TARGET_OPENSBI_CUSTOM_REPO_VERSION \
 		if BR2_TARGET_OPENSBI_CUSTOM_GIT
 
+config BR2_TARGET_OPENSBI_LICENSE_FILES
+	string "OpenSBI license files" if BR2_TARGET_OPENSBI_CUSTOM_GIT || \
+		   BR2_TARGET_OPENSBI_CUSTOM_TARBALL
+	default "COPYING.BSD"
+	help
+	  A space-separated list of license files related to the OpenSBI
+	  package.
+
 config BR2_TARGET_OPENSBI_PLAT
 	string "OpenSBI Platform"
 	default ""
boot/opensbi/opensbi.mk +1 -3
index 0142769a12..f9f550176f 100644
@@ -20,9 +20,7 @@ OPENSBI_SITE = $(call github,riscv-software-src,opensbi,v$(OPENSBI_VERSION))
 endif
 
 OPENSBI_LICENSE = BSD-2-Clause
-ifeq ($(BR2_TARGET_OPENSBI_LATEST_VERSION),y)
-OPENSBI_LICENSE_FILES = COPYING.BSD
-endif
+OPENSBI_LICENSE_FILES = $(call qstrip,$(BR2_TARGET_OPENSBI_LICENSE_FILES))
 OPENSBI_INSTALL_TARGET = NO
 OPENSBI_INSTALL_STAGING = YES
 

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot