livecd-tools/0008-Fix-name-of-x86_64-bootloader-according-to-UEFI-spec.patch

31 lines
1.2 KiB
Diff
Raw Normal View History

From 007b87bab26994a6dfe421b031194191a48a0f3a Mon Sep 17 00:00:00 2001
From: Mikhail Novosyolov <m.novosyolov@rosalinux.ru>
Date: Sun, 27 Jun 2021 15:54:00 +0300
Subject: [PATCH 08/10] Fix name of x86_64 bootloader according to UEFI spec
---
imgcreate/live.py | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/imgcreate/live.py b/imgcreate/live.py
index f1349b0..707dd39 100644
--- a/imgcreate/live.py
+++ b/imgcreate/live.py
@@ -700,7 +700,12 @@ menu end
def efiarch(self):
if not self._efiarch:
# for most things, we want them named boot$efiarch
- efiarch = {"i386": "IA32", "x86_64": "X64"}
+ # Note that AA64 and IA32 are in uppercase but x64 is in lowercase
+ # according to the UEFI specification
+ # "Unified Extensible Firmware Interface (UEFI) Specification, Version 2.7 Errata A, August 2017"
+ # https://uefi.org/sites/default/files/resources/UEFI%20Spec%202_7_A%20Sept%206.pdf
+ # 3.5.1.1 Removable Media Boot Behavior, Table 14. UEFI Image Types, page 159
+ efiarch = {"i386": "IA32", "x86_64": "x64"}
self._efiarch = efiarch[dnf.rpm.basearch(hawkey.detect_arch())]
return self._efiarch
--
2.31.1