Skip to content

Commit

Permalink
jetson-uefi: implement otaclient_no_firmware_update hint file
Browse files Browse the repository at this point in the history
  • Loading branch information
Bodong-Yang committed Jun 11, 2024
1 parent d6fef90 commit a9b0764
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion src/otaclient/app/boot_control/_jetson_uefi.py
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,11 @@ def _finalize_switching_boot(self) -> bool:
return True

def _capsule_firmware_update(self) -> bool:
"""Perform firmware update with UEFI Capsule update."""
"""Perform firmware update with UEFI Capsule update.
Returns:
True if there is firmware update configured, False for no firmware update.
"""
logger.info("jetson-uefi: checking if we need to do firmware update ...")

standby_bootloader_slot = self._uefi_control.standby_slot
Expand All @@ -480,6 +484,17 @@ def _capsule_firmware_update(self) -> bool:
)

# ------ check if we need to do firmware update ------ #
skip_firmware_update_hint_file = (
self._mp_control.standby_slot_mount_point
/ Path(boot_cfg.CAPSULE_PAYLOAD_AT_ROOTFS).relative_to("/")
/ Path(boot_cfg.NO_FIRMWARE_UPDATE_HINT_FNAME)
)
if skip_firmware_update_hint_file.is_file():
logger.warning(
"target image is configured to not doing firmware update, skip"
)
return False

_new_bsp_v_fpath = self._mp_control.standby_slot_mount_point / Path(
boot_cfg.NV_TEGRA_RELEASE_FPATH
).relative_to("/")
Expand Down

0 comments on commit a9b0764

Please sign in to comment.