Bug 11549

Summary: cannot select systemd-boot for UEFI
Product: [Build System, Metadata & Runtime] BSPs Reporter: Patrick Ohly <patrick.ohly>
Component: bsps-meta-intelAssignee: California Sullivan <california.l.sullivan>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium+    
Version: 2.3   
Target Milestone: 2.3 M4   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Patrick Ohly 2017-05-19 19:28:07 UTC
commit 7169c2a5008bd57d68f62340c602449c5dbe7667
...
Date:   Fri May 12 17:36:27 2017 -0700

    conf/machine/intel-core*: change WKS_FILE based on EFI_PROVIDER
    
    If someone changes their EFI_PROVIDER to grub-efi, we shouldn't be
    building a systemd-boot based wic image. Use bb.utils.contains to
    be default to mkefidisk.wks if we aren't using a systemd-boot based
    EFI_PROVIDER.
    
...
diff --git a/conf/machine/intel-corei7-64.conf b/conf/machine/intel-corei7-64.conf
index cca45c7..f28478f 100644
--- a/conf/machine/intel-corei7-64.conf
+++ b/conf/machine/intel-corei7-64.conf
@@ -34,5 +34,5 @@ APPEND += "rootwait console=ttyS0,115200 console=tty0"
 PACKAGE_INSTALL_append_pn-core-image-minimal-initramfs = " linux-firmware-i915"
 
 IMAGE_FSTYPES += "wic"
-WKS_FILE ?= "systemd-bootdisk.wks"
+WKS_FILE ?= "${@bb.utils.contains("EFI_PROVIDER", "systemd-boot rmc-boot", "systemd-bootdisk.wks", "mkefidisk.wks", d)}"
 do_image_wic[depends] += "gptfdisk-native:do_populate_sysroot mtools-native:do_populate_sysroot dosfstools-native:do_populate_sysroot"

This is most likely incorrect, because bb.utils.contains() only selects systemd-bootdisk.wks when EFI_PROVIDES contains *both* systemd-boot *and* rmc-boot.

You want bb.utils.contains_any().

But I haven't tried this, I only stumbled over this line and don't want this to get forgotten, hence this bug report.
Comment 1 California Sullivan 2017-05-19 23:25:05 UTC
Yup, I caught this and sent a patch earlier today. This fixes it:

https://git.yoctoproject.org/cgit/cgit.cgi/meta-intel/commit/?id=7e8f98aa326f16edd679a95f7bb2daf4256479f3
Comment 2 California Sullivan 2017-05-24 23:17:00 UTC
Moving to resolved.