Hello,
I have one question regarding the generation of the DTB file for a Jetson Tx2 on a custom carrier board.
My version of Jetpack is 4.3 with L4T version 32 Revision 3.1
I’ve design a custom board following all the hardware related guidelines. I’m following the design checklists presents at these links:
Hardware Checklist
https://docs.nvidia.com/jetson/l4t/index.html#page/Tegra%2520Linux%2520Driver%2520Package%2520Development%2520Guide%2Fadaptation_and_bringup_checklists.html%23
Software Checklist.
https://docs.nvidia.com/jetson/l4t/index.html#page/Tegra%2520Linux%2520Driver%2520Package%2520Development%2520Guide%2Fadaptation_and_bringup_checklists.html%23wwpID0EPHA
The main document for Platform adaptation which I’m following is:
I’ve managed to create the dtsi file for PINMUX and PADVOLTAGE with the pinmux spreadsheet and convert it to .CFG with the pinmux-dts2cfg.py scripts.
But there’s something in the “Jetson TX2 Platform Adaptation and Bring-Up” that I didn’t understand. I’m stuck at “Porting the Linux Kernel” section.
Let’s say I want to change the USB supply to enable the usb or change some regulator parameters. My board doesn’t have ina3221 for power metering and the GPIO Expander
The guide says to look the file “tegra186-quill-power-tree-p3310-1000-a00-00.dtsi”.
“As a best practice, create your own set of .dts files based on the Quill files already present. Rename your newly created files to the name of your board.”
I’v done that and change the includes in the
tegra186-quill-p3310-1000-a00-00-base.dts
This is an include in the main .dts file: tegra186-quill-p3310-1000-a00-00-base.dts
All these file are in the sources/hardware/… subfolders downloaded with ./source_sync.sh
The guide then says:
“Use fdtdump or dtc to generate a .dts from the final .dtb file and check if your changes have taken effect.”
So basically it tells me how to check if the changes I have made have taken effect but not how to make these changes…
If I try to compile this latter file using the DTC command:
dtc -I dts -O dtb -o tegra186-quill-p3310-1000-a00-00-base.dtb tegra186-quill-p3310-1000-a00-00-base.dts
I receive the following error:
Error: tegra186-quill-p3310-1000-a00-00-base.dts:16.1-2 syntax error
FATAL ERROR: Unable to parse input tree
because (I’m guessing, I’m a beginner with linux platform) the #include statements are preprocessor statement that the dtc command couldn’t resolve?
So:
1 - How can I make a the DTB starting with the main .dts with all the included custom .dtsi files without reverse compile the base.dts with DTC, modding it, and recompile?
(I would not prefer to work on a >14000 lines code file with hexadecimal values for obvious reason, it became very difficult to track the modification)
2 - I must build the whole kernel everytime I made a device tree change or there’s a much more smart way?
Thank you,