summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2016-05-09 16:43:31 +1200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-05-20 10:20:55 +0100
commit55159ef0567c9c5f47609a18cff8866a17e53173 (patch)
tree584b93ea516f99837e37beccafd8032194d042cb /meta/classes
parent02587c4bade345edd6a49ec9fdf7bae007d73eae (diff)
downloadpoky-55159ef0567c9c5f47609a18cff8866a17e53173.tar.gz
classes/kernel: check OLDEST_KERNEL at configure time
If the kernel being built is older than OLDEST_KERNEL and we're building with glibc, then the C library we're building is probably not going to be compatible with the kernel and we should warn the user. (This is easier to do here rather than when building glibc, because we don't necessarily have the information we need to determine the kernel version there, whereas we do here.) Fixes [YOCTO #8653]. (From OE-Core rev: 2e66f57febe85a63ce2ab98eaf6318d47eb60939) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/kernel.bbclass14
1 files changed, 14 insertions, 0 deletions
diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index 75450ce1a0..c5355cf37e 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -326,6 +326,20 @@ sysroot_stage_all () {
326 326
327KERNEL_CONFIG_COMMAND ?= "oe_runmake_call -C ${S} O=${B} oldnoconfig || yes '' | oe_runmake -C ${S} O=${B} oldconfig" 327KERNEL_CONFIG_COMMAND ?= "oe_runmake_call -C ${S} O=${B} oldnoconfig || yes '' | oe_runmake -C ${S} O=${B} oldconfig"
328 328
329python check_oldest_kernel() {
330 oldest_kernel = d.getVar('OLDEST_KERNEL', True)
331 kernel_version = d.getVar('KERNEL_VERSION', True)
332 tclibc = d.getVar('TCLIBC', True)
333 if tclibc == 'glibc':
334 kernel_version = kernel_version.split('-', 1)[0]
335 if oldest_kernel and kernel_version:
336 if bb.utils.vercmp_string(kernel_version, oldest_kernel) < 0:
337 bb.warn('%s: OLDEST_KERNEL is "%s" but the version of the kernel you are building is "%s" - therefore %s as built may not be compatible with this kernel. Either set OLDEST_KERNEL to an older version, or build a newer kernel.' % (d.getVar('PN', True), oldest_kernel, kernel_version, tclibc))
338}
339
340check_oldest_kernel[vardepsexclude] += "OLDEST_KERNEL KERNEL_VERSION"
341do_configure[prefuncs] += "check_oldest_kernel"
342
329kernel_do_configure() { 343kernel_do_configure() {
330 # fixes extra + in /lib/modules/2.6.37+ 344 # fixes extra + in /lib/modules/2.6.37+
331 # $ scripts/setlocalversion . => + 345 # $ scripts/setlocalversion . => +