Jetpack6.2 make dtbs 编译失败

Hi NV team:

我想单独编译dtbs,参考之前的命令 ```
make ARCH=arm64 O=$TEGRA_KERNEL_OUT dtbs

我的输出路径是/home/work/jetpack6.2/Kernel_src/src_out
所以使用了如下的编译命令:
make ARCH=arm64 O=/home/work/jetpack6.2/Kernel_src/src_out dtbs
但编译时,报了如下的错误

================================================================================
make nvidia-dtbs ...
================================================================================
TEGRA_TOP=/home/work/jetpack6.2/Kernel_src \
srctree=kernel/kernel-jammy-src/ \
objtree=kernel/kernel-jammy-src/ \
oottree=/home/work/jetpack6.2/Kernel_src/kernel-devicetree \
HOSTCC=gcc \
make -f /home/work/jetpack6.2/Kernel_src/kernel-devicetree/scripts/Makefile.build \
        obj=/home/work/jetpack6.2/Kernel_src/kernel-devicetree/generic-dts \
        dtbs
make[1]: Entering directory '/home/work/jetpack6.2/Kernel_src'
  mkdir -p /home/work/jetpack6.2/Kernel_src/kernel-devicetree/generic-dts//hardware/nvidia/t23x/nv-public/staging/ ; gcc -E -Wp,-MMD,/home/work/jetpack6.2/Kernel_src/kernel-devicetree/generic-dts//hardware/nvidia/t23x/nv-public/staging/.tegra234-p3737-0000+p3701-0004.dtb.d.pre.tmp -nostdinc -I/home/work/jetpack6.2/Kernel_src/hardware/nvidia/tegra/nv-public -I/home/work/jetpack6.2/Kernel_src/hardware/nvidia/t23x/nv-public/include/kernel -I/home/work/jetpack6.2/Kernel_src/hardware/nvidia/t23x/nv-public/include/nvidia-oot -I/home/work/jetpack6.2/Kernel_src/hardware/nvidia/t23x/nv-public/include/platforms -I/home/work/jetpack6.2/Kernel_src/hardware/nvidia/t23x/nv-public -Ikernel/kernel-jammy-src//scripts/dtc/include-prefixes  -DLINUX_VERSION=600 -DTEGRA_HOST1X_DT_VERSION=2 -undef -D__DTS__ -x assembler-with-cpp -o /home/work/jetpack6.2/Kernel_src/kernel-devicetree/generic-dts//hardware/nvidia/t23x/nv-public/staging/.tegra234-p3737-0000+p3701-0004.dtb.dts.tmp /home/work/jetpack6.2/Kernel_src/kernel-devicetree/generic-dts/../..//hardware/nvidia/t23x/nv-public/staging/tegra234-p3737-0000+p3701-0004.dts ; kernel/kernel-jammy-src//scripts/dtc/dtc -o /home/work/jetpack6.2/Kernel_src/kernel-devicetree/generic-dts//hardware/nvidia/t23x/nv-public/staging/tegra234-p3737-0000+p3701-0004.dtb -b 0 -i/home/work/jetpack6.2/Kernel_src/kernel-devicetree/generic-dts/../..//hardware/nvidia/t23x/nv-public/staging/ -i/home/work/jetpack6.2/Kernel_src/hardware/nvidia/tegra/nv-public -i/home/work/jetpack6.2/Kernel_src/hardware/nvidia/t23x/nv-public/include/kernel -i/home/work/jetpack6.2/Kernel_src/hardware/nvidia/t23x/nv-public/include/nvidia-oot -i/home/work/jetpack6.2/Kernel_src/hardware/nvidia/t23x/nv-public/include/platforms -i/home/work/jetpack6.2/Kernel_src/hardware/nvidia/t23x/nv-public -ikernel/kernel-jammy-src//scripts/dtc/include-prefixes -Wno-interrupt_provider -Wno-unit_address_vs_reg -Wno-unit_address_format -Wno-avoid_unnecessary_addr_size -Wno-alias_paths -Wno-graph_child_address -Wno-simple_bus_reg -Wno-unique_unit_address   -@ -@ -@ -@ -Wno-interrupt_provider -Wno-unit_address_vs_reg -Wno-unit_address_format -Wno-avoid_unnecessary_addr_size -Wno-alias_paths -Wno-graph_child_address -Wno-simple_bus_reg -Wno-unique_unit_address   -d /home/work/jetpack6.2/Kernel_src/kernel-devicetree/generic-dts//hardware/nvidia/t23x/nv-public/staging/.tegra234-p3737-0000+p3701-0004.dtb.d.dtc.tmp /home/work/jetpack6.2/Kernel_src/kernel-devicetree/generic-dts//hardware/nvidia/t23x/nv-public/staging/.tegra234-p3737-0000+p3701-0004.dtb.dts.tmp ; cat /home/work/jetpack6.2/Kernel_src/kernel-devicetree/generic-dts//hardware/nvidia/t23x/nv-public/staging/.tegra234-p3737-0000+p3701-0004.dtb.d.pre.tmp /home/work/jetpack6.2/Kernel_src/kernel-devicetree/generic-dts//hardware/nvidia/t23x/nv-public/staging/.tegra234-p3737-0000+p3701-0004.dtb.d.dtc.tmp > /home/work/jetpack6.2/Kernel_src/kernel-devicetree/generic-dts//hardware/nvidia/t23x/nv-public/staging/.tegra234-p3737-0000+p3701-0004.dtb.d
/bin/sh: 1: kernel/kernel-jammy-src//scripts/dtc/dtc: not found
make[1]: *** [/home/work/jetpack6.2/Kernel_src/kernel-devicetree/generic-dts/Makefile:118: /home/work/jetpack6.2/Kernel_src/kernel-devicetree/generic-dts//hardware/nvidia/t23x/nv-public/staging/tegra234-p3737-0000+p3701-0004.dtb] Error 127
make[1]: Leaving directory '/home/work/jetpack6.2/Kernel_src'
make: *** [Makefile:173: nvidia-dtbs] Error 2
请教是什么原因?

Hi,

Do you do export KERNEL_HEADERS=$PWD/kernel/kernel-jammy-src to get right file path?
Please make sure correct path for kernel/kernel-jammy-src
Please refer to below link.
https://docs.nvidia.com/jetson/archives/r36.4/DeveloperGuide/SD/Kernel/KernelCustomization.html#building-the-dtbs

Thanks

1 Like

好的,感谢,在您的指导下解决了。

1 Like

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