summaryrefslogtreecommitdiff
path: root/releasetools.py
diff options
context:
space:
mode:
Diffstat (limited to 'releasetools.py')
-rw-r--r--releasetools.py32
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 */
#