[isar-cip-core][PATCH] efibootguard-efi: Use correct search path for the efibinary


Quirin Gylstorff
 

From: Quirin Gylstorff <quirin.gylstorff@...>

This fixes the build error:
```
ERROR: _exec_cmd: cp /usr/share/efibootguard/efibootguardx64.efi /tmp/tmp.1Y4utA1zC2/sentron-product-sentron-sentron.wic/tmp.wic.ampnawp6/bootx64.efi returned '1' instead of 0
output: cp: cannot stat '/usr/share/efibootguard/efibootguardx64.efi': No such file or directory
```

Signed-off-by: Quirin Gylstorff <quirin.gylstorff@...>
---
scripts/lib/wic/plugins/source/efibootguard-efi.py | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/scripts/lib/wic/plugins/source/efibootguard-efi.py b/scripts/lib/wic/plugins/source/efibootguard-efi.py
index e1411cb..a01e484 100644
--- a/scripts/lib/wic/plugins/source/efibootguard-efi.py
+++ b/scripts/lib/wic/plugins/source/efibootguard-efi.py
@@ -59,8 +59,10 @@ class EfibootguardEFIPlugin(SourcePlugin):
}

distro_arch = get_bitbake_var("DISTRO_ARCH")
- bootloader = "/usr/share/efibootguard/efibootguard{}.efi".format(
- distro_to_efi_arch[distro_arch])
+ rootfs_path = rootfs_dir.get('ROOTFS_DIR')
+ bootloader = "{rootfs_path}/usr/share/efibootguard/efibootguard{efiarch}.efi".format(
+ rootfs_path=rootfs_path,
+ efiarch=distro_to_efi_arch[distro_arch])
part_rootfs_dir = "%s/disk/%s.%s" % (cr_workdir,
part.label,
part.lineno)
--
2.35.1

Join cip-dev@lists.cip-project.org to automatically receive all group messages.