Open pticon opened 2 years ago
Are you compiling the device tree from within the kernel build system, or trying to do so manually? That label is defined in tegra194-soc-i2c.dtsi
, which is several layers of #include
down from the main device tree file. If it's a kernel build, can you attach a log (with V=1
output)? If it's manual, what command options are you using, and do they align with what the kernel build does (include paths, -D
definitions, etc.)?
Hi @madisongh, Thanks for your reply.
I understand what you meant and the file you pointed is indeed defining that value.
I am compiling using the meta-tegra with a separate source directory.
Here is the command I am using:
mkdir -p arch/arm64/boot/dts/_ddot_/_ddot_/_ddot_/_ddot_/nvidia/platform/t19x/jakku/kernel-dts/ ; aarch64-linux-gcc -E -Wp,-MD,arch/arm64/boot/dts/_ddot_/_ddot_/_ddot_/_ddot_/nvidia/platfo rm/t19x/jakku/kernel-dts/.tegra194-p3668-all-p3509-0000.dtb.d.pre.tmp -nostdinc -I/home/pierre/Sources/linux-tegra-4.9/nvidia/soc/tegra/kernel-include -I/home/pierre/Sources/linux-tegra-4.9/ nvidia/platform/tegra/common/kernel-dts -DLINUX_VERSION=409 -I/home/pierre/Sources/linux-tegra-4.9/nvidia/soc/t210/kernel-dts -I/home/pierre/Sources/linux-tegra-4.9/nvidia/platform/t210/comm on/kernel-dts -I/home/pierre/Sources/linux-tegra-4.9/nvidia/platform/t210b01/common/kernel-dts -I/home/pierre/Sources/linux-tegra-4.9/nvidia/platform/t210/porg/kernel-dts -I/home/pierre/Sour ces/linux-tegra-4.9/nvidia/soc/t18x/kernel-include -I/home/pierre/Sources/linux-tegra-4.9/nvidia/soc/t18x/kernel-dts -I/home/pierre/Sources/linux-tegra-4.9/nvidia/platform/t18x/common/kernel -dts -I/home/pierre/Sources/linux-tegra-4.9/nvidia/soc/t19x/kernel-include -I/home/pierre/Sources/linux-tegra-4.9/nvidia/soc/t18x/kernel-include -I/home/pierre/Sources/linux-tegra-4.9/nvidia /soc/t19x/kernel-dts -I/home/pierre/Sources/linux-tegra-4.9/nvidia/platform/t19x/common/kernel-dts -I/home/pierre/Sources/linux-tegra-4.9/nvidia/soc/t23x/kernel-include -I/home/pierre/Source s/linux-tegra-4.9/nvidia/soc/t23x/kernel-dts -I/home/pierre/Sources/linux-tegra-4.9/nvidia/platform/t18x/lanai/kernel-dts -I/home/pierre/Sources/linux-tegra-4.9/nvidia/platform/t18x/quill/ke rnel-dts -I/home/pierre/Sources/linux-tegra-4.9/nvidia/platform/t19x/galen/kernel-dts -I/home/pierre/Sources/linux-tegra-4.9/nvidia/platform/t19x/galen-industrial/kernel-dts -I/home/pierre/S ources/linux-tegra-4.9/nvidia/platform/t19x/jakku/kernel-dts -I/home/pierre/Sources/linux-tegra-4.9/nvidia/platform/t19x/ -I/home/pierre/Sources/linux-tegra-4.9/nvidia/platform/t19x/mccoy/ke rnel-dts -undef -D__DTS__ -x assembler-with-cpp -o arch/arm64/boot/dts/_ddot_/_ddot_/_ddot_/_ddot_/nvidia/platform/t19x/jakku/kernel-dts/.tegra194-p3668-all-p3509-0000.dtb.dts.tmp /home/pier re/Sources/linux-tegra-4.9/arch/arm64/boot/dts/../../../../nvidia/platform/t19x/jakku/kernel-dts/tegra194-p3668-all-p3509-0000.dts ; ./scripts/dtc/dtc -@ -O dtb -o arch/arm64/boot/dts/_ddot_ /_ddot_/_ddot_/_ddot_/nvidia/platform/t19x/jakku/kernel-dts/tegra194-p3668-all-p3509-0000.dtb -b 0 -i /home/pierre/Sources/linux-tegra-4.9/arch/arm64/boot/dts/../../../../nvidia/platform/t19 x/jakku/kernel-dts/ -i /home/pierre/Sources/linux-tegra-4.9/nvidia/soc/tegra/kernel-include -i /home/pierre/Sources/linux-tegra-4.9/nvidia/platform/tegra/common/kernel-dts -i /home/pierre/So urces/linux-tegra-4.9/nvidia/soc/t210/kernel-dts -i /home/pierre/Sources/linux-tegra-4.9/nvidia/platform/t210/common/kernel-dts -i /home/pierre/Sources/linux-tegra-4.9/nvidia/platform/t210b0 1/common/kernel-dts -i /home/pierre/Sources/linux-tegra-4.9/nvidia/platform/t210/porg/kernel-dts -i /home/pierre/Sources/linux-tegra-4.9/nvidia/soc/t18x/kernel-include -i /home/pierre/Source s/linux-tegra-4.9/nvidia/soc/t18x/kernel-dts -i /home/pierre/Sources/linux-tegra-4.9/nvidia/platform/t18x/common/kernel-dts -i /home/pierre/Sources/linux-tegra-4.9/nvidia/soc/t19x/kernel-inc lude -i /home/pierre/Sources/linux-tegra-4.9/nvidia/soc/t18x/kernel-include -i /home/pierre/Sources/linux-tegra-4.9/nvidia/soc/t19x/kernel-dts -i /home/pierre/Sources/linux-tegra-4.9/nvidia/ platform/t19x/common/kernel-dts -i /home/pierre/Sources/linux-tegra-4.9/nvidia/soc/t23x/kernel-include -i /home/pierre/Sources/linux-tegra-4.9/nvidia/soc/t23x/kernel-dts -i /home/pierre/Sour ces/linux-tegra-4.9/nvidia/platform/t18x/lanai/kernel-dts -i /home/pierre/Sources/linux-tegra-4.9/nvidia/platform/t18x/quill/kernel-dts -i /home/pierre/Sources/linux-tegra-4.9/nvidia/platfor m/t19x/galen/kernel-dts -i /home/pierre/Sources/linux-tegra-4.9/nvidia/platform/t19x/galen-industrial/kernel-dts -i /home/pierre/Sources/linux-tegra-4.9/nvidia/platform/t19x/jakku/kernel-dts -i /home/pierre/Sources/linux-tegra-4.9/nvidia/platform/t19x/ -i /home/pierre/Sources/linux-tegra-4.9/nvidia/platform/t19x/mccoy/kernel-dts -Wno-unit_address_vs_reg -d arch/arm64/boot/dts/_ ddot_/_ddot_/_ddot_/_ddot_/nvidia/platform/t19x/jakku/kernel-dts/.tegra194-p3668-all-p3509-0000.dtb.d.dtc.tmp arch/arm64/boot/dts/_ddot_/_ddot_/_ddot_/_ddot_/nvidia/platform/t19x/jakku/kerne l-dts/.tegra194-p3668-all-p3509-0000.dtb.dts.tmp ; cat arch/arm64/boot/dts/_ddot_/_ddot_/_ddot_/_ddot_/nvidia/platform/t19x/jakku/kernel-dts/.tegra194-p3668-all-p3509-0000.dtb.d.pre.tmp arch /arm64/boot/dts/_ddot_/_ddot_/_ddot_/_ddot_/nvidia/platform/t19x/jakku/kernel-dts/.tegra194-p3668-all-p3509-0000.dtb.d.dtc.tmp > arch/arm64/boot/dts/_ddot_/_ddot_/_ddot_/_ddot_/nvidia/platfo rm/t19x/jakku/kernel-dts/.tegra194-p3668-all-p3509-0000.dtb.d
Are you saying you typed in that command manually (!), or is that an excerpt from running a bitbake build where you're trying to use devtool or externalsrc.bbclass (or just setting the SRC_REPO variable) to point the linux-tegra recipe at your local copy of the source tree? Did you already run through a full kernel build once, in the same workspace, before trying to recompile the device tree? Are you getting other error messages from that besides the one you mentioned in the OP? Does the kernel build succeed if you do a bitbake build and only fail with your manual command?
Hi @madisongh , It was an extract of the bitbake log with an external source with devtool. The kernel and the modules can easily compiled and there is only error with the device tree tegra194-p3668-all-p3509-0000.dts. What I see is that the file you pointed defines an alias named i2c7: tegra194-soc-i2c.dtsi#L30 but on the other side, the DTS uses it as a label: tegra194-camera-jakku-rbpcv3-imx477.dtsi#L30. So I opened another thread in the nvidia forum here in order to sort this out.
I don't think that makes a difference - I'm certainly not seeing any error compiling the kernel and device tree for the Xavier NX, I've just verified that the stock device tree includes that dtsi file, and I can see the i2c-parent
property in the compiled output.
Have you made any other changes in the device tree files?
I am trying compile the device tree for the Jetson Xavier NX Dev Kit (P3668-0000). So I am using that DTS tegra194-p3668-all-p3509-0000.dts, but I got an error with the "i2c7" label because it does not exist:
ERROR (phandle_references): Reference to non-existent node or label "i2c7"
The only one reference for this label is there: https://github.com/OE4T/linux-tegra-4.9/blob/28d9fddded2c498439b985d34ab57de4bd4c13f0/nvidia/platform/t19x/jakku/kernel-dts/common/tegra194-camera-jakku-rbpcv3-imx477.dtsi#L30
But indeed, this label is never defined.
I also checked the pinmux about that i2c7 and it is also unused. Am I missing anything here ?
By just commenting out the line, I was able to compile it.
Thank you for your support.