Skip to content

Commit

Permalink
common/imx8m/releasetools.py: force install vbmeta for incremental OTA
Browse files Browse the repository at this point in the history
Signed-off-by: Gary Bisson <[email protected]>
  • Loading branch information
gibsson committed Feb 4, 2025
1 parent 9fa0de3 commit 3d00f92
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions common/imx8m/releasetools.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,25 @@ def FullOTA_InstallEnd(info):

# emit the script code to trigger the dtbo updater on the device
info.script.WriteRawImage("/dtbo", "dtbo.img")

def IncrementalOTA_InstallEnd(info):
# copy the vbmeta and dtbo into the package.
try:
vbmeta_img = common.GetBootableImage(
"vbmeta.img", "vbmeta.img", OPTIONS.input_tmp, "VBMETA")
dtbo_img = common.GetBootableImage(
"dtbo.img", "dtbo.img", OPTIONS.input_tmp, "DTBO")
except KeyError:
print("no vbmeta or dtbo images in target_files; skipping install")
return
# copy the vbmeta into the package.
common.ZipWriteStr(info.output_zip, "vbmeta.img", vbmeta_img.data)

# emit the script code to trigger the vbmeta updater on the device
info.script.WriteRawImage("/vbmeta", "vbmeta.img")

# copy the dtbo into the package.
common.ZipWriteStr(info.output_zip, "dtbo.img", dtbo_img.data)

# emit the script code to trigger the dtbo updater on the device
info.script.WriteRawImage("/dtbo", "dtbo.img")

0 comments on commit 3d00f92

Please sign in to comment.