only do size check for yaffs images; fix incremental info dict

Change-Id: Ic862000a23b93289604b0737bfcaf8d461f36ff8
This commit is contained in:
Doug Zongker
2010-09-16 14:01:56 -07:00
parent 9b3944ed8c
commit 486de126e3
2 changed files with 18 additions and 19 deletions

View File

@@ -309,18 +309,17 @@ def CheckSize(data, target):
# image size should be increased by 1/64th to account for the
# spare area (64 bytes per 2k page)
limit = limit / 2048 * (2048+64)
size = len(data)
pct = float(size) * 100.0 / limit
msg = "%s size (%d) is %.2f%% of limit (%d)" % (target, size, pct, limit)
if pct >= 99.0:
raise ExternalError(msg)
elif pct >= 95.0:
print
print " WARNING: ", msg
print
elif OPTIONS.verbose:
print " ", msg
size = len(data)
pct = float(size) * 100.0 / limit
msg = "%s size (%d) is %.2f%% of limit (%d)" % (target, size, pct, limit)
if pct >= 99.0:
raise ExternalError(msg)
elif pct >= 95.0:
print
print " WARNING: ", msg
print
elif OPTIONS.verbose:
print " ", msg
def ReadApkCerts(tf_zip):