Flash Jetson Linux flashing system error handling

Error 1: No such file or directory: 'dtc'

When using the SDK Manager to flash Jetson Linux, when the Creating OS image is completed, it cannot proceed further, and an error is reported directly as fail. Check the Terminal error message as follows:

14:56:20 ERROR: Flash Jetson Linux - flash: File "/usr/lib/python3.8/subprocess.py", line 858, in __init__
14:56:20 ERROR: Flash Jetson Linux - flash: FileNotFoundError: [Errno 2] No such file or directory: 'dtc'
14:56:20 ERROR: Flash Jetson Linux - flash: --- Error: Reading board information failed.
14:56:20 ERROR: Flash Jetson Linux - flash: command terminated with error
14:56:20 SUMMARY: DateTime Target Setup - target: Depends on failed component

Please add a picture description

solution

sudo ./nvsdkmanager_flash.sh --storage nvme0n1p1You can see detailed errors using console flashing :

Traceback (most recent call last):  
  File "/home/sangsq/nvidia/nvidia_sdk/JetPack_5.1.1_Linux_JETSON_ORIN_NANO_TARGETS/Linux_for_Tegra/bootloader/tegraflash.py", line 1383, in <module>  
    tegraflash_run_commands()  
  File "/home/sangsq/nvidia/nvidia_sdk/JetPack_5.1.1_Linux_JETSON_ORIN_NANO_TARGETS/Linux_for_Tegra/bootloader/tegraflash.py", line 1217, in tegraflash_run_commands  
    interpreter.onecmd(command)  
  File "/usr/lib/python3.8/cmd.py", line 217, in onecmd  
    return func(arg)  
  File "/home/sangsq/nvidia/nvidia_sdk/JetPack_5.1.1_Linux_JETSON_ORIN_NANO_TARGETS/Linux_for_Tegra/bootloader/tegraflash.py", line 855, in do_dump  
    self.chip_inst.tegraflash_dump(exports, args)  
  File "/home/sangsq/nvidia/nvidia_sdk/JetPack_5.1.1_Linux_JETSON_ORIN_NANO_TARGETS/Linux_for_Tegra/bootloader/tegraflash_impl_t234.py", line 2387, in tegraflash_dump  
    self.tegraflash_preprocess_configs()  
  File "/home/sangsq/nvidia/nvidia_sdk/JetPack_5.1.1_Linux_JETSON_ORIN_NANO_TARGETS/Linux_for_Tegra/bootloader/tegraflash_impl_t234.py", line 360, in tegraflash_preprocess_configs  
    values[config] = self.run_dtc_tool(  
  File "/home/sangsq/nvidia/nvidia_sdk/JetPack_5.1.1_Linux_JETSON_ORIN_NANO_TARGETS/Linux_for_Tegra/bootloader/tegraflash_impl_t234.py", line 3290, in run_dtc_tool  
    run_command(command, False)  
  File "/home/sangsq/nvidia/nvidia_sdk/JetPack_5.1.1_Linux_JETSON_ORIN_NANO_TARGETS/Linux_for_Tegra/bootloader/tegraflash_internal.py", line 277, in run_command  
    process = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=use_shell, env=cmd_environ)  
  File "/usr/lib/python3.8/subprocess.py", line 858, in __init__  
    self._execute_child(args, executable, preexec_fn, close_fds,  
  File "/usr/lib/python3.8/subprocess.py", line 1704, in _execute_child  
    raise child_exception_type(errno_num, err_msg, err_filename)  
FileNotFoundError: [Errno 2] No such file or directory: 'dtc'  
--- Error: Reading board information failed.

The error message indicates that the program was unable to find the 'dtc' tool required to preprocess configuration files. This could be due to a missing or corrupt installation of the Device Tree Compiler (dtc) on your system.

To fix this, try reinstalling the dtc tool by running the following command in Terminal:

sudo apt-get install device-tree-compiler  

This should install the dtc tool and resolve the FileNotFoundError issue. After installing the tool, you can try running the program again to see if the problem is resolved.

Error 2: ERROR sshpass not found and other dependent packages for flashing

The error reported by Terminal is not exhaustive. Use the console to retry the flashing operation, and you can find:

--- Reading board information succeeded.
Parsing module EEPROM:
--- Parsing board ID (3767) succeeded.
--- Parsing board version (300) succeeded.
--- Parsing board SKU (0003) succeeded.
--- Parsing board REV (L.3) succeeded.
jetson-orin-nano-devkit found.
Parsing boardid successful
Target board is jetson-orin-nano-devkit
External storage specified nvme0n1p1
Flashing Jeton Orin Nano
/home/sangsq/nvidia/nvidia_sdk/JetPack_5.1.1_Linux_JETSON_ORIN_NANO_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 --showlogs --network usb0 -p --no-systemimg -c bootloader/t186ref/cfg/flash_t234_qspi.xml jetson-orin-nano-devkit internal
ERROR sshpass not found! To install - please run:  "sudo apt-get install sshpass"
Cleaning up...

solution

Follow the prompts to install sshpass

sudo apt-get install sshpass

Also other packages may be missing:

sudo apt-get install abootimg
sudo apt-get install nfs-kernel-server
sudo apt-get install libxml2-utils

Use the above command to install dependencies.

in conclusion

If a problem occurs, you can view the executed command through the Terminal, and you can see more detailed error information when running it in the console. Through this information, you can more easily find the source of the problem and locate it.

In addition, when using SDKM to flash fails, you can also go directly to the operation directory and try to flash directly using the command line.

Guess you like

Origin blog.csdn.net/marin1993/article/details/130510128