Kernel build error: mkdir: cannot create directory ‘arch/arm64/boot/dts/nvidia/’

Hello, I am trying to build the kernel sources for a Jetson AGX Xavier devkit.

I’ve followed the instructions here: Kernel Customization — Jetson Linux<br/>Developer Guide 34.1 documentation, : downloaded and expanded the kernel sources (kernel-5.10), and set up the cross-compilation env variables.

The kernel build was “error-less” until this point where it fails to create the dir arch/arm64/boot/dts/nvidia/.

Does anyone have an idea how I can fix this?

Building kernel-5.10 sources
make: Entering directory '/home/ubuntu/jetson-xavier/kernel/kernel-5.10'
make[1]: Entering directory '/home/ubuntu/jetson-xavier/kernel_out'
  GEN     Makefile
#
# No change to .config
#
make[1]: Leaving directory '/home/ubuntu/jetson-xavier/kernel_out'
make: Leaving directory '/home/ubuntu/jetson-xavier/kernel/kernel-5.10'
make[1]: Entering directory '/home/ubuntu/jetson-xavier/kernel_out'
  GEN     Makefile
make[1]: Leaving directory '/home/ubuntu/jetson-xavier/kernel_out'
  CALL    /home/ubuntu/jetson-xavier/kernel/kernel-5.10/scripts/atomic/check-atomics.sh
  CALL    /home/ubuntu/jetson-xavier/kernel/kernel-5.10/scripts/checksyscalls.sh
  CHK     include/generated/compile.h
if [ ! -d arch/arm64/boot/dts/nvidia/ ] ; then \
	mkdir arch/arm64/boot/dts/nvidia/ ; \
fi
mkdir: cannot create directory ‘arch/arm64/boot/dts/nvidia/’: No such file or directory
make[2]: *** [/home/ubuntu/jetson-xavier/kernel/kernel-5.10/arch/arm64/boot/dts/Makefile:96: dtbs] Error 1
make[1]: *** [/home/ubuntu/jetson-xavier/kernel/kernel-5.10/Makefile:1391: dtbs] Error 2
make: *** [Makefile:213: __sub-make] Error 2

Hi, can you specify what environment you are using on the host PC? (OS and compiler version)
Also try to use the latest L4T and JetPack release.

The host PC OS version:

No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 20.04.5 LTS
Release:	20.04
Codename:	focal

The cross-compiler version:

aarch64--glibc--stable-2020.08-1

The gcc version on the host PC:

gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0

Make version on host PC:

GNU Make 4.2.1
Built for x86_64-pc-linux-gnu

Could you share us the source code tree you downloaded?

Here is the link to the Jetson Linux sources I downloaded: https://developer.nvidia.com/downloads/public-sourcestbz2

What files did you decompress from it?

After decompressing the public sources, the corresponding kernel file I use is:

public_sources/Linux_for_Tegra/source/public/kernel_src.tbz2

Is this unpacked as root? Or just as a regular user somewhere under the home directory? I’m just wondering if it is an artifact of root ownership.

It was not unpacked with root privileges as far as I remember (I will redo everything to be certain).
Could multithreading be a potential cause?

@linuxdev apparently the problem was linked to user permissions. I did a clean uncompress and compile (with non root privileges) and everything compiles fine now. Thanks for the hint.

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