diff options
author | Ameya Thakur <ameyat@codeaurora.org> | 2013-07-29 17:39:37 -0700 |
---|---|---|
committer | Adnan Begovic <adnan@cyngn.com> | 2015-10-06 17:59:16 -0700 |
commit | e5b5a276e7ff8d0b68bc4b6f21fef8232855efc7 (patch) | |
tree | c5ad99703658f687b3c82f3ea80b9528601f3fce /tools/releasetools/common.py | |
parent | dacf2edb53a608680a9bcad5e865e5bb5af1ac4b (diff) | |
download | build-e5b5a276e7ff8d0b68bc4b6f21fef8232855efc7.zip build-e5b5a276e7ff8d0b68bc4b6f21fef8232855efc7.tar.gz build-e5b5a276e7ff8d0b68bc4b6f21fef8232855efc7.tar.bz2 |
build: Add changes to release tools and mkbootimg
Change the prototype of LoadRecoveryFstab to take in the device type
as a argument. Fix the case where mkbootimg was being passed a incorrect
argument.
Change-Id: Ic6ac596d8d96d3a5effbdf513763ec1cb92b1a03
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") |