Skip to content

Commit

Permalink
jetson-uefi: distiguish firmware BSP version and rootfs BSP version
Browse files Browse the repository at this point in the history
  • Loading branch information
Bodong-Yang committed Jun 11, 2024
1 parent 46ea740 commit d6fef90
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion src/otaclient/app/boot_control/_jetson_uefi.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,18 +247,38 @@ def __init__(self):
raise JetsonUEFIBootControlError(_err_msg)
logger.info(f"dev compatibility: {compat_info}")

# ------ check firmware BSP version ------ #
# ------ check BSP version ------ #
# check firmware BSP version
try:
self.bsp_version = bsp_version = (
NVBootctrlCommon.get_current_fw_bsp_version()
)
assert bsp_version, "bsp version information not available"
logger.info(f"current slot firmware BSP version: {bsp_version}")
except Exception as e:
_err_msg = f"failed to detect BSP version: {e!r}"
logger.error(_err_msg)
raise JetsonUEFIBootControlError(_err_msg)
logger.info(f"{bsp_version=}")

# check rootfs BSP version
try:
self.rootfs_bsp_verion = rootfs_bsp_version = parse_bsp_version(
Path(boot_cfg.NV_TEGRA_RELEASE_FPATH).read_text()
)
logger.info(f"current slot rootfs BSP version: {rootfs_bsp_version}")
except Exception as e:
logger.warning(f"failed to detect rootfs BSP version: {e!r}")
self.rootfs_bsp_verion = rootfs_bsp_version = None

if rootfs_bsp_version and rootfs_bsp_version >= bsp_version:
logger.warning(
(
"current slot's rootfs bsp version is newer than the firmware bsp version, "
"this indicates the device previously only receive rootfs update, this is unexpected"
)
)

# ------ sanity check, currently jetson-uefi only supports >= R35.2 ----- #
# only after R35.2, the Capsule Firmware update is available.
if not bsp_version >= (35, 2, 0):
Expand Down

0 comments on commit d6fef90

Please sign in to comment.