am 77b01a8c: am 6f2f23a4: Merge "Teach the build system to reserve the last 16 Kbytes of /data for the crypto footer" into honeycomb

* commit '77b01a8c2230a7467979d8ab56c0a65c1d6b0640':
  Teach the build system to reserve the last 16 Kbytes of /data for the crypto footer
This commit is contained in:
Ken Sumrall 2011-01-19 17:47:08 -08:00 committed by Android Git Automerger
commit 2eef425167

View file

@ -168,17 +168,21 @@ class EdifyGenerator(object):
"""Format the given partition, specified by its mount point (eg,
"/system")."""
reserve_size = 0
fstab = self.info.get("fstab", None)
if fstab:
p = fstab[partition]
self.script.append('format("%s", "%s", "%s");' %
(p.fs_type, common.PARTITION_TYPES[p.fs_type], p.device))
# Reserve the last 16 Kbytes of an EMMC /data for the crypto footer
if partition == "/data" and common.PARTITION_TYPES[p.fs_type] == "EMMC":
reserve_size = -16384
self.script.append('format("%s", "%s", "%s", "%s");' %
(p.fs_type, common.PARTITION_TYPES[p.fs_type], p.device, reserve_size)
else:
# older target-files without per-partition types
partition = self.info.get("partition_path", "") + partition
self.script.append('format("%s", "%s", "%s");' %
self.script.append('format("%s", "%s", "%s", "%s");' %
(self.info["fs_type"], self.info["partition_type"],
partition))
partition, reserve_size))
def DeleteFiles(self, file_list):
"""Delete all files in file_list."""