OSDN Git Service

Make room for AVB hashtree and metadata.
authorDavid Zeuthen <zeuthen@google.com>
Fri, 30 Sep 2016 21:29:22 +0000 (17:29 -0400)
committerDavid Zeuthen <zeuthen@google.com>
Tue, 4 Oct 2016 21:32:16 +0000 (17:32 -0400)
commit4014a9daa742c2fa45c93729fc9d75f488232e3c
tree9a64f2c23efa20463bb9701d899a82fcda1ee2b0
parent0a5b59e78b66d9afb28c491ffa50746b31ec749c
Make room for AVB hashtree and metadata.

While the system.img images currently built with AVB support verify
correctly, mounting the filesystem content fails. This is because
'avbtool add_hashtree_footer' used to claim some of the unused /
DONT_CARE space for stashing the verity tables and this resulting in the
mapped device ending up being smaller causing the mount failure.

Fix this by leaving enough room for AVB hashtree and metadata before
building the image. This is achieved by moving the AVB hashtree support
into build_image.py and using a just added '--calc_max_image_size'
option to 'avbtool add_hashtree_footer' to figure out how much space to
leave out.

This depends on https://android-review.googlesource.com/#/c/281821/

Bug: 31264226
Test: Mounting dm-verity set up from system.img now works.

Merged-In: I4c5de1004c1059f8c582e76b3b8517d427aa1a87

Change-Id: I945a5f1f6782791736cd319f216cfa6b448fb04d
core/Makefile
tools/releasetools/add_img_to_target_files.py
tools/releasetools/build_image.py