[BUG] "make dtbs" fails to compile (Solved)


I am compiling kernel using the r31.0.1 public_release l4t kernel source. While compiling dtbs, I get below errors:

aaney@sahastrabahu:kernel-4.9 $ make dtbs
cp -u   arch/arm64/boot/dts/
cp: missing destination file operand after ‘arch/arm64/boot/dts/’
Try 'cp --help' for more information.
make[1]: *** [dtbs] Error 1
make: *** [dtbs] Error 2
aaney@sahastrabahu:kernel-4.9 $

Diving through the code, it looks like the variable “tegra-dtstree” in kernel-4.9/scripts/Kbuild.include has wrong path.

In the r31 kernel source:

tegra-dtstree = $(NV_BUILD_KERNEL_DTS_ROOT)
tegra-dtstree = $(srctree)/../../hardware/nvidia

I have fixed the issue by changing to below code:

tegra-dtstree = $(NV_BUILD_KERNEL_DTS_ROOT)
tegra-dtstree = $(srctree)/../hardware/nvidia

Notice one less “…/” (up directory).

Hi anish.aney,

confirmed we can make dtbs successfully.

$ make ARCH=arm64 O=$TEGRA_KERNEL_OUT dtbs
make[1]: Entering directory `/home/carol/Desktop/JEP/Image/Xavier_R31.0.1_build-kernel/public_release/kernel_out'
  DTC     arch/arm64/boot/dts/_ddot_/_ddot_/_ddot_/_ddot_/_ddot_/_ddot_/hardware/nvidia/platform/t19x/galen/kernel-dts/tegra194-p2888-0001-p2822-0000.dtb

Please execute the following commands to build the DTBs:

$ make ARCH=arm64 O=$TEGRA_KERNEL_OUT dtbs

Don’t forget to update the GCC version to 6.4.1 instead of 4.8.5
Please download toolchain from: https://developer.nvidia.com/embedded/dlc/kernel-gcc-6-4-tool-chain

Hi carolyuu,

I am sorry, I forgot that we still need to build the kernels using O= option. I had built the kernel without the O= option and that had failed. Though I would like to build it without this option as that’s easier. Anyway, please ignore the bug.