From 50958bcdac6775be5d0c36bb867bbac7a7eb2e49 Mon Sep 17 00:00:00 2001 From: Kory Maincent Date: Wed, 1 Oct 2025 14:58:23 +0000 Subject: [PATCH] linux: Add support for custom license files The Linux 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 --- linux/Config.in | 8 ++++++++ linux/linux.mk | 8 ++------ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/linux/Config.in b/linux/Config.in index 0ce6035e41..ac5e6298aa 100644 --- a/linux/Config.in +++ b/linux/Config.in @@ -150,6 +150,14 @@ config BR2_LINUX_KERNEL_VERSION default BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION \ if BR2_LINUX_KERNEL_CUSTOM_GIT || BR2_LINUX_KERNEL_CUSTOM_HG || BR2_LINUX_KERNEL_CUSTOM_SVN +config BR2_LINUX_KERNEL_LICENSE_FILES + string "Kernel license files" if BR2_LINUX_KERNEL_CUSTOM_GIT || BR2_LINUX_KERNEL_CUSTOM_HG || \ + BR2_LINUX_KERNEL_CUSTOM_SVN || BR2_LINUX_KERNEL_CUSTOM_TARBALL + default "COPYING LICENSES/preferred/GPL-2.0 LICENSES/exceptions/Linux-syscall-note" + help + A space-separated list of license files related to the Linux + kernel package. + # # Patch selection # diff --git a/linux/linux.mk b/linux/linux.mk index 0520394931..c61089bfe0 100644 --- a/linux/linux.mk +++ b/linux/linux.mk @@ -6,12 +6,8 @@ LINUX_VERSION = $(call qstrip,$(BR2_LINUX_KERNEL_VERSION)) LINUX_LICENSE = GPL-2.0 -ifeq ($(BR2_LINUX_KERNEL_LATEST_VERSION),y) -LINUX_LICENSE_FILES = \ - COPYING \ - LICENSES/preferred/GPL-2.0 \ - LICENSES/exceptions/Linux-syscall-note -endif +LINUX_LICENSE_FILES = $(call qstrip,$(BR2_LINUX_KERNEL_LICENSE_FILES)) + LINUX_CPE_ID_VENDOR = linux LINUX_CPE_ID_PRODUCT = linux_kernel LINUX_CPE_ID_PREFIX = cpe:2.3:o