Commit 7aaa6a16 authored by Paolo Bonzini's avatar Paolo Bonzini
Browse files

tpm: express dependencies with Kconfig



This automatically removes the TPM backends from the
binary altogether if no front-ends are selected.

Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent b42075bb
Loading
Loading
Loading
Loading
+12 −12
Original line number Diff line number Diff line
@@ -466,7 +466,7 @@ gcrypt_hmac="no"
auth_pam=""
vte=""
virglrenderer=""
tpm="yes"
tpm=""
libssh2=""
live_block_migration="yes"
numa=""
@@ -3877,20 +3877,20 @@ EOF
fi

##########################################
# TPM passthrough is only on x86 Linux
# TPM emulation is only on POSIX

if test "$targetos" = Linux && { test "$cpu" = i386 || test "$cpu" = x86_64; }; then
  tpm_passthrough=$tpm
if test "$tpm" = ""; then
  if test "$mingw32" = "yes"; then
    tpm=no
  else
  tpm_passthrough=no
    tpm=yes
  fi
elif test "$tpm" = "yes"; then
  if test "$mingw32" = "yes" ; then
    error_exit "TPM emulation only available on POSIX systems"
  fi

# TPM emulator is for all posix systems
if test "$mingw32" != "yes"; then
  tpm_emulator=$tpm
else
  tpm_emulator=no
fi

##########################################
# attr probe

+9 −1
Original line number Diff line number Diff line
config TPM
config TPMDEV
    bool
    depends on TPM

config TPM_TIS
    bool
    depends on TPM && ISA_BUS
    select TPMDEV

config TPM_CRB
    bool
    depends on TPM && PC
    select TPMDEV

config TPM_PASSTHROUGH
    bool
    default y
    # FIXME: should check for x86 host as well
    depends on TPMDEV && LINUX

config TPM_EMULATOR
    bool
    default y
    depends on TPMDEV