Flash script stuck for long time

@KevinFFF
Comments?


/mnt/JetPack_5.1_Linux_JETSON_AGX_ORIN_TARGETS/Linux_for_Tegra$ sudo ./tools/kernel_flash/l4t_initrd_flash.sh --external-device nvme0n1p1 -c tools/kernel_flash/flash_l4t_external.xml -p -c bootloader/t186ref/cfg/flash_t234_gspi.xml --showlogs --network usb0  p3509-a02+p3767-0000  internal
/mnt/JetPack_5.1_Linux_JETSON_AGX_ORIN_TARGETS/Linux_for_Tegra/tools/kernel_flash/l4t_initrd_flash_internal.sh --no-flash --external-device nvme0n1p1 -c tools/kernel_flash/flash_l4t_external.xml -p -c bootloader/t186ref/cfg/flash_t234_gspi.xml --showlogs --network usb0 p3509-a02+p3767-0000 internal
************************************
*                                  *
*  Step 1: Generate flash packages *
*                                  *
************************************
Create folder to store images to flash
Generate image for internal storage devices
Generate images to be flashed
ADDITIONAL_DTB_OVERLAY=""  /mnt/JetPack_5.1_Linux_JETSON_AGX_ORIN_TARGETS/Linux_for_Tegra/flash.sh --no-flash --sign -c  p3509-a02+p3767-0000 internal

###############################################################################
# L4T BSP Information:
# R35 , REVISION: 2.1
# User release: 0.0
###############################################################################
Board ID() version() sku() revision()
Chip SKU() ramcode() fuselevel(fuselevel_production) board_FAB()
emc_opt_disable_fuse:(0)
Error: missing cfgfile (/mnt/JetPack_5.1_Linux_JETSON_AGX_ORIN_TARGETS/Linux_for_Tegra/p3509-a02+p3767-0000).

-------------------
However:
/mnt/JetPack_5.1_Linux_JETSON_AGX_ORIN_TARGETS/Linux_for_Tegra$ ls p3509-a02+p3767-0000
p3509-a02+p3767-0000-as-p3767-0001.conf  p3509-a02+p3767-0000-as-p3767-0004.conf  p3509-a02+p3767-0000-maxn.conf

reference thread

@Andrey1984,

Your comment itself already tells us that file is indeed missing. Did you accidentally delete it without notice?

Let me just give a simple example, If you use “_av123” in your flash command, it means flash script will search “_av123.conf” in the Linux_for_Tegra path. The string needs to be 100% matching so that the flash process can proceed.

So back to the case, you used “p3509-a02+p3767-0000”. Which means “p3509-a02+p3767-0000.conf” need to be there, but your ls result shows it is not…

BTW, this rule applies since TX1, which means it has been there since long time ago.

results are what is generated by sdkmanager installation
However the issue has been addressed by using other set of commands for mfi creation

Hi,

Below files are what I just downloaded by sdkmanager.

JetPack_5.1_Linux_JETSON_AGX_ORIN_TARGETS/Linux_for_Tegra$ ls p3509-a02+p3767*
p3509-a02+p3767-0000-as-p3767-0001.conf p3509-a02+p3767-0000-as-p3767-0003.conf p3509-a02+p3767-0000-as-p3767-0004.conf p3509-a02+p3767-0000.conf p3509-a02+p3767-0000-maxn.conf

it only worked after copying the file p3509-a02+p3767-0000.conf to p3509-a02+p3767-0000 then the script proceeds

/mnt/JetPack_5.1_Linux_JETSON_AGX_ORIN_TARGETS/Linux_for_Tegra$ sudo ./tools/kernel_flash/l4t_initrd_flash.sh --external-device nvme0n1p1 -c tools/kernel_flash/flash_l4t_external.xml -p -c bootloader/t186ref/cfg/flash_t234_gspi.xml --showlogs --network usb0  p3509-a02+p3767-0000  internal

@Andrey1984

Your command has some weird parts. For example, we don’t have “flash_t234_gspi.xml” but only has flash_t234_qspi.xml.

Previously you said the board config is missing, now it is coming back again and I don’t know what happened on your side.

Also, you are the only guy reporting you need to change board config name to make it work on this forum. For example, guys in below thread hit some flash issue too, but they never needed to change the board config name…

If you really need us to help check this issue, please let us know how to reproduce your case step by step.

Please be aware that we really need “step-by-step” info here because we have flashed lots of device with initrd flash tools lots of times… and what you hit didn’t happen to us.

Also, why do you put the board config as the input for “-c” ?

I have also noticed at one of iterations [ under iteration I mean wiping sdkmanager folder/ installation then installing Linux_for_tegra with sdkmanager] that copy paste of nvme0n1p1 would result with ‘l’ instead on ‘1’ . It must be a copy paste error q->g, in my opinion. Unless data corruption is caused by other processes.
I have run 4-7 iterations. None of them would find the config file with the latest sdkmanager by default.
I will run once again with sudo ./tools/kernel_flash/l4t_initrd_flash.sh --external-device nvme0n1p1 -c tools/kernel_flash/flash_l4t_external.xml -p "-c bootloader/t186ref/cfg/flash_t234_qspi.xml" --showlogs --network usb0 p3509-a02+p3767-0000 internal
Experiment 1.

