From: Farhat-Abbas <[email protected]> There isn't any EFI/BOOT directory in the 'DEPLOY_DIR_IMAGE' directory & efibootguard is present at top level in it, possibly alongwith other *efi bootloaders like grub-efi. Only efibootguard bootloader should be copied to the image from here, in the required architecture specific naming convention. This patch updates the script to the latest OE-Core tree with file 'oe-core/scripts/lib/wic/plugins/source/bootimg-efi.py' as reference.
Signed-off-by: Farhat-Abbas <[email protected]> --- scripts/lib/wic/plugins/source/efibootguard-efi.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/scripts/lib/wic/plugins/source/efibootguard-efi.py b/scripts/lib/wic/plugins/source/efibootguard-efi.py index ab3bbfd..e626f4f 100644 --- a/scripts/lib/wic/plugins/source/efibootguard-efi.py +++ b/scripts/lib/wic/plugins/source/efibootguard-efi.py @@ -66,8 +66,15 @@ class EfibootguardEFIPlugin(SourcePlugin): install_cmd = "install -d %s/EFI/BOOT" % hdddir exec_cmd(install_cmd) - cp_cmd = "cp %s/EFI/BOOT/* %s/EFI/BOOT" % (kernel_dir, hdddir) - exec_cmd(cp_cmd, True) + # Locate & install the efibootguard bootloader properly to the EFI partition + # i586 ARCH: efibootguardia32.efi ---> bootia32.efi + # x86_64 ARCH: efibootguardx64.efi ---> bootx64.efi + for mod in [x for x in os.listdir(kernel_dir) if x.startswith("efibootguard")]: + # mod = efibootguardia32.efi or efibootguardx64.efi + # efi_image = bootia32.efi or bootx64.efi + efi_image = mod.replace('efibootguard', 'boot') + cp_cmd = "cp %s/%s %s/EFI/BOOT/%s" % (kernel_dir, mod, hdddir, efi_image) + exec_cmd(cp_cmd, True) # Calculate the number of extra blocks to be sure that the # resulting partition image is of the wanted size -- 2.7.4 -- You received this message because you are subscribed to the Google Groups "EFI Boot Guard" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/efibootguard-dev/1519216052-8012-6-git-send-email-Farhat_Abbas%40mentor.com. For more options, visit https://groups.google.com/d/optout.
