Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

genimage.bbclass: disable SSTATE artifact generation and avoid unnecessary rebuilds #137

Merged
merged 2 commits into from
Jun 7, 2024

Conversation

ejoerns
Copy link
Member

@ejoerns ejoerns commented Jun 6, 2024

These changes will notably impact how the genimage.bbclass performs.

They will

  • save disk space (by removing sstate artifacts)
  • better trigger rebuilds where useful
  • avoid unnecessary rebuilds

Fixes #130

do_deploy already has the to_build dependency

Without this, do_genimage will always be triggered.

This change is similar to oe-core's f61bcae0 ("image: Drop before
do_build from do_rootfs and do_image") which fixes the same issue for
the image class.

Signed-off-by: Enrico Jörns <ejo@pengutronix.de>
The artifacts created would be quite large and keeping multiple of them
will consume a notable amount of disk space while the expected speed-up
is really minimal.
(For the same reasons, the image class does not generate sstate
artifacts).

Having SSTATE artifacts enabled here before also led to
unexpected/unwanted behavior where a rootfs image recipe was rebuild
and the binary output (file system image) changed but did not make it
into the final genimage-generated disk image.
This becomes a major problem, e.g. in the context of verified boot.

Signed-off-by: Enrico Jörns <ejo@pengutronix.de>
@ejoerns ejoerns added bugfix Pull Request fixes a bug backport-candidate labels Jun 6, 2024
@Emantor Emantor merged commit d0a6b38 into pengutronix:master Jun 7, 2024
2 checks passed
@ejoerns
Copy link
Member Author

ejoerns commented Jun 7, 2024

Backported to scarthgap.

@ejoerns ejoerns deleted the genimage-fixes branch June 7, 2024 11:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Inconsistent rootfs used through SSTATE cache
2 participants