rm p3509-a02+p3767-0000
sudo ./tools/kernel_flash/l4t_initrd_flash.sh --external-device nvme0n1p1 -c tools/kernel_flash/flash_l4t_external.xml -p "-c bootloader/t186ref/cfg/flash_t234_qspi.xml" --showlogs --network usb0 p3509-a02+p3767-0000 internal

This time it worked after prior successful iteration though. I have also noticed that while I was executing you have published another question about the -c - I am not putting it currently. At some of iterations sdkmanager has put it at some of iterations I’ve put it eventually highly likely
Did it just complete each iteration at your side?

Hi,

It is not possible sdkmanager put it because sdkmanager does not support to flash ONX +xavier NX devkit… You can only manually flash it.

Please just follow below guidance and share us the full flash log.

  1. Please remove your Linux_for_Tegra BSP folder by using sdkmanager GUI.

  2. After you remove it, check your directory and make sure it is really removed.

  3. Let sdkmanager download the BSP again.

  4. Go to the new Linux_for_Tegra dirctory, put your board into recovery mode.

  5. Run

sudo ./tools/kernel_flash/l4t_initrd_flash.sh --external-device nvme0n1p1 \
  -c tools/kernel_flash/flash_l4t_external.xml -p "-c bootloader/t186ref/cfg/flash_t234_qspi.xml" \
  --showlogs --network usb0 p3509-a02+p3767-0000 internal
  1. Share the full log to us.

Above step is just a full clean-up and then re-install. Do not try to remove/rename or do anything that you want anymore. Just follow the steps and share the result.

1 Like

1,2,3 - done;
4 [ the board isn’t connected right now maybe later with the board will try rather on Monday]
5 executes with no errors so far as it seems using

sudo ./tools/kernel_flash/l4t_initrd_flash.sh --external-device nvme0n1p1 \
  -c tools/kernel_flash/flash_l4t_external.xml -p "-c bootloader/t186ref/cfg/flash_t234_qspi.xml" \
  --showlogs --network usb0 p3509-a02+p3767-0000 internal

the error can not be reproduced anymore as it seems

@KevinFFF @WayneWWW

I added some debug message, and figured out tools/kernel_flash/l4t_initrd_flash_internal.sh stuck at line 117: network_prerequisite "${network}" "${LINUX_BASE_DIR}" "${NFS_ROOTFS_DIR}". I commented this line out and the script never stuck again.

Could you tell me what this line is doing? It seems that it’s checking network access, but I don’t know why I need it for flashing.

@user49922 did you have --network usb0 added on your command?

Yes, I do. I also found out that when I commented that line, the flash process would fail and return an error: mount.nfs: access denied by server while mounting [fc00:1:1:0::1]:/home/v2x/test/jp51/Linux_for_Tegra/rootfs.

Hi,

We use the micro usb port on the board to establish a usb network between your host and jetson.

If this interface does not happen, then initrd flash may fail.

Hi.

I did some further experiments, and found out flash process would stuck at this function:

nfs_check()
{
        showmount -e | grep -q "${2}" \
        && showmount -e | grep -q "${1}/tools/kernel_flash"
}

This function is in tools/kernel_flash/l4t_network_flash.func.

I’m running to “Step 3: Start the flashing process” stop the flash.

Waiting for target to boot-up…
Timeout
Cleaning up…

I had using lsusb to check ID 0955:7323 NVidia Corp., why Jetson Nano Orin boot-up fail?
flash_1-7_0_20230326-140321.log (7.1 KB)

Orin Nano is not supported in the BSP yet.

Hmmm,

Okay, before I actually try this. Is the Orin NX 16GB together with a Seeed Studio J4012 carrier board supported by the BSP ?

Because I’d quite like to reinstall to choose a smaller partition size but don’t dare to try it if it’s not confirmed that it’s supported.

Kim

Hi,

Actually I cannot directly give a yes or no answer to you. But the answers are as below

  1. Please be aware that cory11 is asking about “Jetson Orin Nano”. Actually he asked this in wrong forum. Orin NX and Orin Nano are two different platforms.

  2. Orin NX + Xavier NX devkit carrier board is supported with jp5.1 already.

  3. Orin NX +Seeed Studio J4012 carrier board is not something I can answer. For any custom board, our BSP from jetpack won’t 100% support them. If the board vendor has any customization, then default BSP is not able to support it. The most precise way is to contact the board vendor to share their customized BSP. Or confirm if their board could run with our default BSP.

@KimHendrikse flashing BSP to the Orin NX 16GB with the Seeed Studio j4012 does not work and has the same problem with the timeout. I have described the issue here (Timeout while flashing Orin Nx)