[OE-core] [wic][PATCH 04/14] image-wic.bbclas: add task do_efi_populate
Ed Bartosh
ed.bartosh at linux.intel.com
Mon Jan 16 15:46:33 UTC 2017
Produce EFI artifacts by calling efi_populate function
provided by current EFI provider.
This should eliminate dependency of wic image-efi plugin
to hddimg. Instead of getting EFI artifacts from HDDDIR
it can get it from $WORKDIR/efi.
[YOCTO #10835]
Signed-off-by: Ed Bartosh <ed.bartosh at linux.intel.com>
---
meta/classes/image-wic.bbclass | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/meta/classes/image-wic.bbclass b/meta/classes/image-wic.bbclass
index bf94e2d..ba6d8ae 100644
--- a/meta/classes/image-wic.bbclass
+++ b/meta/classes/image-wic.bbclass
@@ -111,3 +111,23 @@ python do_rootfs_wicenv () {
addtask do_rootfs_wicenv after do_image before do_image_wic
do_rootfs_wicenv[vardeps] += "${WICVARS}"
do_rootfs_wicenv[prefuncs] = 'set_image_size'
+
+# Populate EFI artifacts
+
+EFI_PROVIDER ?= "grub-efi"
+
+EFI_CLASS = "${@bb.utils.contains("MACHINE_FEATURES", "efi", "${EFI_PROVIDER}", "", d)}"
+inherit ${EFI_CLASS}
+
+python do_efi_populate() {
+ if d.getVar("EFI_CLASS"):
+ # set variables required for populating efi artifacts
+ for key, value in [('LABELS', "boot"), ('GRUB_CFG', "grub-wic.cfg")]:
+ if not d.getVar(key):
+ d.setVar(key, value)
+
+ bb.build.exec_func('build_efi_cfg', d)
+ bb.build.exec_func('efi_populate', d)
+}
+
+addtask do_efi_populate after do_rootfs before do_image
--
2.1.4
More information about the Openembedded-core
mailing list