Skip to contentSkip to conversation

match headers with latest kernel source

PATCH New Vivien Didelot 5 participants 17 messages Apr 19, 2016 – Jul 1, 2016

lore
Share & tools
lore
#0 lore raw

cover match headers with latest kernel source

From the configuration menu, it is hard for a user to make the distinction between the two methods offered by Buildroot to fetch the kernel headers for the toolchain: either download an independent kernel source to use its headers, or get them from the configured Linux source that Buildroot is about to build.

It is also confusing to choose the latest kernel version known to Buildroot and its kernel headers, and still have to specify a custom headers series. This breaks the idea of maintaining an up-to-date board support since after a few kernel bumps, the "Custom kernel headers series" would need to be bumped too...

This patchset aims to document this distinction and avoid confusion before matching the headers series with kernel source when using the latest kernel.

Vivien Didelot (4):
linux: explicit latest kernel version
linux-headers: indent custom choices
linux-headers: rename _AS_KERNEL to _FROM_KERNEL
linux-headers: match headers for the latest kernel

 linux/Config.in                        |   2 +-
 package/linux-headers/Config.in.host   | 187 ++++++++++++++++++---------------
 package/linux-headers/linux-headers.mk |   8 +-
 3 files changed, 105 insertions(+), 92 deletions(-)
Signature · 1 line
2.8.0
#1 lore raw

PATCH 1/4 linux: explicit latest kernel version

When setting BR2_LINUX_KERNEL_LATEST_VERSION, it is hard for the user to know that this version is subject to change in the future.

Explicit this in the Kconfig entry text.

---
 linux/Config.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
linux/Config.in +1 -1
index 043b147..8600ea1 100644
@@ -27,7 +27,7 @@ choice
 	prompt "Kernel version"
 
 config BR2_LINUX_KERNEL_LATEST_VERSION
-	bool "4.5.1"
+	bool "Latest version (4.5.1)"
 
 config BR2_LINUX_KERNEL_CUSTOM_VERSION
 	bool "Custom version"
Signature · 1 line
2.8.0
#2 lore raw

PATCH 1/4 linux: explicit latest kernel version

Quoted 6 lines · Vivien Didelot

When setting BR2_LINUX_KERNEL_LATEST_VERSION, it is hard for the user to know that this version is subject to change in the future.

Explicit this in the Kconfig entry text.

Regards,
Arnout

Quoted 18 lines
---
  linux/Config.in | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
linux/Config.in +1 -1
index 043b147..8600ea1 100644
@@ -27,7 +27,7 @@ choice
  	prompt "Kernel version"
 
  config BR2_LINUX_KERNEL_LATEST_VERSION
-	bool "4.5.1"
+	bool "Latest version (4.5.1)"
 
  config BR2_LINUX_KERNEL_CUSTOM_VERSION
  	bool "Custom version"
Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
#3 lore raw

PATCH 1/4 linux: explicit latest kernel version

In reply to Vivien Didelot

Hello,

Quoted 9 lines · Vivien Didelot

When setting BR2_LINUX_KERNEL_LATEST_VERSION, it is hard for the user to know that this version is subject to change in the future.

Explicit this in the Kconfig entry text.

---
 linux/Config.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Applied to master, after adapting to recent updates to linux/Config.in. Thanks!

Thomas

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

PATCH 2/4 linux-headers: indent custom choices

In reply to Vivien Didelot

Fix the indentation of config entries in the "Custom kernel headers series" choice menu.

---
 package/linux-headers/Config.in.host | 160 +++++++++++++++++------------------
 1 file changed, 80 insertions(+), 80 deletions(-)
package/linux-headers/Config.in.host +80 -80
index 9f80224..6d86113 100644
@@ -99,112 +99,112 @@ choice
 	  This is used to hide/show some packages that have strict
 	  requirements on the version of kernel headers.
 
-config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_5
-	bool "4.5.x"
-	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_5
+	config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_5
+		bool "4.5.x"
+		select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_5
 
-config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_4
-	bool "4.4.x"
-	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_4
+	config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_4
+		bool "4.4.x"
+		select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_4
 
-config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_3
-	bool "4.3.x"
-	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_3
+	config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_3
+		bool "4.3.x"
+		select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_3
 
-config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_2
-	bool "4.2.x"
-	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_2
+	config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_2
+		bool "4.2.x"
+		select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_2
 
