[U-Boot] [PATCH 1/1] avb2.0: add get_size_of_partition()

Igor Opaniuk igor.opaniuk at linaro.org
Mon Jul 9 16:15:15 UTC 2018


Hi Eugeniu,

Thanks for reporting this issue,
LIBAVB should depend on CONFIG_FASTBOOT, as fastboot buffer is re-used
(which initially
is used in the fastboot protocol for downloads) for
mmc read/write AvbOps (and buffer size is configured by setting
CONFIG_FASTBOOT_BUF_ADDR
and CONFIG_FASTBOOT_BUF_SIZE)

The problem is that both CONFIG_FASTBOOT_BUF_ADDR and CONFIG_FASTBOOT_BUF_SIZE
are defined for most platforms, and this is how I missed this issue.

Will fix today and re-test,
Thanks

On 9 July 2018 at 18:33, Eugeniu Rosca <erosca at de.adit-jv.com> wrote:
> On Mon, Jul 09, 2018 at 03:15:54PM +0300, Igor Opaniuk wrote:
>> Implement get_size_of_partition() operation,
>> which is required by the latest upstream libavb [1].
>>
>> [1] https://android.googlesource.com/platform/external/avb/+/master/README.md
>>
>> Signed-off-by: Igor Opaniuk <igor.opaniuk at linaro.org>
>> ---
>>  common/avb_verify.c | 33 ++++++++++++++++++++++++++++++++-
>>  1 file changed, 32 insertions(+), 1 deletion(-)
>
>
> Hi Igor,
>
> Is there a way to play with and smoke-test libavb on sandbox?
> FWIW currently, independently on this patch, menuconfig interface allows me
> to select CONFIG_LIBAVB, but then U-Boot compilation fails as below:
>
> $ make defconfig
> $ make menuconfig => select LIBAVB=y
> $ make
>
> ---8<---
> In file included from common/avb_verify.c:7:0:
> include/avb_verify.h: In function ‘get_sector_buf_size’:
> include/avb_verify.h:70:17: error: ‘CONFIG_FASTBOOT_BUF_SIZE’ undeclared (first use in this function); did you mean ‘CONFIG_PRE_CON_BUF_SZ’?
>   return (size_t)CONFIG_FASTBOOT_BUF_SIZE;
>                  ^~~~~~~~~~~~~~~~~~~~~~~~
>                  CONFIG_PRE_CON_BUF_SZ
> include/avb_verify.h:70:17: note: each undeclared identifier is reported only once for each function it appears in
> include/avb_verify.h: In function ‘get_sector_buf’:
> include/avb_verify.h:75:17: error: ‘CONFIG_FASTBOOT_BUF_ADDR’ undeclared (first use in this function); did you mean ‘CONFIG_PRE_CON_BUF_ADDR’?
>   return (void *)CONFIG_FASTBOOT_BUF_ADDR;
>                  ^~~~~~~~~~~~~~~~~~~~~~~~
>                  CONFIG_PRE_CON_BUF_ADDR
>   CC      env/attr.o
> ---8<---
>
> If there were an easy way to smoke-test libavb on sandbox, I think
> people like me would be more motivated to provide their Tested-by
> in addition to their review (just my feeling).
>
> Best regards,
> Eugeniu.



-- 
Regards,
Igor Opaniuk


More information about the U-Boot mailing list