L4T 27.1 and 28.1 linux 4.4 kernel source is giving build errors.

Hi,

While compiling the release(27.1 and also 28.1) linux kernel, I faced many compilation errors. using the normal way of compiling kernel like below.

export ARCH=arm64 CROSS_COMPILE=aarch64-unknown-linux-gnu-
make tegra18_defconfig
make -j4 Image

As it gave many compilation error, I had to add ccflags-y += -I./$(src)/ in several Makefiles.

For example, one of such makefile is

— a/kernel/nvgpu/drivers/gpu/nvgpu/Makefile.nvgpu
+++ b/kernel/nvgpu/drivers/gpu/nvgpu/Makefile.nvgpu
@@ -25,6 +25,7 @@ ccflags-y += -I$(srctree)/…/nvgpu-t19x/include
ccflags-y += -I$(srctree)/…/nvgpu-t19x/include/uapi
endif

+ccflags-y += -I./$(src)/
obj-$(CONFIG_GK20A) := nvgpu.o

nvgpu-y := \

I am using ‘aarch64-unknown-linux-gnu-gcc (GCC) 4.8.5’.

Anyways I am able to compile and boot TX2 with release linux kernel after fixing build those errors.
How nvidia kernel team is compiling those releases.

I think there would be some special variable to be exported or something like that.

Build method given in l4t docs also tell me to do like what i did.

Any suggestion are greatly appreciated.

Thanks in advance.
Chivas.

I haven’t had any problems compiling under Ubuntu for 28.1. My gcc aarch64 version is…

Using built-in specs.
COLLECT_GCC=/opt/gcc-4.8.5-aarch64/bin/aarch64-unknown-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/opt/gcc-4.8.5-aarch64/bin/../libexec/gcc/aarch64-unknown-linux-gnu/4.8.5/lto-wrapper
Target: aarch64-unknown-linux-gnu
Configured with: /home/savl/aarch64/toolchain-build/gcc-4.8.5/configure LDFLAGS=-static --prefix=/home/savl/aarch64/toolchain-build/install --target=aarch64-unknown-linux-gnu --enable-languages=c,c++,fortran --enable-theads=posix --enable-shared --disable-libsanitizer --disable-gnu-indirect-function --disable-gnu-unique-object --disable-multilib --with-sysroot=/home/savl/aarch64/toolchain-build/install/aarch64-unknown-linux-gnu/sysroot
Thread model: posix
gcc version 4.8.5 (GCC)

Running : Ubuntu 16.04.3 LTS

Just for additional information, my method is cross compilation on 16.04 Ubuntu x86_64 host machine.

Tried on many such host machines but build was successful only after fixing some makefiles.

Hi chivas_regal,

Your steps are still a little bit different from the L4T document. Please try it again with L4T docs with clean build.