mirror of
git://git.yoctoproject.org/meta-virtualization.git
synced 2025-07-19 20:59:41 +02:00

TPM Emulator is a software-based TPM and MTM emulator. This TPM Emulator recipe creates a static library that is cross-compiled against MiniOS, Xen, LWIP, Newlib, PolarSSL, and the stubdom-specific GMP headers and subsequently used during the cross-compilation and linking of the Xen vTPM and vTPM Manager stubdomains. The current Xen source code is hardcoded to fetch a specific version of this package. The patch files originate from the Xen/stubdom source tree. This recipe provides the flexibility to change version or modify the patches. Signed-off-by: Kurt Bodiker <kurt.bodiker@braintrust-us.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
38 lines
1.0 KiB
PHP
38 lines
1.0 KiB
PHP
# Copyright (C) 2017 Kurt Bodiker <kurt.bodiker@braintrust-us.com>
|
|
# Released under the MIT license (see COPYING.MIT for the terms)
|
|
|
|
require stubdom.inc
|
|
|
|
DEPENDS += "\
|
|
cmake-native \
|
|
newlib \
|
|
stubdom-gmp \
|
|
"
|
|
|
|
# nothing to configure
|
|
do_configure[noexec] = "1"
|
|
|
|
export CMAKE_C_FLAGS = "\
|
|
-std=c99 \
|
|
-DTPM_NO_EXTERN \
|
|
${STUBDOM_CPPFLAGS} \
|
|
${STUBDOM_CFLAGS} \
|
|
-Wno-declaration-after-statement \
|
|
-Wno-implicit-fallthrough \
|
|
"
|
|
|
|
do_compile() {
|
|
CC="${HOST_PREFIX}gcc --sysroot=${RECIPE_SYSROOT}" cmake .. -DCMAKE_C_FLAGS:STRING="${CMAKE_C_FLAGS}"
|
|
${MAKE} VERBOSE=1 tpm_crypto tpm
|
|
}
|
|
|
|
do_install() {
|
|
install -d ${D}/${libdir}
|
|
install -m 644 -t ${D}/${libdir} ${B}/crypto/libtpm_crypto.a
|
|
install -m 644 -t ${D}/${libdir} ${B}/tpm/libtpm.a
|
|
|
|
install -D -m 644 -t ${D}/${includedir}/tpm-emulator/build ${S}/build/config.h
|
|
install -D -m 644 -t ${D}/${includedir}/tpm-emulator/crypto ${S}/crypto/*.h
|
|
install -D -m 644 -t ${D}/${includedir}/tpm-emulator/tpm ${S}/tpm/*.h
|
|
}
|