All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 0/4] match headers with latest kernel source
@ 2016-04-19 20:52 Vivien Didelot
  2016-04-19 20:52 ` [Buildroot] [PATCH 1/4] linux: explicit latest kernel version Vivien Didelot
                   ` (3 more replies)
  0 siblings, 4 replies; 17+ messages in thread
From: Vivien Didelot @ 2016-04-19 20:52 UTC (permalink / raw)
  To: buildroot

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(-)

-- 
2.8.0

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Buildroot] [PATCH 1/4] linux: explicit latest kernel version
  2016-04-19 20:52 [Buildroot] [PATCH 0/4] match headers with latest kernel source Vivien Didelot
@ 2016-04-19 20:52 ` Vivien Didelot
  2016-04-19 22:54   ` Arnout Vandecappelle
  2016-04-20 15:39   ` Thomas Petazzoni
  2016-04-19 20:52 ` [Buildroot] [PATCH 2/4] linux-headers: indent custom choices Vivien Didelot
                   ` (2 subsequent siblings)
  3 siblings, 2 replies; 17+ messages in thread
From: Vivien Didelot @ 2016-04-19 20:52 UTC (permalink / raw)
  To: buildroot

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.

Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
---
 linux/Config.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/linux/Config.in b/linux/Config.in
index 043b147..8600ea1 100644
--- a/linux/Config.in
+++ b/linux/Config.in
@@ -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"
-- 
2.8.0

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [Buildroot] [PATCH 2/4] linux-headers: indent custom choices
  2016-04-19 20:52 [Buildroot] [PATCH 0/4] match headers with latest kernel source Vivien Didelot
  2016-04-19 20:52 ` [Buildroot] [PATCH 1/4] linux: explicit latest kernel version Vivien Didelot
@ 2016-04-19 20:52 ` Vivien Didelot
  2016-04-19 22:58   ` Arnout Vandecappelle
  2016-07-01 14:22   ` Yann E. MORIN
  2016-04-19 20:52 ` [Buildroot] [PATCH 3/4] linux-headers: rename _AS_KERNEL to _FROM_KERNEL Vivien Didelot
  2016-04-19 20:52 ` [Buildroot] [PATCH 4/4] linux-headers: match headers for the latest kernel Vivien Didelot
  3 siblings, 2 replies; 17+ messages in thread
From: Vivien Didelot @ 2016-04-19 20:52 UTC (permalink / raw)
  To: buildroot

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

Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
---
 package/linux-headers/Config.in.host | 160 +++++++++++++++++------------------
 1 file changed, 80 insertions(+), 80 deletions(-)

diff --git a/package/linux-headers/Config.in.host b/package/linux-headers/Config.in.host
index 9f80224..6d86113 100644
--- a/package/linux-headers/Config.in.host
+++ b/package/linux-headers/Config.in.host
@@ -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
 
-- 
2.8.0

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [Buildroot] [PATCH 3/4] linux-headers: rename _AS_KERNEL to _FROM_KERNEL
  2016-04-19 20:52 [Buildroot] [PATCH 0/4] match headers with latest kernel source Vivien Didelot
  2016-04-19 20:52 ` [Buildroot] [PATCH 1/4] linux: explicit latest kernel version Vivien Didelot
  2016-04-19 20:52 ` [Buildroot] [PATCH 2/4] linux-headers: indent custom choices Vivien Didelot
@ 2016-04-19 20:52 ` Vivien Didelot
  2016-04-19 21:13   ` Thomas Petazzoni
  2016-07-01 14:34   ` Yann E. MORIN
  2016-04-19 20:52 ` [Buildroot] [PATCH 4/4] linux-headers: match headers for the latest kernel Vivien Didelot
  3 siblings, 2 replies; 17+ messages in thread
From: Vivien Didelot @ 2016-04-19 20:52 UTC (permalink / raw)
  To: buildroot

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.

Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
---
 package/linux-headers/Config.in.host   | 19 ++++++++++++-------
 package/linux-headers/linux-headers.mk |  8 ++++----
 2 files changed, 16 insertions(+), 11 deletions(-)

diff --git a/package/linux-headers/Config.in.host b/package/linux-headers/Config.in.host
index 6d86113..baadb2e 100644
--- a/package/linux-headers/Config.in.host
+++ b/package/linux-headers/Config.in.host
@@ -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.
diff --git a/package/linux-headers/linux-headers.mk b/package/linux-headers/linux-headers.mk
index 0900778..9afe5dc 100644
--- a/package/linux-headers/linux-headers.mk
+++ b/package/linux-headers/linux-headers.mk
@@ -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),\
-- 
2.8.0

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [Buildroot] [PATCH 4/4] linux-headers: match headers for the latest kernel
  2016-04-19 20:52 [Buildroot] [PATCH 0/4] match headers with latest kernel source Vivien Didelot
                   ` (2 preceding siblings ...)
  2016-04-19 20:52 ` [Buildroot] [PATCH 3/4] linux-headers: rename _AS_KERNEL to _FROM_KERNEL Vivien Didelot
@ 2016-04-19 20:52 ` Vivien Didelot
  2016-07-01 16:06   ` Yann E. MORIN
  3 siblings, 1 reply; 17+ messages in thread
From: Vivien Didelot @ 2016-04-19 20:52 UTC (permalink / raw)
  To: buildroot

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.

Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
---
 package/linux-headers/Config.in.host | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/package/linux-headers/Config.in.host b/package/linux-headers/Config.in.host
index baadb2e..15136df 100644
--- a/package/linux-headers/Config.in.host
+++ b/package/linux-headers/Config.in.host
@@ -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
-- 
2.8.0

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [Buildroot] [PATCH 3/4] linux-headers: rename _AS_KERNEL to _FROM_KERNEL
  2016-04-19 20:52 ` [Buildroot] [PATCH 3/4] linux-headers: rename _AS_KERNEL to _FROM_KERNEL Vivien Didelot
