OSDN Git Service

Assert the stash size when generating OTAs.
authorTao Bao <tbao@google.com>
Thu, 21 May 2015 21:09:49 +0000 (14:09 -0700)
committerTao Bao <tbao@google.com>
Wed, 26 Aug 2015 22:00:38 +0000 (15:00 -0700)
commitd47d8e14880132c42a75f41c8041851797c75e35
treef7c8323bce043082d95f80f05eb0382e5ee855bc
parent8a1fa15844e0ad73d3b327ff567012e485e7896d
Assert the stash size when generating OTAs.

With block-based OTA v2 and v3, it requires stash space on the /cache
partition to back up blocks during an update. We need to ensure that
it doesn't exceed the partition size. Since there might be other files
on /cache as well, we use cache_size * threshold as the maximum allowed
size. The threshold defaults to 0.8, which can be overridden by command
line option '--stash_threshold'.

Change-Id: Ieee5d373c9bfb2ea401d85ca8a3adb491579de76
(cherry picked from commit 23ac4042128e47f6fe1ef176e7cb96f907d8e149)
tools/releasetools/blockimgdiff.py
tools/releasetools/ota_from_target_files.py