[Buildroot] [PATCH v2 5/7] barebox: Add support for custom license files
Kory Maincent
kory.maincent at bootlin.com
Wed Oct 1 14:58:27 UTC 2025
The Barebox 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
---
boot/barebox/Config.in | 16 ++++++++++++++++
boot/barebox/barebox.mk | 4 +---
2 files changed, 17 insertions(+), 3 deletions(-)
diff --git a/boot/barebox/Config.in b/boot/barebox/Config.in
index c3cb0b33325328415349408f5be01a4a32dfcf12..469497aff6833ebdfd61b95cc938c9380a0374fb 100644
--- a/boot/barebox/Config.in
+++ b/boot/barebox/Config.in
@@ -45,6 +45,22 @@ config BR2_TARGET_BAREBOX_VERSION
default "custom" if BR2_TARGET_BAREBOX_CUSTOM_TARBALL
default BR2_TARGET_BAREBOX_CUSTOM_GIT_VERSION if BR2_TARGET_BAREBOX_CUSTOM_GIT
+config BR2_TARGET_BAREBOX_CUSTOM_LICENSE_FILES
+ string "Barebox license files"
+ default "COPYING"
+ depends on BR2_TARGET_BAREBOX_CUSTOM_TARBALL || \
+ BR2_TARGET_BAREBOX_CUSTOM_GIT
+ help
+ A space-separated list of license files related to the Barebox
+ package.
+
+config BR2_TARGET_BAREBOX_LICENSE_FILES
+ string
+ default BR2_TARGET_BAREBOX_CUSTOM_LICENSE_FILES \
+ if BR2_TARGET_BAREBOX_CUSTOM_TARBALL || \
+ BR2_TARGET_BAREBOX_CUSTOM_GIT
+ default "COPYING"
+
config BR2_TARGET_BAREBOX_CUSTOM_PATCH_DIR
string "custom patch dir"
help
diff --git a/boot/barebox/barebox.mk b/boot/barebox/barebox.mk
index 929ed48ada8321c7b42a615501fb90645556a37b..cbd6f9313c8012de809d4b0d82f3ffd5d39f680b 100644
--- a/boot/barebox/barebox.mk
+++ b/boot/barebox/barebox.mk
@@ -39,9 +39,7 @@ $(1)_DL_SUBDIR = barebox
$(1)_DEPENDENCIES = host-lzop
$(1)_LICENSE = GPL-2.0 with exceptions
-ifeq ($(BR2_TARGET_BAREBOX_LATEST_VERSION),y)
-$(1)_LICENSE_FILES = COPYING
-endif
+$(1)_LICENSE_FILES = $$(call qstrip,$$(BR2_TARGET_BAREBOX_LICENSE_FILES))
ifeq ($(BR2_TARGET_BAREBOX_NEEDS_OPENSSL),y)
BAREBOX_DEPENDENCIES += host-openssl host-pkgconf
--
2.43.0
More information about the buildroot
mailing list