@ 2016-04-19 21:13   ` Thomas Petazzoni
  2016-04-19 22:12     ` Vivien Didelot
  2016-07-01 14:34   ` Yann E. MORIN
  1 sibling, 1 reply; 17+ messages in thread
From: Thomas Petazzoni @ 2016-04-19 21:13 UTC (permalink / raw)
  To: buildroot

Hello,

On Tue, 19 Apr 2016 16:52:34 -0400, Vivien Didelot wrote:
> 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.
> 
> Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>

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
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Buildroot] [PATCH 3/4] linux-headers: rename _AS_KERNEL to _FROM_KERNEL
  2016-04-19 21:13   ` Thomas Petazzoni
@ 2016-04-19 22:12     ` Vivien Didelot
  0 siblings, 0 replies; 17+ messages in thread
From: Vivien Didelot @ 2016-04-19 22:12 UTC (permalink / raw)
  To: buildroot

Hi Thomas,

Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:

>> 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.
>> 
>> Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
>
> 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.

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

Thanks,
Vivien

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Buildroot] [PATCH 1/4] linux: explicit latest kernel version
  2016-04-19 20:52 ` [Buildroot] [PATCH 1/4] linux: explicit latest kernel version Vivien Didelot
@ 2016-04-19 22:54   ` Arnout Vandecappelle
  2016-04-20 15:39   ` Thomas Petazzoni
  1 sibling, 0 replies; 17+ messages in thread
From: Arnout Vandecappelle @ 2016-04-19 22:54 UTC (permalink / raw)
  To: buildroot

On 04/19/16 22:52, Vivien Didelot wrote:
> 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.
>
> Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>

Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>

  Regards,
  Arnout

> ---
>   linux/Config.in | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/linux/Config.in b/linux/Config.in
> index 043b147..8600ea1 100644
> --- a/linux/Config.in
> +++ b/linux/Config.in
> @@ -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"
>


-- 
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

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Buildroot] [PATCH 2/4] linux-headers: indent custom choices
  2016-04-19 20:52 ` [Buildroot] [PATCH 2/4] linux-headers: indent custom choices Vivien Didelot
@ 2016-04-19 22:58   ` Arnout Vandecappelle
  2016-04-20  7:01     ` Thomas Petazzoni
  2016-07-01 14:22   ` Yann E. MORIN
  1 sibling, 1 reply; 17+ messages in thread
From: Arnout Vandecappelle @ 2016-04-19 22:58 UTC (permalink / raw)
  To: buildroot

On 04/19/16 22:52, Vivien Didelot wrote:
> 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...

>
> Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
> ---
>   package/linux-headers/Config.in.host | 160 +++++++++++++++++------------------
>   1 file changed, 80 insertions(+), 80 deletions(-)
>
> diff --git a/package/linux-headers/Config.in.host b/package/linux-headers/Config.in.host
> index 9f80224..6d86113 100644
> --- a/package/linux-headers/Config.in.host
> +++ b/package/linux-headers/Config.in.host
> @@ -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]

