We are developing a product using Verdin iMX8M-Plus module. So far we were using Dahlia board. But now we completed our carrier board design and we had to use many non verdin standard functionalities on it therefor we need to customize Device Tree file a lot.
I use BSP 5.0 and created our own image with desired recipes inherited from tdx-reference-minimal-image. Now I need to change dtb file integrated to it and play a lot by changing and testing it. What is the suggested workflow for it?
We have also Toradex Pinout Designer xml file for the project if it helps us in someway.
I went through Device Tree Customization article that you suggested also watched the video there but none of them helped. Here are the steps that I followed and stuck.
I setup the yocto environment for Toradex BSP 5 nightly build and used Verdin iMX8M-Plus machine and typed bitbake virtual/kernel -c devshell
This cloned linux-toradex-5.4.161 recipe and bring a new terminal window with all compiler setting are set.
Then I went to the folder “./build/tmp/work-shared/verdin-imx8mp/kernel-source/arch/arm64/boot/dts/freescale” and found imx8mp-verdin-wifi-dahlia.dts file there.
Here $ARCH is set to “arm64” and $CROSS_COMPILE is set to “aarch64-tdx-linux-” by Yocto and I assumed that these are correct for 64 bit platforms and Verdin iMX8M-Plus.
When I use command “make imx8mp-verdin-wifi-dahlia.dts” it returns “make: Nothing to be done for 'imx8mp-verdin-wifi-dahlia.dts'”
If I run “make dtbs” as suggested in the article, it says “make: *** No rule to make target 'dtbs'. Stop.”
You executed the make command from a folder that is not the root of the kernel source, right?
in your case, you were in the ./build/tmp/work-shared/verdin-imx8mp/kernel-source/arch/arm64/boot/dts/freescale folder, whereas the root of your kernel repository is ./build/tmp/work-shared/verdin-imx8mp/kernel-source/
To build a device tree, you need to refer to its “final product”, which is the .dtb binary file instead of the source (.dts)
In your case, you should execute make imx8mp-verdin-wifi-dahlia.dtb instead of make imx8mp-verdin-wifi-dahlia.dts
The make dtbs should work, but as (seems like) you were in the wrong folder, it didn’t work.
Please refer to the Build U-Boot and Linux Kernel from Source Code | Toradex Developer Center article and take a look at the steps there to learn how to build kernel-related binaries. An important step is to build the correct defconfig. I just don’t remember if by dropping into the devshell the defconfig build step is already don’t or not.
Also, a nice way of better understanding how the kernel build works is to take a look at the Makefiles spread through the kernel source.