Flash failed

Hello,

While starting to use the AGX (3550) we are unable to perform the initial flash as the final step of the installation of the SDK.

The error is “cat: /dev/ttyUSB3: Resource temporarily unavailable”.

We tried with 2 different systems and with 2 different AGX targets. Same result.

What could be wrong?

Regards,
Marc.

09:42:24 INFO : Flash Xavier A+B in parallel :
09:42:24 INFO : Flash Xavier A+B in parallel : +++++++++++++++++++++++++++++++++++++++++++++++++
09:42:24 INFO : Flash Xavier A+B in parallel : Aurix Port = /dev/ttyUSB3
09:42:24 INFO : Flash Xavier A+B in parallel : Target rootfs will be flashed into emmc
09:42:24 INFO : Flash Xavier A+B in parallel : ./bootburn.sh -b e3550b03-t194 -B qspi -x /dev/ttyUSB3
09:42:24 INFO : Flash Xavier A+B in parallel : Execute Xavier Script
09:42:24 INFO : Flash Xavier A+B in parallel : Successfully acquired lock over /var/lock/LCK..bootburn
09:42:24 INFO : Flash Xavier A+B in parallel : Successfully acquired lock over /var/lock/LCK..ttyUSB3
09:42:24 INFO : Flash Xavier A+B in parallel : Read skuinfo from InfoRom...
09:42:25 ERROR : Flash Xavier A+B in parallel : cat: /dev/ttyUSB3: Resource temporarily unavailable
09:42:27 ERROR : Flash Xavier A+B in parallel : /home/quintor/nvidia/nvidia_sdk/DRIVE/Linux/5.0.13.2/SW/DriveSDK/drive-t186ref-foundation/tools/host/flashtools/bootburn/../bootburn_t19x//bootburn.sh: line 774: array: bad array subscript
09:42:27 ERROR : Flash Xavier A+B in parallel : /home/quintor/nvidia/nvidia_sdk/DRIVE/Linux/5.0.13.2/SW/DriveSDK/drive-t186ref-foundation/tools/host/flashtools/bootburn/../bootburn_t19x//bootburn.sh: line 774: array: bad array subscript
09:42:27 INFO : Flash Xavier A+B in parallel : Disabling SIGINT temporarily
09:42:29 ERROR : Flash Xavier A+B in parallel : Setting Tegra-A on hold... cat: /dev/ttyUSB3
09:42:29 ERROR : Flash Xavier A+B in parallel : : Resource temporarily unavailable
09:42:40 INFO : Flash Xavier A+B in parallel : Could not execute command "tegrareset x1 h" on aurix. Log follows,
09:42:40 INFO : Flash Xavier A+B in parallel :
09:42:40 INFO : Flash Xavier A+B in parallel : ------------ Stack Trace ------------
09:42:40 INFO : Flash Xavier A+B in parallel : stack frame 0 - 287 AbnormalTermination /home/quintor/nvidia/nvidia_sdk/DRIVE/Linux/5.0.13.2/SW/DriveSDK/drive-t186ref-foundation/tools/host/flashtools/bootburn_t19x/bootburn_lib.sh
09:42:40 INFO : Flash Xavier A+B in parallel : stack frame 1 - 426 ExecuteAurixCommand /home/quintor/nvidia/nvidia_sdk/DRIVE/Linux/5.0.13.2/SW/DriveSDK/drive-t186ref-foundation/tools/host/flashtools/bootburn/../bootburn_t19x//bootburn.sh
09:42:40 INFO : Flash Xavier A+B in parallel : stack frame 2 - 452 GetTegrasAssocWithAurix /home/quintor/nvidia/nvidia_sdk/DRIVE/Linux/5.0.13.2/SW/DriveSDK/drive-t186ref-foundation/tools/host/flashtools/bootburn/../bootburn_t19x//bootburn.sh
09:42:40 INFO : Flash Xavier A+B in parallel : stack frame 3 - 511 CheckRecoveryTargets /home/quintor/nvidia/nvidia_sdk/DRIVE/Linux/5.0.13.2/SW/DriveSDK/drive-t186ref-foundation/tools/host/flashtools/bootburn/../bootburn_t19x//bootburn.sh
09:42:40 INFO : Flash Xavier A+B in parallel : stack frame 4 - 965 main /home/quintor/nvidia/nvidia_sdk/DRIVE/Linux/5.0.13.2/SW/DriveSDK/drive-t186ref-foundation/tools/host/flashtools/bootburn/../bootburn_t19x//bootburn.sh
09:42:40 INFO : Flash Xavier A+B in parallel : -------------------------------------
09:42:40 INFO : Flash Xavier A+B in parallel :
09:42:40 INFO : Flash Xavier A+B in parallel : error-target-command
09:42:40 INFO : Flash Xavier A+B in parallel : bootburn flashing failed! error code = 15
09:42:40 INFO : Flash Xavier A+B in parallel : exit status 15
09:42:40 INFO : Flash Xavier A+B in parallel : [ Component Install Finished with Error ]
09:42:40 ERROR : Flash Xavier A+B in parallel : NV_FLASH_XAVIER_PDKFLASH_PARALLEL_COMP command ./pdk_flash.sh -b e3550b03-t194-es finished with error
09:42:40 INFO : Flash Xavier A+B in parallel :
09:42:40 INFO : Flash Xavier A+B in parallel : [ 66.54 MB used. Disk Avail: 137.23 GB ]
09:42:40 INFO : Flash Xavier A+B in parallel : [ NV_FLASH_XAVIER_PDKFLASH_PARALLEL_COMP Install took 21s ]
09:42:40 INFO : Flash Xavier A+B in parallel : command ./pdk_flash.sh -b e3550b03-t194-es finished with error
09:42:40 ERROR : Flash Xavier A+B in parallel : command terminated with error
09:42:40 ERROR : Flash Xavier A+B in parallel : install 'Flash Xavier A+B in parallel' failure, command < cd '/home/quintor/nvidia/nvidia_sdk/DRIVE/Linux/5.0.13.2/SW' ;

