From b767b5cb2f374630136b1903dba7d86dddff362d Mon Sep 17 00:00:00 2001 From: Todor Minchev Date: Thu, 6 Jul 2017 15:41:21 -0700 Subject: rmc: split rmc.bb and rmc-efi.bb into separate recipes 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 Signed-off-by: Saul Wold --- 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 (limited to 'common/recipes-bsp') diff --git a/common/recipes-bsp/rmc/rmc-efi.bb b/common/recipes-bsp/rmc/rmc-efi.bb new file mode 100644 index 00000000..ea096197 --- /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 93fdd3aa..fb0d1737 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 db75eb68..1172d53d 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"' -- cgit v1.2.3-54-g00ecf