Error flashing Thor with recreated DevKit BSP

Hello,

I am trying to get ahead of the ball and go thru the process of adapting the Jetson Thor DevKit BSP to a custom carrier board. I downloaded the Jetson Thor BSP and sample root directory and the pinmux spreadsheet. I generated the DTSI files from the pinmux spreadsheet (as is without modification except for vendor name and board name) and made a new board config file that points to these DTSI files. I successfully made a new system image but when I try to flash the Dev Kit, I get an error.

[flash_bsp_jetson-t264_die0]: [executeShellCommand(156)] : command = /home/xxx/Linux_for_Tegra/unified_flash/out/bsp_images/tools/flashtools/flash/tegrarcm_v2 --instance /dev/bus/usb/001/046 --download blob ./rcm_blob.bin
cwd = /home/xxx/Linux_for_Tegra/unified_flash/out/bsp_images/flash_workspace/rcm-flash
[flash_bsp_jetson-t264_die0]: [executeShellCommand(171)] : shell command -- /home/xxx/Linux_for_Tegra/unified_flash/out/bsp_images/tools/flashtools/flash/tegrarcm_v2 --instance /dev/bus/usb/001/046 --download blob ./rcm_blob.bin failed
[flash_bsp_jetson-t264_die0]: [executeShellCommand(173)] : Output: Sending blob
ERROR: might be timeout in USB write.

[flash_bsp_jetson-t264_die0]: [executeShellCommand(175)] : Return code: 3
[flash_bsp_jetson-t264_die0]: [executeShellCommand(177)] : stdout: b'Sending blob\nERROR: might be timeout in USB write.\n'
[flash_bsp_jetson-t264_die0]: [executeShellCommand(179)] : stderr: None
[flash_bsp_jetson-t264_die0]: [sendRcmCommand(774)] : Unable to execute tegrarcm command -- /home/xxx/Linux_for_Tegra/unified_flash/out/bsp_images/tools/flashtools/flash/tegrarcm_v2 --instance /dev/bus/usb/001/046 --download blob ./rcm_blob.bin
Traceback (most recent call last):
  File "/home/xxx/Linux_for_Tegra/unified_flash/out/bsp_images/tools/flashtools/bootburn/../bootburn_t264_py/flash_bsp_images.py", line 114, in flash_bsp_active
    bootburnThor.BootRCM("rcm-flash", binaryLocationPath)
  File "/home/xxx/Linux_for_Tegra/unified_flash/out/bsp_images/tools/flashtools/bootburn_t264_py/bootburn_thor.py", line 1281, in BootRCM
    self.sendRcmCommand("--download blob " + blob)
  File "/home/xxx/Linux_for_Tegra/unified_flash/out/bsp_images/tools/flashtools/bootburn/../bootburn_t264_py/bootburn_lib.py", line 775, in sendRcmCommand
    AbnormalTermination("TEGRARCM -- Unable to execute command", nverror.NvError_TegraRcmError)
  File "/home/xxx/Linux_for_Tegra/unified_flash/out/bsp_images/tools/flashtools/bootburn/../bootburn_t264_py/flashtools_nverror.py", line 260, in AbnormalTermination
    raise OSError(errorCode)
OSError: 43
command line used was:
['/home/xxx/Linux_for_Tegra/unified_flash/out/bsp_images/tools/flashtools/bootburn/flash_bsp_images.py', '-b', 'jetson-t264', '--l4t', '-D', '-P', '/home/xxx/Linux_for_Tegra/unified_flash/out/bsp_images/flash_workspace', '--l4t_boot_chain_select', 'A', '--usb-instance', '1-2']


TEGRARCM -- Unable to execute command


Exception raised in flash BSP ACTIVE
43
[flash_bsp_jetson-t264]: start time  = 1773257194.433227
[flash_bsp_jetson-t264]: end time  = 1773257206.993277
[flash_bsp_jetson-t264]: Total Time = 12.560050010681152
[flash_bsp_jetson-t264]: Image Flashing took 12.560050010681152
[flash_bsp_jetson-t264]: Flashing finished Unsuccessfully!!

I also diff’d the pinmux spreadsheet generated DTSI files (gpio, padvoltage, and pinmux) and did not see any differences except for custom vendor name and board name.

Could you please advise?

What is your flash command?

lsusb sees your board in recovery mode? Are you using

    --network <netargs>          Flash through Ethernet protocal using initrd flash. <netargs> can be "usb0" to flash through the USB Flashing cable
                                 or "eth0:<target-ip>/<subnet>:<host-ip>[:<gateway>]" to flash through the LAN cable
                                 For examples:
                                 --network usb0
                                 --network eth0:192.168.0.17/24:192.168.0.21
                                 --network eth0:192.168.0.17/24:192.168.1.2:192.168.0.1

