Skip to contentSkip to conversation

uboot: Add support for custom license files

Buildroot Thomas Perale via buildroot 1 participant 1 message Feb 13

lore
Share & tools
lore
#0 lore raw

commit: https://gitlab.com/buildroot.org/buildroot/-/commit/d9d7fa67d7d784d3d1bc31a625794ad3beaa42c0
branch: https://gitlab.com/buildroot.org/buildroot/-/tree/2025.02.x

The U-Boot 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]
(cherry picked from commit a4d5b20462602aa89a7e6a5587cb187f71e31d5e)
---
 boot/uboot/Config.in | 8 ++++++++
 boot/uboot/uboot.mk  | 4 +---
 2 files changed, 9 insertions(+), 3 deletions(-)
boot/uboot/Config.in +8 -0
index 10098ed227..e96753259e 100644
@@ -92,6 +92,14 @@ config BR2_TARGET_UBOOT_VERSION
 	default BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION \
 		if BR2_TARGET_UBOOT_CUSTOM_GIT || BR2_TARGET_UBOOT_CUSTOM_HG || BR2_TARGET_UBOOT_CUSTOM_SVN
 
+config BR2_TARGET_UBOOT_LICENSE_FILES
+	string "U-boot license files" if BR2_TARGET_UBOOT_CUSTOM_GIT || BR2_TARGET_UBOOT_CUSTOM_HG || \
+		BR2_TARGET_UBOOT_CUSTOM_SVN || BR2_TARGET_UBOOT_CUSTOM_TARBALL
+	default "Licenses/gpl-2.0.txt"
+	help
+	  A space-separated list of license files related to U-Boot
+	  package.
+
 config BR2_TARGET_UBOOT_PATCH
 	string "Custom U-Boot patches"
 	default BR2_TARGET_UBOOT_CUSTOM_PATCH_DIR if BR2_TARGET_UBOOT_CUSTOM_PATCH_DIR != ""  # legacy
boot/uboot/uboot.mk +1 -3
index 0d77340f85..443eb594b2 100644
@@ -8,9 +8,7 @@ UBOOT_VERSION = $(call qstrip,$(BR2_TARGET_UBOOT_VERSION))
 UBOOT_BOARD_NAME = $(call qstrip,$(BR2_TARGET_UBOOT_BOARDNAME))
 
 UBOOT_LICENSE = GPL-2.0+
-ifeq ($(BR2_TARGET_UBOOT_LATEST_VERSION),y)
-UBOOT_LICENSE_FILES = Licenses/gpl-2.0.txt
-endif
+UBOOT_LICENSE_FILES = $(call qstrip,$(BR2_TARGET_UBOOT_LICENSE_FILES))
 UBOOT_CPE_ID_VENDOR = denx
 UBOOT_CPE_ID_PRODUCT = u-boot
 

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