toolchain: allow using custom headers newer than latest known ones
authorVincent Fazio <vfazio@xes-inc.com>
Wed, 15 Jan 2020 18:29:07 +0000 (19:29 +0100)
committerPeter Korsgaard <peter@korsgaard.com>
Sat, 8 Feb 2020 19:25:10 +0000 (20:25 +0100)
commit338e62bd5d23e843a4bf69c06a02681450e858ae
treea6bea11db9c57d7cdcf1c81bb3daaae5ee70ea87
parentfbe18eb246375af9d8c9421045ba315573049c43
toolchain: allow using custom headers newer than latest known ones

When Buildroot is released, it knows up to a certain kernel header
version, and no later. However, it is possible that an external
toolchain will be used, that uses headers newer than the latest version
Buildroot knows about.

This may also happen when testing a development, an rc-class, or a newly
released kernel, either in an external toolchain, or with an internal
toolchain with custom headers (same-as-kernel, custom version, custom
git, custom tarball).

In the current state, Buildroot would refuse to use such toolchains,
because the test is for strict equality.

We'd like to make that situation possible, but we also want the user not
to be lenient at the same time, and select the right headers version
when it is known.

So, we add a new Kconfig blind option that the latest kernel headers
version selects. This options is then used to decide whether we do a
strict or loose check of the kernel headers.

Suggested-by: Aaron Sierra <asierra@xes-inc.com>
Signed-off-by: Vincent Fazio <vfazio@xes-inc.com>
[yann.morin.1998@free.fr:
  - only do a loose check for the latest version
  - expand commit log
]
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Tested-by: Vincent Fazio <vfazio@xes-inc.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
package/linux-headers/Config.in.host
package/linux-headers/linux-headers.mk
support/scripts/check-kernel-headers.sh
toolchain/Config.in
toolchain/helpers.mk
toolchain/toolchain-external/pkg-toolchain-external.mk
toolchain/toolchain-external/toolchain-external-custom/Config.in.options