summaryrefslogtreecommitdiffstats
path: root/tools/releasetools/edify_generator.py
diff options
context:
space:
mode:
authorDoug Zongker <dougz@google.com>2014-06-16 15:16:31 -0700
committerDoug Zongker <dougz@google.com>2014-06-16 15:39:54 -0700
commitc8b4e849f10f3a382694b00453b3f49608c83b48 (patch)
treec54d82b98530a5e82cbbca361ec5073f70545083 /tools/releasetools/edify_generator.py
parent4b445e89989845b5e8109caf96a8f32d8d7fe788 (diff)
downloadbuild-c8b4e849f10f3a382694b00453b3f49608c83b48.zip
build-c8b4e849f10f3a382694b00453b3f49608c83b48.tar.gz
build-c8b4e849f10f3a382694b00453b3f49608c83b48.tar.bz2
full support for OTA of vendor partitions
Make vendor partition a first-class member of the OTA system (for target_files that contain a VENDOR/ subdirectory). Build vendor images in a way that is compatible with block-based OTA. Support updating the vendor partition in both full and incremental, block and file OTAs. In most cases this is handled by refactoring the existing code to handle the system partition to handle either, and then calling it twice. Currently we don't support incremental OTAs from a target-files without a VENDOR subdirectory to one with one, or vice versa. To add or remove a vendor partition a full OTA will need to be done. Bug: 15544685 Change-Id: I9cb9a1267060bd9683a9bea19b43a26b5a43800d
Diffstat (limited to 'tools/releasetools/edify_generator.py')
-rw-r--r--tools/releasetools/edify_generator.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/tools/releasetools/edify_generator.py b/tools/releasetools/edify_generator.py
index 43e8542..8620812 100644
--- a/tools/releasetools/edify_generator.py
+++ b/tools/releasetools/edify_generator.py
@@ -203,11 +203,10 @@ class EdifyGenerator(object):
p.device, p.length, p.mount_point))
def WipeBlockDevice(self, partition):
- if partition != "/system":
- raise ValueError(("WipeBlockDevice currently only works "
- "on /system, not %s\n") % (partition,))
+ if partition not in ("/system", "/vendor"):
+ raise ValueError(("WipeBlockDevice doesn't work on %s\n") % (partition,))
fstab = self.info.get("fstab", None)
- size = self.info.get("system_size", None)
+ size = self.info.get(partition.lstrip("/") + "_size", None)
device = fstab[partition].device
self.script.append('wipe_block_device("%s", %s);' % (device, size))