Error Building ATF and Trusty on Xavier NX (32.4.4)
I am trying to build both the ATF and the Trusty OS, but I am encountering errors. I am following the instructions presented in the “Linux for Tegra Building ATF and Trusty README” document.
I set the environment variables CROSS_COMPILE_AARCH64 and CROSS_COMPILE_ARM to point to the AArch64 toolchain and the armhf toolchain respectively.
export CROSS_COMPILE_AARCH64=$HOME/l4t-gcc/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-
export CROSS_COMPILE_ARM=/home/dcapers/l4t-gcc/gcc-linaro-7.3.1-2018.05-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-
I downloaded the toolchains from following:
I then extracted the ATF and Trusty source packages
tar xpf ~/Linux_for_Tegra/source/public/atf_src.tbz2 -C atf_and_trusty/atf/
tar xpf ~/Linux_for_Tegra/source/public/trusty_src.tbz2 -C atf_and_trusty/trusty/
After extracting the source I attempted to build both the ATF and Trusty source code… This is where I ran into problems.
When building the ATF Source code I navigated to the ATF directory ant ran make:
cd atf_and_~/trusty/atf/arm-trusted-firmware
make BUILD_BASE=./t194ref
CROSS_COMPILE=“${CROSS_COMPILE_AARCH64}”
DEBUG=0 LOG_LEVEL=20 PLAT=tegra SPD=trusty TARGET_SOC=t194 V=0
Below is the output from the ATF build
Including services/spd/trusty/trusty.mk
Building tegra
CC drivers/delay_timer/delay_timer.c
warning: TCG doesn’t support requested feature: CPUID.01H:ECX.vmx [bit 5]
/lib64/ld-linux-x86-64.so.2: No such file or directory
Makefile:580: recipe for target ‘t194ref/tegra/t194/release/bl31/delay_timer.o’ failed
make: *** [t194ref/tegra/t194/release/bl31/delay_timer.o] Error 255
When building the Trusty Source code I navigated to the Trusty directory ant ran make:
cd ~/atf_and_trusty/trusty/trusty
make t186 PROJECT=t186 TARGET=t186 BUILDROOT=./t194ref
TOOLCHAIN_PREFIX=“${CROSS_COMPILE_AARCH64}”
ARCH_arm_TOOLCHAIN_PREFIX=“${CROSS_COMPILE_ARM}”
ARCH_arm64_TOOLCHAIN_PREFIX=“${CROSS_COMPILE_AARCH64}”
DEBUG=0 DEBUG_LVL=0 DEFAULT_OTE_APP_DEBUGLEVEL=1 NOECHO=@
TRUSTY_VARIANT=l4t-public TRUSTY_MULTI_GUEST_CONFIGURATION=
TARGET_SOC=t194
Below is the output from the Trusty build
make[1]: Entering directory ‘/home/dcapers/atf_and_trusty/trusty/trusty’
make[2]: Entering directory ‘/home/dcapers/atf_and_trusty/trusty/trusty’
PROJECT = t186
PLATFORM = t18x
TARGET = t186
TOOLCHAIN_PREFIX = /home/dcapers/l4t-gcc/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-
warning: TCG doesn’t support requested feature: CPUID.01H:ECX.vmx [bit 5]
/lib64/ld-linux-x86-64.so.2: No such file or directory
including app dev dev/interrupt/arm_gic dev/timer/arm_generic kernel lib/boot_profiler lib/memlog lib/sm lib/trusty platform target
including kernel/vm lib/debug lib/fixed_point lib/heap lib/libc lib/syscall lib/uthread lib/version
Include Trusty user tasks support
warning: TCG doesn’t support requested feature: CPUID.01H:ECX.vmx [bit 5]
/lib64/ld-linux-x86-64.so.2: No such file or directory
XBIN_TOOLCHAIN_PREFIX = /home/dcapers/l4t-gcc/gcc-linaro-7.3.1-2018.05-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-
XBIN_LIBGCC =
including app/trusty lib/libc-trusty
including lib/libc
warning: TCG doesn’t support requested feature: CPUID.01H:ECX.vmx [bit 5]
/lib64/ld-linux-x86-64.so.2: No such file or directory
XBIN_TOOLCHAIN_PREFIX = /home/dcapers/l4t-gcc/gcc-linaro-7.3.1-2018.05-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-
XBIN_LIBGCC =
including app/trusty lib/libc-trusty
including lib/libc
warning: TCG doesn’t support requested feature: CPUID.01H:ECX.vmx [bit 5]
/lib64/ld-linux-x86-64.so.2: No such file or directory
XBIN_TOOLCHAIN_PREFIX = /home/dcapers/l4t-gcc/gcc-linaro-7.3.1-2018.05-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-
XBIN_LIBGCC =
including app/trusty lib/libc-trusty lib/openssl
including lib/libc lib/openssl-stubs
including lib/rng
including interface/hwrng
LIBGCC =
GLOBAL_COMPILEFLAGS = -g -fno-builtin -finline -include ./t194ref/build-t186/config.h -W -Wall -Wno-multichar -Wno-unused-parameter -Wno-nonnull-compare -ffunction-sections -fdata-sections
GLOBAL_OPTFLAGS = -O2
generating t194ref/build-t186/tegra/public/platform/t18x/module_config.h
generating t194ref/build-t186/config.h
generating t194ref/build-t186/user_tasks/sample/ipc-unittest/main/config.h
generating t194ref/build-t186/user_tasks/sample/ipc-unittest/srv/config.h
generating t194ref/build-t186/user_tasks/sample/hwkey-agent/config.h
compiling tegra/public/platform/t18x/platform.c
warning: TCG doesn’t support requested feature: CPUID.01H:ECX.vmx [bit 5]
/lib64/ld-linux-x86-64.so.2: No such file or directory
make/compile.mk:41: recipe for target ‘t194ref/build-t186/tegra/public/platform/t18x/platform.o’ failed
make[2]: *** [t194ref/build-t186/tegra/public/platform/t18x/platform.o] Error 255
make[2]: Leaving directory ‘/home/dcapers/atf_and_trusty/trusty/trusty’
lk/common/engine.mk:28: recipe for target ‘make-make’ failed
make[1]: *** [make-make] Error 2
make[1]: Leaving directory ‘/home/dcapers/atf_and_trusty/trusty/trusty’
makefile:27: recipe for target ‘t186’ failed
make: *** [t186] Error 2