Browse Source

package/linux-headers: prevent invalid custom headers selection

If BR2_KERNEL_HEADERS_AS_KERNEL is selected and the kernel version
is known we should not allow potentially incompatible custom headers
to be selected.

For BR2_LINUX_KERNEL_LATEST_CIP_VERSION and
BR2_LINUX_KERNEL_LATEST_CIP_RT_VERSION this means we should select
BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_10 and for
BR2_LINUX_KERNEL_LATEST_VERSION this means we should select
BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_15.

Fixes:
 - http://autobuild.buildroot.net/results/816/816d7a3ad77ba051fff7fba7f2a38fc31549c360
 - http://autobuild.buildroot.net/results/3c3/3c3a9fc1a1e0002ae8169fd47b3003ebb86935f6
 - http://autobuild.buildroot.net/results/188/18883459577dc0fdc01149110ffb81bf1a28c94a

Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
James Hilliard 3 years ago
parent
commit
c457bf9cb4
2 changed files with 6 additions and 2 deletions
  1. 3 0
      linux/Config.in
  2. 3 2
      package/linux-headers/Config.in.host

+ 3 - 0
linux/Config.in

@@ -29,9 +29,11 @@ choice
 
 config BR2_LINUX_KERNEL_LATEST_VERSION
 	bool "Latest version (5.15)"
+	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_15 if BR2_KERNEL_HEADERS_AS_KERNEL
 
 config BR2_LINUX_KERNEL_LATEST_CIP_VERSION
 	bool "Latest CIP SLTS version (5.10.104-cip3)"
+	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_10 if BR2_KERNEL_HEADERS_AS_KERNEL
 	help
 	  CIP launched in the spring of 2016 to address the needs of
 	  organizations in industries such as power generation and
@@ -51,6 +53,7 @@ config BR2_LINUX_KERNEL_LATEST_CIP_VERSION
 
 config BR2_LINUX_KERNEL_LATEST_CIP_RT_VERSION
 	bool "Latest CIP RT SLTS version (5.10.104-cip3-rt3)"
+	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_10 if BR2_KERNEL_HEADERS_AS_KERNEL
 	help
 	  Same as the CIP version, but this is the PREEMPT_RT realtime
 	  variant.

+ 3 - 2
package/linux-headers/Config.in.host

@@ -127,8 +127,9 @@ endif
 
 choice
 	bool "Custom kernel headers series"
-	default BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_15 if \
-		(BR2_KERNEL_HEADERS_AS_KERNEL && BR2_LINUX_KERNEL_LATEST_VERSION)
+	depends on !BR2_LINUX_KERNEL_LATEST_VERSION || !BR2_KERNEL_HEADERS_AS_KERNEL
+	depends on !BR2_LINUX_KERNEL_LATEST_CIP_VERSION || !BR2_KERNEL_HEADERS_AS_KERNEL
+	depends on !BR2_LINUX_KERNEL_LATEST_CIP_RT_VERSION || !BR2_KERNEL_HEADERS_AS_KERNEL
 	depends on BR2_KERNEL_HEADERS_VERSION || BR2_KERNEL_HEADERS_AS_KERNEL || \
 		   BR2_KERNEL_HEADERS_CUSTOM_TARBALL || BR2_KERNEL_HEADERS_CUSTOM_GIT
 	help