-config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_1
-	bool "4.1.x"
-	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_1
+	config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_1
+		bool "4.1.x"
+		select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_1
 
-config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_0
-	bool "4.0.x"
-	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_0
+	config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_0
+		bool "4.0.x"
+		select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_0
 
-config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_19
-	bool "3.19.x"
-	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_19
+	config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_19
+		bool "3.19.x"
+		select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_19
 
-config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_18
-	bool "3.18.x"
-	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_18
+	config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_18
+		bool "3.18.x"
+		select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_18
 
-config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_17
-	bool "3.17.x"
-	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_17
+	config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_17
+		bool "3.17.x"
+		select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_17
 
-config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_16
-	bool "3.16.x"
-	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_16
+	config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_16
+		bool "3.16.x"
+		select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_16
 
-config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_15
-	bool "3.15.x"
-	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_15
+	config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_15
+		bool "3.15.x"
+		select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_15
 
-config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_14
-	bool "3.14.x"
-	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_14
+	config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_14
+		bool "3.14.x"
+		select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_14
 
-config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_13
-	bool "3.13.x"
-	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_13
+	config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_13
+		bool "3.13.x"
+		select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_13
 
-config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_12
-	bool "3.12.x"
-	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12
+	config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_12
+		bool "3.12.x"
+		select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12
 
-config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_11
-	bool "3.11.x"
-	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_11
+	config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_11
+		bool "3.11.x"
+		select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_11
 
-config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_10
-	bool "3.10.x"
-	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_10
+	config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_10
+		bool "3.10.x"
+		select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_10
 
-config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_9
-	bool "3.9.x"
-	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_9
+	config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_9
+		bool "3.9.x"
+		select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_9
 
-config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_8
-	bool "3.8.x"
-	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_8
+	config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_8
+		bool "3.8.x"
+		select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_8
 
-config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_7
-	bool "3.7.x"
-	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_7
+	config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_7
+		bool "3.7.x"
+		select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_7
 
-config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_6
-	bool "3.6.x"
-	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_6
+	config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_6
+		bool "3.6.x"
+		select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_6
 
-config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_5
-	bool "3.5.x"
-	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_5
+	config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_5
+		bool "3.5.x"
+		select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_5
 
-config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_4
-	bool "3.4.x"
-	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_4
+	config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_4
+		bool "3.4.x"
+		select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_4
 
-config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_3
-	bool "3.3.x"
-	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_3
+	config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_3
+		bool "3.3.x"
+		select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_3
 
-config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_2
-	bool "3.2.x"
-	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2
+	config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_2
+		bool "3.2.x"
+		select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2
 
-config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_1
-	bool "3.1.x"
-	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_1
+	config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_1
+		bool "3.1.x"
+		select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_1
 
-config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_0
-	bool "3.0.x"
-	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0
+	config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_0
+		bool "3.0.x"
+		select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0
 
-config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_REALLY_OLD
-	bool "2.6.x"
+	config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_REALLY_OLD
+		bool "2.6.x"
 
 endchoice
 
Signature · 1 line
2.8.0
#5 lore raw

PATCH 2/4 linux-headers: indent custom choices

Quoted 2 lines · Vivien Didelot

Fix the indentation of config entries in the "Custom kernel headers series" choice menu.

We currently have 5 choice statements where the contents is indented, and 54
where it's not. So I wouldn't say that we usually indent it...

That said, I'm not strictly against indenting choice contents: it's not going
to be nested any deeper, and the lines are normally not that long. The only question is what to do with the help texts, because they would suddenly have to be wrapped at 82 characters...

Quoted 20 lines
---
  package/linux-headers/Config.in.host | 160 +++++++++++++++++------------------
  1 file changed, 80 insertions(+), 80 deletions(-)
package/linux-headers/Config.in.host +3 -3
index 9f80224..6d86113 100644
@@ -99,112 +99,112 @@ choice
  	  This is used to hide/show some packages that have strict
  	  requirements on the version of kernel headers.
 
-config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_5
-	bool "4.5.x"
-	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_5
+	config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_5
+		bool "4.5.x"
+		select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_5

[snip]

Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
#6 lore raw

PATCH 2/4 linux-headers: indent custom choices

Hello,

Quoted 2 lines · Arnout Vandecappelle

