Unable to flash Jetson AGX Orin 64 GB developer kit with Jetpack 5.1.2 using SDK Manager 2.1.0

Jetpack Version: 5.1.2
SDK Manager: 2.1.0 (Ubuntu 20.04)
Device: Jetson AGX Orin 64 GB Developer kit

Flashing the Orin (NVMe) fails with the following error

8:50:59 INFO: Flash Jetson Linux - flash: SSH ready
08:50:59 INFO: Flash Jetson Linux - flash: blockdev: cannot open /dev/mmcblk0boot0: No such file or directory
08:50:59 INFO: Flash Jetson Linux - flash: max_index=75
08:51:00 INFO: Flash Jetson Linux - flash: writing item=59, 1:3:primary_gpt, 512, 19968, gpt_primary_1_3.bin, 16896, fixed--0, d7094ac7e4f7c9a3d4eb6198fc9d0e0e6b005223
08:51:00 INFO: Flash Jetson Linux - flash: Writing primary_gpt partition with gpt_primary_1_3.bin
08:51:00 INFO: Flash Jetson Linux - flash: dd if=/mnt/internal/gpt_primary_1_3.bin of=/dev/mmcblk0 bs=1 skip=0 seek=512 count=16896
08:51:00 INFO: Flash Jetson Linux - flash: 16896 bytes (17 kB, 16 KiB) copied, 0.0193667 s, 872 kB/s
08:51:01 INFO: Flash Jetson Linux - flash: Cleaning up...
08:51:01 INFO: Flash Jetson Linux - flash: [ Component Install Finished with Error ]
08:51:01 ERROR: Flash Jetson Linux - flash: command terminated with error
08:51:01 SUMMARY: DateTime Target Setup - target: Depends on failed component

I have exported the logs and attached them here for reference.
SDKM_logs_JetPack_5.1.2_Linux_for_Jetson_AGX_Orin_modules_2024-05-10_08-45-05_latest.zip (217.6 KB)

Note: Flashing with Jetpack 5.1.3 and Jetpack 6 works, but we want to flash the Orin with Jetpack 5.1.2 since ECON Camera drivers only support Jetpack 5.1.2.

2 Likes

Hi,

Please copy this into the 35.4.1 version of Linux_for_Tegra/p3701.conf.common:

# update_local_cfgfile
update_local_cfgfile()
{
	# Update "num_sectors" in local cfgfile for the device
	# with FAB=501 and BOARDSKU=0004/0005
	local local_cfgfile="${1}"
	if [ "${board_FAB}" == "501" ] && [[ "${board_sku}" == "0004" || "${board_sku}" == "0005" ]]; then
		sed -i 's/num_sectors=\"124321792\"/num_sectors=\"124190720\"/' "${local_cfgfile}"
	fi
}

Some AGX Orin modules get new eMMC chips because of PCN, but the disk size is slightly smaller than previous modules, hence this error:

Error: Invalid argument during seek for read on /dev/mmcblk0
[ 1]: l4t_flash_from_kernel: Error: partprobe failed. This indicates that:
 -   the xml indicates the gpt is larger than the device storage
 -   the xml might be invalid
 -   the device might have a problem.
 Please make correction.
1 Like

After adding the bash function, I get a similar error on flashing

10:46:00 INFO: Flash Jetson Linux - flash: 16896+0 records in
10:46:00 INFO: Flash Jetson Linux - flash: 16896+0 records out
10:46:00 INFO: Flash Jetson Linux - flash: 16896 bytes (17 kB, 16 KiB) copied, 0.0194705 s, 868 kB/s
10:46:00 INFO: Flash Jetson Linux - flash: Writing primary_gpt partition done
10:46:00 ERROR: Flash Jetson Linux - flash: Error: Invalid argument during seek for read on /dev/mmcblk0
10:46:00 ERROR: Flash Jetson Linux - flash: [ 1]: l4t_flash_from_kernel: Error: partprobe failed. This indicates that:
10:46:00 INFO: Flash Jetson Linux - flash: - the xml indicates the gpt is larger than the device storage
10:46:00 INFO: Flash Jetson Linux - flash: - the xml might be invalid
10:46:00 INFO: Flash Jetson Linux - flash: - the device might have a problem.
10:46:00 INFO: Flash Jetson Linux - flash: Please make correction.
10:46:00 INFO: Flash Jetson Linux - flash: Flash failure
10:46:00 INFO: Flash Jetson Linux - flash: Cleaning up..

sdkm logs are attached.
SDKM_logs_JetPack_5.1.2_Linux_for_Jetson_AGX_Orin_modules_2024-05-13_10-41-24.zip (351.7 KB)

Update:
I was able to flash successfully. I added update_local_cfgfile ${localcfgfile} to flash.sh

if [ "${tegraid}" = "0x19" ]; then
	# Create a file to store the partition layout with mb1 fix
	localcfgfile_mb1_fix_ext="${localcfgfile##*.}";
	localcfgfile_mb1_fix_name="${localcfgfile%.*}";
	localcfgfile_mb1_fix="${localcfgfile_mb1_fix_name}_mb1_fix.${localcfgfile_mb1_fix_ext}";
	mb1_b_filename="${mb1filename:0:3}_b${mb1filename:3}";
	cp "${mb1file}" "${BL_DIR}/${mb1_b_filename}";
	# Replace the mb1_b filename (the second MB1FILE)
	sed ':a;N;$!ba;s/MB1FILE/'"${mb1_b_filename}"'/2' "${cfgfile}" > "${localcfgfile_mb1_fix}"; chkerr;
	mkfilesoft cfgfile "${localcfgfile_mb1_fix}" "";
fi;

# CFGCONV is a flat string holding a bunch of flags for sed, so should not be
# quoted. Maybe need to convert CFGCONV to a list so that we can quote this.
# For now, though, disable SC2086.
cat "${cfgfile}" | limit_boot_chains | sed ${CFGCONV} > ${localcfgfile}; chkerr;

##### ADDED LINE - Replace number of sectors ######
update_local_cfgfile  ${localcfgfile}

I am not sure if this is the correct way to call the bash function though.

That’s fine you do it this way.
I didn’t notice that update_local_cfgfile() was not available in flash.sh until 35.5.

2 Likes