diff mbox series

linux: add option to include git submodules

Message ID be7460b2010a5732e757b9cbc60b94d28b580273.1712568188.git.baruch@tkos.co.il
State New
Headers show
Series linux: add option to include git submodules | expand

Commit Message

Baruch Siach April 8, 2024, 9:23 a.m. UTC
Some kernel users find it useful to store submodules in the kernel
source tree for cross source trees definitions. Add option to download
these submodules.

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
---
 linux/Config.in | 6 ++++++
 linux/linux.mk  | 3 +++
 2 files changed, 9 insertions(+)
diff mbox series

Patch

diff --git a/linux/Config.in b/linux/Config.in
index d520dc379f0e..3f5b088a193f 100644
--- a/linux/Config.in
+++ b/linux/Config.in
@@ -126,6 +126,12 @@  config BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION
 
 endif
 
+config BR2_LINUX_KERNEL_CUSTOM_REPO_GIT_SUBMODULES
+	bool "Download also git submodules"
+	depends on BR2_LINUX_KERNEL_CUSTOM_GIT
+	help
+	  Include git submodules in the kernel source tree.
+
 config BR2_LINUX_KERNEL_VERSION
 	string
 	default "6.6.22" if BR2_LINUX_KERNEL_LATEST_VERSION
diff --git a/linux/linux.mk b/linux/linux.mk
index 4e12b36c1fd4..16d9f1947089 100644
--- a/linux/linux.mk
+++ b/linux/linux.mk
@@ -24,6 +24,9 @@  LINUX_SOURCE = $(notdir $(LINUX_TARBALL))
 else ifeq ($(BR2_LINUX_KERNEL_CUSTOM_GIT),y)
 LINUX_SITE = $(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_REPO_URL))
 LINUX_SITE_METHOD = git
+ifeq ($(BR2_LINUX_KERNEL_CUSTOM_REPO_GIT_SUBMODULES),y)
+LINUX_GIT_SUBMODULES = YES
+endif
 else ifeq ($(BR2_LINUX_KERNEL_CUSTOM_HG),y)
 LINUX_SITE = $(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_REPO_URL))
 LINUX_SITE_METHOD = hg