[meta-intel] [PATCH] rmc: split rmc.bb and rmc-efi.bb into separate recipes

Todor Minchev todor.minchev at linux.intel.com
Thu Jul 6 15:41:21 PDT 2017


X32 builds require that the bootloader is built as x86_64 binary.
This patch splits the build definitions of the RMC userspace application
and the RMC EFI library into separate recipes and builds an x86_64 EFI library
when DEFAULTTUNE is x32.

Signed-off-by: Todor Minchev <todor.minchev at linux.intel.com>
---
 common/recipes-bsp/rmc/rmc-efi.bb                  | 39 ++++++++++++++++++++++
 common/recipes-bsp/rmc/rmc.bb                      |  3 +-
 .../systemd-boot/systemd-boot/rmc-boot.inc         |  2 +-
 3 files changed, 41 insertions(+), 3 deletions(-)
 create mode 100644 common/recipes-bsp/rmc/rmc-efi.bb

diff --git a/common/recipes-bsp/rmc/rmc-efi.bb b/common/recipes-bsp/rmc/rmc-efi.bb
new file mode 100644
index 0000000..ea09619
--- /dev/null
+++ b/common/recipes-bsp/rmc/rmc-efi.bb
@@ -0,0 +1,39 @@
+SUMMARY = "RMC (Runtime Machine Configuration) EFI library"
+
+DESCRIPTION = "The RMC EFI library adds RMC support to existing EFI bootloaders"
+
+LICENSE = "MIT"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=ade413c694d3aaefc9554b24a8814ee8"
+
+SRC_URI = "git://git.yoctoproject.org/rmc"
+
+SRCREV = "027ac76f642dcab1a9f237a00f03a3a714bd04b9"
+
+S = "${WORKDIR}/git"
+
+COMPATIBLE_HOST = "(x86_64.*|i.86.*)-linux*"
+
+TARGET_CFLAGS +="-Wl,--hash-style=both"
+
+EXTRA_OEMAKE = "RMC_INSTALL_PREFIX=${D}/${prefix} \
+                RMC_INSTALL_LIB_PATH=${D}${libdir} \
+                RMC_INSTALL_HEADER_PATH=${D}${includedir}/rmc"
+
+SECURITY_CFLAGS_remove_class-target = "-fstack-protector-strong"
+
+python () {
+	ccargs = d.getVar('TUNE_CCARGS').split()
+	if '-mx32' in ccargs:
+		ccargs.remove('-mx32')
+		ccargs.append('-m64')
+		d.setVar('TUNE_CCARGS', ' '.join(ccargs))
+}
+
+do_compile() {
+	oe_runmake -f Makefile.efi
+}
+
+do_install() {
+	oe_runmake -f Makefile.efi install
+}
diff --git a/common/recipes-bsp/rmc/rmc.bb b/common/recipes-bsp/rmc/rmc.bb
index 93fdd3a..fb0d173 100644
--- a/common/recipes-bsp/rmc/rmc.bb
+++ b/common/recipes-bsp/rmc/rmc.bb
@@ -28,14 +28,13 @@ EXTRA_OEMAKE = "RMC_INSTALL_PREFIX=${D}/${prefix} \
                 RMC_INSTALL_HEADER_PATH=${D}${includedir}/rmc"
 
 SECURITY_CFLAGS_remove_class-target = "-fstack-protector-strong"
+
 do_compile_class-target() {
 	oe_runmake
-	oe_runmake -f Makefile.efi
 }
 
 do_install() {
 	oe_runmake install
-	oe_runmake -f Makefile.efi install
 }
 
 do_install_class-native() {
diff --git a/common/recipes-bsp/systemd-boot/systemd-boot/rmc-boot.inc b/common/recipes-bsp/systemd-boot/systemd-boot/rmc-boot.inc
index db75eb6..1172d53 100644
--- a/common/recipes-bsp/systemd-boot/systemd-boot/rmc-boot.inc
+++ b/common/recipes-bsp/systemd-boot/systemd-boot/rmc-boot.inc
@@ -1,4 +1,4 @@
-DEPENDS_append_intel-x86-common = " rmc"
+DEPENDS_append_intel-x86-common = " rmc rmc-efi"
 
 EXTRA_OEMAKE_append_intel-x86-common = ' EFI_LDFLAGS="-L${STAGING_DIR_HOST}/usr/lib" EFI_CFLAGS="-I${STAGING_INCDIR}/rmc -DRMC_EFI"'
 
-- 
2.13.2



More information about the meta-intel mailing list