VirtualBox

Changeset 91555 in vbox


Ignore:
Timestamp:
Oct 5, 2021 7:48:33 AM (3 years ago)
Author:
vboxsync
Message:

Config.kmk,configure: Add check for libtpms dependency required for the virtual TPM, bugref:10075

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Config.kmk

    r91524 r91555  
    641641# Enable TPM device emulation support.
    642642VBOX_WITH_TPM = 1
     643# Enable libtpms, required for the in process TPM emulation.
     644#VBOX_WITH_LIBTPMS = 1
    643645## @}
    644646
     
    45194521 SDK_VBOX_FUSE_INCS         ?= $(SDK_VBOX_FUSE_DEFAULT_INCS)
    45204522 SDK_VBOX_FUSE_LIBS         ?= $(PATH_STAGE_LIB)/VBox-libfuse$(VBOX_SUFF_LIB)
     4523endif
     4524
     4525ifdef VBOX_WITH_LIBTPMS
     4526 SDK_VBOX_TPMS               = .
     4527 SDK_VBOX_TPMS_DEFAULT_INCS := $(PATH_ROOT)/src/libs/libtpms-0.9.0
     4528 SDK_VBOX_TPMS_INCS         ?= $(SDK_VBOX_TPMS_DEFAULT_INCS)
     4529 SDK_VBOX_TPMS_LIBS         ?= $(PATH_STAGE_LIB)/VBox-libtpms$(VBOX_SUFF_LIB)
    45214530endif
    45224531
  • trunk/configure

    r90537 r91555  
    100100WITH_LIBVPX=1
    101101WITH_LIBOPUS=1
     102WITH_LIBTPMS=1
    102103BUILD_LIBXML2=
    103104BUILD_LIBCURL=
    104105BUILD_LIBSSL=
    105106BUILD_LIBVPX=
     107BUILD_LIBTPMS=
    106108PASSIVE_MESA=0
    107109CC="gcc"
     
    17981800
    17991801#
     1802# Check for libtpms
     1803#
     1804check_libtpms()
     1805{
     1806  if [ -z "$BUILD_LIBTPMS" ]; then
     1807    test_header libtpms
     1808    if which_wrapper pkg-config > /dev/null; then
     1809      libtpms_ver=`pkg-config libtpms --modversion 2>> $LOG`
     1810      if [ $? -eq 0 ]; then
     1811        FLGTPMS=`pkg-config libtpms --cflags`
     1812        INCTPMS=`strip_I "$FLGTPMS"`
     1813        LIBTPMS=`pkg-config libtpms --libs`
     1814      fi
     1815      cat > $ODIR.tmp_src.cc << EOF
     1816#include <cstdio>
     1817#include <libtpms/tpm_library.h>
     1818extern "C" int main(void)
     1819{
     1820  TPMLIB_MainInit();
     1821  printf("found, OK.\n");
     1822}
     1823EOF
     1824      [ -n "$INCTPMS" ] && I_INCTPMS=`prefix_I "$INCTPMS"`
     1825      if test_compile "$LIBTPMS $I_INCTPMS" libtpms libtpms; then
     1826        if test_execute; then
     1827          cnf_append "SDK_VBOX_TPMS_INCS" "$INCTPMS"
     1828          cnf_append "SDK_VBOX_TPMS_LIBS" "`strip_l "$LIBTPMS"`"
     1829          fi
     1830      fi
     1831    fi
     1832  fi
     1833}
     1834
     1835
     1836#
    18001837# Check whether static libstdc++ is installed. This library is required
    18011838# for the Linux guest additions.
     
    23882425[ $WITH_LIBVPX  -eq 1 ] && echo "  --disable-libvpx         don't use libvpx for video capturing"
    23892426[ $WITH_LIBOPUS -eq 1 ] && echo "  --disable-libopus        don't use libopus for audio capturing"
     2427[ $WITH_LIBTPMS -eq 1 ] && echo "  --disable-libtpms        don't use libtpms for TPM emulation"
    23902428[ "$OS" = "linux" -o "$OS" = "freebsd" ] && echo "  --enable-vde             enable VDE networking"
    23912429cat << EOF
     
    23952433  --build-libxml2          build libxml2 from sources
    23962434  --build-libssl           build openssl from sources
     2435  --build-libtpms          build libtpms from sources
    23972436EOF
    23982437[ $OSE -eq 0 ] && cat << EOF
     
    26352674      WITH_LIBOPUS=0
    26362675      ;;
     2676    --disable-libtpms)
     2677      WITH_LIBTPMS=0
     2678      ;;
    26372679    --disable-sdl)
    26382680      WITH_SDL=0
     
    28212863[ $WITH_HARDENING -eq 2 ] && cnf_append "VBOX_WITH_HARDENING" "2"
    28222864[ $WITH_VMMRAW    -eq 0 ] && cnf_append "VBOX_WITH_RAW_MODE" ""
     2865[ $WITH_LIBTPMS   -eq 0 ] && cnf_append "VBOX_WITH_TPM_LIBTPMS" ""
    28232866if [ $WITH_LIBVPX -eq 0 ]; then
    28242867  cnf_append "VBOX_WITH_LIBVPX" ""
     
    28532896  [ $WITH_LIBVPX -eq 1 ] && check_vpx
    28542897  [ $WITH_LIBOPUS -eq 1 ] && check_libopus
     2898  [ $WITH_LIBTPMS -eq 1 ] && check_libtpms
    28552899  [ "$OS" != "darwin"  ] && check_png
    28562900  [ $OSE -eq 0 -a "$OS" = "linux" ] && check_pam
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette