[meta-xilinx] meta-xilinx device-tree recipe on master / yocto pyro

Holden.Sandlar at ultra-fei.com Holden.Sandlar at ultra-fei.com
Thu Oct 5 06:57:13 PDT 2017

Hi Nathan,

Thanks for the clarification on the intent of this recipe. I am able to 
use the device-tree-generation recipe in meta-xilinx-tools to generate a 
device tree, but I have not yet tracked down why there are some missing 
entries. In particular, for the ZCU102 I expect to see nodes associated 
with the TI I2C-based GPIO controller to set the GTR on-board muxes. Here 
is an example of these entries when building with bitbake/poky 1.32.0 and 
the 2017.2 tag of meta-xilinx and meta-xilinx-tools (per directions 
provided by Xilinx's wiki)  --

                i2c at ff020000 {
                        compatible = "cdns,i2c-r1p14", "cdns,i2c-r1p10";
                        status = "okay";
                        interrupt-parent = <0x4>;
                        interrupts = <0x0 0x11 0x4>;
                        reg = <0x0 0xff020000 0x0 0x1000>;
                        #address-cells = <0x1>;
                        #size-cells = <0x0>;
                        power-domains = <0x15>;
                        clocks = <0x3 0x3d>;
                        pinctrl-names = "default", "gpio";
                        pinctrl-0 = <0x16>;
                        pinctrl-1 = <0x17>;
                        scl-gpios = <0x18 0xe 0x0>;
                        sda-gpios = <0x18 0xf 0x0>;
                        clock-frequency = <0x61a80>;

                        gpio at 20 {
                                compatible = "ti,tca6416";
                                reg = <0x20>;
                                #gpio-cells = <0x2>;

                                gtr_sel0 {
                                        gpios = <0x0 0x0>;
                                        line-name = "sel0";

                                gtr_sel1 {
                                        gpios = <0x1 0x0>;
                                        line-name = "sel1";

As mentioned, when I build with the device-tree-generation recipe my dts 
contains nodes for the gpio at 20, gpio at 21, etc. but does not contain the 
gtr_sel0/1/2/3 sub-nodes. I can see that these nodes exist in the kernel's 
dts for the ZCU102 here -- 

 Essentially my end-goal is to have my device tree recipe build the 
dts/dtb which includes the kernel source dts's and any additional custom 
entries required by my custom hardware (described within the hdf). What am 
I missing to achieve this? It seems like the device-tree-generation recipe 
only deals with the HDF file and the device-tree recipe only deals with 
additions to the kernel source dts's.


From:   Nathan Rossi <nathan at nathanrossi.com>
To:     Holden.Sandlar at ultra-fei.com
Cc:     meta-xilinx at yoctoproject.org
Date:   10/05/2017 04:05 AM
Subject:        Re: [meta-xilinx] meta-xilinx device-tree recipe on master 
/ yocto pyro

On 5 October 2017 at 07:34,  <Holden.Sandlar at ultra-fei.com> wrote:
> Hi all,
> I'm hoping this is a quick and easy issue someone already knows the 
> to. I'm working with a ZCU102, using meta-petalinux, meta-xilinx,
> meta-xilinx-tools and bitbake/poky 1.34.0 -- both meta-xilinx and
> meta-xilinx-tools on the master branch and am having an issue with the
> meta-xilinx device-tree recipe. Just for quick and easy reference, the
> device-tree recipe is here:

> The issue that I'm running into is that when I run "bitbake device-tree" 
> get an error that there are no dts files in the device-tree/1.0-r0
> directory. Full error shown below:
> ERROR: device-tree-1.0-r0 do_compile: Function failed: do_compile (log 
> is located at
> ERROR: Logfile of failure stored in:
> Log data follows:
> | DEBUG: Executing shell function do_compile
> |
> | gcc: error:
> No such file or directory
> | gcc: warning: ‘-x assembler-with-cpp’ after last input file has no 
> | gcc: fatal error: no input files
> | compilation terminated.
> exit 4 from 'gcc -E -nostdinc -Ulinux -x assembler-with-cpp
> -o `basename ${DTS_FILE}`.pp ${DTS_FILE}'
> | ERROR: Function failed: do_compile (log file is located at
> ERROR: Task
> failed with exit code '1'
> NOTE: Tasks Summary: Attempted 534 tasks of which 464 didn't need to be
> rerun and 1 failed.
> Summary: 1 task failed:
> Summary: There were 5 WARNING messages shown.
> Summary: There was 1 ERROR message shown, returning a non-zero exit 
> After reviewing the history on this recipe, it appears the recipe was
> restructured months ago to "Improve, clean up and remove
> MACHINE_DEVICETREE". Based on this commit, it appears the intent was to 
> the dts/dtsi files within the kernel sources as a base for generating a
> device tree. There was a line added to ensure that
> "virtual/kernel:do_shared_workdir" is run prior to the device-tree 
> My assumption is that the kernel recipe do_shared_workdir task is 
> to copy the selected machine's dts files into the shared workdir so they 
> be used by this device-tree recipe. However, this does not seem to 
happen in
> my case --
> ls
> arch   COPYING  Documentation  fs       ipc      kernel       Makefile
> README          scripts   tools
> block  CREDITS  drivers        include  Kbuild   lib          mm
> REPORTING-BUGS  security  usr
> certs  crypto   firmware       init     Kconfig  MAINTAINERS  net
> samples         sound     virt
> Additionally, the device-tree recipe loops over any *.dts files in the 
> directory, which is mapped to ${WORKDIR} in this recipe
> (
> This loop will effectively do an ls in the
> build/tmp/work/zcu102_zynqmp-xilinx-linux/device-tree/1.0-r0 directory 
> check for any *.dts files. This directory definitely does not contain 
> dts files.
> I'm guessing I'm missing something small/simple here. Can anyone provide 
> guidance?

The 'device-tree' recipe is intended to build custom source
device-trees within OE outside of the kernel source itself (whilst
still being able to reference the kernel dts includes).

Unless you have provided some additional device tree sources via a
.bbappend to device-tree (like meta-xilinx does for some specific
there will be no dts files in the ${S} directory of the device-tree
recipe build and it will fail.

The zcu102-zynqmp board already has device trees in the linux-xlnx
kernel source (built by setting KERNEL_DEVICETREE in the machine
conf), so there is no need to use device-tree for that machine.

If you are using meta-xilinx-tools you might be confusing
'device-tree' for the 'device-tree-generation' recipe? Which uses
Xilinx tools to generate device trees from your HDF design.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/meta-xilinx/attachments/20171005/b9271ef9/attachment.html>

More information about the meta-xilinx mailing list