diff options
author | Kurt Bodiker <kurt.bodiker@braintrust-us.com> | 2018-05-01 10:05:32 -0400 |
---|---|---|
committer | Bruce Ashfield <bruce.ashfield@windriver.com> | 2018-05-01 23:17:29 -0400 |
commit | 299c5243ddcdbf6028e44e0fa3e3ff314d97cc38 (patch) | |
tree | ac42343bac1b810f6e3a95a7f60994c7f4dd4dbb | |
parent | e1279d6de619e50871178d0c061073922fdb3c53 (diff) | |
download | meta-virtualization-299c5243ddcdbf6028e44e0fa3e3ff314d97cc38.tar.gz |
xen: GMP recipe for Xen stubdoms
GMP is a fast precision arithmetic library targeted for cryptographic
applications. This GMP recipe creates a static library that is
cross-compiled against that is cross-compiled against MiniOS, Xen, LWIP,
Newlib, and PolarSSL headers and subsquently used during the
cross-compilation and linking of the TPM Emulator and the Xen vTPM and
vTPM Manager stubdomains.
Signed-off-by: Kurt Bodiker <kurt.bodiker@braintrust-us.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
-rw-r--r-- | recipes-extended/xen/stubdom-gmp.inc | 37 | ||||
-rw-r--r-- | recipes-extended/xen/stubdom-gmp_4.3.2.bb | 20 |
2 files changed, 57 insertions, 0 deletions
diff --git a/recipes-extended/xen/stubdom-gmp.inc b/recipes-extended/xen/stubdom-gmp.inc new file mode 100644 index 00000000..ef6473d4 --- /dev/null +++ b/recipes-extended/xen/stubdom-gmp.inc | |||
@@ -0,0 +1,37 @@ | |||
1 | # Copyright (C) 2017 Kurt Bodiker <kurt.bodiker@braintrust-us.com> | ||
2 | # Released under the MIT license (see COPYING.MIT for the terms) | ||
3 | |||
4 | require stubdom.inc | ||
5 | |||
6 | DEPENDS += "\ | ||
7 | newlib \ | ||
8 | " | ||
9 | |||
10 | do_configure() { | ||
11 | # need to modify prefix here during configure otherwise OE-level variables | ||
12 | # (prefix, libdir, includedir, etc...) defined in stubdom.inc get messed up | ||
13 | CPPFLAGS="-isystem ${RECIPE_SYSROOT}/cross-root-${GNU_TARGET_ARCH}/${GNU_TARGET_ARCH}-xen-elf/include ${STUBDOM_CPPFLAGS}" \ | ||
14 | CFLAGS="${STUBDOM_CFLAGS}" \ | ||
15 | CC="${HOST_PREFIX}gcc --sysroot=${RECIPE_SYSROOT}" \ | ||
16 | ${S}/configure \ | ||
17 | --disable-shared \ | ||
18 | --enable-static \ | ||
19 | --disable-fft \ | ||
20 | --without-readline \ | ||
21 | --with-gnu-ld \ | ||
22 | --prefix=${prefix}/${GNU_TARGET_ARCH}-xen-elf \ | ||
23 | --libdir=${libdir} \ | ||
24 | --build=`${HOST_PREFIX}gcc -dumpmachine` \ | ||
25 | --host=${GNU_TARGET_ARCH}-xen-elf | ||
26 | |||
27 | sed -i 's/#define HAVE_OBSTACK_VPRINTF 1/\/\/#define HAVE_OBSTACK_VPRINTF 1/' ${S}/config.h | ||
28 | } | ||
29 | |||
30 | do_compile() { | ||
31 | ${MAKE} | ||
32 | } | ||
33 | |||
34 | do_install() { | ||
35 | ${MAKE} DESTDIR=${D} install | ||
36 | rm -rf ${D}${prefix}/${GNU_TARGET_ARCH}-xen-elf/share | ||
37 | } | ||
diff --git a/recipes-extended/xen/stubdom-gmp_4.3.2.bb b/recipes-extended/xen/stubdom-gmp_4.3.2.bb new file mode 100644 index 00000000..d9a2adbd --- /dev/null +++ b/recipes-extended/xen/stubdom-gmp_4.3.2.bb | |||
@@ -0,0 +1,20 @@ | |||
1 | # Copyright (C) 2017 Kurt Bodiker <kurt.bodiker@braintrust-us.com> | ||
2 | # Released under the MIT license (see COPYING.MIT for the terms) | ||
3 | |||
4 | DESCRIPTION = "GMP library for Xen vTPM's." | ||
5 | HOMEPAGE = "http://gmp" | ||
6 | LICENSE = "GPLv3" | ||
7 | LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \ | ||
8 | file://COPYING.LIB;md5=6a6a8e020838b23406c81b19c1d46df6 \ | ||
9 | " | ||
10 | |||
11 | SRC_URI = "\ | ||
12 | https://gmplib.org/download/gmp/archive/gmp-${PV}.tar.bz2 \ | ||
13 | " | ||
14 | SRC_URI[md5sum] = "dd60683d7057917e34630b4a787932e8" | ||
15 | SRC_URI[sha256sum] = "936162c0312886c21581002b79932829aa048cfaf9937c6265aeaa14f1cd1775" | ||
16 | |||
17 | S="${WORKDIR}/gmp-${PV}" | ||
18 | B="${S}" | ||
19 | |||
20 | require stubdom-gmp.inc | ||