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>
This commit is contained in:
James Hilliard
2022-05-02 15:53:42 -06:00
committed by Arnout Vandecappelle (Essensium/Mind)
parent 40ea68b4b2
commit c457bf9cb4
2 changed files with 6 additions and 2 deletions

View File

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

View File

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