handle don't care regions in the system image

The system partitions has regions that we shouldn't write and can't
depend on the contents of.  Adds a new script to generate a map of
these regions (using the sparse image as input), and include the map
in the package zip so it can be used when writing or patching the
system partition.

Also fixes a bug where the wrong SELinux file contexts are used when
generating incrementals.

Change-Id: Iaca5b967a3b7d1df843c7c21becc19b3f1633dad
This commit is contained in:
Doug Zongker
2014-02-24 08:13:45 -08:00
parent 7676dbe03e
commit 5fad2039bb
7 changed files with 228 additions and 19 deletions

View File

@@ -27,6 +27,8 @@ import sys
import commands
import shutil
import simg_map
def RunCommand(cmd):
""" Echo and run the given command
@@ -146,6 +148,13 @@ def UnsparseImage(sparse_image_path, replace=True):
return False, None
return True, unsparse_image_path
def MappedUnsparseImage(sparse_image_path, unsparse_image_path,
map_path, mapped_unsparse_image_path):
if simg_map.ComputeMap(sparse_image_path, unsparse_image_path,
map_path, mapped_unsparse_image_path):
return False
return True
def MakeVerityEnabledImage(out_file, prop_dict):
"""Creates an image that is verifiable using dm-verity.