L4T R38.4.0: initrd flash fails on jetson-orin-nano-devkit-super — dtbcheck.py not copied to staging directory

L4T R38.4.0: initrd flash fails on jetson-orin-nano-devkit-super — dtbcheck.py not copied to staging directory

Summary

Flashing a Jetson Orin Nano Super devkit using l4t_initrd_flash.sh with L4T R38.4.0 fails with:

Error: Unexpected error in updating: tegra234-bpmp-3767-0003-3768-super_with_odm.dtb

The root cause is that copy_bootloader() in l4t_initrd_flash_internal.sh does not copy dtbcheck.py to the temporary staging directory. When tegraflash_impl_t264.py later checks for the file with os.path.exists('dtbcheck.py'), it doesn’t find it and raises an exception.

Environment

  • Host: Ubuntu 24.04 x86_64
  • BSP: L4T R38.4.0 (JetPack 7.1)
  • Board: jetson-orin-nano-devkit-super
  • Flash method: initrd flash to NVMe

Flash command used

cd Linux_for_Tegra
sudo ./tools/kernel_flash/l4t_initrd_flash.sh \
    --external-device nvme0n1p1 \
    -c tools/kernel_flash/flash_l4t_t234_nvme.xml \
    -p "-c bootloader/generic/cfg/flash_t234_qspi.xml" \
    --showlogs \
    --network usb0 \
    jetson-orin-nano-devkit-super internal

Full error output

  Bootloader is not running
  Parsing partition layout
  tegraparser_v2 --pt flash_l4t_t234_nvme_uda_only.xml.tmp flash_t234_qspi.xml.tmp
  Successfully read partition layout
  ...
  Updating bpmp-dtb (tegra234-bpmp-3767-0003-3768-super_with_odm.dtb)
  Error: Unexpected error in updating: tegra234-bpmp-3767-0003-3768-super_with_odm.dtb

Root cause analysis

The flash process changes its working directory to a temporary staging directory (temp_dir) during the BPMP DTB update phase. In tegraflash_impl_t264.py (around line 2167), the code checks:

  tmp_dtb = tegraflash_create_backup_file(bpmp_dtb, '_tmp')
  if os.path.exists(tmp_dtb) and os.path.exists('dtbcheck.py'):
      # run dtbcheck validation...
  else:
      raise tegraflash_exception('Unexpected error in updating: ' + bpmp_dtb + ' ')

The tmp_dtb file exists, but dtbcheck.py does not because copy_bootloader() in tools/kernel_flash l4t_initrd_flash_internal.sh never copies it to the staging directory. The function copies tegraflash*.py, tegrasign*.py, and pyfdt, but omits dtbcheck.py.

This appears to affect only the “super” board variant (jetson-orin-nano-devkit-super), which uses the tegra234-bpmp-3767-0003-3768-super_with_odm.dtb BPMP DTB that triggers the dtbcheck.py code path.

Fix

Add a conditional copy of dtbcheck.py to the copy_bootloader() function in tools/kernel_flash/l4t_initrd_flash_internal.sh:

  --- a/tools/kernel_flash/l4t_initrd_flash_internal.sh
  +++ b/tools/kernel_flash/l4t_initrd_flash_internal.sh
  @@ -800,6 +800,9 @@
        cp tegraparser_v2 "${temp_bootloader}";
        cp tegrarcm_v2 "${temp_bootloader}";
        cp -r -t "${temp_bootloader}" ./tegraflash*.py ./tegrasign*.py ./pyfdt
  +     if [ -f dtbcheck.py ]; then
  +             cp dtbcheck.py "${temp_bootloader}";
  +     fi;
        cp tegraopenssl "${temp_bootloader}";

After applying this patch, the flash completes successfully and the Jetson boots normally.

Steps to reproduce

  1. Download L4T R38.4.0 BSP and rootfs from NVIDIA
  2. Extract and run apply_binaries.sh
  3. Connect a Jetson Orin Nano Super in recovery mode via USB-C
  4. Run the flash command above
  5. Observe the dtbcheck.py error

Hi stiraspo,

Please note that Jetpack 7.1(r38.4.0) does not support for Orin Nano yet.
Orin series will be supported from Jetpack 7.2.

For Orin series, please use the latest Jetpack 6.2.2(r36.5) we just released this week.