We currently have 5 choice statements where the contents is indented, and 54
where it's not. So I wouldn't say that we usually indent it...

I agreed.

Quoted 4 lines

That said, I'm not strictly against indenting choice contents: it's not going
to be nested any deeper, and the lines are normally not that long. The only question is what to do with the help texts, because they would suddenly have to be wrapped at 82 characters...

I prefer to keep things non-indented. Otherwise, to be consistent, we would also have to indent the config options within a if...endif block, or within a menuconfig...endmenu. And then suddenly you can have a choice nested in an if, nested in a menuconfig, and your indentation goes crazy.

So, I'd say no.

Thomas

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

PATCH 2/4 linux-headers: indent custom choices

Hi Thomas, Arnout,

Quoted 14 lines · Thomas Petazzoni

Hello,

Quoted 2 lines · Arnout Vandecappelle

We currently have 5 choice statements where the contents is indented, and 54
where it's not. So I wouldn't say that we usually indent it...

I agreed.

Quoted 4 lines

That said, I'm not strictly against indenting choice contents: it's not going
to be nested any deeper, and the lines are normally not that long. The only question is what to do with the help texts, because they would suddenly have to be wrapped at 82 characters...

Quoted 7 lines

I prefer to keep things non-indented. Otherwise, to be consistent, we would also have to indent the config options within a if...endif block, or within a menuconfig...endmenu. And then suddenly you can have a choice nested in an if, nested in a menuconfig, and your indentation goes crazy.

So, I'd say no.

I didn't take a look at other files, but only this one, and wanted to be consistent with the rest of the code where the "Kernel Headers" config entries are indented.

But I really don't mind, I'll drop this one ;-)

Thanks,
-v

#8 lore raw

PATCH 2/4 linux-headers: indent custom choices

In reply to Vivien Didelot

Vivien, All,

On 2016-04-19 16:52 -0400, Vivien Didelot spake thusly:

Quoted 2 lines

Fix the indentation of config entries in the "Custom kernel headers series" choice menu.

After the comments by Arnout and Thomas, and your further feedback, I've marked this patch as rejected in out patchwork.

Regards,
Yann E. MORIN.

Quoted 205 lines
---
 package/linux-headers/Config.in.host | 160 +++++++++++++++++------------------
 1 file changed, 80 insertions(+), 80 deletions(-)
package/linux-headers/Config.in.host +80 -80
index 9f80224..6d86113 100644
@@ -99,112 +99,112 @@ choice
 	  This is used to hide/show some packages that have strict
 	  requirements on the version of kernel headers.
 
-config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_5
-	bool "4.5.x"
-	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_5
+	config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_5
+		bool "4.5.x"
+		select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_5
 
-config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_4
-	bool "4.4.x"
-	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_4
+	config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_4
+		bool "4.4.x"
+		select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_4
 
-config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_3
-	bool "4.3.x"
-	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_3
+	config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_3
+		bool "4.3.x"
+		select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_3
 
-config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_2
-	bool "4.2.x"
-	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_2
+	config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_2
+		bool "4.2.x"
+		select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_2
 
-config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_1
-	bool "4.1.x"
-	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_1
+	config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_1
+		bool "4.1.x"
+		select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_1
 
-config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_0
-	bool "4.0.x"
-	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_0
+	config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_0
+		bool "4.0.x"
+		select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_0
 
-config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_19
-	bool "3.19.x"
-	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_19
+	config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_19
+		bool "3.19.x"
+		select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_19
 
-config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_18
-	bool "3.18.x"
-	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_18
+	config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_18
+		bool "3.18.x"
+		select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_18
 
-config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_17
-	bool "3.17.x"
-	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_17
+	config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_17
+		bool "3.17.x"
+		select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_17
 
-config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_16
-	bool "3.16.x"
-	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_16
+	config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_16
+		bool "3.16.x"
+		select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_16
 
-config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_15
-	bool "3.15.x"
-	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_15
+	config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_15
+		bool "3.15.x"
+		select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_15
 
-config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_14
-	bool "3.14.x"
-	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_14
+	config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_14
+		bool "3.14.x"
+		select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_14
 
-config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_13
-	bool "3.13.x"
-	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_13
+	config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_13
+		bool "3.13.x"
+		select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_13
 
-config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_12
-	bool "3.12.x"
-	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12
+	config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_12
+		bool "3.12.x"
+		select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12
 
