barebox: Add support for custom license files

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@bootlin.com>
[Arnout: use a single Kconfig option with conditional prompt]
Signed-off-by: Arnout Vandecappelle <arnout@rnout.be>
This commit is contained in:
Kory Maincent
2025-10-01 14:58:27 +00:00
committed by Arnout Vandecappelle
parent 399cc39621
commit 76dee8aadc
2 changed files with 9 additions and 3 deletions

View File

@@ -45,6 +45,14 @@ 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_LICENSE_FILES
string "Barebox license files" if BR2_TARGET_BAREBOX_CUSTOM_TARBALL || \
BR2_TARGET_BAREBOX_CUSTOM_GIT
default "COPYING"
help
A space-separated list of license files related to the Barebox
package.
config BR2_TARGET_BAREBOX_CUSTOM_PATCH_DIR
string "custom patch dir"
help

View File

@@ -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