Did you run

sudo ./apply_binaries.sh --openrm

Hi joe_schmo,

Which Jetpack release are you using for Thor?

Would it work if you don’t customize the BSP package and use default configuration?

For USB timeout issue, please check the USB connection between the host and the devkit.

From the L4T base directory I ran…

sudo ./l4t_initrd_flash.sh --flash-only <vendor name>-<board name> internal

I also did run the apply_binaries script a while ago after I copied and untar’d the BSP and sample root filesystem.

I am using the following Jetpack release and sample root filesystem…

Jetson_Linux_R38.4.0_aarch64.tbz2
Tegra_Linux_Sample-Root-Filesystem_R38.4.0_aarch64.tbz2

Flashing is successful by running…

sudo ./l4t_initrd_flash.sh --flash-only jetson-agx-thor-devkit internal

Since the above is flashing successfully, I do not think that it is a cable connectivity issue.

You could see if this helps. On host

https://forums.developer.nvidia.com/t/fix-for-error-might-be-timeout-in-usb-write-increase-usbfs-memory-mb-to-2048/360581

cat /sys/module/usbcore/parameters/usbfs_memory_mb
cat /sys/module/usbcore/parameters/autosuspend

echo 2048 | sudo tee /sys/module/usbcore/parameters/usbfs_memory_mb
echo -1 | sudo tee /sys/module/usbcore/parameters/autosuspend

for f in /sys/bus/usb/devices/*/power/control; do
    echo on | sudo tee "$f"
done

for f in /sys/bus/usb/devices/*/power/autosuspend_delay_ms; do
    echo -1 | sudo tee "$f"
done

Please remove --flash-only option in the flash command or it won’t re-create the correct BSP package for the board connected.

I think I found a typo in the names of the include files. Waiting for confirmation.

I recently downloaded the new Pinmux Template spreadsheet (version 1.6 release just a few days ago) and have successfully made a new system image with it.

I have not changed any of the values in the new spreadsheet and I generated the device tree source files. Comparing these to the ones in the L4T directory, I did see differences in comparison to the defaults for the AGX Thor DevKit. Should I worry about these discrepancies or do you think it’s ok to Flash? Again, haven’t changed anything but want to be able to reproduce the system image to practice for upcoming custom hardware.

I think it should be fine as the pinmux spreadsheet will be updated.

Please just configure the pinmux spreadsheet according to your design on the custom carrier board.

After copying the files, ensure that you point these files to the new board.conf file that you created for your board.

How exactly should I point these generated DTSI files to the new board config file?

Please check the PINMUX_CONFIG specified in the board config.
e.g. you may check the following line in jetson-agx-thor-devkit.conf.

PINMUX_CONFIG="tegra264-mb1-bct-pinmux-p3834-xxxx-p4071-0000.dts";

Please note that gpio dtsi is included by pinmux dtsi.

So do I simply edit this file “tegra264-mb1-bct-pinmux-p3834-xxxx-p4071-0000.dts” and change the highlighted line to include the custom PINMUX DTSI file that I created?

No, this is the pinmux configuration file rather than board config.

Please check if you are using tegra264-mb1-bct-pinmux-p3834-xxxx-p4071-0000.dts as pinmux configuration file.

Yes, I see in my board config that the PINMUX_CONFIG variable is set to…

tegra264-mb1-bct-pinmux-p3834-xxxx-p4071-0000.dts

What should I modify in the board config file for custom hardware? Could you please provide an example?

Sorry that it seems there’s something change between Orin series with R36.x and Thor series with R38.x.

Your understanding is correct here to update the custom pinmux dtsi file and you don’t need to update it in board config.

e.g. if your generate:
pinmux device tree : custom_pinmux.dtsi
gpio device tree: custom_gpio.dtsi

Please update <Linux_for_Tegra>/bootloader/generic/BCT/tegra264-mb1-bct-pinmux-p3834-xxxx-p4071-0000.dts as following:

    mb1_bct {
        padctl@0 {
-            #include "tegra264-mb1-bct-pinmux-p3834-xxxx-p4071-0000.dtsi"
+            #include "custom_pinmux.dtsi"
        };
    };

Please remember to put both custom pinmux and gpio dtsi under <Linux_for_Tegra>/bootloader/, and gpio dtsi should be included by pinmux dtsi.

Thank you!