Hello,
I get errors when building trusty on Ubuntu 16.04.
According to the Jetson Linux Driver Package Toolchain in the development guide, I downloaded the 64-bit cross-compilation toolchain and put the toolchain in ‘/opt/l4t-gcc’ directory(some parts of the developer guide are really confusing).
- I entered ‘echo “export CROSS_COMPILE=/opt/l4t-gcc/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-” >> ~.bashrc’ in the terminal.
- according to the atf_and_trusty_README.txt, I entered the command as follow.
make t186 PROJECT=t186 TARGET=t186 BUILDROOT=./t186ref
TOOLCHAIN_PREFIX=“${CROSS_COMPILE}”
ARCH_arm_TOOLCHAIN_PREFIX=“${CROSS_COMPILE_ARM}”
ARCH_arm64_TOOLCHAIN_PREFIX=“${CROSS_COMPILE}”
DEBUG=0 DEBUG_LVL=0 DEFAULT_OTE_APP_DEBUGLEVEL=1 NOECHO=@
TRUSTY_VARIANT=l4t-public TRUSTY_MULTI_GUEST_CONFIGURATION=
TARGET_SOC=t186
Note, here I replaced CROSS_COMPILE_AARCH64 with CROSS_COMPILE.
But an error was reported:
make t186 PROJECT=t186 TARGET=t186 BUILDROOT=./t186ref \
TOOLCHAIN_PREFIX="${CROSS_COMPILE}" \ ARCH_arm_TOOLCHAIN_PREFIX="${CROSS_COMPILE_ARM}" \ ARCH_arm64_TOOLCHAIN_PREFIX="${CROSS_COMPILE}" \ DEBUG=0 DEBUG_LVL=0 DEFAULT_OTE_APP_DEBUGLEVEL=1 NOECHO=@ \ TRUSTY_VARIANT=l4t-public TRUSTY_MULTI_GUEST_CONFIGURATION= \ TARGET_SOC=t186
make[1]: Entering directory ‘/home/yangfan/trusty_src/trusty’
make[2]: Entering directory ‘/home/yangfan/trusty_src/trusty’
PROJECT = t186
PLATFORM = t18x
TARGET = t186
TOOLCHAIN_PREFIX =
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
XBIN_TOOLCHAIN_PREFIX =
XBIN_LIBGCC = /usr/lib/gcc/x86_64-linux-gnu/5/libgcc.a
including app/trusty lib/libc-trusty
including lib/libc
XBIN_TOOLCHAIN_PREFIX =
XBIN_LIBGCC = /usr/lib/gcc/x86_64-linux-gnu/5/libgcc.a
including app/trusty lib/libc-trusty
including lib/libc
XBIN_TOOLCHAIN_PREFIX =
XBIN_LIBGCC = /usr/lib/gcc/x86_64-linux-gnu/5/libgcc.a
including app/trusty lib/libc-trusty lib/openssl
including lib/libc lib/openssl-stubs
including lib/rng
including interface/hwrng
LIBGCC = /usr/lib/gcc/x86_64-linux-gnu/5/libgcc.a
GLOBAL_COMPILEFLAGS = -g -fno-builtin -finline -include ./t186ref/build-t186/config.h -W -Wall -Wno-multichar -Wno-unused-parameter -Wno-nonnull-compare -ffunction-sections -fdata-sections
GLOBAL_OPTFLAGS = -O2
generating t186ref/build-t186/tegra/public/platform/t18x/module_config.h
generating t186ref/build-t186/config.h
compiling tegra/public/platform/t18x/platform.c
gcc: error: unrecognized command line option ‘-mgeneral-regs-only’
make/compile.mk:41: recipe for target ‘t186ref/build-t186/tegra/public/platform/t18x/platform.o’ failed
make[2]: *** [t186ref/build-t186/tegra/public/platform/t18x/platform.o] Error 1
make[2]: Leaving directory ‘/home/yangfan/trusty_src/trusty’
lk/common/engine.mk:28: recipe for target ‘make-make’ failed
make[1]: *** [make-make] Error 2
make[1]: Leaving directory ‘/home/yangfan/trusty_src/trusty’
makefile:27: recipe for target ‘t186’ failed
make: *** [t186] Error 2
Later, I downloaded the 32-bit toolchain and placed it in the /opt/l4t-gcc-32 directory.
- I entered ‘echo “export CROSS32CC=/opt/l4t-gcc-32/gcc-linaro-7.3.1-2018.05-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-gcc” >> ~.bashrc’ in the terminal.
- enter the command
make t186 PROJECT=t186 TARGET=t186 BUILDROOT=./t186ref
TOOLCHAIN_PREFIX=“${CROSS_COMPILE}”
ARCH_arm_TOOLCHAIN_PREFIX=“${CROSS32CC}”
ARCH_arm64_TOOLCHAIN_PREFIX=“${CROSS_COMPILE}”
DEBUG=0 DEBUG_LVL=0 DEFAULT_OTE_APP_DEBUGLEVEL=1 NOECHO=@
TRUSTY_VARIANT=l4t-public TRUSTY_MULTI_GUEST_CONFIGURATION=
TARGET_SOC=t186
Note, here I replaced CROSS_COMPILE_ARM with CROSS32CC.
Still, same as the first error.
What should I do?