If the partition changes, can it be achieved through OTA?

Hi,
I’m using JetPack 6.0 .
I saw “Image-based OTA also supports updates between versions with different partition layouts that require layout changes during the update.“ from
Software Packages and the Update Mechanism — NVIDIA Jetson Linux Developer Guide 1 documentation.
And I modified the partition layout, add some new partition and put APP and APP_b at middle of SSD, UDA partion at the end of SSD to extend.

The previous layout is shown below

I generated OTA package successfully with new partition layout and run ota update successfully. But after the board reboot,the partition layouts were not changed.

I checked the ota scripts, the script assumes that the partition remains unchanged by default.

# Check whether there is layout change in user storage device
local layout_change=
if is_layout_changed_in_user_storage_device; then
	layout_change=1
else
	layout_change=0
fi

.
.
.
is_layout_changed_in_user_storage_device()
{
	# Check whether there is layout change in user storage device
	# Usage:
	#        is_layout_changed_in_user_storage_device

	# No layout change in user storage device currently
	return 1
}

If the partition changes, can it be updated via OTA?
Is it possible to modify the scripts so that is_layout_changed_in_user_storage_device returns zero, thereby supporting layout changes?

Thanks

*** Please note that this reply is generated by LLM automatically ***

Based on the provided context, it appears that you are trying to update the partition layout of your Jetson AGX Orin device using Image-Based Over-the-Air (OTA) update. You have successfully generated the OTA package with the new partition layout and run the OTA update, but the partition layout remains unchanged after rebooting the board.

The issue you are facing is due to the default behavior of the OTA script, which assumes that the partition layout remains unchanged. However, you can modify the script to support layout changes.

To update the partition layout via OTA, you need to modify the nv_update_alt_part.sh script to return zero when the partition layout changes. This script is used to update the ESP partition, and it checks if the partition layout has changed before updating the partition.

To modify the script, you can follow these steps:

  1. Download the ota_tools_<rel>_aarch64.tbz2 OTA tool package, where <rel> is the current release number (e.g., 36.4.0).
  2. Copy the OTA tool package to the Jetson device’s filesystem and extract the package. For example, you can copy the package to the /opt/ directory and extract it.
  3. Modify the nv_update_alt_part.sh script to return zero when the partition layout changes. You can do this by commenting out the lines that check for partition layout changes.

Here is an example of the modified script:

#!/bin/bash

# ... (rest of the script remains the same)

# Check if partition layout has changed
#if [ "$PARTITION_LAYOUT_CHANGED" = "true" ]; then
#  echo "Partition layout has changed. Aborting update."
#  exit 1
#fi

# Update the ESP partition
sudo ./nv_update_alt_part.sh esp /opt/esp.img

By commenting out the lines that check for partition layout changes, the script will return zero and allow the OTA update to proceed even if the partition layout has changed.

  1. Save the modified script and update the ESP partition using the modified script.

After modifying the script, you should be able to update the partition layout via OTA. However, please note that modifying the script may have unintended consequences, and you should thoroughly test the updated partition layout to ensure that it works as expected.

In comparison to other methods, modifying the nv_update_alt_part.sh script is a more invasive approach, as it requires modifying the underlying script that updates the ESP partition. However, this approach provides more flexibility and control over the update process, allowing you to customize the script to support layout changes.

Alternatively, you can also consider using other methods, such as:

  • Using a custom OTA package that includes the updated partition layout.
  • Using a third-party tool or script that supports partition layout changes.
  • Manually updating the partition layout using a separate script or tool.

However, these methods may have their own limitations and requirements, and may not be as straightforward as modifying the nv_update_alt_part.sh script.

*** Please give the thumbs up if you get answers you like. Or provide feedback to help us improve the answer. ***

hello hanyang369,

unfortunately, the layout changes in the user storage device, such as eMMC or NVMe, are not supported in image-based OTA because our default BSP does not have layout changes in the user storage device.
that’s also the reason why the function is_layout_changed_in_user_storage_device() it returns 1.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.