I am updating a device tree in Beagle Bone Black to enable i2c configuration. I have created a new layer meta-test. In meta-test there is a recipes-kernel where I have a leds.cfg and am335x-boneblack.dts file with linux-yocto_%.bbappend file. The bbappend file looks like this:
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
PACKAGE_ARCH = "${MACHINE_ARCH}"
SRC_URI += "\
file://am335x-boneblack.dts \
file://leds.cfg \
"
After building the kernel with bitbake both the files are transferred to "build/tmp/work/beaglebone_yocto-poky-linux-gnueabi/linux-yocto/4.18.25+git**" directory
But I want the dts file to get transfer to another directory "build/tmp/work-shared/beaglebone-yocto/kernel-source/arch/arm/boot/dts "
How do I achieve this within the bbappend file?
I was able to solve it adding this line:
do_configure_append() {
cp ${WORKDIR}/am335x-boneblack.dts ${S}/arch/arm/boot/dts/
}