<div dir="ltr"><div>ERROR: systemd-boot-236-r0 do_compile: Function failed: do_compile (log file is located at /data/poky-tmp/master/work/corei7-64-intel-common-poky-linux/systemd-boot/236-r0/temp/log.do_compile.10165)</div><div>ERROR: Logfile of failure stored in: /data/poky-tmp/master/work/corei7-64-intel-common-poky-linux/systemd-boot/236-r0/temp/log.do_compile.10165</div><div>Log data follows:</div><div>| DEBUG: Executing shell function do_compile</div><div>| /data/poky-tmp/master/work/corei7-64-intel-common-poky-linux/systemd-boot/236-r0/temp/run.do_compile.10165: 109: [: x86_64: unexpected operator</div><div>| ninja: error: unknown target &#39;src/boot/efi/systemd-bootia32.efi&#39;</div><div><br></div><div><span style="font-size:12.800000190734863px">+       if [ &quot;${TARGET_ARCH}&quot; == &quot;x86_64&quot; ]; then</span><br style="font-size:12.800000190734863px"></div><div><span style="font-size:12.800000190734863px"><br></span></div><div><span style="font-size:12.800000190734863px">Remember that == is a bashism and the correct operator for [ is =.</span></div><div><span style="font-size:12.800000190734863px"><br></span></div><div><span style="font-size:12.800000190734863px">(fix squashed here)</span></div><div><span style="font-size:12.800000190734863px"><br></span></div><div>Ross</div></div><div class="gmail_extra"><br><div class="gmail_quote">On 28 February 2018 at 05:56, Chen Qi <span dir="ltr">&lt;<a href="mailto:Qi.Chen@windriver.com" target="_blank">Qi.Chen@windriver.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Upgrade systemd-boot to 236.<br>
<br>
As systemd has dropped autotools support, fix configure and compile<br>
failures related to meson.<br>
<br>
Signed-off-by: Chen Qi &lt;<a href="mailto:Qi.Chen@windriver.com">Qi.Chen@windriver.com</a>&gt;<br>
---<br>
 meta/recipes-core/systemd/<a href="http://systemd-boot_234.bb" rel="noreferrer" target="_blank">syst<wbr>emd-boot_234.bb</a>      | 43 ---------------<br>
 meta/recipes-core/systemd/<a href="http://systemd-boot_236.bb" rel="noreferrer" target="_blank">syst<wbr>emd-boot_236.bb</a>      | 49 +++++++++++++++++<br>
 .../systemd/0001-Also-check-<wbr>i586-for-ia32.patch    | 28 ++++++++++<br>
 ...efi_cc-and-efi_ld-<wbr>correctly-when-cross-co.patch | 62 ++++++++++++++++++++++<br>
 4 files changed, 139 insertions(+), 43 deletions(-)<br>
 delete mode 100644 meta/recipes-core/systemd/<a href="http://systemd-boot_234.bb" rel="noreferrer" target="_blank">syst<wbr>emd-boot_234.bb</a><br>
 create mode 100644 meta/recipes-core/systemd/<a href="http://systemd-boot_236.bb" rel="noreferrer" target="_blank">syst<wbr>emd-boot_236.bb</a><br>
 create mode 100644 meta/recipes-core/systemd/<wbr>systemd/0001-Also-check-i586-<wbr>for-ia32.patch<br>
 create mode 100644 meta/recipes-core/systemd/<wbr>systemd/0001-Fix-to-run-efi_<wbr>cc-and-efi_ld-correctly-when-<wbr>cross-co.patch<br>
<br>
diff --git a/meta/recipes-core/systemd/<a href="http://systemd-boot_234.bb" rel="noreferrer" target="_blank">sy<wbr>stemd-boot_234.bb</a> b/meta/recipes-core/systemd/<a href="http://systemd-boot_234.bb" rel="noreferrer" target="_blank">sy<wbr>stemd-boot_234.bb</a><br>
deleted file mode 100644<br>
index 88a14ac..0000000<br>
--- a/meta/recipes-core/systemd/<a href="http://systemd-boot_234.bb" rel="noreferrer" target="_blank">sy<wbr>stemd-boot_234.bb</a><br>
+++ /dev/null<br>
@@ -1,43 +0,0 @@<br>
-require systemd.inc<br>
-FILESEXTRAPATHS =. &quot;${FILE_DIRNAME}/systemd:&quot;<br>
-<br>
-DEPENDS = &quot;intltool-native libcap util-linux gnu-efi gperf-native&quot;<br>
-<br>
-SRC_URI += &quot;file://0007-use-lnr-wrapper-<wbr>instead-of-looking-for-<wbr>relative-opti.patch&quot;<br>
-<br>
-inherit autotools pkgconfig gettext<br>
-inherit deploy<br>
-<br>
-EFI_CC ?= &quot;${CC}&quot;<br>
-# Man pages are packaged through the main systemd recipe<br>
-EXTRA_OECONF = &quot; --enable-gnuefi \<br>
-                 --with-efi-includedir=${<wbr>STAGING_INCDIR} \<br>
-                 --with-efi-ldsdir=${STAGING_<wbr>LIBDIR} \<br>
-                 --with-efi-libdir=${STAGING_<wbr>LIBDIR} \<br>
-                 --disable-manpages \<br>
-                 EFI_CC=&#39;${EFI_CC}&#39; \<br>
-               &quot;<br>
-<br>
-# Imported from the old gummiboot recipe<br>
-TUNE_CCARGS_remove = &quot;-mfpmath=sse&quot;<br>
-COMPATIBLE_HOST = &quot;(x86_64.*|i.86.*)-linux&quot;<br>
-COMPATIBLE_HOST_x86-x32 = &quot;null&quot;<br>
-<br>
-do_compile() {<br>
-       SYSTEMD_BOOT_EFI_ARCH=&quot;ia32&quot;<br>
-       if [ &quot;${TARGET_ARCH}&quot; = &quot;x86_64&quot; ]; then<br>
-               SYSTEMD_BOOT_EFI_ARCH=&quot;x64&quot;<br>
-       fi<br>
-<br>
-       oe_runmake systemd-boot${SYSTEMD_BOOT_<wbr>EFI_ARCH}.efi<br>
-}<br>
-<br>
-do_install() {<br>
-       # Bypass systemd installation with a NOP<br>
-       :<br>
-}<br>
-<br>
-do_deploy () {<br>
-       install ${B}/systemd-boot*.efi ${DEPLOYDIR}<br>
-}<br>
-addtask deploy before do_build after do_compile<br>
diff --git a/meta/recipes-core/systemd/<a href="http://systemd-boot_236.bb" rel="noreferrer" target="_blank">sy<wbr>stemd-boot_236.bb</a> b/meta/recipes-core/systemd/<a href="http://systemd-boot_236.bb" rel="noreferrer" target="_blank">sy<wbr>stemd-boot_236.bb</a><br>
new file mode 100644<br>
index 0000000..1a0135a<br>
--- /dev/null<br>
+++ b/meta/recipes-core/systemd/<a href="http://systemd-boot_236.bb" rel="noreferrer" target="_blank">sy<wbr>stemd-boot_236.bb</a><br>
@@ -0,0 +1,49 @@<br>
+require systemd.inc<br>
+FILESEXTRAPATHS =. &quot;${FILE_DIRNAME}/systemd:&quot;<br>
+<br>
+DEPENDS = &quot;intltool-native libcap util-linux gnu-efi gperf-native&quot;<br>
+<br>
+SRC_URI += &quot;file://0003-use-lnr-wrapper-<wbr>instead-of-looking-for-<wbr>relative-opti.patch \<br>
+            file://0027-remove-nobody-<wbr>user-group-checking.patch \<br>
+            file://0001-Also-check-i586-<wbr>for-ia32.patch \<br>
+            file://0001-Fix-to-run-efi_cc-<wbr>and-efi_ld-correctly-when-<wbr>cross-co.patch \<br>
+            &quot;<br>
+<br>
+inherit meson pkgconfig gettext<br>
+inherit deploy<br>
+<br>
+EFI_CC ?= &quot;${CC}&quot;<br>
+<br>
+EXTRA_OEMESON += &quot;-Defi=true \<br>
+                  -Dgnu-efi=true \<br>
+                  -Defi-includedir=${STAGING_<wbr>INCDIR}/efi \<br>
+                  -Defi-ldsdir=${STAGING_LIBDIR} \<br>
+                  -Defi-libdir=${STAGING_LIBDIR} \<br>
+                  -Dman=false \<br>
+                  -Defi-cc=&#39;${EFI_CC}&#39; \<br>
+                  -Defi-ld=&#39;${LD}&#39; \<br>
+                  &quot;<br>
+<br>
+<br>
+# Imported from the old gummiboot recipe<br>
+TUNE_CCARGS_remove = &quot;-mfpmath=sse&quot;<br>
+COMPATIBLE_HOST = &quot;(x86_64.*|i.86.*)-linux&quot;<br>
+COMPATIBLE_HOST_x86-x32 = &quot;null&quot;<br>
+<br>
+do_compile() {<br>
+       SYSTEMD_BOOT_EFI_ARCH=&quot;ia32&quot;<br>
+       if [ &quot;${TARGET_ARCH}&quot; == &quot;x86_64&quot; ]; then<br>
+               SYSTEMD_BOOT_EFI_ARCH=&quot;x64&quot;<br>
+       fi<br>
+       ninja src/boot/efi/systemd-boot${<wbr>SYSTEMD_BOOT_EFI_ARCH}.efi<br>
+}<br>
+<br>
+do_install() {<br>
+       # Bypass systemd installation with a NOP<br>
+       :<br>
+}<br>
+<br>
+do_deploy () {<br>
+       install ${B}/src/boot/efi/systemd-<wbr>boot*.efi ${DEPLOYDIR}<br>
+}<br>
+addtask deploy before do_build after do_compile<br>
diff --git a/meta/recipes-core/systemd/<wbr>systemd/0001-Also-check-i586-<wbr>for-ia32.patch b/meta/recipes-core/systemd/<wbr>systemd/0001-Also-check-i586-<wbr>for-ia32.patch<br>
new file mode 100644<br>
index 0000000..892b25e<br>
--- /dev/null<br>
+++ b/meta/recipes-core/systemd/<wbr>systemd/0001-Also-check-i586-<wbr>for-ia32.patch<br>
@@ -0,0 +1,28 @@<br>
+From 4616e6f228d2678420ee7d5bb1c8a0<wbr>c8ebb27be8 Mon Sep 17 00:00:00 2001<br>
+From: Chen Qi &lt;<a href="mailto:Qi.Chen@windriver.com">Qi.Chen@windriver.com</a>&gt;<br>
+Date: Tue, 27 Feb 2018 20:42:41 -0800<br>
+Subject: [PATCH] Also check i586 for ia32<br>
+<br>
+Upstream-Status: Pending<br>
+<br>
+Signed-off-by: Chen Qi &lt;<a href="mailto:Qi.Chen@windriver.com">Qi.Chen@windriver.com</a>&gt;<br>
+---<br>
+ meson.build | 2 +-<br>
+ 1 file changed, 1 insertion(+), 1 deletion(-)<br>
+<br>
+diff --git a/meson.build b/meson.build<br>
+index ddc061c12..abd1261d6 100644<br>
+--- a/meson.build<br>
++++ b/meson.build<br>
+@@ -1182,7 +1182,7 @@ conf.set10(&#39;SYSTEMD_SLOW_<wbr>TESTS_DEFAULT&#39;, get_option(&#39;slow-tests&#39;))<br>
+ if get_option(&#39;efi&#39;)<br>
+         efi_arch = host_machine.cpu_family()<br>
+<br>
+-        if efi_arch == &#39;x86&#39;<br>
++        if efi_arch == &#39;x86&#39; or efi_arch == &#39;i586&#39;<br>
+                 EFI_MACHINE_TYPE_NAME = &#39;ia32&#39;<br>
+                 gnu_efi_arch = &#39;ia32&#39;<br>
+         elif efi_arch == &#39;x86_64&#39;<br>
+--<br>
+2.13.0<br>
+<br>
diff --git a/meta/recipes-core/systemd/<wbr>systemd/0001-Fix-to-run-efi_<wbr>cc-and-efi_ld-correctly-when-<wbr>cross-co.patch b/meta/recipes-core/systemd/<wbr>systemd/0001-Fix-to-run-efi_<wbr>cc-and-efi_ld-correctly-when-<wbr>cross-co.patch<br>
new file mode 100644<br>
index 0000000..e2e19ba<br>
--- /dev/null<br>
+++ b/meta/recipes-core/systemd/<wbr>systemd/0001-Fix-to-run-efi_<wbr>cc-and-efi_ld-correctly-when-<wbr>cross-co.patch<br>
@@ -0,0 +1,62 @@<br>
+From 527413ec243564a89ffaad6368d446<wbr>de44415970 Mon Sep 17 00:00:00 2001<br>
+From: Chen Qi &lt;<a href="mailto:Qi.Chen@windriver.com">Qi.Chen@windriver.com</a>&gt;<br>
+Date: Tue, 27 Feb 2018 21:42:23 -0800<br>
+Subject: [PATCH] Fix to run efi_cc and efi_ld correctly when cross-compiling<br>
+<br>
+When cross-compiling, efi_cc and efi_ld may take the form of<br>
+&#39;xxx-gcc --sysroot=xxx&#39;, and this would cause run_command and<br>
+the alike fail.<br>
+<br>
+Fix to split them to make commands run correctly.<br>
+<br>
+Upstream-Status: Pending<br>
+<br>
+Signed-off-by: Chen Qi &lt;<a href="mailto:Qi.Chen@windriver.com">Qi.Chen@windriver.com</a>&gt;<br>
+---<br>
+ src/boot/efi/meson.build | 16 +++++++++++++---<br>
+ 1 file changed, 13 insertions(+), 3 deletions(-)<br>
+<br>
+diff --git a/src/boot/efi/meson.build b/src/boot/efi/meson.build<br>
+index 992a3ba4c..9f9ec4911 100644<br>
+--- a/src/boot/efi/meson.build<br>
++++ b/src/boot/efi/meson.build<br>
+@@ -157,7 +157,7 @@ if have_gnu_efi<br>
+                 o_file = custom_target(file + &#39;.o&#39;,<br>
+                                        input : file,<br>
+                                        output : file + &#39;.o&#39;,<br>
+-                                       command : [efi_cc, &#39;-c&#39;, &#39;@INPUT@&#39;, &#39;-o&#39;, &#39;@OUTPUT@&#39;]<br>
++                                       command : efi_cc.split() + [&#39;-c&#39;, &#39;@INPUT@&#39;, &#39;-o&#39;, &#39;@OUTPUT@&#39;]<br>
+                                                  + compile_args,<br>
+                                        depend_files : efi_headers)<br>
+                 if (common_sources + systemd_boot_sources).<wbr>contains(file)<br>
+@@ -168,7 +168,17 @@ if have_gnu_efi<br>
+                 endif<br>
+         endforeach<br>
+<br>
+-        libgcc_file_name = run_command(efi_cc, &#39;-print-libgcc-file-name&#39;).<wbr>stdout().strip()<br>
++        find_libgcc_cmd_all = efi_cc + &#39; -print-libgcc-file-name&#39;<br>
++        find_libgcc_cmd = find_libgcc_cmd_all.split()[0]<br>
++        find_libgcc_args = []<br>
++        cmd_args_all = find_libgcc_cmd_all.split()<br>
++        foreach arg : cmd_args_all<br>
++                if arg != find_libgcc_cmd<br>
++                        find_libgcc_args += arg<br>
++                endif<br>
++        endforeach<br>
++<br>
++        libgcc_file_name = run_command(find_libgcc_cmd, find_libgcc_args).stdout().<wbr>strip()<br>
+         systemd_boot_efi_name = &#39;systemd-boot@0@.efi&#39;.format(<wbr>EFI_MACHINE_TYPE_NAME)<br>
+         stub_efi_name = &#39;linux@0@.efi.stub&#39;.format(<wbr>EFI_MACHINE_TYPE_NAME)<br>
+         no_undefined_symbols = find_program(&#39;no-undefined-<wbr>symbols.sh&#39;)<br>
+@@ -179,7 +189,7 @@ if have_gnu_efi<br>
+                         tuple[0],<br>
+                         input : tuple[2],<br>
+                         output : tuple[0],<br>
+-                        command : [efi_ld, &#39;-o&#39;, &#39;@OUTPUT@&#39;] +<br>
++                        command : efi_ld.split() + [&#39;-o&#39;, &#39;@OUTPUT@&#39;] +<br>
+                                   efi_ldflags + tuple[2] +<br>
+                                   [&#39;-lefi&#39;, &#39;-lgnuefi&#39;, libgcc_file_name])<br>
+<br>
+--<br>
+2.13.0<br>
+<br>
<span class="HOEnZb"><font color="#888888">--<br>
1.9.1<br>
<br>
--<br>
______________________________<wbr>_________________<br>
Openembedded-core mailing list<br>
<a href="mailto:Openembedded-core@lists.openembedded.org">Openembedded-core@lists.<wbr>openembedded.org</a><br>
<a href="http://lists.openembedded.org/mailman/listinfo/openembedded-core" rel="noreferrer" target="_blank">http://lists.openembedded.org/<wbr>mailman/listinfo/openembedded-<wbr>core</a><br>
</font></span></blockquote></div><br></div>