UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
179 Views
Registered: ‎08-04-2019

Syntax error in pl.dtsi

Hi, I have a ZCU106: I have implemented the VCU TRD 2018.3 for this board. I have built the hardware design, exported hardware, built Petalinux and run it successfully on the board.

Then, I have added my own tiny custom module in the video path: it takes AXI-S in from the MIPI core and outputs AXI-S to the demosaic core. It also has a register interface to the Zynq, which I have connected via the AXI interconnect. The hardware builds successfully. I can "export hardware" to generate a .hdf for Petalinux. Within the Petalinux environment, I use "--get-hw-description" to import the very slightly altered hardware. I then run petalinux-build. One of the stages of this is to recreate the device tree, presumably based off the newly updated .hdf.  This fails:

| Error: ..../build/../components/plnx_workspace/device-tree/device-tree/pl.dtsi:809.17-23 syntax error

The content of pl.dtsi looks suspicious: the relevant parts look like this:

 

/*** entries cut here ***/
	       mod_axi_0: mod_axi@a0053000 {
                        clock-names = "axi_reg_aclk", "axis_in_aclk", "axis_out_aclk";
                        clocks = <&clk 71>, <&clk 72>, <&clk 72>;
                        compatible = "xlnx,mod-axi-1.0";
                        reg = <0x0 0xa0053000 0x0 0x1000>;
                        xlnx,axi-reg-addr-width = <0x7>;
                        xlnx,axi-reg-data-width = <0x20>;
                        xlnx,axis-in-tdata-width = <0x18>;
                        xlnx,axis-out-tdata-width = <0x10>;
                };
                mipi_csi2_rx_v_demosaic_0: v_demosaic@a0250000 {
                        clock-names = "ap_clk";
                        clocks = <&clk 72>;
                        compatible = "xlnx,v-demosaic-1.0", "xlnx,v-demosaic";
                        reg = <0x0 0xa0250000 0x0 0x10000>;
                        reset-gpios = <&gpio 85 1>;
                        xlnx,max-height = <2160>;
                        xlnx,max-width = <3840>;
                        xlnx,s-axi-ctrl-addr-width = <6>;
                        xlnx,s-axi-ctrl-data-width = <32>;
                };
                mipi_csi2_rx_v_gamma_lut_0: v_gamma_lut@a0270000 {
                        clock-names = "ap_clk";
                        clocks = <&clk 72>;
                        compatible = "xlnx,v-gamma-lut-1.0", "xlnx,v-gamma-lut";
                        reg = <0x0 0xa0270000 0x0 0x10000>;
                        reset-gpios = <&gpio 86 1>;
                        xlnx,max-height = <2160>;
                        xlnx,max-width = <3840>;
                        xlnx,s-axi-ctrl-addr-width = <13>;
                        xlnx,s-axi-ctrl-data-width = <32>;
                        gamma_ports: ports {
                                #address-cells = <1>;
                                #size-cells = <0>;
                                gamma_port0: port@0 {
                                        reg = <0>;
                                        xlnx,video-width = <8>;
                                        gamma_in: endpoint {
                                                remote-endpoint = <&demosaic_out>;
                                        };
                                };
                                gamma_port1: port@1 {
                                        reg = <1>;
                                        xlnx,video-width = <8>;
                                        gamma_out: endpoint {
                                                remote-endpoint = <&csc_in>;
                                        };
                                };
                        };
                };

/*** other entries cut here ***/

                vcap_tpg {
                        compatible = "xlnx,video";
                        dma-names = "port0";
                        dmas = <&tpg_input_v_frmbuf_wr_0 0>;
                        v_ports: ports {
                                #address-cells = <1>;
                                #size-cells = <0>;
                                v_port: port@0 {
                                        direction = "input";
                                        reg = <0>;
                                        vcap_dev_in: endpoint {
                                                remote-endpoint = <&tpg_out>;
                                        };
                                };
                        };
                };
        };
};
/*** below is the line that is identified as the syntax error: ***/
demosaic_port1: port@1 {
        /* For cfa-pattern=rggb user needs to fill as per BAYER format */
        reg = <1>;
        xlnx,cfa-pattern = "rggb";
        xlnx,video-width = <8>;
        demosaic_out: endpoint {
                remote-endpoint = <&gamma_in>;
        };
};
/*** EOF ***/

 

I'm not particularly familiar with the format of device trees! But, what I see is:

  • modules are described: sometimes (as is the case with the gamma_lut module) there are "port" descriptions which provide some information about how the hardware pipeline is actually connected together.
  • my "mod_axi" module doesn't have port descriptions. Is this a problem?
  • the description of the demosaic interface is bad: there is no "port 0" description at all: that is the "port" that is connected to my new module. The "port 1" description has been thrown at the bottom of the file, completely out of order and without reference to where it should be.

Has anyone seen this before?

Am I using the correct process to update hardware and reconfigure Petalinux?

What is the tool that actually generates pl.dtsi? Is there a way to get visibility into that process? (because it certainly looks like it's generating bad output!)

If you need further information, let me know and I'll see what I am allowed to provide.

Peter

Tags (2)
0 Kudos
8 Replies
Moderator
Moderator
147 Views
Registered: ‎09-12-2007

Re: Syntax error in pl.dtsi

Can you share the HDF you used to create this please?

0 Kudos
138 Views
Registered: ‎08-04-2019

Re: Syntax error in pl.dtsi

Here's my .hdf (zipped because the web upload doesn't like .hdf files?). Note that my module in here is called "biotmo_axi". I have looked through the files inside it and can't see anything obviously suspicious.

