From 0108c0f43b218a7aa73b09006552dc6c2a60f87a Mon Sep 17 00:00:00 2001 From: Kory Maincent Date: Wed, 1 Oct 2025 14:58:27 +0000 Subject: [PATCH] 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 [Arnout: use a single Kconfig option with conditional prompt] Signed-off-by: Arnout Vandecappelle (cherry picked from commit 76dee8aadc31dfa3fea03d18b3b0c2ac1c08c5d6) Signed-off-by: Thomas Perale --- boot/barebox/Config.in | 8 ++++++++ boot/barebox/barebox.mk | 4 +--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/boot/barebox/Config.in b/boot/barebox/Config.in index c3cb0b3332..6ee97ffe02 100644 --- a/boot/barebox/Config.in +++ b/boot/barebox/Config.in @@ -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 diff --git a/boot/barebox/barebox.mk b/boot/barebox/barebox.mk index 929ed48ada..cbd6f9313c 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