3 - Make changes to device tree
A better practice is organizing device tree into one base file and more overlays. Create the new base dtb file by include the dts/dtsi file from previous layer.
For new hardware, the new base dtb file name to be loaded needs to be defined in .env file using 'baseboard=' and 'fdt_file=' operation. The env file name is specified in u-boot recipe bbappend file by variable UBOOT_ENV_FILE.
Note the dts files under u-boot/dts
are only used for u-boot running. The dts files for kernel are under kernel recipes. The new dtb file name is used for u-boot to pass as argument when loading kernel.
the list of overlays to be loaded is specified in layer/conf/machine/include/imx8m-overlays.inc
.
Add the new dtb file name to variable KERNEL_DEVICETREE in kernel recipe .bbappend file.
The new dts files (base and overlays) for kernel to use should be created under linux/linux-karo-5.15/mx8-nxp-bsp/dts/freescale/
directory.