Jetpack 3.1 for TX2 compiling kernel error

Hi all,
I downloaded Linux source package for Jetson TX2, version 28.1.
Then i unpack the kernel source,and create a script to compile the kernel source named “build_kernel”,i expect a kernel image in folder “arch/arm64/boot”

#cd public_source/kernel_src/kernel/kernel-4.4
#./build_kernel

source /home/kaifa/TOOLCHAIN/env_cross_compile
export CROSS_COMPILE=aarch64-linux-gnu-
make ARCH=arm64 -j4

Then I got some compiling error,is there anything wrong?

root@ubuntu:/home/kaifa/guotie/Jetpack3.0/TX2/public_source/kernel_src/kernel/kernel-4.4# ls …/…/
hardware kernel
root@ubuntu:/home/kaifa/guotie/Jetpack3.0/TX2/public_source/kernel_src/kernel/kernel-4.4# ls …/
display kernel-4.4 nvgpu nvhost nvmap nvmap-t18x t18x
root@ubuntu:/home/kaifa/guotie/Jetpack3.0/TX2/public_source/kernel_src/kernel/kernel-4.4# ./build_kernel
CHK include/config/kernel.release
CHK include/generated/uapi/linux/version.h
CHK include/generated/utsrelease.h
DTC arch/arm64/boot/dts/ddot/ddot/ddot/ddot/ddot/ddot/hardware/nvidia/platform/t18x/quill/kernel-dts/tegra186-quill-p3310-1000-a00-00-base.dtb
DTC arch/arm64/boot/dts/ddot/ddot/ddot/ddot/ddot/ddot/hardware/nvidia/platform/t18x/quill/kernel-dts/tegra186-quill-p3310-1000-a00-00-ape-cam.dtb
DTC arch/arm64/boot/dts/ddot/ddot/ddot/ddot/ddot/ddot/hardware/nvidia/platform/t18x/quill/kernel-dts/tegra186-quill-p3310-1000-a00-00-edp.dtb
DTC arch/arm64/boot/dts/ddot/ddot/ddot/ddot/ddot/ddot/hardware/nvidia/platform/t18x/quill/kernel-dts/tegra186-quill-p3310-1000-a00-00-dsi-hdmi-dp.dtb
DTC arch/arm64/boot/dts/ddot/ddot/ddot/ddot/ddot/ddot/hardware/nvidia/platform/t18x/quill/kernel-dts/tegra186-quill-p3310-1000-a00-00-dsi-hdmi-hdmi.dtb
DTC arch/arm64/boot/dts/ddot/ddot/ddot/ddot/ddot/ddot/hardware/nvidia/platform/t18x/quill/kernel-dts/tegra186-quill-p3310-1000-c03-00-dsi-hdmi-hdmi.dtb
DTC arch/arm64/boot/dts/ddot/ddot/ddot/ddot/ddot/ddot/hardware/nvidia/platform/t18x/quill/kernel-dts/tegra186-quill-p3310-1000-c03-00-dsi-hdmi-dp.dtb
DTC arch/arm64/boot/dts/ddot/ddot/ddot/ddot/ddot/ddot/hardware/nvidia/platform/t18x/quill/kernel-dts/tegra186-quill-p3310-1000-a00-00-dsi-dp.dtb
DTC arch/arm64/boot/dts/ddot/ddot/ddot/ddot/ddot/ddot/hardware/nvidia/platform/t18x/quill/kernel-dts/tegra186-quill-hdmi-primary-p3310-1000-c03-00.dtb
DTC arch/arm64/boot/dts/ddot/ddot/ddot/ddot/ddot/ddot/hardware/nvidia/platform/t18x/quill/kernel-dts/tegra186-quill-hdmi-primary-p3310-1000-a00-00.dtb
DTC arch/arm64/boot/dts/ddot/ddot/ddot/ddot/ddot/ddot/hardware/nvidia/platform/t18x/quill/kernel-dts/tegra186-quill-p3310-1000-a00-00-base-mods-display.dtb
DTC arch/arm64/boot/dts/ddot/ddot/ddot/ddot/ddot/ddot/hardware/nvidia/platform/t18x/quill/kernel-dts/tegra186-quill-p3310-1000-a00-00-imx274.dtb
DTC arch/arm64/boot/dts/ddot/ddot/ddot/ddot/ddot/ddot/hardware/nvidia/platform/t18x/quill/kernel-dts/tegra186-quill-p3310-1000-c03-00-base.dtb
DTC arch/arm64/boot/dts/ddot/ddot/ddot/ddot/ddot/ddot/hardware/nvidia/platform/t18x/quill/kernel-dts/tegra186-quill-p3310-1000-c03-00-dsi-dp.dtb
DTC arch/arm64/boot/dts/ddot/ddot/ddot/ddot/ddot/ddot/hardware/nvidia/platform/t18x/quill/kernel-dts/tegra186-quill-p3310-1000-c00-00-auo-1080p-edp.dtb
DTC arch/arm64/boot/dts/ddot/ddot/ddot/ddot/ddot/ddot/hardware/nvidia/platform/t18x/quill/kernel-dts/tegra186-quill-e3313-1000-a00-00-e2598.dtb

CC sound/soc/tegra-alt/ahub_unit_fpga_clock.o
In file included from sound/soc/tegra-alt/ahub_unit_fpga_clock.c:31:0:
./…/t18x/include/sound/tegra_audio.h:24:31: fatal error: tegra210_xbar_alt.h: No such file or directory

compilation terminated.
make[3]: *** [sound/soc/tegra-alt/ahub_unit_fpga_clock.o] Error 1
make[2]: *** [sound/soc/tegra-alt] Error 2
make[1]: *** [sound/soc] Error 2
make: *** [sound] Error 2
make: *** Waiting for unfinished jobs…
CC drivers/devfreq/governor_pod_scaling.o
CC drivers/dma-buf/dma-buf.o
drivers/devfreq/governor_pod_scaling.c:54:22: fatal error: governor.h: No such file or directory

compilation terminated.
make[2]: *** [drivers/devfreq/governor_pod_scaling.o] Error 1
make[1]: *** [drivers/devfreq] Error 2
make[1]: *** Waiting for unfinished jobs…

tegra18_defconfig is the default configure file. Very strange, i never meet this problems for L4T 28.2.1

How did you configure? I don’t actually see tegra18_defconfig used.

I’ve never used the “build_kernel” script. I usually take the “/proc/config.gz” of the running system using that config as a start (plus setting CONFIG_LOCALVERSION and any edits).