Can't generate DTB file from kernel compilation

Hello,

I’m trying to generate Image, zImage and DTB file for TX2, compiling customized kernel sources. I have done this successfully for TX1, but now for TX2 the compilation process generates Image, zImage, but no DTB file. I’m using jetpack 3.1 and L4T 28.1 , kernel is 4.4.38.

The process for TX1, that was going good, is:

export CROSS_COMPILE=/opt/gcc-4.8.5-aarch64/bin/aarch64-unknown-linux-gnu-
export TEGRA_KERNEL_OUT=kernel_out
export ARCH=arm64
export LOCALVERSION=-tegra
make O=$TEGRA_KERNEL_OUT tegra21_defconfig
make O=$TEGRA_KERNEL_OUT modules
make O=$TEGRA_KERNEL_OUT zImage
make O=$TEGRA_KERNEL_OUT dtbs

The process for TX2, that is not generating any DTB file, is:

export CROSS_COMPILE=/opt/gcc-4.8.5-aarch64/bin/aarch64-unknown-linux-gnu-
export TEGRA_KERNEL_OUT=kernel_out
export ARCH=arm64
export LOCALVERSION=-tegra
make O=$TEGRA_KERNEL_OUT tegra18_defconfig
make O=$TEGRA_KERNEL_OUT modules
make O=$TEGRA_KERNEL_OUT zImage
make O=$TEGRA_KERNEL_OUT dtbs

The compilation for TX2 seems to go well, without errors, except in the end that exits with:

make[1]: Entering directory ‘Source/kernel/kernel-4.4/kernel_out’
cp -u arch/arm64/boot/dts/
cp: missing destination file operand after ‘arch/arm64/boot/dts/’
Try ‘cp --help’ for more information.
…/arch/arm64/boot/dts/Makefile:97: recipe for target ‘dtbs’ failed
make[2]: *** [dtbs] Error 1
arch/arm64/Makefile:105: recipe for target ‘dtbs’ failed
make[1]: *** [dtbs] Error 2
make[1]: Leaving directory ‘Source/kernel/kernel-4.4/kernel_out’
Makefile:150: recipe for target ‘sub-make’ failed
make: *** [sub-make] Error 2

Which I think it is because there are missing files in arch/arm64/boot/dts/, since line 97 of arch/arm64/boot/dts/Makefile is:

cp -u $(DTB_OBJS) arch/arm64/boot/dts/

Any ideas on why the compilation doesn’t generates DTS files ?

hello pellejero.nicolas,

may I know did you follow the steps in the [Kernel Customization] chapter in the [NVIDIA Tegra Linux Driver Package]-> [Development Guide]
thanks

Hello JerryChang,

Yes I did follow those steps, except that sources has been modified by a third party, and as far as I know they tested the patch with TX1.

So I started with the sources they provided, used source_sync.sh -k tegra-l4t-r28.1 to update sources in a clean environment (L4T R28.1), and added missing folders to their sources. The folders I added to compile properly are: nvgpu-t18x nvhost-t18x nvmap-t18x t18x

But after that, as I said, the compilation ends without errors, Image and zImage are generated, but no DTB file.

hello pellejero.nicolas,

please check the [L4T TX2 Sources] package from Jetson Download Center
the device tree is under kernel_src/hardware
thanks