-config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_11
-	bool "3.11.x"
-	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_11
+	config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_11
+		bool "3.11.x"
+		select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_11
 
-config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_10
-	bool "3.10.x"
-	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_10
+	config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_10
+		bool "3.10.x"
+		select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_10
 
-config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_9
-	bool "3.9.x"
-	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_9
+	config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_9
+		bool "3.9.x"
+		select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_9
 
-config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_8
-	bool "3.8.x"
-	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_8
+	config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_8
+		bool "3.8.x"
+		select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_8
 
-config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_7
-	bool "3.7.x"
-	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_7
+	config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_7
+		bool "3.7.x"
+		select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_7
 
-config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_6
-	bool "3.6.x"
-	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_6
+	config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_6
+		bool "3.6.x"
+		select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_6
 
-config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_5
-	bool "3.5.x"
-	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_5
+	config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_5
+		bool "3.5.x"
+		select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_5
 
-config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_4
-	bool "3.4.x"
-	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_4
+	config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_4
+		bool "3.4.x"
+		select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_4
 
-config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_3
-	bool "3.3.x"
-	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_3
+	config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_3
+		bool "3.3.x"
+		select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_3
 
-config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_2
-	bool "3.2.x"
-	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2
+	config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_2
+		bool "3.2.x"
+		select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2
 
-config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_1
-	bool "3.1.x"
-	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_1
+	config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_1
+		bool "3.1.x"
+		select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_1
 
-config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_0
-	bool "3.0.x"
-	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0
+	config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_0
+		bool "3.0.x"
+		select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0
 
-config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_REALLY_OLD
-	bool "2.6.x"
+	config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_REALLY_OLD
+		bool "2.6.x"
 
 endchoice
 
Signature · 1 line
2.8.0
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.  |
'------------------------------^-------^------------------^--------------------'
#9 lore raw

PATCH 3/4 linux-headers: rename _AS_KERNEL to _FROM_KERNEL

In reply to Vivien Didelot

BR2_KERNEL_HEADERS_AS_KERNEL is confusing when making the choice between downloading the headers from an independent kernel source, and using the headers found in the kernel built by Buildroot.

Rename it to BR2_KERNEL_HEADERS_FROM_KERNEL.

In the meantime, document this distinction between the two choices.

---
 package/linux-headers/Config.in.host   | 19 ++++++++++++-------
 package/linux-headers/linux-headers.mk |  8 ++++----
 2 files changed, 16 insertions(+), 11 deletions(-)
package/linux-headers/Config.in.host +12 -7
index 6d86113..baadb2e 100644
@@ -5,15 +5,20 @@ comment "Kernel Header Options"
 
 choice
 	prompt "Kernel Headers"
-	default BR2_KERNEL_HEADERS_AS_KERNEL if BR2_LINUX_KERNEL
+	default BR2_KERNEL_HEADERS_FROM_KERNEL if BR2_LINUX_KERNEL
 	default BR2_KERNEL_HEADERS_4_5
 	help
-	  Select the version of kernel header files you wish to use.
-	  You must select the correct set of header files to match
-	  the kernel you intend to use on your target system.
+	  Select the source of kernel header files which matches the kernel
+	  version you intend to use on your target system.
 
-	config BR2_KERNEL_HEADERS_AS_KERNEL
-		bool "Same as kernel"
+	  Select BR2_KERNEL_HEADERS_FROM_KERNEL to use the header files from
+	  the kernel source you are building for your target.
+
+	  Select any other choices to download and use an independent kernel
+	  version for its headers. Useful when you are not building the kernel.
+
+	config BR2_KERNEL_HEADERS_FROM_KERNEL
+		bool "From the kernel source"
 		depends on BR2_LINUX_KERNEL
 
 	config BR2_KERNEL_HEADERS_3_2
@@ -91,7 +96,7 @@ config BR2_DEFAULT_KERNEL_VERSION
 
 choice
 	bool "Custom kernel headers series"
-	depends on BR2_KERNEL_HEADERS_VERSION || BR2_KERNEL_HEADERS_AS_KERNEL
+	depends on BR2_KERNEL_HEADERS_VERSION || BR2_KERNEL_HEADERS_FROM_KERNEL
 	default BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_REALLY_OLD
 	help
 	  Set to the kernel headers series you manually set above.
