Skip to contentSkip to conversation

efibootguard: Architecture independent installation

PATCH Applied Q. Gylstorff 2 participants 2 messages Mar 11, 2022 – Mar 14, 2022 1 message not in the archive

lore
Share & tools
lore
#1 lore raw

PATCH 1/1 efibootguard: Architecture independent installation

In reply to a message not in the archive

From: Quirin Gylstorff <[email protected]>

Add globbing to install the efibootguard binary architecture independent.

Also adapt the wic plugin to use the build output.

---
 recipes-bsp/efibootguard/files/debian/efibootguard.install | 2 +-
 recipes-bsp/efibootguard/files/debian/efibootguard.links   | 1 -
 scripts/lib/wic/plugins/source/efibootguard-efi.py         | 6 ++++--
 3 files changed, 5 insertions(+), 4 deletions(-)
 delete mode 100644 recipes-bsp/efibootguard/files/debian/efibootguard.links
recipes-bsp/efibootguard/files/debian/efibootguard.install +1 -1
index 0239953..462fc1d 100644
@@ -1,3 +1,3 @@
 bg_setenv usr/bin
 bg_printenv usr/bin
-efibootguardx64.efi usr/share/efibootguard
+efibootguard*.efi usr/share/efibootguard
recipes-bsp/efibootguard/files/debian/efibootguard.links deleted +0 -1
deleted file mode 100644
index 97bab21..0000000
@@ -1 +0,0 @@
-usr/share/efibootguard/efibootguardx64.efi usr/share/efibootguard/bootx64.efi
scripts/lib/wic/plugins/source/efibootguard-efi.py +4 -2
index 858fcbf..9e6febe 100644
@@ -59,7 +59,7 @@ class EfibootguardEFIPlugin(SourcePlugin):
         }
 
         distro_arch = get_bitbake_var("DISTRO_ARCH")
-        bootloader = "/usr/share/efibootguard/boot{}.efi".format(
+        bootloader = "/usr/share/efibootguard/efibootguard{}.efi".format(
             distro_to_efi_arch[distro_arch])
         part_rootfs_dir = "%s/disk/%s.%s" % (cr_workdir,
                                              part.label,
@@ -67,7 +67,9 @@ class EfibootguardEFIPlugin(SourcePlugin):
         create_dir_cmd = "install -d %s/EFI/BOOT" % part_rootfs_dir
         exec_cmd(create_dir_cmd)
 
-        name = os.path.basename(bootloader)
+        name = "boot{}.efi".format(
+            distro_to_efi_arch[distro_arch])
+
         signed_bootloader = cls._sign_file(name,
                                            bootloader,
                                            cr_workdir,
Signature · 1 line
2.35.1
Applied
#2 lore raw
Quoted 44 lines · Q. Gylstorff

From: Quirin Gylstorff <[email protected]>

Add globbing to install the efibootguard binary architecture independent.

Also adapt the wic plugin to use the build output.

---
 recipes-bsp/efibootguard/files/debian/efibootguard.install | 2 +-
 recipes-bsp/efibootguard/files/debian/efibootguard.links   | 1 -
 scripts/lib/wic/plugins/source/efibootguard-efi.py         | 6 ++++--
 3 files changed, 5 insertions(+), 4 deletions(-)
 delete mode 100644 recipes-bsp/efibootguard/files/debian/efibootguard.links
recipes-bsp/efibootguard/files/debian/efibootguard.install +1 -1
index 0239953..462fc1d 100644
@@ -1,3 +1,3 @@
 bg_setenv usr/bin
 bg_printenv usr/bin
-efibootguardx64.efi usr/share/efibootguard
+efibootguard*.efi usr/share/efibootguard
recipes-bsp/efibootguard/files/debian/efibootguard.links deleted +0 -1
deleted file mode 100644
index 97bab21..0000000
@@ -1 +0,0 @@
-usr/share/efibootguard/efibootguardx64.efi usr/share/efibootguard/bootx64.efi
scripts/lib/wic/plugins/source/efibootguard-efi.py +1 -1
index 858fcbf..9e6febe 100644
@@ -59,7 +59,7 @@ class EfibootguardEFIPlugin(SourcePlugin):
         }
 
         distro_arch = get_bitbake_var("DISTRO_ARCH")
-        bootloader = "/usr/share/efibootguard/boot{}.efi".format(
+        bootloader = "/usr/share/efibootguard/efibootguard{}.efi".format(
             distro_to_efi_arch[distro_arch])
         part_rootfs_dir = "%s/disk/%s.%s" % (cr_workdir,
                                              part.label,

scripts/lib/wic/plugins/source/efibootguard-efi.py class EfibootguardEFIPlugin(SourcePlugin): · line 75

Quoted 10 lines
scripts/lib/wic/plugins/source/efibootguard-efi.py +3 -1
@@ -67,7 +67,9 @@ class EfibootguardEFIPlugin(SourcePlugin):
         create_dir_cmd = "install -d %s/EFI/BOOT" % part_rootfs_dir
         exec_cmd(create_dir_cmd)
 
-        name = os.path.basename(bootloader)
+        name = "boot{}.efi".format(
+            distro_to_efi_arch[distro_arch])
+
         signed_bootloader = cls._sign_file(name,
                                            bootloader,
                                            cr_workdir,

Thanks, applied.

Jan

Signature · 2 lines
Siemens AG, Technology
Competence Center Embedded Linux