| Submitter | Stefan Berger |
|---|---|
| Date | Jan. 18, 2013, 4:02 p.m. |
| Message ID | <1358524968-22297-8-git-send-email-stefanb@linux.vnet.ibm.com> |
| Download | mbox | patch |
| Permalink | /patch/213679/ |
| State | New |
| Headers | show |
Comments
On 01/18/2013 11:02 AM, Stefan Berger wrote: > Introduce --enable-tpm-passthrough configure option. > > Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com> > --- > configure | 16 +++++++++++++++- > 1 file changed, 15 insertions(+), 1 deletion(-) > > diff --git a/configure b/configure > index 73fc146..f54d40e 100755 > --- a/configure > +++ b/configure > @@ -224,6 +224,7 @@ coroutine="" > seccomp="" > glusterfs="" > tpm="no" > +tpm_passthrough="no" > > # parse CC options first > for opt do > @@ -874,11 +875,20 @@ for opt do > ;; > --enable-tpm) tpm="yes" > ;; > + --enable-tpm-passthrough) tpm_passthrough="yes" > + ;; > *) echo "ERROR: unknown option $opt"; show_help="yes" > ;; > esac > done > > +if test "$tpm" = "no" ; then > + if test "$tpm_passthrough" = "yes"; then > + echo "ERROR: --enable-tpm-passthrough requires --enable-tpm" > + exit 1 > + fi > +fi > + > case "$cpu" in > sparc) > LDFLAGS="-m32 $LDFLAGS" > @@ -1123,6 +1133,7 @@ echo " gthread, ucontext, sigaltstack, windows" > echo " --enable-glusterfs enable GlusterFS backend" > echo " --disable-glusterfs disable GlusterFS backend" > echo " --enable-tpm enable TPM support" > +echo " --enable-tpm-passthrough enable TPM passthrough driver" > echo "" > echo "NOTE: The object files are built at the place where configure is launched" > exit 1 > @@ -3255,6 +3266,7 @@ echo "seccomp support $seccomp" > echo "coroutine backend $coroutine_backend" > echo "GlusterFS support $glusterfs" > echo "TPM support $tpm" > +echo "TPM passthrough $tpm_passthrough" > > if test "$sdl_too_old" = "yes"; then > echo "-> Your SDL version is too old - please upgrade to have SDL support" > @@ -4157,7 +4169,9 @@ fi > if test "$tpm" = "yes"; then > if test "$target_softmmu" = "yes" ; then > if test "$linux" = "yes" ; then > - echo "CONFIG_TPM_PASSTHROUGH=y" >> $config_host_mak > + if test "$tpm_passthrough" = "yes" ; then > + echo "CONFIG_TPM_PASSTHROUGH=y" >> $config_host_mak > + fi > fi > echo "CONFIG_TPM=y" >> $config_host_mak > fi > Reviewed-by: Corey Bryant <coreyb@linux.vnet.ibm.com>
Patch
diff --git a/configure b/configure index 73fc146..f54d40e 100755 --- a/configure +++ b/configure @@ -224,6 +224,7 @@ coroutine="" seccomp="" glusterfs="" tpm="no" +tpm_passthrough="no" # parse CC options first for opt do @@ -874,11 +875,20 @@ for opt do ;; --enable-tpm) tpm="yes" ;; + --enable-tpm-passthrough) tpm_passthrough="yes" + ;; *) echo "ERROR: unknown option $opt"; show_help="yes" ;; esac done +if test "$tpm" = "no" ; then + if test "$tpm_passthrough" = "yes"; then + echo "ERROR: --enable-tpm-passthrough requires --enable-tpm" + exit 1 + fi +fi + case "$cpu" in sparc) LDFLAGS="-m32 $LDFLAGS" @@ -1123,6 +1133,7 @@ echo " gthread, ucontext, sigaltstack, windows" echo " --enable-glusterfs enable GlusterFS backend" echo " --disable-glusterfs disable GlusterFS backend" echo " --enable-tpm enable TPM support" +echo " --enable-tpm-passthrough enable TPM passthrough driver" echo "" echo "NOTE: The object files are built at the place where configure is launched" exit 1 @@ -3255,6 +3266,7 @@ echo "seccomp support $seccomp" echo "coroutine backend $coroutine_backend" echo "GlusterFS support $glusterfs" echo "TPM support $tpm" +echo "TPM passthrough $tpm_passthrough" if test "$sdl_too_old" = "yes"; then echo "-> Your SDL version is too old - please upgrade to have SDL support" @@ -4157,7 +4169,9 @@ fi if test "$tpm" = "yes"; then if test "$target_softmmu" = "yes" ; then if test "$linux" = "yes" ; then - echo "CONFIG_TPM_PASSTHROUGH=y" >> $config_host_mak + if test "$tpm_passthrough" = "yes" ; then + echo "CONFIG_TPM_PASSTHROUGH=y" >> $config_host_mak + fi fi echo "CONFIG_TPM=y" >> $config_host_mak fi
Introduce --enable-tpm-passthrough configure option. Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com> --- configure | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-)