Hi Toradex,
I have created a custom carrier board using Gumstix for the Verdin imx8m mini. The carrier board came with a custom DTS file. I sought to compile the DTS into a DTB to integrate with a supplied reference image from Build U-Boot and Linux Kernel from Source Code | Toradex Developer Center.
Following the link above, I encountered an obstacle in finding a reference Easy Installer image for BSP 5.1 that would be compatible with my Verdin imx8mm 1.0B module. I additionally had to edit the makefile in the freescale folder of the kernel source in order to have the top level Makefile create my custom dtb.
Specifically, I performed the following steps:
First, I cloned the linux-toradex branch for BSP version 5.1 (that is supposed to be compatible with the Verdin 1.0b)
$ mkdir -p ~/workdir
$ cd ~/workdir
$ git clone -b toradex_5.4-2.1.x-imx git://git.toradex.com/linux-toradex.git
Second, I configured the kernel with default configuration for BSP 5.1
$ cd ~/workdir/linux-toradex
$ make defconfig
Third, I did some custom work to enable compilation of my custom DTS here before following the standard kernel compilation procedures. I began by entering the freescale directory and edited the Makefile to include my custom carrier board’s dts (that had appropriate verdin dtsi includes):
$ cd ~/workdir/linux-toradex/arch/arm64/boot/dts/freescale
$ emacs Makefile
Specifically, inside the Makefile in the freescale directory, I added my custom device tree name underneath the existing verdin ones so I would be able to build my dtb.
dtb-$(CONFIG_ARCH_MXC) += imx8mm-evk.dtb imx8mm-evk-rpmsg.dtb imx8mm-evk-rm67191.dtb \
imx8mm-ddr4-evk.dtb imx8mm-evk-root.dtb imx8mm-evk-inmate.dtb \
imx8mm-ddr4-evk-rm67191.dtb imx8mm-evk-revb.dtb imx8mm-ddr4-evk-revb.dtb \
imx8mm-ddr4-evk-revb-rm67191.dtb imx8mm-ddr3l-val.dtb \
imx8mm-evk-usd-wifi.dtb \
imx8mm-verdin-nonwifi-dahlia.dtb \
imx8mm-verdin-nonwifi-dev.dtb \
imx8mm-verdin-nonwifi-v1.1-dahlia.dtb \
imx8mm-verdin-nonwifi-v1.1-dev.dtb \
imx8mm-verdin-wifi-dahlia.dtb \
imx8mm-verdin-wifi-dev.dtb \
imx8mm-verdin-wifi-v1.1-dahlia.dtb \
imx8mm-verdin-wifi-v1.1-dev.dtb \
MyCustomTree.dtb
Fourth, I went back up the toplevel of linux-toradex and performed compilation of the kernel:
$ make -j$(nproc) Image.gz 2>&1 | tee build.log
$ make DTC_FLAGS="-@" freescale/MyDeviceTree.dtb
Fifth, following the guide exactly, I recompiled the kernel’s modules:
$ make -j$(nproc) modules
And then I reached the steps where I deploy the kernel to the image (Build U-Boot and Linux Kernel from Source Code | Toradex Developer Center). However, when following the link to available Easy Installer reference images (Reference Images for Yocto Project Software Downloads | Toradex Developer Center), I was only able to find reference images for 5.2.0 which do not support Verdin 1.0B or higher. The lowest I found was Verdin iMX8M Mini (2021-04-08 | 5.2.0+build.7 | 40.06 MB).
Is there a location where I can find a 5.1 BSP Reference Image? Are Verdin 1.0B’s generally not supported anymore? Lastly - is there a better way of building a custom dtb rather than editing the Makefile in the freescale directory of linux-toradex as I detailed above?
Thank you,
DVLevine