0 Kudos
Moderator
Moderator
113 Views
Registered: ‎09-12-2007

Re: Syntax error in pl.dtsi

I can reporduce your issue, by isolating the issue in the devicetree generator and compiling manually (see below):

dtg_dtc.png

I have created a patch (attached) that I tested in 2018.3. You can see the steps to use this patch in the wiki here:

https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/136904764/Creating+Devicetree+from+Devicetree+Generator+for+Zynq+Ultrascale+and+Zynq+7000

0 Kudos
99 Views
Registered: ‎08-04-2019

Re: Syntax error in pl.dtsi

Thanks Stephen - I'll try that out later today and let you know how it goes.

0 Kudos
87 Views
Registered: ‎08-04-2019

Re: Syntax error in pl.dtsi

I now get a different error in the Petalinux build:

DEBUG: Executing shell function do_compile
Error: /home/peterw/vcu_trd_bsp/xilinx-vcu-trd-zcu106-v2018.3-final/build/tmp/work/plnx_zynqmp-xilinx-linux/device-tree/xilinx+gitAUTOINC+b7466bbeee-r0/design-fixes.dtsi:138.1-10 Label or path csiss_in not found
FATAL ERROR: Syntax error parsing input tree

I have placed the patch here: 

/project-spec/meta-user/recipes-bsp/device-tree/files$ ls
0001_fix_mipi_demosaic.patch

And device-tree.bbappend now looks like:

$ cat device-tree.bbappend
SRC_URI_append ="\
    file://0001-vproc_ss-Updated-node-name-for-SDI.patch \
    file://system-conf.dtsi \
    file://system-user.dtsi \
    file://vcap-hdmi_2.dtsi \
    file://vcap-hdmi_3.dtsi \
    file://vcap-hdmi_4.dtsi \
    file://vcap-hdmi_5.dtsi \
    file://vcap-hdmi_6.dtsi \
    file://vcap-hdmi_7.dtsi \
    file://apm.dtsi \
    file://hdmi-misc.dtsi \
    file://li-imx274mipi-fmc.dtsi \
    file://design-fixes.dtsi \
    file://xlnk.dtsi \
    file://0001_fix_mipi_demosaic.patch \
"
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"

I have tried including the patch earlier in the list - it doesn't seem to make a difference (I'm not sure if it should?). Is there something I am doing wrong still?

The patch you supplied is specific to the demosaic core: is there something specific about how this core is described that means it's a problem, or is this issue going to come back to bite me later again?

Peter

0 Kudos
71 Views
Registered: ‎08-04-2019

Re: Syntax error in pl.dtsi

 I've tried creating a new Petalinux project now: and it looks different. With the patch applied, I think the device tree is building successfully.

But I now get a different error instead: 

| /opt/pkg/petalinux/tools/linux-i386/aarch64-none-elf/bin/../lib/gcc/aarch64-none-elf/7.3.1/../../../../aarch64-none-elf/bin/ld: cannot open linker script file lscript.ld: No such file or directory
| collect2: error: ld returned 1 exit status
| make: *** [Makefile:28: executable.elf] Error 1
| WARNING: /home/peterw/tmp/xilinx-zcu106-2018.3/build/tmp/work/zcu106_zynqmp-xilinx-linux/fsbl/2018.3+gitAUTOINC+56f3da2afb-r0/temp/run.do_compile.7158:1 exit 2 from 'make'
| ERROR: Function failed: do_compile (log file is located at /home/peterw/tmp/xilinx-zcu106-2018.3/build/tmp/work/zcu106_zynqmp-xilinx-linux/fsbl/2018.3+gitAUTOINC+56f3da2afb-r0/temp/log.do_compile.7158)
ERROR: Task (/opt/pkg/petalinux/components/yocto/source/aarch64/layers/meta-xilinx-tools/recipes-bsp/fsbl/fsbl_git.bb:do_compile) failed with exit code '1'

I feel like I'm chasing shadows!  Where is the script expecting to find a linker script?

Is there some sort of guide for the build process that explains what is happening? ug1144 is particularly unhelpful in explaining what is actually happening at each step.

Peter

0 Kudos
Moderator
Moderator
65 Views
Registered: ‎09-12-2007

Re: Syntax error in pl.dtsi

Issue is the fsbl generation

Can you do

petalinux-build -x mrproper

petalinux-build

0 Kudos
45 Views
Registered: ‎08-04-2019

Re: Syntax error in pl.dtsi

I finally have a Petalinux build. But it doesn't boot. It gets as far as this:

[    7.407062] xilinx-video amba_pl@0:vcap_csi: device registered
[    7.415188] xilinx-video amba_pl@0:vcap_tpg: device registered
[    7.423290] xilinx-video amba_pl@0:vcap_csi: Entity type for entity a0250000.v_demosaic was not initialized!
[    7.435222] xilinx-demosaic a0250000.v_demosaic: Xilinx Video Demosaic Probe Successful
[    7.445727] xilinx-video amba_pl@0:vcap_csi: Entity type for entity a0270000.v_gamma_lut was not initialized!
[    7.457788] xilinx-gamma-lut a0270000.v_gamma_lut: Xilinx 8-bit Video Gamma Correction LUT registered

And that's where it hangs. If you have ideas, please let me know.

0 Kudos