Skip to contentSkip to conversation

kernel-fit-image: skip sstate creation for deploy

PATCH In review Tafil Avdyli 3 participants 3 messages Jun 3 – Jun 6

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kernel-fit-image: skip sstate creation for deploy

When building completely from sstate (e.g. in pipeline), the linux-yocto-fitimage recipe deploys from sstate even if the INITRAMFS_IMAGE requires a rebuild.

Using dm-verity or verity image classes, the initramfs image must be rebuilt after the rootfs. However, linux-yocto-fitimage:do_build was skipped and went straight for do_deploy from sstate and deployed a fitImage with an outdated initramfs with old roothash data while the image and INITRAMFS_IMAGE were being built.

Skipping the do_deploy task in a sstate only build, successfully triggers linux-yocto-fitimage:do_build after INITRAMFS_IMAGE:do_image_complete.
This also follows fitimage.bbclass[1] from meta-oe.

[1]: https://git.openembedded.org/meta-openembedded/tree/meta-oe/classes/fitimage.bbclass?h=wrynose#n522

---
 meta/classes-recipe/kernel-fit-image.bbclass | 1 +
 1 file changed, 1 insertion(+)
meta/classes-recipe/kernel-fit-image.bbclass +1 -0
index ae8f3c6688..03272bab51 100644
@@ -241,3 +241,4 @@ do_deploy() {
     fi
 }
 addtask deploy after do_compile before do_build
+SSTATE_SKIP_CREATION:task-deploy = "1"
#1 lore raw
Quoted 27 lines · Tafil Avdyli via lists.openembedded.org

When building completely from sstate (e.g. in pipeline), the linux-yocto-fitimage recipe deploys from sstate even if the INITRAMFS_IMAGE requires a rebuild.

Using dm-verity or verity image classes, the initramfs image must be rebuilt after the rootfs. However, linux-yocto-fitimage:do_build was skipped and went straight for do_deploy from sstate and deployed a fitImage with an outdated initramfs with old roothash data while the image and INITRAMFS_IMAGE were being built.

Skipping the do_deploy task in a sstate only build, successfully triggers linux-yocto-fitimage:do_build after INITRAMFS_IMAGE:do_image_complete.
This also follows fitimage.bbclass[1] from meta-oe.

[1]: https://git.openembedded.org/meta-openembedded/tree/meta-oe/classes/fitimage.bbclass?h=wrynose#n522

---
 meta/classes-recipe/kernel-fit-image.bbclass | 1 +

 1 file changed, 1 insertion(+)
meta/classes-recipe/kernel-fit-image.bbclass +0 -0
index ae8f3c6688..03272bab51 100644
@@ -241,3 +241,4 @@ do_deploy() {
Quoted 4 lines

     fi
 }
 addtask deploy after do_compile before do_build
+SSTATE_SKIP_CREATION:task-deploy = "1"

This is a workaround, it sounds like there is a missing dependency somewhere to trigger the build needed?

Cheers,

Richard

#2 lore raw
Quoted 28 lines · Richard Purdie via lists.openembedded.org
Quoted 26 lines · Tafil Avdyli via lists.openembedded.org

When building completely from sstate (e.g. in pipeline), the linux-yocto-fitimage recipe deploys from sstate even if the INITRAMFS_IMAGE requires a rebuild.

Using dm-verity or verity image classes, the initramfs image must be
rebuilt after the rootfs. However, linux-yocto-fitimage:do_build was
skipped and went straight for do_deploy from sstate and deployed a fitImage with an outdated initramfs with old roothash data while the
image and INITRAMFS_IMAGE were being built.

Skipping the do_deploy task in a sstate only build, successfully triggers linux-yocto-fitimage:do_build after INITRAMFS_IMAGE:do_image_complete.
This also follows fitimage.bbclass[1] from meta-oe.

[1]:
https://git.openembedded.org/meta-openembedded/tree/meta-oe/classes/fitimage.bbclass?h=wrynose#n522

---
 meta/classes-recipe/kernel-fit-image.bbclass | 1 +

 1 file changed, 1 insertion(+)
Quoted 13 lines
Quoted 10 lines
meta/classes-recipe/kernel-fit-image.bbclass +0 -0
index ae8f3c6688..03272bab51 100644
@@ -241,3 +241,4 @@ do_deploy() {

     fi
 }
 addtask deploy after do_compile before do_build
+SSTATE_SKIP_CREATION:task-deploy = "1"

This is a workaround, it sounds like there is a missing dependency somewhere to trigger the build needed?

I agree with Richard, this is not the right fix. What are you exactly doing and what are you then going to change before calling bitbake again?

Regards,
Adrian

Quoted 15 lines

Cheers,

Richard

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#238102):
https://lists.openembedded.org/g/openembedded-core/message/238102
Mute This Topic: https://lists.openembedded.org/mt/119630574/4454582
Group Owner: [email protected] Unsubscribe:
https://lists.openembedded.org/g/openembedded-core/unsub [
[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-