* Re: [PATCH 1/1] kernel.bbclass: Make sanity check opt-out and provide easy opt-out
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
2017-02-15 16:50 ` Richard Purdie
2017-02-23 22:32 ` [PATCH v2 " California Sullivan
2017-02-28 1:02 ` [PATCH v3 1/1] kernel.bbclass: Give sanity check function an opt-out variable California Sullivan
2 siblings, 1 reply; 9+ messages in thread
From: Wold, Saul @ 2017-02-15 6:21 UTC (permalink / raw)
To: Sullivan, California L, openembedded-core@lists.openembedded.org
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
>
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: [PATCH 1/1] kernel.bbclass: Make sanity check opt-out and provide easy opt-out
2017-02-15 6:21 ` Wold, Saul
@ 2017-02-15 16:50 ` Richard Purdie
0 siblings, 0 replies; 9+ messages in thread
From: Richard Purdie @ 2017-02-15 16:50 UTC (permalink / raw)
To: Wold, Saul, Sullivan, California L,
openembedded-core@lists.openembedded.org
On Wed, 2017-02-15 at 06:21 +0000, Wold, Saul wrote:
> This should also be applied Morty please
Whilst we can likely do this in master, it does have side effects you
aren't highlighting. You're making the kernel version check default for
*all* kernels linux-yocto or otherwise. This is a significant change in
behaviour and could break many existing non linux-yocto recipes. That
is certainly not something which can easily be backported to morty. Its
also something which if intended, should be hightlighted in the commit
message.
This is a good example of why these "can we backport this?" messages
for changes that haven't even made master worry me.
Cheers,
Richard
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH v2 1/1] kernel.bbclass: Make sanity check opt-out and provide easy opt-out
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
@ 2017-02-23 22:32 ` California Sullivan
2017-02-23 23:07 ` Burton, Ross
2017-02-28 1:02 ` [PATCH v3 1/1] kernel.bbclass: Give sanity check function an opt-out variable California Sullivan
2 siblings, 1 reply; 9+ messages in thread
From: California Sullivan @ 2017-02-23 22:32 UTC (permalink / raw)
To: openembedded-core; +Cc: saul.wold
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 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
AUTOREV.
Note that this change *will* impact non linux-yocto kernel recipes, and
will require recipes using kernel.bbclass to either set the correct PV
or opt-out of the check.
Signed-off-by: California Sullivan <california.l.sullivan@intel.com>
---
The only change from V1 to V2 is the updated commit message, changing
AUTOINC to AUTOREV and adding the blurb about impacting outside recipes.
I also agree with Richard in that this is a significant functionality change
and should not be backported.
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 97cba92..731776e 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 a4e02db..d5579b2 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
^ permalink raw reply related [flat|nested] 9+ messages in thread* Re: [PATCH v2 1/1] kernel.bbclass: Make sanity check opt-out and provide easy opt-out
2017-02-23 22:32 ` [PATCH v2 " California Sullivan
@ 2017-02-23 23:07 ` Burton, Ross
2017-02-23 23:27 ` Cal Sullivan
0 siblings, 1 reply; 9+ messages in thread
From: Burton, Ross @ 2017-02-23 23:07 UTC (permalink / raw)
To: California Sullivan; +Cc: Saul Wold, OE-core
[-- Attachment #1: Type: text/plain, Size: 590 bytes --]
On 23 February 2017 at 22:32, California Sullivan <
california.l.sullivan@intel.com> wrote:
> The only change from V1 to V2 is the updated commit message, changing
> AUTOINC to AUTOREV and adding the blurb about impacting outside recipes.
>
> I also agree with Richard in that this is a significant functionality
> change
> and should not be backported.
>
I failed to say that I suspected this patch was to blame for SDK generation
failing on the autobuilder earlier. Can you try generating a eSDK (bitbake
core-image-minimal -c populate_sdk_ext) with this patch?
Ross
[-- Attachment #2: Type: text/html, Size: 1008 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2 1/1] kernel.bbclass: Make sanity check opt-out and provide easy opt-out
2017-02-23 23:07 ` Burton, Ross
@ 2017-02-23 23:27 ` Cal Sullivan
2017-02-24 0:13 ` Cal Sullivan
0 siblings, 1 reply; 9+ messages in thread
From: Cal Sullivan @ 2017-02-23 23:27 UTC (permalink / raw)
To: Burton, Ross; +Cc: Saul Wold, OE-core
[-- Attachment #1: Type: text/plain, Size: 842 bytes --]
On 02/23/2017 03:07 PM, Burton, Ross wrote:
>
> On 23 February 2017 at 22:32, California Sullivan
> <california.l.sullivan@intel.com
> <mailto:california.l.sullivan@intel.com>> wrote:
>
> The only change from V1 to V2 is the updated commit message, changing
> AUTOINC to AUTOREV and adding the blurb about impacting outside
> recipes.
>
> I also agree with Richard in that this is a significant
> functionality change
> and should not be backported.
>
>
> I failed to say that I suspected this patch was to blame for SDK
> generation failing on the autobuilder earlier. Can you try generating
> a eSDK (bitbake core-image-minimal -c populate_sdk_ext) with this patch?
>
> Ross
Will do. Any specific configuration I should use, or should it fail in
most/all situations?
Thanks,
Cal
[-- Attachment #2: Type: text/html, Size: 2076 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2 1/1] kernel.bbclass: Make sanity check opt-out and provide easy opt-out
2017-02-23 23:27 ` Cal Sullivan
@ 2017-02-24 0:13 ` Cal Sullivan
2017-02-24 18:19 ` Cal Sullivan
0 siblings, 1 reply; 9+ messages in thread
From: Cal Sullivan @ 2017-02-24 0:13 UTC (permalink / raw)
To: Burton, Ross; +Cc: OE-core, Saul Wold
[-- Attachment #1: Type: text/plain, Size: 2459 bytes --]
On 02/23/2017 03:27 PM, Cal Sullivan wrote:
>
>
> On 02/23/2017 03:07 PM, Burton, Ross wrote:
>>
>> On 23 February 2017 at 22:32, California Sullivan
>> <california.l.sullivan@intel.com
>> <mailto:california.l.sullivan@intel.com>> wrote:
>>
>> The only change from V1 to V2 is the updated commit message, changing
>> AUTOINC to AUTOREV and adding the blurb about impacting outside
>> recipes.
>>
>> I also agree with Richard in that this is a significant
>> functionality change
>> and should not be backported.
>>
>>
>> I failed to say that I suspected this patch was to blame for SDK
>> generation failing on the autobuilder earlier. Can you try
>> generating a eSDK (bitbake core-image-minimal -c populate_sdk_ext)
>> with this patch?
>>
>> Ross
> Will do. Any specific configuration I should use, or should it fail in
> most/all situations?
>
> Thanks,
> Cal
>
>
[clsulliv@clsulliv build]$ bitbake core-image-minimal -c populate_sdk_ext
WARNING: Host distribution "fedora-23" has not been validated with this
version of the build system; you may possibly experience unexpected
failures. It is recommended that you use a tested distribution.
Loading cache: 100%
|##############################################################################################################|
Time: 0:00:00
Loaded 1346 entries from dependency cache.
NOTE: Resolving any missing task queue dependencies
Build Configuration:
BB_VERSION = "1.33.1"
BUILD_SYS = "x86_64-linux"
NATIVELSBSTRING = "universal"
TARGET_SYS = "x86_64-poky-linux"
MACHINE = "intel-corei7-64"
DISTRO = "poky"
DISTRO_VERSION = "2.2+snapshot-20170223"
TUNE_FEATURES = "m64 corei7"
TARGET_FPU = ""
meta
meta-poky
meta-yocto-bsp =
"clsulliv/sanity:53c2449017a3312a2e65720a23ef654924eef0b4"
meta-intel = "master:5153dad2fa695bbb579c03ff795ef649269e8420"
Initialising tasks: 100%
|#########################################################################################################|
Time: 0:00:06
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
NOTE: Tasks Summary: Attempted 3362 tasks of which 2752 didn't need to
be rerun and all succeeded.
Summary: There was 1 WARNING message shown.
I'll rerun the build with no meta-intel and qemux86 overnight.
p.s., upgrading my fedora system now :)
---
Cal
[-- Attachment #2: Type: text/html, Size: 4420 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2 1/1] kernel.bbclass: Make sanity check opt-out and provide easy opt-out
2017-02-24 0:13 ` Cal Sullivan
@ 2017-02-24 18:19 ` Cal Sullivan
0 siblings, 0 replies; 9+ messages in thread
From: Cal Sullivan @ 2017-02-24 18:19 UTC (permalink / raw)
To: Burton, Ross; +Cc: Saul Wold, OE-core
[-- Attachment #1: Type: text/plain, Size: 2678 bytes --]
On 02/23/2017 04:13 PM, Cal Sullivan wrote:
> On 02/23/2017 03:27 PM, Cal Sullivan wrote:
>>
>>
>> On 02/23/2017 03:07 PM, Burton, Ross wrote:
>>>
>>> On 23 February 2017 at 22:32, California Sullivan
>>> <california.l.sullivan@intel.com
>>> <mailto:california.l.sullivan@intel.com>> wrote:
>>>
>>> The only change from V1 to V2 is the updated commit message,
>>> changing
>>> AUTOINC to AUTOREV and adding the blurb about impacting outside
>>> recipes.
>>>
>>> I also agree with Richard in that this is a significant
>>> functionality change
>>> and should not be backported.
>>>
>>>
>>> I failed to say that I suspected this patch was to blame for SDK
>>> generation failing on the autobuilder earlier. Can you try
>>> generating a eSDK (bitbake core-image-minimal -c populate_sdk_ext)
>>> with this patch?
>>>
>>> Ross
>> Will do. Any specific configuration I should use, or should it fail
>> in most/all situations?
>>
>> Thanks,
>> Cal
>>
>>
>
> [clsulliv@clsulliv build]$ bitbake core-image-minimal -c populate_sdk_ext
> WARNING: Host distribution "fedora-23" has not been validated with
> this version of the build system; you may possibly experience
> unexpected failures. It is recommended that you use a tested distribution.
> Loading cache: 100%
> |##############################################################################################################|
> Time: 0:00:00
> Loaded 1346 entries from dependency cache.
> NOTE: Resolving any missing task queue dependencies
>
> Build Configuration:
> BB_VERSION = "1.33.1"
> BUILD_SYS = "x86_64-linux"
> NATIVELSBSTRING = "universal"
> TARGET_SYS = "x86_64-poky-linux"
> MACHINE = "intel-corei7-64"
> DISTRO = "poky"
> DISTRO_VERSION = "2.2+snapshot-20170223"
> TUNE_FEATURES = "m64 corei7"
> TARGET_FPU = ""
> meta
> meta-poky
> meta-yocto-bsp =
> "clsulliv/sanity:53c2449017a3312a2e65720a23ef654924eef0b4"
> meta-intel = "master:5153dad2fa695bbb579c03ff795ef649269e8420"
>
> Initialising tasks: 100%
> |#########################################################################################################|
> Time: 0:00:06
> NOTE: Executing SetScene Tasks
> NOTE: Executing RunQueue Tasks
> NOTE: Tasks Summary: Attempted 3362 tasks of which 2752 didn't need to
> be rerun and all succeeded.
>
> Summary: There was 1 WARNING message shown.
>
>
> I'll rerun the build with no meta-intel and qemux86 overnight.
>
> p.s., upgrading my fedora system now :)
>
> ---
> Cal
>
>
Same results with qemux86.
Thanks,
Cal
[-- Attachment #2: Type: text/html, Size: 4998 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH v3 1/1] kernel.bbclass: Give sanity check function an opt-out variable
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
2017-02-23 22:32 ` [PATCH v2 " California Sullivan
@ 2017-02-28 1:02 ` California Sullivan
2 siblings, 0 replies; 9+ messages in thread
From: California Sullivan @ 2017-02-28 1:02 UTC (permalink / raw)
To: openembedded-core; +Cc: saul.wold
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.
v2 changes:
* Update commit message, removing typos and highlighting the patch will
effect all kernels.
v3 changes:
* It was decided the change was too invasive, so move function back to
linux-yocto.inc so that what it doesn't affect all kernels. Remove
note about effecting all kernels.
Signed-off-by: California Sullivan <california.l.sullivan@intel.com>
---
meta/classes/kernel.bbclass | 6 +++++-
meta/recipes-kernel/linux/linux-yocto-dev.bb | 1 +
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index 97cba92..1fa33e2 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,7 +352,7 @@ 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
}
diff --git a/meta/recipes-kernel/linux/linux-yocto-dev.bb b/meta/recipes-kernel/linux/linux-yocto-dev.bb
index a4e02db..d5579b2 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"
--
2.5.5
^ permalink raw reply related [flat|nested] 9+ messages in thread