summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorCalifornia Sullivan <california.l.sullivan@intel.com>2017-02-27 17:02:43 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-03-04 23:18:19 +0000
commit132b4d13e0e59c2929484111ed70ad62e30a3d2b (patch)
tree5e3ae303d5f6b190c148fcee003026e0850b26bb /meta
parentf3881e63fd0cfca36aa66afcc2ce0a7cecb71a0a (diff)
downloadpoky-132b4d13e0e59c2929484111ed70ad62e30a3d2b.tar.gz
kernel.bbclass: Give sanity check function an opt-out variable
Having no opt-out method and adding the task to linux-yocto.inc was causing issues. For example, linux-yocto-dev would often fail because it uses AUTOREV with no way to dynamically change the PV. Add a variable to turn off the sanity check, allowing an easy opt out, and set the opt-out variable in linux-yocto-dev, fixing the issue with AUTOREV. (From OE-Core rev: 1b6a3c17874ead7ee0957e67329aa3bd019fa129) Signed-off-by: California Sullivan <california.l.sullivan@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/kernel.bbclass6
-rw-r--r--meta/recipes-kernel/linux/linux-yocto-dev.bb1
2 files changed, 6 insertions, 1 deletions
diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index 3cd59fd749..1e0646a437 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -327,6 +327,10 @@ do_install[prefuncs] += "package_get_auto_pr"
327 327
328# Must be ran no earlier than after do_kernel_checkout or else Makefile won't be in ${S}/Makefile 328# Must be ran no earlier than after do_kernel_checkout or else Makefile won't be in ${S}/Makefile
329do_kernel_version_sanity_check() { 329do_kernel_version_sanity_check() {
330 if [ "x${KERNEL_VERSION_SANITY_SKIP}" = "x1" ]; then
331 exit 0
332 fi
333
330 # The Makefile determines the kernel version shown at runtime 334 # The Makefile determines the kernel version shown at runtime
331 # Don't use KERNEL_VERSION because the headers it grabs the version from aren't generated until do_compile 335 # Don't use KERNEL_VERSION because the headers it grabs the version from aren't generated until do_compile
332 VERSION=$(grep "^VERSION =" ${S}/Makefile | sed s/.*=\ *//) 336 VERSION=$(grep "^VERSION =" ${S}/Makefile | sed s/.*=\ *//)
@@ -350,7 +354,7 @@ do_kernel_version_sanity_check() {
350 reg="${reg}${EXTRAVERSION}" 354 reg="${reg}${EXTRAVERSION}"
351 355
352 if [ -z `echo ${PV} | grep -E "${reg}"` ]; then 356 if [ -z `echo ${PV} | grep -E "${reg}"` ]; then
353 bbfatal "Package Version (${PV}) does not match of kernel being built (${vers}). Please update the PV variable to match the kernel source." 357 bbfatal "Package Version (${PV}) does not match of kernel being built (${vers}). Please update the PV variable to match the kernel source or set KERNEL_VERSION_SANITY_SKIP=\"1\" in your recipe."
354 fi 358 fi
355 exit 0 359 exit 0
356} 360}
diff --git a/meta/recipes-kernel/linux/linux-yocto-dev.bb b/meta/recipes-kernel/linux/linux-yocto-dev.bb
index b9487d6e69..444ee4111d 100644
--- a/meta/recipes-kernel/linux/linux-yocto-dev.bb
+++ b/meta/recipes-kernel/linux/linux-yocto-dev.bb
@@ -44,3 +44,4 @@ KERNEL_FEATURES_append_qemux86=" cfg/sound.scc cfg/paravirt_kvm.scc"
44KERNEL_FEATURES_append_qemux86-64=" cfg/sound.scc" 44KERNEL_FEATURES_append_qemux86-64=" cfg/sound.scc"
45KERNEL_FEATURES_append = " ${@bb.utils.contains("TUNE_FEATURES", "mx32", " cfg/x32.scc", "" ,d)}" 45KERNEL_FEATURES_append = " ${@bb.utils.contains("TUNE_FEATURES", "mx32", " cfg/x32.scc", "" ,d)}"
46 46
47KERNEL_VERSION_SANITY_SKIP = "1"