Unable to use l4t_initrd_flash.sh to flash eMMC of TX2 NX

Hi, I need some help with flashing TX2 NX internal eMMC. I can successfully flash the board with flash.sh but just can’t figure out how to use l4t_initrd_flash.sh

I am using Jetson TX2 NX with A206 Carrier Board from SeeedStudio. I followed all the instructions in the README_Initrd_flash.txt (Release 32.7.1), but I still have no luck.

Here are my steps:

  1. systemctl stop udisk2.service
  2. sudo apt install libxml2-utils simg2img network-manager abootimg sshpass
  3. unpack secureboot_R32.7.1_aarch64.tbz2 to the following directory: JetPack_4.6.1_Linux_JETSON_TX2_TARGETS
  4. cd Linux_for_Tegra
  5. Put device into recovery mode
  6. Flashing the internal storage:
    sudo ./tools/kernel_flash/l4t_initrd_flash.sh jetson-xavier-nx-devkit-tx2-nx mmcblk0p1

However, I am getting errors that say “Flash complete (WITH FAILURES)” in the terminal. The log says "Error: Invalid argument during seek for read on /dev/sda
[ 3]: 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.
    Error flashing non-qspi storage"

flash_1-1_0_20220412-142928.log (9.9 KB)

Can someone help me with that?

Is there any usb device connected when you try to use inird flash? Please remove them and try again.

Also, since this is custom board, if there are some usb devices that are not able to remove by you, then I can only suggest you just only use flash.sh.

The only USB devices connected are keyboard and mouse. After removing them, I still can’t get the inird flash to work with it. Still throwing same error.

Thanks Wayne. For now, I will use flash.sh.

Just want to clarify, after you use flash.sh to flash and boot into the board, will you see any device like /dev/sda ?

Yes, after flashing with flash.sh, I can see a /dev/sda device from my host machine.

And this is from the TX2 NX:


Can you remove that sda1 device on your host and try again?

The first 250GB disk is the M.2 SSD for my host. It can’t be removed.

Oh ok. I think they are not related.

Please try to modify bootloader/t186ref/cfg/flash_l4t_t186.xml. Need to modify the num_sectors for the sdmmc_user in that file to be smaller first.

This is mentioned in the readme file.

How to use:
- This tool does not support size discovery for internal emmc/sdcard. Therefore,
  you might need to change the "num_sectors" field in the config file under
  bootloader/t186ref/cfg if the default "num_sectors" is incompatible. You must
  change "num_sectors" so that num_sectors * sector_size is equal to or smaller
  the size of the internal emmc/sd card of your Jetson.
- This tool supports T194 and T186 devices. You can use the -h option to find out what options this tool supports.
- Below are listed some sample workflows for initrd flashing.

Thanks Wayne, now it works after modifying the num_sectors. I didn’t realise there are two num_sectors fields in that config file initially.

1 Like

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