Issue with when building Tegra kernel -dtbs failed to build

have an issue when trying to build the kernel for Tegra TX2 using make ARCH=arm64 O=KERNEL_OUT CROSS_COMPILE={CROSS_COMPILE}

Get the following error

sudo make ARCH=arm64 O=KERNEL_OUT CROSS_COMPILE={CROSS_COMPILE} -j12
make[1]: Entering directory ‘/home/alphi/nvidia/nvidia_sdk/JetPack_4.2_Linux_P2888/Linux_for_Tegra/sources/kernel/kernel-4.9/build’
CHK include/config/kernel.release
GEN ./Makefile
CHK include/generated/uapi/linux/version.h
make[2]: *** No rule to make target ‘dtbs’. Stop.
arch/arm64/Makefile:124: recipe for target ‘dtbs’ failed
make[1]: *** [dtbs] Error 2
make[1]: *** Waiting for unfinished jobs…
make[1]: Leaving directory ‘/home/alphi/nvidia/nvidia_sdk/JetPack_4.2_Linux_P2888/Linux_for_Tegra/sources/kernel/kernel-4.9/build’
Makefile:170: recipe for target ‘sub-make’ failed
make: *** [sub-make] Error 2

The file is located here:

/home/alphi/nvidia/nvidia_sdk/JetPack_4.2_Linux_P2888/Linux_for_Tegra/sources/hardware/nvidia/platform/t19x/galen/kernel-dts/tegra194-p2888-0001-p2822-0000.dts

though it appears to be looking in the following directory …/kernel-4.9/arch/arm64/boot/dts where it is not located. Not sure why it cant find it. Even when i copied the dts files over to the directory …/kernel-4.9/arch/arm64/boot/dts. I still get the same error message above

Moving to TX2 forum.

You should specify a make target. Also note that unless output directories require root permission that you won’t need sudo. Having run sudo once might imply some of the content is now owned by root even if not originally a root file. Example to build the kernel, then modules (the “modules_prepare” is not required if you build Image first…and even if you don’t want the kernel, I recommend building Image once as a sanity check):

# Prior to this configuration must be set up.
make ARCH=arm64 O=$KERNEL_OUT CROSS_COMPILE=${CROSS_COMPILE} -j12 Image
make ARCH=arm64 O=$KERNEL_OUT CROSS_COMPILE=${CROSS_COMPILE} -j12 modules_prepare
make ARCH=arm64 O=$KERNEL_OUT CROSS_COMPILE=${CROSS_COMPILE} -j12 modules

This would be for dtbs, but most people won’t be building this. Even so, if building, you do have to make sure configuration is done first:

make ARCH=arm64 O=$KERNEL_OUT CROSS_COMPILE=${CROSS_COMPILE} -j12 dtbs