package/linux-headers/linux-headers.mk +4 -4
index 0900778..9afe5dc 100644
@@ -7,7 +7,7 @@
 # This package is used to provide Linux kernel headers for the
 # internal toolchain backend.
 
-ifeq ($(BR2_KERNEL_HEADERS_AS_KERNEL),y)
+ifeq ($(BR2_KERNEL_HEADERS_FROM_KERNEL),y)
 
 LINUX_HEADERS_VERSION = $(call qstrip,$(BR2_LINUX_KERNEL_VERSION))
 
@@ -71,7 +71,7 @@ endef
 
 LINUX_HEADERS_POST_PATCH_HOOKS += LINUX_HEADERS_APPLY_LOCAL_PATCHES
 
-else # ! BR2_KERNEL_HEADERS_AS_KERNEL
+else # ! BR2_KERNEL_HEADERS_FROM_KERNEL
 
 LINUX_HEADERS_VERSION = $(call qstrip,$(BR2_DEFAULT_KERNEL_HEADERS))
 ifeq ($(findstring x2.6.,x$(LINUX_HEADERS_VERSION)),x2.6.)
@@ -83,7 +83,7 @@ LINUX_HEADERS_SITE = $(BR2_KERNEL_MIRROR)/linux/kernel/v4.x
 endif
 LINUX_HEADERS_SOURCE = linux-$(LINUX_HEADERS_VERSION).tar.xz
 
-endif # ! BR2_KERNEL_HEADERS_AS_KERNEL
+endif # ! BR2_KERNEL_HEADERS_FROM_KERNEL
 
 LINUX_HEADERS_LICENSE = GPLv2
 LINUX_HEADERS_LICENSE_FILES = COPYING
@@ -125,7 +125,7 @@ define LINUX_HEADERS_INSTALL_STAGING_CMDS
 			headers_install)
 endef
 
