blob: e61a63a836434d63df4d365d49f101708f027291 [file] [log] [blame]
Badhri Jagan Sridharan872ab6d2014-05-07 15:05:32 -07001import common
2import struct
3
4def FullOTA_InstallEnd(info):
5 try:
6 firmware_img = info.input_zip.read("RADIO/firmware.zip")
7 except KeyError:
8 print "no firmware.zip in target_files; skipping install"
9 else:
10 info.script.Print("Writing firmware.zip...")
11 common.ZipWriteStr(info.output_zip, "firmware.zip", firmware_img)
12 info.script.AppendExtra(
13 'package_extract_file("firmware.zip", "/dev/block/platform/sdhci-tegra.3/by-name/OTA");')
14
15
16def IncrementalOTA_InstallEnd(info):
17 try:
18 source_firmware_img = info.source_zip.read("RADIO/firmware.zip")
19 except KeyError:
20 print "no firmware.zip in source_files; skipping install"
21 else:
22 try:
23 target_firmware_img = info.target_zip.read("RADIO/firmware.zip")
24 except KeyError:
25 print "no firmware.zip in target_files; skipping install"
26 else:
27 if source_firmware_img == target_firmware_img:
28 return
29 info.script.Print("Writing firmware.zip...")
30 common.ZipWriteStr(info.output_zip, "firmware.zip", target_firmware_img)
31 info.script.AppendExtra(
32 'package_extract_file("firmware.zip", "/dev/block/platform/sdhci-tegra.3/by-name/OTA");')