]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
grub-efi.bbclass: fix racing issue on grub-efi image
authorHongxu Jia <hongxu.jia@windriver.com>
Fri, 5 Sep 2025 06:57:40 +0000 (14:57 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 8 Sep 2025 17:02:37 +0000 (18:02 +0100)
In recipe grub-efi, the deploy task installed grub-efi image to deploy dir.

In image-live.bbclass, the do_bootimg task called build_iso -> efi_iso_populate
-> efi_populate.

In image-live.bbclass, the do_bootimg task called build_hddimg -> efi_hddimg_populate
-> efi_populate.

In grub-efi.bbclass, efi_populate called efi_populate_common for grub-efi to
installed grub-efi image from deploy dir to ISO/HDDDIR.

Explicitly make do_bootimg depend on grub-efi:deploy otherwise a racing issue
on grub-efi image in deploy dir
...
|DEBUG: Executing shell function build_iso
|NOTE: Trying to install tmp/deploy/images/qemux86-64/bzImage as tmp/work/qemux86_64-wrs-linux/
wrlinux-image-installer/1.0/sources/wrlinux-image-installer-1.0/iso/bzImage
|install: cannot stat 'tmp/deploy/images/qemux86-64/grub-efi-bootx64.efi': No such file or directory
|WARNING: tmp/work/qemux86_64-wrs-linux/wrlinux-image-installer/1.0/temp/run.build_iso.954273:419 exit 1 from
'install -m 0644 tmp/deploy/images/qemux86-64/$2-bootx64.efi ${DEST}/EFI/BOOT/bootx64.efi'
...

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes-recipe/grub-efi.bbclass

index 4afd12195fb0ca33ea441f1e13b2fe5d83047ada..34bcbc53e69193bf9ecd4b937eec8031a64e42e9 100644 (file)
@@ -7,6 +7,9 @@
 inherit grub-efi-cfg
 require conf/image-uefi.conf
 
+# Assure the existence of grub-efi image in deploy dir
+do_bootimg[depends] += "grub-efi:do_deploy"
+
 efi_populate() {
        efi_populate_common "$1" grub-efi