Skip to contentSkip to conversation

kernel.bbclass: fix some incorrect inter-task dependencies

PATCH In review [email protected] 2 participants 3 messages Mar 30, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kernel.bbclass: fix some incorrect inter-task dependencies

From: Ming Liu <[email protected]>

- Move the addtask statment that kernel_link_images needs run after do_compile from linux-yocto.inc to kernel.bbclass. Or else the recipes that inheriting kernel.bbclass might run into implicit dependency issues.
- Fix a typo, "addtask do_strip" should be "addtask strip".
- Remove some redundant addtask statments, when "addtask A after B" is set, then "addtask B before A" is not needed.

---
 meta/classes/kernel.bbclass               | 5 +++--
 meta/recipes-kernel/linux/linux-yocto.inc | 1 -
 2 files changed, 3 insertions(+), 3 deletions(-)
meta/classes/kernel.bbclass +3 -2
index 244087a..d175f1d 100644
@@ -538,6 +538,7 @@ do_kernel_link_images() {
 		ln -sf ../../../vmlinuz.bin
 	fi
 }
+addtask kernel_link_images after do_compile
 
 do_strip() {
 	if [ -n "${KERNEL_IMAGE_STRIP_EXTRA_SECTIONS}" ]; then
@@ -566,7 +567,7 @@ do_strip() {
 }
 do_strip[dirs] = "${B}"
 
-addtask do_strip before do_sizecheck after do_kernel_link_images
+addtask strip before do_sizecheck after do_kernel_link_images
 
 # Support checking the kernel size since some kernels need to reside in partitions
 # with a fixed length or there is a limit in transferring the kernel to memory
@@ -586,7 +587,7 @@ do_sizecheck() {
 }
 do_sizecheck[dirs] = "${B}"
 
-addtask sizecheck before do_install after do_strip
+addtask sizecheck before do_install
 
 KERNEL_IMAGE_BASE_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}-${DATETIME}"
 # Don't include the DATETIME variable in the sstate package signatures
meta/recipes-kernel/linux/linux-yocto.inc +0 -1
index 556546f..637506a 100644
@@ -65,6 +65,5 @@ 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
Signature · 1 line
2.7.4
#1 lore raw
Quoted 10 lines · On Thu, Mar 30, 2017 at 3:58 AM, <[email protected]> wrote:

From: Ming Liu <[email protected]>

- Move the addtask statment that kernel_link_images needs run after do_compile from linux-yocto.inc to kernel.bbclass. Or else the recipes that inheriting kernel.bbclass might run into implicit dependency issues.
- Fix a typo, "addtask do_strip" should be "addtask strip".
- Remove some redundant addtask statments, when "addtask A after B" is set, then "addtask B before A" is not needed.

These should be multiple commits. Whenever you find yourself listing changes in
a single commit header, it should really be multiple commits. Even if the changes
are small.

Quoted 31 lines
---
 meta/classes/kernel.bbclass               | 5 +++--
 meta/recipes-kernel/linux/linux-yocto.inc | 1 -
 2 files changed, 3 insertions(+), 3 deletions(-)
meta/classes/kernel.bbclass +2 -1
index 244087a..d175f1d 100644
@@ -538,6 +538,7 @@ do_kernel_link_images() {
                ln -sf ../../../vmlinuz.bin
        fi
 }