-ifeq ($(BR2_KERNEL_HEADERS_VERSION)$(BR2_KERNEL_HEADERS_AS_KERNEL),y)
+ifeq ($(BR2_KERNEL_HEADERS_VERSION)$(BR2_KERNEL_HEADERS_FROM_KERNEL),y)
 define LINUX_HEADERS_CHECK_VERSION
 	$(call check_kernel_headers_version,\
 		$(STAGING_DIR),\
Signature · 1 line
2.8.0
#10 lore raw

PATCH 3/4 linux-headers: rename _AS_KERNEL to _FROM_KERNEL

Hello,

Quoted 9 lines · Vivien Didelot

BR2_KERNEL_HEADERS_AS_KERNEL is confusing when making the choice between downloading the headers from an independent kernel source, and using the headers found in the kernel built by Buildroot.

Rename it to BR2_KERNEL_HEADERS_FROM_KERNEL.

In the meantime, document this distinction between the two choices.

I tend to disagree here. The headers are not "from" the kernel, since in practice, we download the kernel source code twice and extract it twice. So the "as kernel" really seem better. It could be "like kernel" as well, but "from kernel" seems wrong.

However, I'm all for improving the help texts to make this clearer.

Thomas

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

PATCH 3/4 linux-headers: rename _AS_KERNEL to _FROM_KERNEL

Hi Thomas,

Quoted 6 lines · Thomas Petazzoni
Quoted 6 lines

BR2_KERNEL_HEADERS_AS_KERNEL is confusing when making the choice between downloading the headers from an independent kernel source, and using the headers found in the kernel built by Buildroot.

Rename it to BR2_KERNEL_HEADERS_FROM_KERNEL.

Quoted 8 lines
Quoted 3 lines

In the meantime, document this distinction between the two choices.

I tend to disagree here. The headers are not "from" the kernel, since in practice, we download the kernel source code twice and extract it twice. So the "as kernel" really seem better. It could be "like kernel" as well, but "from kernel" seems wrong.

So with BR2_KERNEL_HEADERS_AS_KERNEL, the kernel source tree to extract the headers from is the same site as the Linux kernel source. With !BR2_KERNEL_HEADERS_AS_KERNEL, the kernel source is downloaded from kernel.org (or a mirror). Correct?

If yes, BR2_KERNEL_HEADERS_SAME_SOURCE or BR2_KERNEL_HEADERS_SAME_SITE seem clearer to me.

Quoted 1 line

However, I'm all for improving the help texts to make this clearer.

Thanks,
Vivien

#12 lore raw

PATCH 3/4 linux-headers: rename _AS_KERNEL to _FROM_KERNEL

In reply to Vivien Didelot

Vivien, All,

On 2016-04-19 16:52 -0400, Vivien Didelot spake thusly:

Quoted 7 lines

BR2_KERNEL_HEADERS_AS_KERNEL is confusing when making the choice between downloading the headers from an independent kernel source, and using the headers found in the kernel built by Buildroot.

Rename it to BR2_KERNEL_HEADERS_FROM_KERNEL.

In the meantime, document this distinction between the two choices.

We'v ediscussed this during the Buildroot summer-camp, and we've come to the conclusion that:
- the naming of the variable might indeed not be the best;
- however, it's been part of a release now, and handling legacy for a

    symbol in a choice is not easy;

- we can improve the prompt and the help text.

So, I'll take this and rework the help and prompts.

In the meantime, I've marked this patch as "changes request4ed" in patchwork.

Thanks!

Regards,
Yann E. MORIN.

Quoted 89 lines
---
 package/linux-headers/Config.in.host   | 19 ++++++++++++-------
 package/linux-headers/linux-headers.mk |  8 ++++----
 2 files changed, 16 insertions(+), 11 deletions(-)
package/linux-headers/Config.in.host +12 -7
index 6d86113..baadb2e 100644
@@ -5,15 +5,20 @@ comment "Kernel Header Options"
 
 choice
 	prompt "Kernel Headers"
-	default BR2_KERNEL_HEADERS_AS_KERNEL if BR2_LINUX_KERNEL
+	default BR2_KERNEL_HEADERS_FROM_KERNEL if BR2_LINUX_KERNEL
 	default BR2_KERNEL_HEADERS_4_5
 	help
-	  Select the version of kernel header files you wish to use.
-	  You must select the correct set of header files to match
-	  the kernel you intend to use on your target system.
+	  Select the source of kernel header files which matches the kernel
+	  version you intend to use on your target system.
 
-	config BR2_KERNEL_HEADERS_AS_KERNEL
-		bool "Same as kernel"
+	  Select BR2_KERNEL_HEADERS_FROM_KERNEL to use the header files from
+	  the kernel source you are building for your target.
+
+	  Select any other choices to download and use an independent kernel
+	  version for its headers. Useful when you are not building the kernel.
+
+	config BR2_KERNEL_HEADERS_FROM_KERNEL
+		bool "From the kernel source"
 		depends on BR2_LINUX_KERNEL
 
 	config BR2_KERNEL_HEADERS_3_2
@@ -91,7 +96,7 @@ config BR2_DEFAULT_KERNEL_VERSION
 
 choice
 	bool "Custom kernel headers series"
-	depends on BR2_KERNEL_HEADERS_VERSION || BR2_KERNEL_HEADERS_AS_KERNEL
+	depends on BR2_KERNEL_HEADERS_VERSION || BR2_KERNEL_HEADERS_FROM_KERNEL
 	default BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_REALLY_OLD
 	help
 	  Set to the kernel headers series you manually set above.
package/linux-headers/linux-headers.mk +4 -4
index 0900778..9afe5dc 100644
@@ -7,7 +7,7 @@
 # This package is used to provide Linux kernel headers for the
 # internal toolchain backend.
 
-ifeq ($(BR2_KERNEL_HEADERS_AS_KERNEL),y)
+ifeq ($(BR2_KERNEL_HEADERS_FROM_KERNEL),y)
 
 LINUX_HEADERS_VERSION = $(call qstrip,$(BR2_LINUX_KERNEL_VERSION))
 
@@ -71,7 +71,7 @@ endef
 
 LINUX_HEADERS_POST_PATCH_HOOKS += LINUX_HEADERS_APPLY_LOCAL_PATCHES
 
-else # ! BR2_KERNEL_HEADERS_AS_KERNEL
+else # ! BR2_KERNEL_HEADERS_FROM_KERNEL
 
 LINUX_HEADERS_VERSION = $(call qstrip,$(BR2_DEFAULT_KERNEL_HEADERS))
 ifeq ($(findstring x2.6.,x$(LINUX_HEADERS_VERSION)),x2.6.)
@@ -83,7 +83,7 @@ LINUX_HEADERS_SITE = $(BR2_KERNEL_MIRROR)/linux/kernel/v4.x
 endif
 LINUX_HEADERS_SOURCE = linux-$(LINUX_HEADERS_VERSION).tar.xz
 
-endif # ! BR2_KERNEL_HEADERS_AS_KERNEL
+endif # ! BR2_KERNEL_HEADERS_FROM_KERNEL
 
 LINUX_HEADERS_LICENSE = GPLv2
 LINUX_HEADERS_LICENSE_FILES = COPYING
@@ -125,7 +125,7 @@ define LINUX_HEADERS_INSTALL_STAGING_CMDS
 			headers_install)
 endef
 
