diff options
author | Ken Sumrall <ksumrall@android.com> | 2011-01-19 17:08:54 -0800 |
---|---|---|
committer | Ken Sumrall <ksumrall@android.com> | 2011-01-19 17:14:51 -0800 |
commit | a67616acfd436ac0ba224e675dc972c8491901fc (patch) | |
tree | b08be9c743a2116fa1c7b9d738b6279ae065fa11 /tools/releasetools/edify_generator.py | |
parent | 23d3dedb870d9ca867c7366632cadcdbc4e49f31 (diff) | |
download | build-a67616acfd436ac0ba224e675dc972c8491901fc.zip build-a67616acfd436ac0ba224e675dc972c8491901fc.tar.gz build-a67616acfd436ac0ba224e675dc972c8491901fc.tar.bz2 |
Teach the build system to reserve the last 16 Kbytes of /data for the crypto footer
If making /data and it's an EMMC interface, reserve the last 16 Kbytes
of the partition for the crypto footer.
Change-Id: Ia2c0bb53a545f074e79fc9d6ac04faee75fb9be4
Diffstat (limited to 'tools/releasetools/edify_generator.py')
-rw-r--r-- | tools/releasetools/edify_generator.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/tools/releasetools/edify_generator.py b/tools/releasetools/edify_generator.py index a1eea1f..7511465 100644 --- a/tools/releasetools/edify_generator.py +++ b/tools/releasetools/edify_generator.py @@ -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.""" |