Skip to contentSkip to conversation

linux: make custom versions and patches exclusive

PATCH Superseded Vivien Didelot 3 participants 3 messages Jan 6, 2015 – Jan 7, 2015

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 linux: make custom versions and patches exclusive

When using a custom kernel (custom tarball, repository or local tree), we're using the OVERRIDE_SRCDIR internally, which means we do not apply patches. Since this is the expected behavior, show the LINUX_KERNEL_PATCH option only when using a vanilla kernel.

---
 linux/Config.in | 3 +++
 1 file changed, 3 insertions(+)
linux/Config.in +3 -0
index bf30426..3845758 100644
@@ -119,6 +119,9 @@ config BR2_LINUX_KERNEL_VERSION
 
 config BR2_LINUX_KERNEL_PATCH
 	string "Custom kernel patches"
+	depends on BR2_LINUX_KERNEL_LATEST_VERSION || \\
+		  BR2_LINUX_KERNEL_SAME_AS_HEADERS || \\
+		  BR2_LINUX_KERNEL_CUSTOM_VERSION
 	help
 	  A space-separated list of patches to apply to the
 	  kernel. Each patch can be described as an URL, a local file
Signature · 1 line
2.2.1
#1 lore raw

PATCH 1/1 linux: make custom versions and patches exclusive

Vivien, All,

On 2015-01-06 17:16 -0500, Vivien Didelot spake thusly:

Quoted 16 lines

When using a custom kernel (custom tarball, repository or local tree), we're using the OVERRIDE_SRCDIR internally, which means we do not apply patches. Since this is the expected behavior, show the LINUX_KERNEL_PATCH option only when using a vanilla kernel.

---
 linux/Config.in | 3 +++
 1 file changed, 3 insertions(+)
linux/Config.in +0 -0
index bf30426..3845758 100644

linux/Config.in config BR2_LINUX_KERNEL_VERSION · line 123

Quoted 5 lines
linux/Config.in +2 -0
@@ -119,6 +119,9 @@ config BR2_LINUX_KERNEL_VERSION
 
 config BR2_LINUX_KERNEL_PATCH
 	string "Custom kernel patches"
+	depends on BR2_LINUX_KERNEL_LATEST_VERSION || \\
+		  BR2_LINUX_KERNEL_SAME_AS_HEADERS || \\

This should be a single trailling backslash on both lines.

Regards,
Yann E. MORIN.

Quoted 7 lines
linux/Config.in +1 -0
+		  BR2_LINUX_KERNEL_CUSTOM_VERSION
 	help
 	  A space-separated list of patches to apply to the
 	  kernel. Each patch can be described as an URL, a local file
Signature · 1 line
2.2.1
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#2 lore raw

PATCH 1/1 linux: make custom versions and patches exclusive

In reply to Vivien Didelot

Dear Vivien Didelot,

Quoted 16 lines · Vivien Didelot

When using a custom kernel (custom tarball, repository or local tree), we're using the OVERRIDE_SRCDIR internally, which means we do not apply patches. Since this is the expected behavior, show the LINUX_KERNEL_PATCH option only when using a vanilla kernel.

---
 linux/Config.in | 3 +++
 1 file changed, 3 insertions(+)
linux/Config.in +0 -0
index bf30426..3845758 100644

linux/Config.in config BR2_LINUX_KERNEL_VERSION · line 127

Quoted 9 lines
linux/Config.in +3 -0
@@ -119,6 +119,9 @@ config BR2_LINUX_KERNEL_VERSION
 
 config BR2_LINUX_KERNEL_PATCH
 	string "Custom kernel patches"
+	depends on BR2_LINUX_KERNEL_LATEST_VERSION || \\
+		  BR2_LINUX_KERNEL_SAME_AS_HEADERS || \\
+		  BR2_LINUX_KERNEL_CUSTOM_VERSION
 	help
 	  A space-separated list of patches to apply to the
 	  kernel. Each patch can be described as an URL, a local file

While I agree that we cannot apply patches when using BR2_LINUX_KERNEL_CUSTOM_LOCAL, I think there is no reason to not support patches when using a custom Git or Mercurial repository. It works currently (contrary to the local case, which doesn't work), and I don't see a reason to prevent these use cases. To me, they are very
valid: I can be using a custom vendor-provided kernel tree, and still need to have some local patches to adapt the kernel to my board. Of course, I could put those patches in my own kernel Git repository, but if I don't have many of them, it might be more convenient to just have those few patches in the Buildroot tree.

So, I think the patch should be changed to use instead:

depends on !BR2_LINUX_KERNEL_CUSTOM_LOCAL

I've marked the patch as Changes Requested in patchwork.

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com