+addtask kernel_link_images after do_compile
 
 do_strip() {
        if [ -n "${KERNEL_IMAGE_STRIP_EXTRA_SECTIONS}" ]; then
@@ -566,7 +567,7 @@ do_strip() {
 }
 do_strip[dirs] = "${B}"
 
-addtask do_strip before do_sizecheck after do_kernel_link_images
+addtask strip before do_sizecheck after do_kernel_link_images
 
 # Support checking the kernel size since some kernels need to reside in

partitions

 # with a fixed length or there is a limit in transferring the kernel to
memory

meta/classes/kernel.bbclass do_sizecheck() { · line 591

Quoted 6 lines
meta/classes/kernel.bbclass +1 -1
@@ -586,7 +587,7 @@ do_sizecheck() {
 }
 do_sizecheck[dirs] = "${B}"
 
-addtask sizecheck before do_install after do_strip
+addtask sizecheck before do_install
 

Although possibly redundant, I don't see the problem with leaving this in place.
When we have the before and after here, it is self documenting when this should
run.

With this removed, the reader must track down all the task dependencies themselves
if they are to come to the same conclusion. Also, if that other task dependency changes,
this will change.

So I prefer that this stay completely defined and self documenting.

Bruce

Quoted 26 lines
meta/classes/kernel.bbclass +0 -0
 KERNEL_IMAGE_BASE_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${

MACHINE}-${DATETIME}"
# Don't include the DATETIME variable in the sstate package signatures

meta/recipes-kernel/linux/linux-yocto.inc +0 -0
index 556546f..637506a 100644
@@ -65,6 +65,5 @@ 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.7.4

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Signature · 2 lines
"Thou shalt not follow the NULL pointer, for chaos and madness await thee
at its end"
author
#2 lore raw

Hi, Bruce:

Got your meaning, will send a V2 soon.

//Ming Liu

2017-03-30 14:38 GMT+02:00 Bruce Ashfield <[email protected]>:

Quoted 110 lines · On Thu, Mar 30, 2017 at 3:58 AM, <[email protected]> wrote:
Quoted 11 lines

From: Ming Liu <[email protected]>

- Move the addtask statment that kernel_link_images needs run after do_compile from linux-yocto.inc to kernel.bbclass. Or else the recipes that inheriting kernel.bbclass might run into implicit dependency issues.
- Fix a typo, "addtask do_strip" should be "addtask strip".
- Remove some redundant addtask statments, when "addtask A after B" is set, then "addtask B before A" is not needed.

These should be multiple commits. Whenever you find yourself listing changes in
a single commit header, it should really be multiple commits. Even if the changes
are small.

Quoted 31 lines
---
 meta/classes/kernel.bbclass               | 5 +++--
 meta/recipes-kernel/linux/linux-yocto.inc | 1 -
 2 files changed, 3 insertions(+), 3 deletions(-)
meta/classes/kernel.bbclass +2 -1
index 244087a..d175f1d 100644
@@ -538,6 +538,7 @@ do_kernel_link_images() {
                ln -sf ../../../vmlinuz.bin
        fi
 }
+addtask kernel_link_images after do_compile
 
 do_strip() {
        if [ -n "${KERNEL_IMAGE_STRIP_EXTRA_SECTIONS}" ]; then
@@ -566,7 +567,7 @@ do_strip() {
 }
 do_strip[dirs] = "${B}"
 
-addtask do_strip before do_sizecheck after do_kernel_link_images
+addtask strip before do_sizecheck after do_kernel_link_images
 
 # Support checking the kernel size since some kernels need to reside in

partitions

 # with a fixed length or there is a limit in transferring the kernel to
memory

meta/classes/kernel.bbclass do_sizecheck() { · line 591

Quoted 6 lines
meta/classes/kernel.bbclass +1 -1
@@ -586,7 +587,7 @@ do_sizecheck() {
 }
 do_sizecheck[dirs] = "${B}"
 
-addtask sizecheck before do_install after do_strip
+addtask sizecheck before do_install
 

Although possibly redundant, I don't see the problem with leaving this in place.
When we have the before and after here, it is self documenting when this should
run.

With this removed, the reader must track down all the task dependencies themselves
if they are to come to the same conclusion. Also, if that other task dependency changes,
this will change.

So I prefer that this stay completely defined and self documenting.

Bruce

Quoted 20 lines
meta/classes/kernel.bbclass +0 -0
 KERNEL_IMAGE_BASE_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MAC

HINE}-${DATETIME}"
# Don't include the DATETIME variable in the sstate package signatures

meta/recipes-kernel/linux/linux-yocto.inc +0 -0
index 556546f..637506a 100644
@@ -65,6 +65,5 @@ 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.7.4

Quoted 6 lines

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

--
"Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end"