-ifeq ($(BR2_KERNEL_HEADERS_VERSION)$(BR2_KERNEL_HEADERS_AS_KERNEL),y)
+ifeq ($(BR2_KERNEL_HEADERS_VERSION)$(BR2_KERNEL_HEADERS_FROM_KERNEL),y)
 define LINUX_HEADERS_CHECK_VERSION
 	$(call check_kernel_headers_version,\
 		$(STAGING_DIR),\
Signature · 1 line
2.8.0
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.  |
'------------------------------^-------^------------------^--------------------'
#13 lore raw

PATCH 3/4 linux-headers: rename _AS_KERNEL to _FROM_KERNEL

Quoted 2 lines · Yann E. MORIN

Vivien, All,

<snip>

Quoted 2 lines

- however, it's been part of a release now, and handling legacy for a

    symbol in a choice is not easy;

I think breaking user's configurations by changing config names is very serious and should be done for a very good reason, not just to get a slightly clearer name.

Regards, Steve

#14 lore raw

PATCH 3/4 linux-headers: rename _AS_KERNEL to _FROM_KERNEL

Steve, All,

On 2016-07-01 10:51 -0700, Steve Calfee spake thusly:

Quoted 11 lines · Yann E. MORIN
Quoted 2 lines

Vivien, All,

<snip>

Quoted 2 lines

- however, it's been part of a release now, and handling legacy for a

    symbol in a choice is not easy;

I think breaking user's configurations by changing config names is very serious and should be done for a very good reason, not just to get a slightly clearer name.

That's why we did not rename the option.

Regards,
Yann E. MORIN.

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.  |
'------------------------------^-------^------------------^--------------------'
#15 lore raw

PATCH 4/4 linux-headers: match headers for the latest kernel

In reply to Vivien Didelot

The point of choosing BR2_LINUX_KERNEL_LATEST_VERSION alongside BR2_KERNEL_HEADERS_FROM_KERNEL is not to care about bumping the kernel and its headers used in the toolchain in later Buildroot releases.

When using the latest kernel and its headers, automatically set the headers version to at least BR2_LINUX_KERNEL_VERSION.

A similar change can be done for BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE, but this is less trivial since it requires parsing the free form string.

---
 package/linux-headers/Config.in.host | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)
package/linux-headers/Config.in.host +10 -2
index baadb2e..15136df 100644
@@ -12,7 +12,9 @@ choice
 	  version you intend to use on your target system.
 
 	  Select BR2_KERNEL_HEADERS_FROM_KERNEL to use the header files from
-	  the kernel source you are building for your target.
+	  the kernel source you are building for your target. Unless you chose
+	  BR2_LINUX_KERNEL_LATEST_VERSION, you must specify the custom kernel
+	  headers series below.
 
 	  Select any other choices to download and use an independent kernel
 	  version for its headers. Useful when you are not building the kernel.
@@ -20,6 +22,8 @@ choice
 	config BR2_KERNEL_HEADERS_FROM_KERNEL
 		bool "From the kernel source"
 		depends on BR2_LINUX_KERNEL
+		select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_5 if \
+			BR2_LINUX_KERNEL_LATEST_VERSION
 
 	config BR2_KERNEL_HEADERS_3_2
 		bool "Linux 3.2.x kernel headers"
@@ -96,7 +100,9 @@ config BR2_DEFAULT_KERNEL_VERSION
 
 choice
 	bool "Custom kernel headers series"