-- 
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

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Buildroot] [PATCH 2/4] linux-headers: indent custom choices
  2016-04-19 22:58   ` Arnout Vandecappelle
@ 2016-04-20  7:01     ` Thomas Petazzoni
  2016-04-20 13:52       ` Vivien Didelot
  0 siblings, 1 reply; 17+ messages in thread
From: Thomas Petazzoni @ 2016-04-20  7:01 UTC (permalink / raw)
  To: buildroot

Hello,

On Wed, 20 Apr 2016 00:58:48 +0200, Arnout Vandecappelle wrote:

>   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.

>   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
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Buildroot] [PATCH 2/4] linux-headers: indent custom choices
  2016-04-20  7:01     ` Thomas Petazzoni
@ 2016-04-20 13:52       ` Vivien Didelot
  0 siblings, 0 replies; 17+ messages in thread
From: Vivien Didelot @ 2016-04-20 13:52 UTC (permalink / raw)
  To: buildroot

Hi Thomas, Arnout,

Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:

> Hello,
>
> On Wed, 20 Apr 2016 00:58:48 +0200, Arnout Vandecappelle wrote:
>
>>   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.
>
>>   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.

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

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Buildroot] [PATCH 1/4] linux: explicit latest kernel version
  2016-04-19 20:52 ` [Buildroot] [PATCH 1/4] linux: explicit latest kernel version Vivien Didelot
  2016-04-19 22:54   ` Arnout Vandecappelle
@ 2016-04-20 15:39   ` Thomas Petazzoni
  1 sibling, 0 replies; 17+ messages in thread
From: Thomas Petazzoni @ 2016-04-20 15:39 UTC (permalink / raw)
  To: buildroot

Hello,

On Tue, 19 Apr 2016 16:52:32 -0400, Vivien Didelot wrote:
> 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.
> 
> Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
> ---
>  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
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Buildroot] [PATCH 2/4] linux-headers: indent custom choices
  2016-04-19 20:52 ` [Buildroot] [PATCH 2/4] linux-headers: indent custom choices Vivien Didelot
  2016-04-19 22:58   ` Arnout Vandecappelle
@ 2016-07-01 14:22   ` Yann E. MORIN
  1 sibling, 0 replies; 17+ messages in thread
From: Yann E. MORIN @ 2016-07-01 14:22 UTC (permalink / raw)
  To: buildroot

Vivien, All,

On 2016-04-19 16:52 -0400, Vivien Didelot spake thusly:
> 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.

> Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
> ---
>  package/linux-headers/Config.in.host | 160 +++++++++++++++++------------------
>  1 file changed, 80 insertions(+), 80 deletions(-)
> 
> diff --git a/package/linux-headers/Config.in.host b/package/linux-headers/Config.in.host
> index 9f80224..6d86113 100644
> --- a/package/linux-headers/Config.in.host
> +++ b/package/linux-headers/Config.in.host
> @@ -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
>  
> -- 
> 2.8.0
> 

-- 
.-----------------.--------------------.------------------.--------------------.
|  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.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Buildroot] [PATCH 3/4] linux-headers: rename _AS_KERNEL to _FROM_KERNEL
  2016-04-19 20:52 ` [Buildroot] [PATCH 3/4] linux-headers: rename _AS_KERNEL to _FROM_KERNEL Vivien Didelot
  2016-04-19 21:13   ` Thomas Petazzoni
@ 2016-07-01 14:34   ` Yann E. MORIN
  2016-07-01 17:51     ` Steve Calfee
  1 sibling, 1 reply; 17+ messages in thread
From: Yann E. MORIN @ 2016-07-01 14:34 UTC (permalink / raw)
  To: buildroot

Vivien, All,

On 2016-04-19 16:52 -0400, Vivien Didelot spake thusly:
> 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.

> Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
> ---
>  package/linux-headers/Config.in.host   | 19 ++++++++++++-------
>  package/linux-headers/linux-headers.mk |  8 ++++----
>  2 files changed, 16 insertions(+), 11 deletions(-)
> 
> diff --git a/package/linux-headers/Config.in.host b/package/linux-headers/Config.in.host
> index 6d86113..baadb2e 100644
> --- a/package/linux-headers/Config.in.host
> +++ b/package/linux-headers/Config.in.host
> @@ -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.
> diff --git a/package/linux-headers/linux-headers.mk b/package/linux-headers/linux-headers.mk
> index 0900778..9afe5dc 100644
> --- a/package/linux-headers/linux-headers.mk
> +++ b/package/linux-headers/linux-headers.mk
> @@ -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),\
> -- 
> 2.8.0
> 

-- 
.-----------------.--------------------.------------------.--------------------.
|  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.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Buildroot] [PATCH 4/4] linux-headers: match headers for the latest kernel
  2016-04-19 20:52 ` [Buildroot] [PATCH 4/4] linux-headers: match headers for the latest kernel Vivien Didelot