Update. We have identified the failing part of source-code in bootburn.sh.

We temporarily solved it by downgrading the kernel of Ubuntu 16.04.5 LTS from 4.15 to 4.4 (4.4.0-31). The flash now succeeds.

It seems the newer Linux kernels in Ubuntu 16.04 LTS do not like the part in the script where first one process is spawned to read from /dev/ttyUSB3, and then a second process is spawned writing a command to /dev/ttyUSB3 (e.g. “inforom dump”) and expect that first process to get the output of that Aurix command?

Dear mdebruin,
We noticed this issue and working to provide a patch. We advise to you flash both Tegras individually as a work around. You can refer to the work around steps at https://devtalk.nvidia.com/default/topic/1046975/sdkmanager-0-9-9-flash-agx-failed/?offset=20#5313645 in case of any issue.

Flashing individually does not seem to help with a newer kernel.

I isolated the problem to this source code in bootburn.sh:

sudo cat $l_Aurix > $p_FlashFiles/$l_AurixLogFile &
l_AurixPidParent=$!
disown ${l_AurixPidParent}
sleep 1
l_AurixPidChild=`pgrep -P $l_AurixPidParent`
TraceNext "Execute command on Aurix serial port"
echo "$l_Command" | sudo tee -a $l_Aurix &>/dev/null &
wait $! 2>/dev/null

Line 1 spawns a “reader” on /dev/ttyUSB3. When, at line 7, the command is “written” (e.g. ‘inforom dump’) to /dev/ttyUSB3, the previously spawned reader at line 1 fails with “Resource temporarily unavailable”.

I’m no expert on this but to me it seems a bit weird to have two processes communicating with /dev/ttyUSB3 in parallel?

Dear mdebruin,
You need to downgrade your kernel first before attempting flashing as a workaround solution mentioned in https://devtalk.nvidia.com/default/topic/1046975/sdkmanager-0-9-9-flash-agx-failed/?offset=20#5313645 Let us know if you see any flashing issues even after downgrading the kernel. Like I said we are working on patch to support newer kernels.

Hi mdebruin,

Please refer to Important Drive Software Notice

If can’t open it directly, please find Important Drive Software Notice link from https://developer.nvidia.com/drive/documentation

Thanks