Error compiling the RT-Linux Kernel on Jetson AGX Orin

Hi, I’m following the steps of Kernel Customization — Jetson Linux Developer Guide documentation documentation, and in the step 4 when I compile the kernel it returns that error:
Building kernel-5.10 sources
make: Entering directory ‘/home/gpuerto/Linux_for_Tegra/source/public/kernel/kernel-5.10’
make: Warning: File ‘Makefile’ has modification time 1652155855 s in the future
make[1]: Entering directory ‘/home/gpuerto/Linux_for_Tegra/source/public/kernel_out’
make[1]: Warning: File ‘/home/gpuerto/Linux_for_Tegra/source/public/kernel/kernel-5.10/arch/arm64/Makefile’ has modification time 1652155855 s in the future
GEN Makefile
make[2]: Warning: File ‘/home/gpuerto/Linux_for_Tegra/source/public/kernel/kernel-5.10/scripts/Makefile.host’ has modification time 1652155860 s in the future
HOSTCC scripts/basic/fixdep
make[2]: warning: Clock skew detected. Your build may be incomplete.
make[2]: Warning: File ‘/home/gpuerto/Linux_for_Tegra/source/public/kernel/kernel-5.10/scripts/Makefile.host’ has modification time 1652155859 s in the future
HOSTCC scripts/kconfig/conf.o
HOSTCC scripts/kconfig/confdata.o
HOSTCC scripts/kconfig/expr.o
LEX scripts/kconfig/lexer.lex.c
YACC scripts/kconfig/parser.tab.[ch]
HOSTCC scripts/kconfig/lexer.lex.o
HOSTCC scripts/kconfig/parser.tab.o
HOSTCC scripts/kconfig/preprocess.o
HOSTCC scripts/kconfig/symbol.o
HOSTCC scripts/kconfig/util.o
HOSTLD scripts/kconfig/conf
/home/gpuerto/Linux_for_Tegra/source/public/kernel/kernel-5.10/scripts/gcc-version.sh: 17: /home/gpuerto/l4t-gcc/aarch64–glibc–stable-2022.08-1/bin/aarch64-buildroot-linux-gnu-gcc: Exec format error
/home/gpuerto/Linux_for_Tegra/source/public/kernel/kernel-5.10/scripts/gcc-version.sh: 18: /home/gpuerto/l4t-gcc/aarch64–glibc–stable-2022.08-1/bin/aarch64-buildroot-linux-gnu-gcc: Exec format error
/home/gpuerto/Linux_for_Tegra/source/public/kernel/kernel-5.10/scripts/gcc-version.sh: 19: /home/gpuerto/l4t-gcc/aarch64–glibc–stable-2022.08-1/bin/aarch64-buildroot-linux-gnu-gcc: Exec format error
sh: 1: /home/gpuerto/l4t-gcc/aarch64–glibc–stable-2022.08-1/bin/aarch64-buildroot-linux-gnu-ld: Exec format error
init/Kconfig:39: syntax error
init/Kconfig:38: invalid statement
/home/gpuerto/Linux_for_Tegra/source/public/kernel/kernel-5.10/scripts/clang-version.sh: 11: /home/gpuerto/l4t-gcc/aarch64–glibc–stable-2022.08-1/bin/aarch64-buildroot-linux-gnu-gcc: Exec format error
/home/gpuerto/Linux_for_Tegra/source/public/kernel/kernel-5.10/scripts/lld-version.sh: 9: /home/gpuerto/l4t-gcc/aarch64–glibc–stable-2022.08-1/bin/aarch64-buildroot-linux-gnu-ld: Exec format error
make[2]: *** [/home/gpuerto/Linux_for_Tegra/source/public/kernel/kernel-5.10/scripts/kconfig/Makefile:89: tegra_defconfig] Error 1
make[1]: *** [/home/gpuerto/Linux_for_Tegra/source/public/kernel/kernel-5.10/Makefile:633: tegra_defconfig] Error 2
make[1]: Leaving directory ‘/home/gpuerto/Linux_for_Tegra/source/public/kernel_out’
make: *** [Makefile:213: __sub-make] Error 2
make: Leaving directory ‘/home/gpuerto/Linux_for_Tegra/source/public/kernel/kernel-5.10’

Any idea?

I have that first error compiling, Jetpack 5.0 Kconfig syntax warning, and thats the second one.

Are you doing native compilation or cross compilation?

I’m doing the compilation on the Jetson Orin, but I set the CROSS_COMPILE_AARCH64 environment variables as following the instructions.

Dude, why did you need that when you are compiling natively on Jetson?
Start again without setting the variable so it uses the default native compiling toolchain.

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