[U-Boot] [PATCH 1/2] avb: Fix build when CONFIG_OPTEE_TA_AVB is disabled

Sam Protsenko semen.protsenko at linaro.org
Wed Aug 7 12:09:37 UTC 2019


Hi Tom,

On Thu, Aug 1, 2019 at 2:15 PM Igor Opaniuk <igor.opaniuk at gmail.com> wrote:
>
> Hi,
>
> On Wed, Jul 31, 2019 at 7:59 PM Sam Protsenko
> <semen.protsenko at linaro.org> wrote:
> >
> > When having only these AVB related configs enabled:
> >
> >     CONFIG_AVB_VERIFY=y
> >     CONFIG_CMD_AVB=y
> >     CONFIG_LIBAVB=y
> >
> > build fails with next errors:
> >
> >     common/avb_verify.c: In function 'read_persistent_value':
> >     common/avb_verify.c:867:6: warning: implicit declaration of function
> >                                         'get_open_session'
> >     common/avb_verify.c:870:45: error: 'struct AvbOpsData' has no member
> >                                         named 'tee'
> >     common/avb_verify.c:894:7: warning: implicit declaration of function
> >                                         'invoke_func'
> >     common/avb_verify.c: In function 'write_persistent_value':
> >     common/avb_verify.c:931:45: error: 'struct AvbOpsData' has no member
> >                                        named 'tee'
> >
> > Guard read_persistent_value() and write_persistent_value() functions
> > by checking if CONFIG_OPTEE_TA_AVB is enabled (as those are only used in
> > that case) to fix the build with mentioned configuration.
> >
> > Signed-off-by: Sam Protsenko <semen.protsenko at linaro.org>
> > ---
> >  common/avb_verify.c | 3 +++
> >  1 file changed, 3 insertions(+)
> >
> > diff --git a/common/avb_verify.c b/common/avb_verify.c
> > index 32034d927c..36898a610f 100644
> > --- a/common/avb_verify.c
> > +++ b/common/avb_verify.c
> > @@ -851,6 +851,7 @@ static AvbIOResult get_size_of_partition(AvbOps *ops,
> >         return AVB_IO_RESULT_OK;
> >  }
> >
> > +#ifdef CONFIG_OPTEE_TA_AVB
> >  static AvbIOResult read_persistent_value(AvbOps *ops,
> >                                          const char *name,
> >                                          size_t buffer_size,
> > @@ -968,6 +969,8 @@ free_name:
> >
> >         return rc;
> >  }
> > +#endif
> > +
> >  /**
> >   * ============================================================================
> >   * AVB2.0 AvbOps alloc/initialisation/free
> > --
> > 2.20.1
> >
>
> Reviewed-by: Igor Opaniuk <igor.opaniuk at gmail.com>
>

Can you please pull this series (2 patches) to -rc2? It fixes the
build with AVB enabled.

Thanks!

> --
> Best regards - Freundliche GrĂ¼sse - Meilleures salutations
>
> Igor Opaniuk
>
> mailto: igor.opaniuk at gmail.com
> skype: igor.opanyuk
> +380 (93) 836 40 67
> http://ua.linkedin.com/in/iopaniuk


More information about the U-Boot mailing list