@ 2016-07-01 16:06   ` Yann E. MORIN
  0 siblings, 0 replies; 17+ messages in thread
From: Yann E. MORIN @ 2016-07-01 16:06 UTC (permalink / raw)
  To: buildroot

Vivien, All,

On 2016-04-19 16:52 -0400, Vivien Didelot spake thusly:
> 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.

> Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
> ---
>  package/linux-headers/Config.in.host | 12 ++++++++++--
>  1 file changed, 10 insertions(+), 2 deletions(-)
> 
> diff --git a/package/linux-headers/Config.in.host b/package/linux-headers/Config.in.host
> index baadb2e..15136df 100644
> --- a/package/linux-headers/Config.in.host
> +++ b/package/linux-headers/Config.in.host
> @@ -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
> -- 
> 2.8.0
> 

-- 
.-----------------.--------------------.------------------.--------------------.
|  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.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Buildroot] [PATCH 3/4] linux-headers: rename _AS_KERNEL to _FROM_KERNEL
  2016-07-01 14:34   ` Yann E. MORIN
@ 2016-07-01 17:51     ` Steve Calfee
  2016-07-01 17:56       ` Yann E. MORIN
  0 siblings, 1 reply; 17+ messages in thread
From: Steve Calfee @ 2016-07-01 17:51 UTC (permalink / raw)
  To: buildroot

On Fri, Jul 1, 2016 at 7:34 AM, Yann E. MORIN <yann.morin.1998@free.fr> wrote:
> Vivien, All,
>
<snip>

>   - 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

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Buildroot] [PATCH 3/4] linux-headers: rename _AS_KERNEL to _FROM_KERNEL
  2016-07-01 17:51     ` Steve Calfee
@ 2016-07-01 17:56       ` Yann E. MORIN
  0 siblings, 0 replies; 17+ messages in thread
From: Yann E. MORIN @ 2016-07-01 17:56 UTC (permalink / raw)
  To: buildroot

Steve, All,

On 2016-07-01 10:51 -0700, Steve Calfee spake thusly:
> On Fri, Jul 1, 2016 at 7:34 AM, Yann E. MORIN <yann.morin.1998@free.fr> wrote:
> > Vivien, All,
> >
> <snip>
> 
> >   - 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.

-- 
.-----------------.--------------------.------------------.--------------------.
|  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.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2016-07-01 17:56 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-19 20:52 [Buildroot] [PATCH 0/4] match headers with latest kernel source Vivien Didelot
2016-04-19 20:52 ` [Buildroot] [PATCH 1/4] linux: explicit latest kernel version Vivien Didelot
2016-04-19 22:54   ` Arnout Vandecappelle
2016-04-20 15:39   ` Thomas Petazzoni
2016-04-19 20:52 ` [Buildroot] [PATCH 2/4] linux-headers: indent custom choices Vivien Didelot
2016-04-19 22:58   ` Arnout Vandecappelle
2016-04-20  7:01     ` Thomas Petazzoni
2016-04-20 13:52       ` Vivien Didelot
2016-07-01 14:22   ` Yann E. MORIN
2016-04-19 20:52 ` [Buildroot] [PATCH 3/4] linux-headers: rename _AS_KERNEL to _FROM_KERNEL Vivien Didelot
2016-04-19 21:13   ` Thomas Petazzoni
2016-04-19 22:12     ` Vivien Didelot
2016-07-01 14:34   ` Yann E. MORIN
2016-07-01 17:51     ` Steve Calfee
2016-07-01 17:56       ` Yann E. MORIN
2016-04-19 20:52 ` [Buildroot] [PATCH 4/4] linux-headers: match headers for the latest kernel Vivien Didelot
2016-07-01 16:06   ` Yann E. MORIN

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.