[OE-core] [PATCH 1/9] uefi.bbclass: add bbclass holding configuration for UEFI applications

dbaryshkov at gmail.com dbaryshkov at gmail.com
Wed Sep 11 09:29:53 UTC 2019


From: Dmitry Eremin-Solenikov <dmitry_eremin-solenikov at mentor.com>

Create new bbclass defining common variables for all UEFI-related
packages (bootloaders, test applications, etc).

Signed-off-by: Dmitry Eremin-Solenikov <dmitry_eremin-solenikov at mentor.com>
---
 meta/classes/uefi.bbclass | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)
 create mode 100644 meta/classes/uefi.bbclass

diff --git a/meta/classes/uefi.bbclass b/meta/classes/uefi.bbclass
new file mode 100644
index 000000000000..d3fc4b686676
--- /dev/null
+++ b/meta/classes/uefi.bbclass
@@ -0,0 +1,26 @@
+# Location of EFI files inside EFI System Partition
+EFIDIR ?= "/EFI/BOOT"
+
+# Prefix where ESP is mounted inside rootfs. Set to empty if package is going
+# to be installed to ESP directly
+EFI_PREFIX ?= "/boot"
+
+# Location inside rootfs.
+EFI_FILES_PATH = "${EFI_PREFIX}${EFIDIR}"
+
+# Determine name of bootloader image
+python __anonymous () {
+    import re
+    target = d.getVar('TARGET_ARCH')
+    if target == "x86_64":
+        image = "bootx64.efi"
+    elif re.match('i.86', target):
+        image = "bootia32.efi"
+    elif re.match('aarch64', target):
+        image = "bootaa64.efi"
+    elif re.match('arm', target):
+        image = "bootarm.efi"
+    else:
+        image = "bootUNKNOWN.efi"
+    d.setVar("EFI_BOOT_IMAGE", image)
+}
-- 
2.23.0



More information about the Openembedded-core mailing list