diff options
Diffstat (limited to 'tools/releasetools/common.py')
-rw-r--r-- | tools/releasetools/common.py | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/tools/releasetools/common.py b/tools/releasetools/common.py index e37b0f8..b61de74 100644 --- a/tools/releasetools/common.py +++ b/tools/releasetools/common.py @@ -148,6 +148,8 @@ def LoadInfoDict(input_file): if "fstab_version" not in d: d["fstab_version"] = "1" + if "device_type" not in d: + d["device_type"] = "MMC" try: data = read_helper("META/imagesizes.txt") for line in data.split("\n"): @@ -177,7 +179,7 @@ def LoadInfoDict(input_file): makeint("boot_size") makeint("fstab_version") - d["fstab"] = LoadRecoveryFSTab(read_helper, d["fstab_version"]) + d["fstab"] = LoadRecoveryFSTab(read_helper, d["fstab_version"], d["device_type"]) d["build.prop"] = LoadBuildProp(read_helper) return d @@ -200,7 +202,7 @@ def LoadDictionaryFromLines(lines): d[name] = value return d -def LoadRecoveryFSTab(read_helper, fstab_version): +def LoadRecoveryFSTab(read_helper, fstab_version, type): class Partition(object): def __init__(self, mount_point, fs_type, device, length, device2, context): self.mount_point = mount_point @@ -364,6 +366,11 @@ def BuildBootableImage(sourcedir, fs_config_file, info_dict=None): cmd.append("--tags-addr") cmd.append(open(fn).read().rstrip("\n")) + fn = os.path.join(sourcedir, "tags_offset") + if os.access(fn, os.F_OK): + cmd.append("--tags_offset") + cmd.append(open(fn).read().rstrip("\n")) + fn = os.path.join(sourcedir, "ramdisk_offset") if os.access(fn, os.F_OK): cmd.append("--ramdisk_offset") |