Openembedded Core Discussions
 help / color / mirror / Atom feed
From: "Wold, Saul" <saul.wold@intel.com>
To: "Sullivan, California L" <california.l.sullivan@intel.com>,
	"openembedded-core@lists.openembedded.org"
	<openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH 1/1] kernel.bbclass: Make sanity check opt-out and provide easy opt-out
Date: Wed, 15 Feb 2017 06:21:18 +0000	[thread overview]
Message-ID: <1487139667.10318.32.camel@intel.com> (raw)
In-Reply-To: <1486684537-17517-1-git-send-email-california.l.sullivan@intel.com>


This should also be applied Morty please

Sau!

On Thu, 2017-02-09 at 15:55 -0800, California Sullivan wrote:
> 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 AUTOINC with no way to dynamically change the PV.
> 
> Add a variable to turn off the sanity check to easily opt out.
> Add the task to the kernel build by default so that it is not both
> opt-in and opt out.
> Set the opt-out variable in linux-yocto-dev, fixing the issue with
> AUTOINC.
> 
> Signed-off-by: California Sullivan <california.l.sullivan@intel.com>
> ---
>  meta/classes/kernel.bbclass                  | 8 +++++++-
>  meta/recipes-kernel/linux/linux-yocto-dev.bb | 1 +
>  meta/recipes-kernel/linux/linux-yocto.inc    | 1 -
>  3 files changed, 8 insertions(+), 2 deletions(-)
> 
> diff --git a/meta/classes/kernel.bbclass
> b/meta/classes/kernel.bbclass
> index f462b2f..3968d8b 100644
> --- a/meta/classes/kernel.bbclass
> +++ b/meta/classes/kernel.bbclass
> @@ -325,6 +325,10 @@ do_install[prefuncs] += "package_get_auto_pr"
>  
>  # Must be ran no earlier than after do_kernel_checkout or else
> Makefile won't be in ${S}/Makefile
>  do_kernel_version_sanity_check() {
> +	if [ "x${KERNEL_VERSION_SANITY_SKIP}" = "x1" ]; then
> +		exit 0
> +	fi
> +
>  	# The Makefile determines the kernel version shown at
> runtime
>  	# Don't use KERNEL_VERSION because the headers it grabs the
> version from aren't generated until do_compile
>  	VERSION=$(grep "^VERSION =" ${S}/Makefile | sed s/.*=\ *//)
> @@ -348,11 +352,13 @@ do_kernel_version_sanity_check() {
>  	reg="${reg}${EXTRAVERSION}"
>  
>  	if [ -z `echo ${PV} | grep -E "${reg}"` ]; then
> -		bbfatal "Package Version (${PV}) does not match of
> kernel being built (${vers}). Please update the PV variable to match
> the kernel source."
> +		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."
>  	fi
>  	exit 0
>  }
>  
> +addtask kernel_version_sanity_check after do_kernel_metadata
> do_kernel_checkout before do_compile
> +
>  addtask shared_workdir after do_compile before
> do_compile_kernelmodules
>  addtask shared_workdir_setscene
>  
> diff --git a/meta/recipes-kernel/linux/linux-yocto-dev.bb
> b/meta/recipes-kernel/linux/linux-yocto-dev.bb
> index 0cda553..1410954 100644
> --- a/meta/recipes-kernel/linux/linux-yocto-dev.bb
> +++ b/meta/recipes-kernel/linux/linux-yocto-dev.bb
> @@ -43,3 +43,4 @@ KERNEL_FEATURES_append_qemux86=" cfg/sound.scc
> cfg/paravirt_kvm.scc"
>  KERNEL_FEATURES_append_qemux86-64=" cfg/sound.scc"
>  KERNEL_FEATURES_append = " ${@bb.utils.contains("TUNE_FEATURES",
> "mx32", " cfg/x32.scc", "" ,d)}"
>  
> +KERNEL_VERSION_SANITY_SKIP = "1"
> diff --git a/meta/recipes-kernel/linux/linux-yocto.inc
> b/meta/recipes-kernel/linux/linux-yocto.inc
> index 556546f..3ea3e40 100644
> --- a/meta/recipes-kernel/linux/linux-yocto.inc
> +++ b/meta/recipes-kernel/linux/linux-yocto.inc
> @@ -64,7 +64,6 @@ do_install_append(){
>  }
>  
>  # extra tasks
> -addtask kernel_version_sanity_check after do_kernel_metadata
> do_kernel_checkout before do_compile
>  addtask kernel_link_images after do_compile before do_strip
>  addtask validate_branches before do_patch after do_kernel_checkout
>  addtask kernel_configcheck after do_configure before do_compile
> -- 
> 2.5.5
> 

  reply	other threads:[~2017-02-15  6:21 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-09 23:55 [PATCH 1/1] kernel.bbclass: Make sanity check opt-out and provide easy opt-out California Sullivan
2017-02-15  6:21 ` Wold, Saul [this message]
2017-02-15 16:50   ` Richard Purdie
2017-02-23 22:32 ` [PATCH v2 " California Sullivan
2017-02-23 23:07   ` Burton, Ross
2017-02-23 23:27     ` Cal Sullivan
2017-02-24  0:13       ` Cal Sullivan
2017-02-24 18:19         ` Cal Sullivan
2017-02-28  1:02 ` [PATCH v3 1/1] kernel.bbclass: Give sanity check function an opt-out variable California Sullivan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1487139667.10318.32.camel@intel.com \
    --to=saul.wold@intel.com \
    --cc=california.l.sullivan@intel.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox