Skip to content

Commit

Permalink
image-sign-rpi.bbclass: reorder tasks to avoid missing boot files
Browse files Browse the repository at this point in the history
At this moment do_balena_signed_bootgen_and_deploy
and do_image_balenaos_img tasks run in parallel, which is causing
problems as do_image_balenaos_img needs to use the output
of do_balena_signed_bootgen_and_deploy to generate the contents
of the boot partition. Since the call to the signing server takes
several seconds, sometimes `boot.sig` or `boot.img` or both
are not included in the final image, depending on when
do_image_balenaos_img is actually executed.

This patch reorders the tasks so that do_image_balenaos_img is only
started after do_balena_signed_bootgen_and_deploy.

Changelog-entry: Fix race condition between signing and generating boot partition
Signed-off-by: Michal Toman <michalt@balena.io>
  • Loading branch information
mtoman committed Jun 11, 2024
1 parent 26d2f27 commit 6a5a8ec
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -124,4 +124,4 @@ do_balena_signed_bootgen_and_deploy[vardeps] += " \
SIGN_RSA_KEY_ID \
"

addtask balena_signed_bootgen_and_deploy after do_resin_boot_dirgen_and_deploy before do_image_complete
addtask balena_signed_bootgen_and_deploy after do_resin_boot_dirgen_and_deploy before do_image_balenaos_img

0 comments on commit 6a5a8ec

Please sign in to comment.