diff options
| author | Zhao Wei Liew <zhaoweiliew@gmail.com> | 2016-02-13 11:16:02 +0800 |
|---|---|---|
| committer | Zhao Wei Liew <zhaoweiliew@gmail.com> | 2016-02-13 11:30:36 +0800 |
| commit | 1ca6b959a164ada31daae109729a1924c9af21f3 (patch) | |
| tree | dc8914c8c57fded6efc199de779d1a6e6b8efd54 /releasetools.py | |
| parent | d0390b5eac48b3d69a6bb595f60bf91592e89c38 (diff) | |
deb: Bring up CM
* Add proprietary file scripts
* Add widevine blobs and remove unnecessary blobs
* Configure hardware keys appropriately
* Move over to Trebuchet from Launcher2
* Don't restrict vendor files
Change-Id: Iae45847deb780fbf3b6a118bc4c541c45f5c675c
Diffstat (limited to 'releasetools.py')
| -rw-r--r-- | releasetools.py | 32 |
1 files changed, 25 insertions, 7 deletions
diff --git a/releasetools.py b/releasetools.py index 1714eaa..6f485c1 100644 --- a/releasetools.py +++ b/releasetools.py @@ -22,6 +22,12 @@ def FullOTA_InstallEnd(info): else: print "no radio.img in target_files; skipping install" + DDR_img = FindDDR(info.input_zip) + if DDR_img: + WriteDDR(info, DDR_img) + else: + print "no DDR.bin in target_files; skipping install" + def IncrementalOTA_VerifyEnd(info): target_radio_img = FindRadio(info.target_zip) @@ -36,13 +42,6 @@ def IncrementalOTA_VerifyEnd(info): len(target_radio_img), common.sha1(target_radio_img).hexdigest())) -def IncrementalOTA_InstallBegin(info): - # Reduce the space taken by the journal. - info.script.Unmount("/system") - info.script.TunePartition("/system", "-O", "^has_journal") - info.script.Mount("/system") - - def IncrementalOTA_InstallEnd(info): try: target_bootloader_img = info.target_zip.read("RADIO/bootloader.img") @@ -58,6 +57,13 @@ def IncrementalOTA_InstallEnd(info): except KeyError: print "no bootloader.img in target target_files; skipping install" + df = FindDDR(info.target_zip) + if not df: + print "no DDR.bin in target target_files; skipping install" + else: + df = common.File("DDR.bin", df) + WriteDDR(info, df.data) + tf = FindRadio(info.target_zip) if not tf: # failed to read TARGET radio image: don't include any radio in update. @@ -101,6 +107,18 @@ def WriteRadio(info, radio_img): info.script.AppendExtra( 'package_extract_file("radio.img", "%s");' % (device,)) +def FindDDR(zipfile): + try: + return zipfile.read("RADIO/DDR.bin") + except KeyError: + return None + + +def WriteDDR(info, DDR_img): + info.script.Print("Writing DDR...") + common.ZipWriteStr(info.output_zip, "DDR.bin", DDR_img) + info.script.AppendExtra( + 'package_extract_file("DDR.bin", "/dev/block/platform/msm_sdcc.1/by-name/DDR");' ) # /* msm8960 bootloader.img format */ # |
