I am trying to build an image for a sama5d27 eval board and my PCBA which has the sama5d27 chip. I'm following this guide to do so:
https://www.linux4sam.org/bin/view/Linux4SAM/Sama5d27Som1EKMainPage
I want to make some modifications to the kernel device tree and have been doing so by modifying the existing at91-sama5d27_som1_ek.dts via a patch file. I'm using Yocto and bitbake to build the image for the boards.
I want to use the same machine (sama5d27-som1-ek-sd) but add a new device tree file (via a git patch from the kernel source) and use that instead of the default one for that machine in the yocto bitbake build, how would I do that? I've so far modified the dts file for the machine via a similar git patch that I add to a SRC_URI_append_ in the bbappend file for the kernel source, and have successfully been making changes to the device tree that way. Instead of modifying the dts file for the machine, I want to add a new dts file via a patch from the kernel source in the same way. I've done the following : Made a patch with the new dts file and added it to linux-at91_5.4.bbappend in my own yocto layer via SRC_URI_APPEND_ also added to the same file:
KERNEL_DEVICETREE_append = "ft3-sama5d27_sp.dtb"
(ft3-sama5d27_sp.dts is the name of the new dts I've added via a patch) I see the new patch file in build/tmp/work-shared/sama5d27-som1-ek-sd/kernel-source/arch/arm/boot/dts/ft3-sama5d27_sp.dtb but I am still using the default dtb file (at91-sama5d27-som1-ek.dtb). How do I use ft3-sama5d27_sp.dtb instead?
Resolved- I had to patch the dt-overlay-at91 source code to modify the base_fdt dtb file.