Re: [yocto] System device tree, AMD EDF, custom board
Sergei Nikulov <[email protected]>
| Newsgroups | org.yoctoproject.lists.yocto |
|---|---|
| Message-ID | <CAE7Ac0D9xT6KDqr4NgM5mX95Z6aNhv46JNw+dGDqh4VdnseVsw@mail.gmail.com> |
On Wed, Jan 28, 2026 at 4:59 PM pierre.daye via lists.yoctoproject.org <[email protected]> wrote: > > Dear All, > > I am currently updating my workflow to move to Scarthgap. > The issue I am facing is related to the fact that I use a system device > tree generated by sdtgen from my XSA design than I use genmachine-conf to > create the configuration files and set my machine name. > Now is the pickle for me. I don't know how to add a device tree > specification that is related to my custom board (and not to the FPGA and > the design itself, e.g. a device connected to an i2c bus defined in the PL). > If I add it as I was doing it before, it doesn't find the labels that are > defined in the PL part of my design and only focuses on the one accessible > by the PS part. > > Any help, pointers, would be greatly appreciated ! > > Thanks, > > Pi-r > > Hello, Pierre Here is my proposal (maybe there is a better way :) ) I've created custom layer let's call it meta-my-custom-board with "bitbake-layers create-layer -a ..." and put device-tree.bbappend here meta-my-custom-board ├── conf │ └── layer.conf ├── COPYING.MIT ├── README └── recipes-bsp └── device-tree ├── device-tree.bbappend └── files ├── custom_device.dtsi <----------- here just list of /include/ "... below dtsi ..." ├── one.dtsi ├── two.dtsi └── three.dtsi In custom bbappend I've customized do_configure to append main dtsi to linux dts FILESEXTRAPATHS:prepend := "${THISDIR}/files:" SYSTEM_USER_DTSI ?= "custom_device.dtsi" SRC_URI:append = " file://${SYSTEM_USER_DTSI}" SRC_URI:append = " file://one.dtsi" SRC_URI:append = " file://two.dtsi" TARGET_DTS_MODIFY ?= "cortexa53-linux.dts" do_configure:append() { set -xe echo "Running do_configure for ${MACHINE}..." if [ -f ${S}/${TARGET_DTS_MODIFY} ]; then if ! grep -q "/include/ \"${SYSTEM_USER_DTSI}\"" "${S}/${TARGET_DTS_MODIFY}"; then echo "/include/ \"${SYSTEM_USER_DTSI}\"" >> ${S}/${TARGET_DTS_MODIFY} fi fi } HTH, -- Best Regards, Sergei Nikulov