-	depends on BR2_KERNEL_HEADERS_VERSION || BR2_KERNEL_HEADERS_FROM_KERNEL
+	depends on BR2_KERNEL_HEADERS_VERSION || \
+		(BR2_KERNEL_HEADERS_FROM_KERNEL && \
+		 !BR2_LINUX_KERNEL_LATEST_VERSION)
 	default BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_REALLY_OLD
 	help
 	  Set to the kernel headers series you manually set above.
@@ -228,4 +234,6 @@ config BR2_DEFAULT_KERNEL_HEADERS
 	default "4.3.6"		if BR2_KERNEL_HEADERS_4_3
 	default "4.4.7"		if BR2_KERNEL_HEADERS_4_4
 	default "4.5.1"		if BR2_KERNEL_HEADERS_4_5
+	default BR2_LINUX_KERNEL_VERSION if BR2_KERNEL_HEADERS_FROM_KERNEL && \
+		BR2_LINUX_KERNEL_LATEST_VERSION
 	default BR2_DEFAULT_KERNEL_VERSION if BR2_KERNEL_HEADERS_VERSION
Signature · 1 line
2.8.0
#16 lore raw

PATCH 4/4 linux-headers: match headers for the latest kernel

Vivien, All,

On 2016-04-19 16:52 -0400, Vivien Didelot spake thusly:

Quoted 9 lines

The point of choosing BR2_LINUX_KERNEL_LATEST_VERSION alongside BR2_KERNEL_HEADERS_FROM_KERNEL is not to care about bumping the kernel and its headers used in the toolchain in later Buildroot releases.

When using the latest kernel and its headers, automatically set the headers version to at least BR2_LINUX_KERNEL_VERSION.

A similar change can be done for BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE, but this is less trivial since it requires parsing the free form string.

We've also discussed this patch today, and we've come to a simpler
solution: default to the latest kernel version for the custom headers. I've sent the patch:

    https://patchwork.ozlabs.org/patch/643102/

So, I've marked this patch as superseded in patchwork.

Thanks!

Regards,
Yann E. MORIN.

Quoted 50 lines
---
 package/linux-headers/Config.in.host | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)
package/linux-headers/Config.in.host +10 -2
index baadb2e..15136df 100644
@@ -12,7 +12,9 @@ choice
 	  version you intend to use on your target system.
 
 	  Select BR2_KERNEL_HEADERS_FROM_KERNEL to use the header files from
-	  the kernel source you are building for your target.
+	  the kernel source you are building for your target. Unless you chose
+	  BR2_LINUX_KERNEL_LATEST_VERSION, you must specify the custom kernel
+	  headers series below.
 
 	  Select any other choices to download and use an independent kernel
 	  version for its headers. Useful when you are not building the kernel.
@@ -20,6 +22,8 @@ choice
 	config BR2_KERNEL_HEADERS_FROM_KERNEL
 		bool "From the kernel source"
 		depends on BR2_LINUX_KERNEL
+		select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_5 if \
+			BR2_LINUX_KERNEL_LATEST_VERSION
 
 	config BR2_KERNEL_HEADERS_3_2
 		bool "Linux 3.2.x kernel headers"
@@ -96,7 +100,9 @@ config BR2_DEFAULT_KERNEL_VERSION
 
 choice
 	bool "Custom kernel headers series"
-	depends on BR2_KERNEL_HEADERS_VERSION || BR2_KERNEL_HEADERS_FROM_KERNEL
+	depends on BR2_KERNEL_HEADERS_VERSION || \
+		(BR2_KERNEL_HEADERS_FROM_KERNEL && \
+		 !BR2_LINUX_KERNEL_LATEST_VERSION)
 	default BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_REALLY_OLD
 	help
 	  Set to the kernel headers series you manually set above.
@@ -228,4 +234,6 @@ config BR2_DEFAULT_KERNEL_HEADERS
 	default "4.3.6"		if BR2_KERNEL_HEADERS_4_3
 	default "4.4.7"		if BR2_KERNEL_HEADERS_4_4
 	default "4.5.1"		if BR2_KERNEL_HEADERS_4_5
+	default BR2_LINUX_KERNEL_VERSION if BR2_KERNEL_HEADERS_FROM_KERNEL && \
+		BR2_LINUX_KERNEL_LATEST_VERSION
 	default BR2_DEFAULT_KERNEL_VERSION if BR2_KERNEL_HEADERS_VERSION
Signature · 1 line
2.8.0
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.  |
'------------------------------^-------^------------------^--------------------'