@@ -19,6 +19,7 @@ MAINTAINER = "Jan Kiszka <jan.kiszka@siemens.com>"
SRC_URI = " \
https://github.com/siemens/efibootguard/archive/refs/tags/v${PV}.tar.gz;downloadfilename=efitbootguard-v${PV}.tar.gz \
file://debian \
+ file://0001-configure-Fix-aarch64-EFI-arch.patch \
"
SRC_URI[sha256sum] = "4d58574a0bb8f1e56056ab0bcc2487d37e49fa147dc991e719c2ec8e20f88dd3"
new file mode 100644
@@ -0,0 +1,28 @@
+From 3f11612fbcbd1c17988d634ecdaecf1ec241f6e0 Mon Sep 17 00:00:00 2001
+From: Jan Kiszka <jan.kiszka@siemens.com>
+Date: Mon, 21 Mar 2022 07:02:28 +0100
+Subject: [PATCH] configure: Fix aarch64 EFI arch
+
+It's aa64 here according to the UEFI spec.
+
+Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index a1a83e9..09d06d7 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -102,7 +102,7 @@ AM_COND_IF(ARCH_X86_64, [
+ MACHINE_TYPE_NAME=x64])
+
+ AM_COND_IF(ARCH_AARCH64, [
+- MACHINE_TYPE_NAME=aarch64])
++ MACHINE_TYPE_NAME=aa64])
+
+ AC_SUBST([ARCH])
+ AC_SUBST([MACHINE_TYPE_NAME])
+--
+2.34.1
+
@@ -176,10 +176,17 @@ class EfibootguardBootPlugin(SourcePlugin):
def _create_unified_kernel_image(cls, rootfs_dir, cr_workdir, cmdline,
uefi_kernel, deploy_dir, kernel_image,
initrd_image, source_params):
+ # we need to map the distro_arch to uefi values
+ distro_to_efi_arch = {
+ "amd64": "x64",
+ "arm64": "aa64",
+ "i386": "ia32"
+ }
rootfs_path = rootfs_dir.get('ROOTFS_DIR')
os_release_file = "{root}/etc/os-release".format(root=rootfs_path)
- efistub = "{rootfs_path}/usr/lib/systemd/boot/efi/linuxx64.efi.stub"\
- .format(rootfs_path=rootfs_path)
+ efistub = "{rootfs_path}/usr/lib/systemd/boot/efi/linux{efiarch}.efi.stub"\
+ .format(rootfs_path=rootfs_path,
+ efiarch=distro_to_efi_arch[get_bitbake_var("DISTRO_ARCH")])
msger.debug("osrelease path: %s", os_release_file)
kernel_cmdline_file = "{cr_workdir}/kernel-command-line-file.txt"\
.format(cr_workdir=cr_workdir)
@@ -54,7 +54,7 @@ class EfibootguardEFIPlugin(SourcePlugin):
# we need to map the distro_arch to uefi values
distro_to_efi_arch = {
"amd64": "x64",
- "arm64": "aarch64",
+ "arm64": "aa64",
"i386": "ia32"
}