(base) slsop@aridiblm02:~/Linux_for_Tegra$ lsusb
Bus 002 Device 002: ID 0bda:0411 Realtek Semiconductor Corp.
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 005: ID 03f0:354a Hewlett-Packard
Bus 001 Device 004: ID 03f0:094a Hewlett-Packard Optical Mouse [672662-001] Bus 001 Device 018: ID 0955:7f21 NVidia Corp.
Bus 001 Device 002: ID 0bda:5411 Realtek Semiconductor Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
(base) slsop@aridiblm02:~/Linux_for_Tegra$ sudo ./flash.sh jetson-nano-qspi-sd mmcblk0p1
###############################################################################
L4T BSP Information:
R32 , REVISION: 4.4
############################################################################### ./flash.sh: line 593: ./tegrarcm: cannot execute binary file: Exec format error
Error: probing the target board failed.
Make sure the target board is connected through
USB port and is in recovery mode.
I have connected the Jetson Nano via USB micro port to my linux host(also an Jetson Nano) and used a Jumper for J50 pin 9 &10 to set to recovery mode. With the command lsusb I checked that the jetson is connected.
What does that error in bold mean?
Any other idea why it doesn’t work?
Was this software running entirely on a standard desktop host PC? The error occurs when a program designed for one architecture has an attempt to use it on another architecture. For example, a Jetson is arm64/aarch64, and a PC is x86_64/amd64, and if you try to run something for amd64 on arm64, then you get this (or vice-versa, trying to run arm64 on amd64, you get this error).
The flash software tegrarcm must run on a desktop PC, and the indication is that it is being attempted on some other computer. If this is not the case, then perhaps something in your environment was set up for cross compiling such that it thinks it is on the wrong architecture (I’ve not seen this happen, but in theory it is possible…very likely though the program is simply being run on the wrong hardware).
Trivia: When the JetPack/SDKM is setting up the content for the root filesystem on the PC it is basically just an entire operating system designed to run on the incompatible arm64 hardware. The adjustments and extras used to complete that setup is run inside of the QEMU emulator so the PC can have an “adapter” to arm64. If you were to try to run tegrarcm on the PC, but within the QEMU arm64 emulator, you’d also get the above error.
Thank you for the long answer. The host which I use is also an Jetson Nano with the JetPack 4.4.1 image on it. So it has olso the architecture aarch64 (with command uname -m)
I checked the CROSS_COMPILE environment variable and it was wrong. Now I get an error even earlier in the process. In the manual > Update the U-Boot Pinmux > 5. Rebuild the U-Boot bootloader > 3. Build U-Boot by running the commands:
$make distclean
$make p3450-porg_defconfig
$make
I use the toolchain version “gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu” which was suggested in the Developer Guide.
I have already deleted everything and started from scratch to avoid errors.
(base) slsop@aridiblm02:~/Linux_for_Tegra/sources/u-boot$ export CROSS_COMPILE=/home/slsop/l4t-gcc/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-
(base) slsop@aridiblm02:~/Linux_for_Tegra/sources/u-boot$ make distclean
/home/slsop/l4t-gcc/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc: 1: /home/slsop/l4t-gcc/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc: cannot open @@: No such file
/home/slsop/l4t-gcc/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc: 1: /home/slsop/l4t-gcc/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc: ELF: not found
/home/slsop/l4t-gcc/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc: 3: /home/slsop/l4t-gcc/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc: Syntax error: "(" unexpected
/bin/sh: 1: /home/slsop/l4t-gcc/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc: Exec format error
dirname: missing operand
Try 'dirname --help' for more information.
(base) slsop@aridiblm02:~/Linux_for_Tegra/sources/u-boot$ make p3450-porg_defconfig
#
# configuration written to .config
#
(base) slsop@aridiblm02:~/Linux_for_Tegra/sources/u-boot$ make
/home/slsop/l4t-gcc/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc: 1: /home/slsop/l4t-gcc/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc: cannot open @@: No such file
/home/slsop/l4t-gcc/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc: 1: /home/slsop/l4t-gcc/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc: ELF: not found
/home/slsop/l4t-gcc/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc: 3: /home/slsop/l4t-gcc/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc: Syntax error: "(" unexpected
/bin/sh: 1: /home/slsop/l4t-gcc/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc: Exec format error
dirname: missing operand
Try 'dirname --help' for more information.
scripts/kconfig/conf --silentoldconfig Kconfig
CHK include/config.h
UPD include/config.h
GEN include/autoconf.mk
/bin/sh: 1: /home/slsop/l4t-gcc/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc: Exec format error
scripts/Makefile.autoconf:75: recipe for target 'include/autoconf.mk' failed
make[1]: *** [include/autoconf.mk] Error 1
make: *** No rule to make target 'include/config/auto.conf', needed by 'include/config/uboot.release'. Stop.
(base) slsop@aridiblm02:~/Linux_for_Tegra/sources/u-boot$
You can build kernels on any Jetson. JetPack and flash software has no possibility of working from any architecture other than a Linux desktop PC. So this is the cause of the failure when using flash tools.
Note that a Jetson of the same type will be the same architecture, and so this would be native compile if we are only speaking of kernel build. In a native compile any use of “CROSS_COMPILE” or “ARCH” would cause an error for build since these are only for cross compiling and not for native compile. Are you compiling from a desktop PC?
Also, the defconfig was somewhat specific. Are you building this specific defconfig, and not “tegra_defconfig” for a reason? Are you building only U-Boot, which has different requirements?
I am compiling from the Jetson Nano connected to a monitor, so yes i think that is an desktop PC. The compliling without setting the CROSS_COMPILE variable has worked in my first try, so I just have a problem with flashing.
Can I use an Raspberry pi (ARMv6 (32 Bit) architecture) to flash the Jetson Nano?
What architecture has an standard Linux desktop PC?
I am building the specific p3450-porg_defconfig because I want to make a pinmux change on the 40-pin Header. I am a beginner, so I am just following this manual.
As I understand it, that is just for the U-Boot and in a next step I should update the CBoot with the device tree, finally I should flash everything to the Jetson.