U-Boot build exec format error

hi, i try to build u-boot source code on my jetson Nano 2GB.

i follow this NVIDIA Docs

I Use tegra-l4t-r32.5
.1 branch source code
git clone -n git://nv-tegra.nvidia.com/3rdparty/u-boot.git
git checkout tegra-l4t-r32.5.1
and CrossCompiler gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu.

make distClean = OK
make p3541-0000_defconfig = OK
make = Error

Everything seems to build well,
but as soon as the DTC is built, the build fails with an exec format error like this.

How can i solve this problem??

I only get this issue when I build uboot on Jetson Nano, and I don’t get this issue when I build via virtual machine Linux on a regular desktop cpu. Why won’t uboot build on Jetson Nano?


what version of gcc toolchain did you use when building on Jetson Nano?

Toolchain version is gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux.gnu


I think that’s the cross compiler for building ARM programs on x86-64.
I’m asking about the native compiler you use on your Jetson Nano.

i try
$make CC=gcc distclean
$make CC=gcc p3541-0000_defconfig
$make CC=gcc

but, the same problem occurred.


I think I found the reason here.
The device tree compiler in the uboot source code is for x86-64, not aarch64, hence Exec format error.
Replace the executable ./scripts/dtc/dtc with the ARM version and try again:

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.