Failed to make L4T kernel dts

Hi,

I was attempting to compile a rt kernel for TX2 on an Archlinux host machine and I configured the kernel by

make ARCH=arm64 O=/path/to/destination tegra_defconfig

following by

make ARCH=arm64 O=/path/to/destination menuconfig

and modified preempt model to full preempt rt, kernel frequency to 1000Hz and add a local version.

After that, when compiling, I tried

make ARCH=arm64 O=/path/to/destination -j`nproc`

And it failed, reporting:

/path/to/kernel/kernel-4.9/arch/arm64/boot/dts/Makefile:132: target 'arch/arm64/boot/dts/_ddot_' given more than once in the same rule
/path/to/kernel/kernel-4.9/arch/arm64/boot/dts/Makefile:132: target 'arch/arm64/boot/dts/_ddot_' given more than once in the same rule
(the same warning repeats several times...)
cc1: fatal error: arch/arm64/boot/dts/..: No such file or directory

However, when it comes to compiling serially, no error was reported, but it was too slow for me.

My make version is 4.3, gcc version is linaro 7.3.1 and trying to compile the latest L4T (32.3.1 I think, with Linux kernel 4.9).

I’m new to kernel compiling so I might forget to post some important information. If you need anything further, tell me and I’ll supplement ASAP. Thanks in advance.

regards,
Karl

Edit: Failed in making in single process too. The error occured at the very end of the whole progress.

Is your host PC arm64? If so, then you can eliminate “arch=arm64”. If not, then you must also specify the cross compiler.

Where did you get the kernel source? Sometimes when you have certain configurations you will need to have some out of tree content for NVIDIA-specific content. If you have ever flashed before, then you will have a “Linux_for_Tegra/” subdirectory, and within that is a “source_sync.sh” script. You can download full kernel source for this release as:
./source_sync.sh -k tegra-l4t-r32.3.1

Note that this script will also work directly on the Jetson, and that you could build natively from the TX2.

Please follow below document to get kernel and build it.

https://docs.nvidia.com/jetson/l4t/index.html#page/Tegra%2520Linux%2520Driver%2520Package%2520Development%2520Guide%2Fkernel_custom.html%23

Thanks for reply.

My PC is amd64 and I did specify CROSS_COMPILE to linaro gcc build from NVIDIA download center.

I downloaded the source directly from download center (public_source.tbz2), for download through git is slow in my country.

regards

Yeah it was exactly the guide I was following.

Could you try without “make ARCH=arm64 O=/path/to/destination menuconfig” to add your mention to confirm if it cause the build failed.

Hi, i have the same problem with L4T 32.4.2.
I also have a solution. This is caused by new version of make 4.3.
Problem is described here: makefile - Possible bug in GNU make 4.3? - Stack Overflow
To make it working you must edit file: scripts/Kbuild.include
Then change lines:

the-space :=
the-space +=

To:

E =
the-space = $E $E

7 Likes

Hi mzapart,

Thanks for your sharing!

This error happen in the latest jetpack 4.6
And fixed with edit Kbuild.include solution here.