Skip to contentSkip to conversation

Revert "Added local directory as source of kernel code"

PATCH New Yann E. MORIN 2 participants 2 messages Aug 27, 2016 – Aug 28, 2016

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 Revert "Added local directory as source of kernel code"

This reverts commit 73da2ff6f718f2889e3c5024d899f8d58f502863.

The reason for adding support for a local location was to be able to do development on the Linux kernel source tree on a local directory rather than have to clone it for every build.

We already have a mechanism for that, it's called override-srcdir. It's been available since September 2011, more than a year before this patch was committed.

Otherwise, we're going to be adding support for local sources in other packages. First was U-Boot as submitted by Adam. But what next? We can't have such support for all packages, especially since override-srcdir does the job.

Besides, using a local source tree makes the build non-reproducible, so we don't really want to have this in a .config (or defconfig).

We only handle the boolean option in legacy, as there is nothing we can do with the directory path.

Cc Rafal Fabich <[email protected]>
Cc Peter Korsgaard <[email protected]>
Cc Arnout Vandecappelle <[email protected]>
Cc Thomas Petazzoni <[email protected]>
Cc Adam Duskett <[email protected]>

---
Changes v1 -> v2:
- add legacy handling (Thomas)
- don't change the local tarball version handling in linux.mk (Thomas)

---
Rafal, if your use-case was just to use a local tree for development purposes, please see to using the override-srcdir mechanism instead. If you had another use-case that requires using a local source tree, could you explain it, please? Thanks!

---
 Config.in.legacy | 12 ++++++++++++
 linux/Config.in  | 13 -------------
 linux/linux.mk   |  3 ---
 3 files changed, 12 insertions(+), 16 deletions(-)
Config.in.legacy +12 -0
index 746b80a..dafaf40 100644
@@ -143,6 +143,18 @@ comment "----------------------------------------------------"
 endif
 
 ###############################################################################
+comment "Legacy options removed in 2016.11"
+
+config BR2_LINUX_KERNEL_CUSTOM_LOCAL
+	bool "Linux kernel local directory option removed"
+	help
+	  The option to select a local ditrectory as the source of the Linux
+	  kernel has been removed. It hurts reproducibility of builds.
+
+	  In case you were using this option during development of your
+	  Linux kernel use the override mechanism instead.
+
+###############################################################################
 comment "Legacy options removed in 2016.08"
 
 config BR2_PACKAGE_SYSTEMD_COMPAT
linux/Config.in +0 -13
index c7bc4d8..43d63c0 100644
@@ -68,12 +68,6 @@ config BR2_LINUX_KERNEL_CUSTOM_SVN
 	  This option allows Buildroot to get the Linux kernel source
 	  code from a Subversion repository.
 
-config BR2_LINUX_KERNEL_CUSTOM_LOCAL
-	bool "Local directory"
-	help
-	  This option allows Buildroot to get the Linux kernel source
-	  code from a local directory.
-
 endchoice
 
 config BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE
@@ -101,12 +95,6 @@ config BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION
 
 endif
 
-config BR2_LINUX_KERNEL_CUSTOM_LOCAL_PATH
-	string "Path to the local directory"
-	depends on BR2_LINUX_KERNEL_CUSTOM_LOCAL
-	help
-	  Path to the local directory with the Linux kernel source code.
-
 config BR2_LINUX_KERNEL_VERSION
 	string
 	default "4.7.2" if BR2_LINUX_KERNEL_LATEST_VERSION
@@ -115,7 +103,6 @@ config BR2_LINUX_KERNEL_VERSION
 	default "custom" if BR2_LINUX_KERNEL_CUSTOM_TARBALL
 	default BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION \
 		if BR2_LINUX_KERNEL_CUSTOM_GIT || BR2_LINUX_KERNEL_CUSTOM_HG || BR2_LINUX_KERNEL_CUSTOM_SVN
-	default "custom" if BR2_LINUX_KERNEL_CUSTOM_LOCAL
 
 #
 # Patch selection
linux/linux.mk +0 -3
index fb844ef..6e41a92 100644
@@ -21,9 +21,6 @@ LINUX_TARBALL = $(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION))
 LINUX_SITE = $(patsubst %/,%,$(dir $(LINUX_TARBALL)))
 LINUX_SOURCE = $(notdir $(LINUX_TARBALL))
 BR_NO_CHECK_HASH_FOR += $(LINUX_SOURCE)
-else ifeq ($(BR2_LINUX_KERNEL_CUSTOM_LOCAL),y)
-LINUX_SITE = $(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_LOCAL_PATH))
-LINUX_SITE_METHOD = local
 else ifeq ($(BR2_LINUX_KERNEL_CUSTOM_GIT),y)
 LINUX_SITE = $(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_REPO_URL))
 LINUX_SITE_METHOD = git
Signature · 1 line
2.7.4
#1 lore raw

PATCH v2 1/1 Revert "Added local directory as source of kernel code"

Quoted 51 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Yann" == Yann E MORIN <[email protected]> writes:

This reverts commit 73da2ff6f718f2889e3c5024d899f8d58f502863. The reason for adding support for a local location was to be able to do development on the Linux kernel source tree on a local directory rather than have to clone it for every build.

We already have a mechanism for that, it's called override-srcdir. It's been available since September 2011, more than a year before this patch was committed.

Otherwise, we're going to be adding support for local sources in other packages. First was U-Boot as submitted by Adam. But what next? We can't have such support for all packages, especially since override-srcdir does the job.

Besides, using a local source tree makes the build non-reproducible, so we don't really want to have this in a .config (or defconfig).

We only handle the boolean option in legacy, as there is nothing we can do with the directory path.

Cc Rafal Fabich <[email protected]>
Cc Peter Korsgaard <[email protected]>
Cc Arnout Vandecappelle <[email protected]>
Cc Thomas Petazzoni <[email protected]>
Cc Adam Duskett <[email protected]>

---
Changes v1 -> v2:
- add legacy handling (Thomas)
- don't change the local tarball version handling in linux.mk (Thomas)

---
Rafal, if your use-case was just to use a local tree for development purposes, please see to using the override-srcdir mechanism instead. If you had another use-case that requires using a local source tree, could you explain it, please? Thanks!

---
 Config.in.legacy | 12 ++++++++++++
 linux/Config.in  | 13 -------------
 linux/linux.mk   |  3 ---
 3 files changed, 12 insertions(+), 16 deletions(-)
Config.in.legacy +0 -0
index 746b80a..dafaf40 100644

Config.in.legacy comment "----------------------------------------------------" · line 151

Quoted 9 lines
Config.in.legacy +6 -0
@@ -143,6 +143,18 @@ comment "----------------------------------------------------"
 endif
 
 ###############################################################################
+comment "Legacy options removed in 2016.11"
+
+config BR2_LINUX_KERNEL_CUSTOM_LOCAL
+	bool "Linux kernel local directory option removed"
+	help
+	  The option to select a local ditrectory as the source of the Linux

s/ditrectory/directory/

Committed to next with that fixed, thanks.

Signature · 2 lines
Venlig hilsen,
Peter Korsgaard