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
https://docs.nvidia.com/jetson/archives/l4t-archived/l4t-325/index.html#page/Tegra%20Linux%20Driver%20Package%20Development%20Guide/uboot_guide.html#wwpID0E0HK0HA

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?

Hi,

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

Hi,

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.

Hi,

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.