cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
chintan_bl
Contributor
Contributor
2,119 Views
Registered: ‎04-20-2020

Yocto Build error : undefined reference to

Jump to solution

Hi,

I built the axi_dma simple interrupt example that comes with Vitis software using Vitis tools and was able to test it on HW (ZC106).

Next I want to take this source code and build it using Yocto. However, the functions that main routine calls (e.g xil_printf, XAxiDma_Reset) throw up an error in Yocto saying : undefined reference to 'xil_printf'. Sticking to xil_printf as an example, I have added the xil_printf.h/.c files in the bitbake .bb files and added those files too. 

I have attached make and .bb files here.

A snippet of the error log is:

/usr/src/debug/dmaxfer/1.0-r0/dmaxfer.c:242: undefined reference to `xil_printf'

Any thoughts on why I am seeing this error?

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
chintan_bl
Contributor
Contributor
1,038 Views
Registered: ‎04-20-2020

Agreed. I will mark as accept as solution. 

Can you send me the zcu102 design vivado design? I can use that as a reference to check my settings in the PL

Chintan

View solution in original post

0 Kudos
25 Replies
stephenm
Xilinx Employee
Xilinx Employee
2,049 Views
Registered: ‎09-12-2007

sounds like you are trying to compile baremetal code on linux? This will not work

 

You can use the example here if trying to access the dma from userspace:

https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/18842418/Linux+DMA+From+User+Space

0 Kudos
chintan_bl
Contributor
Contributor
2,040 Views
Registered: ‎04-20-2020

Hi @stephenm ,

Thanks for your reply. I am trying to do a simple sanity check on an AXI DMA instantiated in the PL using the example code provided by under :

C:\Xilinx\Vitis\2020.1\data\embeddedsw\XilinxProcessorIPLib\drivers\axidma_v9_11

Can any of that the simple loopback code provided in this folder be used for a building in Yocto? (Since I have been able to make it work on the hardware using Vitis build)

 

 

 

 

0 Kudos
stephenm
Xilinx Employee
Xilinx Employee
2,035 Views
Registered: ‎09-12-2007

If you just want to do a sanity check on your HW, then doing a baremetal test might be the easiest solution here.

Launch Vitis, and create an application project. Import your XSA (this will create your platform), target your processor (this will create the domain). Then create an Empty Applciation in the application templates (this will create the app). Then right click on the app in explorer view, and import the source file above. Then build, and test on HW

0 Kudos
chintan_bl
Contributor
Contributor
2,023 Views
Registered: ‎04-20-2020

Hi @stephenm 

I wasn't clear. I have successfully sanity-tested using the Vitis flow, where I can see that data that was sent is recieved back and I can change packet sizes, transfer sizes etc in the example code.

Now, I want to establish equivalent test in Linux using Yocto. What will be the path of least resistance to do that?

I already have an Yocto build for the ZC106 which boots succesfully and I have built peekpoke in this Yocto build (by adding in user_app under meta-petalinux). So that is the baseline Yocto project that I now want to add the AXI DMA loopback test to.

Any thoughts?

Thanks

Chintan

0 Kudos
stephenm
Xilinx Employee
Xilinx Employee
2,012 Views
Registered: ‎09-12-2007

Then you can create a UIO and use the baremetal example as a reference of how to config the DMA

https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/18842490/Testing+UIO+with+Interrupt+on+Zynq+Ultrascale

0 Kudos
chintan_bl
Contributor
Contributor
2,004 Views
Registered: ‎04-20-2020

Hmm a bit confused.

How do I use the UIO to config the DMA?

Thanks,
Chintan

0 Kudos
stephenm
Xilinx Employee
Xilinx Employee
1,994 Views
Registered: ‎09-12-2007

Have a look at the example here:

https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/18842418/Linux+DMA+From+User+Space

There is an example here that you can use to test the DMA from user space. 

You can use this as a reference

0 Kudos
chintan_bl
Contributor
Contributor
1,786 Views
Registered: ‎04-20-2020

Hi @stephenm 

I have been trying to follow the instructions in the Linux+Soft+DMA+Driver link you sent was running into some issues (probably due to my lack of familiarity with Yocto)

1. How/where to the I set the following config options
CONFIG_DMADEVICES
CONFIG_XILINX_DMA

2. In Yocto, where do I find the .dtsi to add the AXIDMA entry in device tree per instructions.

3. In Yocto, where do I add the source code (xilinx_dmatest.c) for the platform driver?

The note is very useful on what-to, but doesn't get into the how-to for the Xilinx Yocto set up. Any tips on this?

 

Thanks,

Chintan

 

0 Kudos
chintan_bl
Contributor
Contributor
1,761 Views
Registered: ‎04-20-2020

Hi @stephenm and @sandeepg ,

 

I tried to follow the note (https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/18842337/Linux+Soft+DMA+Driver#LinuxSoftDMADriver-AXIDMAandMCDMA) to build the xilinx_dma driver and axidmatest driver in my Yocto build.

Specifically, I did the following

 

1. Create a Vivado PL project with AXI DMA loopback (40 bit wide) and exported .xsa 

2. In Yocto project, within meta-petalinux/kernel-recipes directory, created a folder titled "axidmatest'. In there I have .bb file pointing to the source code copied from the Xilnx git (axidmatest.c and dmaheader.h) The .bb file looks like

SUMMARY = "Example of how to build an external Linux kernel module"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e"

inherit module

SRC_URI = "file://Makefile \
file://axidmatest.c \
file://dmaengine.h \
file://COPYING \
"

S = "${WORKDIR}"

# The inherit of module.bbclass will automatically name module packages with
# "kernel-module-" prefix as required by the oe-core build environment.

RPROVIDES_${PN} += "kernel-xilinxdma"

 

3. In my .conf file under I add

IMAGE_INSTALL_append = "axidmatest"
RM_WORK_EXCLUDE = "gnuradio"
KERNEL_MODULE_AUTOLOAD += "axidmatest"

4. The Linux image builds without error. When the card boots I see the following message,

axidmatest: exports duplicate symbol xilinx_vdma_channel_set_config (owned by kernel)
[ 23.345556] axidmatest: exports duplicate symbol xilinx_vdma_channel_set_config (owned by kernel)
[ 23.385474] axidmatest: exports duplicate symbol xilinx_vdma_channel_set_config (owned by kernel)

5. On the board, I see the axidmatest.ko driver at: /lib/modules/5.4.0-xilinx-v2020.1/extra/

root@zcu106-zynqmp:/lib/modules/5.4.0-xilinx-v2020.1/extra# ls
al5d al5e common dmaproxy mali.ko axidmatest.ko

When I use insmod to load this driver manually, I get the same error message as in the startup script.

insmod axidmatest.ko
[ 1294.594690] axidmatest: exports duplicate symbol xilinx_vdma_channel_set_config (owned by kernel)
[ 1294.641506] axidmatest: exports duplicate symbol xilinx_vdma_channel_set_config (owned by kernel)
insmod: can't insert 'axidmatest.ko': invalid module format

Any thoughts on what is happening? FWIW, I get the same error when I include xilinx_dma driver instead of axidmatest driver.

Thanks,

Chintan

 

0 Kudos
sandeepg
Moderator
Moderator
1,750 Views
Registered: ‎04-24-2017

Hi @chintan_bl ,

Steve has opened an SR we will keep you posted with right steps.

Thanks,
Sandeep
PetaLinux Yocto | Embedded SW Support

---------------------------------------------------------------------------
Don’t forget to Reply, Kudo, and Accept as Solution.
---------------------------------------------------------------------------
0 Kudos
chintan_bl
Contributor
Contributor
1,747 Views
Registered: ‎04-20-2020

Thanks a lot. If you need any specifics from me - let me know.

 

0 Kudos
sandeepg
Moderator
Moderator
1,710 Views
Registered: ‎04-24-2017

Hi @chintan_bl ,

Do you want to load axidma test driver as module or built-in tree?

Thanks,
Sandeep
PetaLinux Yocto | Embedded SW Support

---------------------------------------------------------------------------
Don’t forget to Reply, Kudo, and Accept as Solution.
---------------------------------------------------------------------------
0 Kudos
chintan_bl
Contributor
Contributor
1,694 Views
Registered: ‎04-20-2020

Hi @sandeepg ,

I don't have a preference. Either way is acceptable as long as it can be made to work without errors. I was trying to use the driver as a loadable kernel module that gets loaded automatically, but maybe I am doing something wrong. 

0 Kudos
sandeepg
Moderator
Moderator
1,588 Views
Registered: ‎04-24-2017

Hi @chintan_bl ,

Below is the instructions.

  1. Create a system-user.dtsi file in <PATH_TO_YOCTO>/sources/meta-xilinx-tools/recipes-bsp/device-tree/files directory and add below content.
    / {
    	axidmatest_1: axidmatest@1 {
    		compatible ="xlnx,axi-dma-test-1.00.a";
    		dmas = <&axi_dma_0 0
    		        &axi_dma_0 1>;
    		dma-names = "axidma0", "axidma1";
    	};
    };


  2. Add do_configure_append function in <PATH_TO_YOCTO>/sources/meta-xilinx-tools/recipes-bsp/device-tree/device-tree.bbappend file
    SRC_URI_append_zynqmp = "\
        file://system-user.dtsi \
    "
    
    do_configure_append_zynqmp() {
            if [ -e ${WORKDIR}/system-user.dtsi ]; then
                   cp ${WORKDIR}/system-user.dtsi ${DT_FILES_PATH}/system-user.dtsi
                   echo '/include/ "system-user.dtsi"' >> ${DT_FILES_PATH}/${BASE_DTS}.dts
            fi
    }​
  3. Create a directory linux-xlnx directory, .bbappend and .cfg file in <PATH_TO_YOCTO>/sources/meta-xilinx/meta-xilinx-bsp/recipes-kernel/linux/ 
    $ mkdir -p <PATH_TO_YOCTO>/sources/meta-xilinx/meta-xilinx-bsp/recipes-kernel/linux/linux-xlnx
    $ touch <PATH_TO_YOCTO>/sources/meta-xilinx/meta-xilinx-bsp/recipes-kernel/linux/linux-xlnx.bbappend
    $ touch <PATH_TO_YOCTO>/sources/meta-xilinx/meta-xilinx-bsp/recipes-kernel/linux/linux-xlnx/devtool-fragment.cfg​
  4. Add the DMA test config in <PATH_TO_YOCTO>/sources/meta-xilinx/meta-xilinx-bsp/recipes-kernel/linux/linux-xlnx/devtool-fragment.cfg file
    CONFIG_XILINX_DMATEST=y​
  5. Include the .cfg file in <PATH_TO_YOCTO>/sources/meta-xilinx/meta-xilinx-bsp/recipes-kernel/linux/linux-xlnx.bbappend
    FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
    
    SRC_URI_append = " \
    	file://devtool-fragment.cfg \
    "​
  6. Build the images and now you should see dmatest running.

I tested using your xsa but I see some error. Are you sure with your dma loop back design is correct?

 

 

 

root@zcu106-zynqmp:~#
root@zcu106-zynqmp:~# dmesg | grep -i dma
[    0.000000]   DMA32 zone: 8188 pages used for memmap
[    0.000000]   DMA32 zone: 0 pages reserved
[    0.000000]   DMA32 zone: 524032 pages, LIFO batch:63
[    0.282890] DMA: preallocated 256 KiB pool for atomic allocations
[    3.816185] ps_pcie_dma init()
[    4.345434] xilinx-dpdma fd4c0000.dma: Xilinx DPDMA engine is probed
[    4.352004] xilinx-vdma a0000000.dma: Xilinx AXI DMA Engine Driver Probed!!
[    4.359185] xilinx-zynqmp-dma fd500000.dma: ZynqMP DMA driver Probe success
[    4.366294] xilinx-zynqmp-dma fd510000.dma: ZynqMP DMA driver Probe success
[    4.373397] xilinx-zynqmp-dma fd520000.dma: ZynqMP DMA driver Probe success
[    4.380505] xilinx-zynqmp-dma fd530000.dma: ZynqMP DMA driver Probe success
[    4.387612] xilinx-zynqmp-dma fd540000.dma: ZynqMP DMA driver Probe success
[    4.394714] xilinx-zynqmp-dma fd550000.dma: ZynqMP DMA driver Probe success
[    4.401815] xilinx-zynqmp-dma fd560000.dma: ZynqMP DMA driver Probe success
[    4.408916] xilinx-zynqmp-dma fd570000.dma: ZynqMP DMA driver Probe success
[    4.416094] xilinx-zynqmp-dma ffa80000.dma: ZynqMP DMA driver Probe success
[    4.423196] xilinx-zynqmp-dma ffa90000.dma: ZynqMP DMA driver Probe success
[    4.430300] xilinx-zynqmp-dma ffaa0000.dma: ZynqMP DMA driver Probe success
[    4.437404] xilinx-zynqmp-dma ffab0000.dma: ZynqMP DMA driver Probe success
[    4.444511] xilinx-zynqmp-dma ffac0000.dma: ZynqMP DMA driver Probe success
[    4.451616] xilinx-zynqmp-dma ffad0000.dma: ZynqMP DMA driver Probe success
[    4.458720] xilinx-zynqmp-dma ffae0000.dma: ZynqMP DMA driver Probe success
[    4.465823] xilinx-zynqmp-dma ffaf0000.dma: ZynqMP DMA driver Probe success
[    5.755253] ata1: SATA max UDMA/133 mmio [mem 0xfd0c0000-0xfd0c1fff] port 0x100 irq 40
[    5.763166] ata2: SATA max UDMA/133 mmio [mem 0xfd0c0000-0xfd0c1fff] port 0x180 irq 40
[    6.388530] mmc0: SDHCI controller on ff170000.mmc [ff170000.mmc] using ADMA 64-bit
[    6.397000] dmatest: Started 1 threads using dma1chan0 dma1chan1
[    6.400515] dma1chan0-dma1c: dstbuf[0x21f4] not copied! Expected cf, got 2b
[    6.409948] dma1chan0-dma1c: dstbuf[0x21f5] not copied! Expected ce, got 2a
[    6.416903] dma1chan0-dma1c: dstbuf[0x21f6] not copied! Expected cd, got 29
[    6.423855] dma1chan0-dma1c: dstbuf[0x21f7] not copied! Expected cc, got 28
[    6.430808] dma1chan0-dma1c: dstbuf[0x21f8] not copied! Expected cb, got 27
[    6.437763] dma1chan0-dma1c: dstbuf[0x21f9] not copied! Expected ca, got 26
[    6.444716] dma1chan0-dma1c: dstbuf[0x21fa] not copied! Expected c9, got 25
[    6.451669] dma1chan0-dma1c: dstbuf[0x21fb] not copied! Expected c8, got 24
[    6.458622] dma1chan0-dma1c: dstbuf[0x21fc] not copied! Expected c7, got 23
[    6.465575] dma1chan0-dma1c: dstbuf[0x21fd] not copied! Expected c6, got 22
[    6.472530] dma1chan0-dma1c: dstbuf[0x21fe] not copied! Expected c5, got 21
[    6.479481] dma1chan0-dma1c: dstbuf[0x21ff] not copied! Expected c4, got 20
[    6.486436] dma1chan0-dma1c: dstbuf[0x2200] not copied! Expected c3, got 3f
[    6.493389] dma1chan0-dma1c: dstbuf[0x2201] not copied! Expected c2, got 3e
[    6.500342] dma1chan0-dma1c: dstbuf[0x2202] not copied! Expected c1, got 3d
[    6.507296] dma1chan0-dma1c: dstbuf[0x2203] not copied! Expected c0, got 3c
[    6.514249] dma1chan0-dma1c: dstbuf[0x2204] not copied! Expected df, got 3b
[    6.521202] dma1chan0-dma1c: dstbuf[0x2205] not copied! Expected de, got 3a
[    6.528156] dma1chan0-dma1c: dstbuf[0x2206] not copied! Expected dd, got 39
[    6.535109] dma1chan0-dma1c: dstbuf[0x2207] not copied! Expected dc, got 38
[    6.542062] dma1chan0-dma1c: dstbuf[0x2208] not copied! Expected db, got 37
[    6.549016] dma1chan0-dma1c: dstbuf[0x2209] not copied! Expected da, got 36
[    6.555969] dma1chan0-dma1c: dstbuf[0x220a] not copied! Expected d9, got 35
[    6.562923] dma1chan0-dma1c: dstbuf[0x220b] not copied! Expected d8, got 34
[    6.569876] dma1chan0-dma1c: dstbuf[0x220c] not copied! Expected d7, got 33
[    6.576829] dma1chan0-dma1c: dstbuf[0x220d] not copied! Expected d6, got 32
[    6.583783] dma1chan0-dma1c: dstbuf[0x220e] not copied! Expected d5, got 31
[    6.590738] dma1chan0-dma1c: dstbuf[0x220f] not copied! Expected d4, got 30
[    6.597690] dma1chan0-dma1c: dstbuf[0x2210] not copied! Expected d3, got 2f
[    6.604643] dma1chan0-dma1c: dstbuf[0x2211] not copied! Expected d2, got 2e
[    6.611596] dma1chan0-dma1c: dstbuf[0x2212] not copied! Expected d1, got 2d
[    6.618549] dma1chan0-dma1c: dstbuf[0x2213] not copied! Expected d0, got 2c
[    6.625887] dma1chan0-dma1c: 65688 errors suppressed
[    6.630925] dma1chan0-dma1c: #0: 65720 errors with
[    6.643607] dma1chan0-dma1c: dstbuf[0x19c] not copied! Expected db, got 23
[    6.650486] dma1chan0-dma1c: dstbuf[0x19d] not copied! Expected da, got 22
[    6.657358] dma1chan0-dma1c: dstbuf[0x19e] not copied! Expected d9, got 21
[    6.664224] dma1chan0-dma1c: dstbuf[0x19f] not copied! Expected d8, got 20
[    6.671095] dma1chan0-dma1c: dstbuf[0x1a0] not copied! Expected d7, got 3f
[    6.677961] dma1chan0-dma1c: dstbuf[0x1a1] not copied! Expected d6, got 3e
[    6.684828] dma1chan0-dma1c: dstbuf[0x1a2] not copied! Expected d5, got 3d
[    6.691693] dma1chan0-dma1c: dstbuf[0x1a3] not copied! Expected d4, got 3c
[    6.698561] dma1chan0-dma1c: dstbuf[0x1a4] not copied! Expected d3, got 3b
[    6.705428] dma1chan0-dma1c: dstbuf[0x1a5] not copied! Expected d2, got 3a
[    6.712294] dma1chan0-dma1c: dstbuf[0x1a6] not copied! Expected d1, got 39
[    6.719161] dma1chan0-dma1c: dstbuf[0x1a7] not copied! Expected d0, got 38
[    6.726027] dma1chan0-dma1c: dstbuf[0x1a8] not copied! Expected cf, got 37
[    6.732894] dma1chan0-dma1c: dstbuf[0x1a9] not copied! Expected ce, got 36
[    6.739760] dma1chan0-dma1c: dstbuf[0x1aa] not copied! Expected cd, got 35
[    6.746628] dma1chan0-dma1c: dstbuf[0x1ab] not copied! Expected cc, got 34
[    6.753495] dma1chan0-dma1c: dstbuf[0x1ac] not copied! Expected cb, got 33
[    6.760360] dma1chan0-dma1c: dstbuf[0x1ad] not copied! Expected ca, got 32
[    6.767226] dma1chan0-dma1c: dstbuf[0x1ae] not copied! Expected c9, got 31
[    6.774095] dma1chan0-dma1c: dstbuf[0x1af] not copied! Expected c8, got 30
[    6.780960] dma1chan0-dma1c: dstbuf[0x1b0] not copied! Expected c7, got 2f
[    6.787827] dma1chan0-dma1c: dstbuf[0x1b1] not copied! Expected c6, got 2e
[    6.794693] dma1chan0-dma1c: dstbuf[0x1b2] not copied! Expected c5, got 2d
[    6.801560] dma1chan0-dma1c: dstbuf[0x1b3] not copied! Expected c4, got 2c
[    6.808426] dma1chan0-dma1c: dstbuf[0x1b4] not copied! Expected c3, got 2b
[    6.808431] dma1chan0-dma1c: dstbuf[0x1b5] not copied! Expected c2, got 2a
[    6.826682] dma1chan0-dma1c: dstbuf[0x1b6] not copied! Expected c1, got 29
[    6.833549] dma1chan0-dma1c: dstbuf[0x1b7] not copied! Expected c0, got 28
[    6.840415] dma1chan0-dma1c: dstbuf[0x1b8] not copied! Expected df, got 27
[    6.847285] dma1chan0-dma1c: dstbuf[0x1b9] not copied! Expected de, got 26
[    6.854148] dma1chan0-dma1c: dstbuf[0x1ba] not copied! Expected dd, got 25
[    6.861015] dma1chan0-dma1c: dstbuf[0x1bb] not copied! Expected dc, got 24
[    6.868390] dma1chan0-dma1c: 87008 errors suppressed
[    6.873885] dma1chan0-dma1c: #1: 87040 errors with
[    6.886728] dma1chan0-dma1c: dstbuf[0x16ac] not copied! Expected cb, got 33
[    6.893684] dma1chan0-dma1c: dstbuf[0x16ad] not copied! Expected ca, got 32
[    6.900635] dma1chan0-dma1c: dstbuf[0x16ae] not copied! Expected c9, got 31
[    6.907594] dma1chan0-dma1c: dstbuf[0x16af] not copied! Expected c8, got 30
[    6.914550] dma1chan0-dma1c: dstbuf[0x16b0] not copied! Expected c7, got 2f
[    6.921503] dma1chan0-dma1c: dstbuf[0x16b1] not copied! Expected c6, got 2e
[    6.928457] dma1chan0-dma1c: dstbuf[0x16b2] not copied! Expected c5, got 2d
[    6.935410] dma1chan0-dma1c: dstbuf[0x16b3] not copied! Expected c4, got 2c
[    6.942363] dma1chan0-dma1c: dstbuf[0x16b4] not copied! Expected c3, got 2b
[    6.949317] dma1chan0-dma1c: dstbuf[0x16b5] not copied! Expected c2, got 2a
[    6.956269] dma1chan0-dma1c: dstbuf[0x16b6] not copied! Expected c1, got 29
[    6.963224] dma1chan0-dma1c: dstbuf[0x16b7] not copied! Expected c0, got 28
[    6.970177] dma1chan0-dma1c: dstbuf[0x16b8] not copied! Expected df, got 27
[    6.977130] dma1chan0-dma1c: dstbuf[0x16b9] not copied! Expected de, got 26
[    6.984084] dma1chan0-dma1c: dstbuf[0x16ba] not copied! Expected dd, got 25
[    6.991039] dma1chan0-dma1c: dstbuf[0x16bb] not copied! Expected dc, got 24
[    6.997990] dma1chan0-dma1c: dstbuf[0x16bc] not copied! Expected db, got 23
[    7.004944] dma1chan0-dma1c: dstbuf[0x16bd] not copied! Expected da, got 22
[    7.011897] dma1chan0-dma1c: dstbuf[0x16be] not copied! Expected d9, got 21
[    7.018850] dma1chan0-dma1c: dstbuf[0x16bf] not copied! Expected d8, got 20
[    7.025804] dma1chan0-dma1c: dstbuf[0x16c0] not copied! Expected d7, got 3f
[    7.032757] dma1chan0-dma1c: dstbuf[0x16c1] not copied! Expected d6, got 3e
[    7.039711] dma1chan0-dma1c: dstbuf[0x16c2] not copied! Expected d5, got 3d
[    7.046664] dma1chan0-dma1c: dstbuf[0x16c3] not copied! Expected d4, got 3c
[    7.053617] dma1chan0-dma1c: dstbuf[0x16c4] not copied! Expected d3, got 3b
[    7.060570] dma1chan0-dma1c: dstbuf[0x16c5] not copied! Expected d2, got 3a
[    7.067525] dma1chan0-dma1c: dstbuf[0x16c6] not copied! Expected d1, got 39
[    7.074477] dma1chan0-dma1c: dstbuf[0x16c7] not copied! Expected d0, got 38
[    7.081431] dma1chan0-dma1c: dstbuf[0x16c8] not copied! Expected cf, got 37
[    7.088384] dma1chan0-dma1c: dstbuf[0x16c9] not copied! Expected ce, got 36
[    7.095337] dma1chan0-dma1c: dstbuf[0x16ca] not copied! Expected cd, got 35
[    7.102291] dma1chan0-dma1c: dstbuf[0x16cb] not copied! Expected cc, got 34
[    7.109488] dma1chan0-dma1c: 41168 errors suppressed
[    7.114920] dma1chan0-dma1c: #2: 41200 errors with
[    7.127688] dma1chan0-dma1c: dstbuf[0x34c] not copied! Expected d3, got 33
[    7.134560] dma1chan0-dma1c: dstbuf[0x34d] not copied! Expected d2, got 32
[    7.141425] dma1chan0-dma1c: dstbuf[0x34e] not copied! Expected d1, got 31
[    7.148294] dma1chan0-dma1c: dstbuf[0x34f] not copied! Expected d0, got 30
[    7.155158] dma1chan0-dma1c: dstbuf[0x350] not copied! Expected cf, got 2f
[    7.162024] dma1chan0-dma1c: dstbuf[0x351] not copied! Expected ce, got 2e
[    7.168891] dma1chan0-dma1c: dstbuf[0x352] not copied! Expected cd, got 2d
[    7.175757] dma1chan0-dma1c: dstbuf[0x353] not copied! Expected cc, got 2c
[    7.182624] dma1chan0-dma1c: dstbuf[0x354] not copied! Expected cb, got 2b
[    7.189490] dma1chan0-dma1c: dstbuf[0x355] not copied! Expected ca, got 2a
[    7.196357] dma1chan0-dma1c: dstbuf[0x356] not copied! Expected c9, got 29
[    7.203224] dma1chan0-dma1c: dstbuf[0x357] not copied! Expected c8, got 28
[    7.210090] dma1chan0-dma1c: dstbuf[0x358] not copied! Expected c7, got 27
[    7.216957] dma1chan0-dma1c: dstbuf[0x359] not copied! Expected c6, got 26
[    7.223823] dma1chan0-dma1c: dstbuf[0x35a] not copied! Expected c5, got 25
[    7.230690] dma1chan0-dma1c: dstbuf[0x35b] not copied! Expected c4, got 24
[    7.237557] dma1chan0-dma1c: dstbuf[0x35c] not copied! Expected c3, got 23
[    7.244423] dma1chan0-dma1c: dstbuf[0x35d] not copied! Expected c2, got 22
[    7.251293] dma1chan0-dma1c: dstbuf[0x35e] not copied! Expected c1, got 21
[    7.258157] dma1chan0-dma1c: dstbuf[0x35f] not copied! Expected c0, got 20
[    7.265023] dma1chan0-dma1c: dstbuf[0x360] not copied! Expected df, got 3f
[    7.271889] dma1chan0-dma1c: dstbuf[0x361] not copied! Expected de, got 3e
[    7.278756] dma1chan0-dma1c: dstbuf[0x362] not copied! Expected dd, got 3d
[    7.285622] dma1chan0-dma1c: dstbuf[0x363] not copied! Expected dc, got 3c
[    7.292489] dma1chan0-dma1c: dstbuf[0x364] not copied! Expected db, got 3b
[    7.299355] dma1chan0-dma1c: dstbuf[0x365] not copied! Expected da, got 3a
[    7.306222] dma1chan0-dma1c: dstbuf[0x366] not copied! Expected d9, got 39
[    7.313089] dma1chan0-dma1c: dstbuf[0x367] not copied! Expected d8, got 38
[    7.319955] dma1chan0-dma1c: dstbuf[0x368] not copied! Expected d7, got 37
[    7.326822] dma1chan0-dma1c: dstbuf[0x369] not copied! Expected d6, got 36
[    7.333687] dma1chan0-dma1c: dstbuf[0x36a] not copied! Expected d5, got 35
[    7.340555] dma1chan0-dma1c: dstbuf[0x36b] not copied! Expected d4, got 34
[    7.348201] dma1chan0-dma1c: 133448 errors suppressed
[    7.353408] dma1chan0-dma1c: #3: 133480 errors with
[    7.366335] dma1chan0-dma1c: dstbuf[0x15cc] not copied! Expected c3, got 33
[    7.373294] dma1chan0-dma1c: dstbuf[0x15cd] not copied! Expected c2, got 32
[    7.380245] dma1chan0-dma1c: dstbuf[0x15ce] not copied! Expected c1, got 31
[    7.387198] dma1chan0-dma1c: dstbuf[0x15cf] not copied! Expected c0, got 30
[    7.394150] dma1chan0-dma1c: dstbuf[0x15d0] not copied! Expected df, got 2f
[    7.401104] dma1chan0-dma1c: dstbuf[0x15d1] not copied! Expected de, got 2e
[    7.408057] dma1chan0-dma1c: dstbuf[0x15d2] not copied! Expected dd, got 2d
[    7.415013] dma1chan0-dma1c: dstbuf[0x15d3] not copied! Expected dc, got 2c
[    7.421964] dma1chan0-dma1c: dstbuf[0x15d4] not copied! Expected db, got 2b
[    7.428917] dma1chan0-dma1c: dstbuf[0x15d5] not copied! Expected da, got 2a
[    7.435870] dma1chan0-dma1c: dstbuf[0x15d6] not copied! Expected d9, got 29
[    7.442824] dma1chan0-dma1c: dstbuf[0x15d7] not copied! Expected d8, got 28
[    7.449777] dma1chan0-dma1c: dstbuf[0x15d8] not copied! Expected d7, got 27
[    7.456731] dma1chan0-dma1c: dstbuf[0x15d9] not copied! Expected d6, got 26
[    7.463684] dma1chan0-dma1c: dstbuf[0x15da] not copied! Expected d5, got 25
[    7.470639] dma1chan0-dma1c: dstbuf[0x15db] not copied! Expected d4, got 24
[    7.477590] dma1chan0-dma1c: dstbuf[0x15dc] not copied! Expected d3, got 23
[    7.484545] dma1chan0-dma1c: dstbuf[0x15dd] not copied! Expected d2, got 22
[    7.491500] dma1chan0-dma1c: dstbuf[0x15de] not copied! Expected d1, got 21
[    7.498452] dma1chan0-dma1c: dstbuf[0x15df] not copied! Expected d0, got 20
[    7.505404] dma1chan0-dma1c: dstbuf[0x15e0] not copied! Expected cf, got 3f
[    7.512364] dma1chan0-dma1c: dstbuf[0x15e1] not copied! Expected ce, got 3e
[    7.519321] dma1chan0-dma1c: dstbuf[0x15e2] not copied! Expected cd, got 3d
[    7.526273] dma1chan0-dma1c: dstbuf[0x15e3] not copied! Expected cc, got 3c
[    7.533226] dma1chan0-dma1c: dstbuf[0x15e4] not copied! Expected cb, got 3b
[    7.540179] dma1chan0-dma1c: dstbuf[0x15e5] not copied! Expected ca, got 3a
[    7.547133] dma1chan0-dma1c: dstbuf[0x15e6] not copied! Expected c9, got 39
[    7.554087] dma1chan0-dma1c: dstbuf[0x15e7] not copied! Expected c8, got 38
[    7.561040] dma1chan0-dma1c: dstbuf[0x15e8] not copied! Expected c7, got 37
[    7.567993] dma1chan0-dma1c: dstbuf[0x15e9] not copied! Expected c6, got 36
[    7.574947] dma1chan0-dma1c: dstbuf[0x15ea] not copied! Expected c5, got 35
[    7.581903] dma1chan0-dma1c: dstbuf[0x15eb] not copied! Expected c4, got 34
[    7.589346] dma1chan0-dma1c: 84088 errors suppressed
[    7.594482] dma1chan0-dma1c: #4: 84120 errors with
[    7.604235] dma1chan0-dma1c: terminating after 5 tests, 5 failures 99 iops 794 KB/s (status 0)
[    8.246435] dmaproxy: loading out-of-tree module taints kernel.
root@zcu106-zynqmp:~#

 

 

 

 

Thanks,
Sandeep
PetaLinux Yocto | Embedded SW Support

---------------------------------------------------------------------------
Don’t forget to Reply, Kudo, and Accept as Solution.
---------------------------------------------------------------------------
0 Kudos
chintan_bl
Contributor
Contributor
1,533 Views
Registered: ‎04-20-2020

Hi @sandeepg 

Thanks for your detailed instructions - very helpful.

When I do everything you instructed, I see this error.

 

Subprocess output:
Error: /ryftone/chintan/darpa/gr-zcu106/build/tmp/work/zcu106_zynqmp-xilinx-linux/device-tree/xilinx-v2020.1+gitAUTOINC+bc84458333-r0/build/device-tree/.dts:2.29-3.1 syntax error
FATAL ERROR: Unable to parse input tree

I have attached the error log file. Changing the contents of system-user.dtsi to a different dt binding (e.g the one of AXI DMA on the Soft DMA Wiki page) still gives the same error.

Also, on a different note I do see a warning message also:

WARNING: No recipes available for:
/ryftone/chintan/darpa/gr-zcu106/build/sources/core/../meta-xilinx/meta-xilinx-bsp/recipes-kernel/linux/linux-xlnx.bbappend

Let me know if you need any other information.

Chintan

0 Kudos
sandeepg
Moderator
Moderator
1,517 Views
Registered: ‎04-24-2017

Hi @chintan_bl ,

This error doesn't make sense, are you sure you have wired up with all the recipes?

Error: /ryftone/chintan/darpa/gr-zcu106/build/tmp/work/zcu106_zynqmp-xilinx-linux/device-tree/xilinx-v2020.1+gitAUTOINC+bc84458333-r0/build/device-tree/.dts:2.29-3.1 syntax error
Thanks,
Sandeep
PetaLinux Yocto | Embedded SW Support

---------------------------------------------------------------------------
Don’t forget to Reply, Kudo, and Accept as Solution.
---------------------------------------------------------------------------
0 Kudos
chintan_bl
Contributor
Contributor
1,335 Views
Registered: ‎04-20-2020

Hi @sandeepg ,

I think I have the recipes correct. I re-checked and I am following your instructions correctly, but get the same error which is related to adding the system-user.dtsi

I tried a few other things like changing the content of the system-user.dtsi file to a dummy/blank file, placing the system-user.dtsi file at meta-xilinx/meta-xilinx-bsp/recipes-bsp/device-tree/files and changed the .bbappend file to point to it, but no matter what I get the same error.

 

Thoughts?

 

0 Kudos
chintan_bl
Contributor
Contributor
1,269 Views
Registered: ‎04-20-2020

Hi @sandeepg ,

The device tree error happens in the following file: /core/meta/classes/devicetree.bbclass at line 121: python devicetree_do_compile(). As I mentioned earlier, irrespective of the contents of the system-user.dtsi file I see the errors.

I did notice that my device tree version is 1-4-0. I can't upgrade to more recent version using sudo-apt (probably because of Ubuntu version on build machine). Could an older device tree compiler explain what I am seeing?

Thanks

Chintan

0 Kudos
sandeepg
Moderator
Moderator
1,184 Views
Registered: ‎04-24-2017

Hi @chintan_bl ,

Looks like there is some confusion I shared the recipes for 2020.2 release when I looked at your files you were using 2020.1, Let me send you 2020.1 files.

Thanks,
Sandeep
PetaLinux Yocto | Embedded SW Support

---------------------------------------------------------------------------
Don’t forget to Reply, Kudo, and Accept as Solution.
---------------------------------------------------------------------------
0 Kudos
sandeepg
Moderator
Moderator
1,070 Views
Registered: ‎04-24-2017

Hi @chintan_bl 

Update do_configure_append function in <PATH_TO_YOCTO>/sources/meta-xilinx-tools/recipes-bsp/device-tree/device-tree.bbappend file

 

SRC_URI_append_zcu106-zynqmp = "\
    file://system-user.dtsi \
"

do_configure_append_zcu106-zynqmp() {
        if [ -e ${WORKDIR}/system-user.dtsi ]; then
               cp ${WORKDIR}/system-user.dtsi ${DT_FILES_PATH}/system-user.dtsi
               echo '/include/ "system-user.dtsi"' >> ${DT_FILES_PATH}/system-top.dts
        fi
}

 

 

Clean the device-tree sstate cache and rebuild it.

 

$ bitbake device-tree -c cleanall; bitbake device-tree

 

 

Thanks,
Sandeep
PetaLinux Yocto | Embedded SW Support

---------------------------------------------------------------------------
Don’t forget to Reply, Kudo, and Accept as Solution.
---------------------------------------------------------------------------
0 Kudos
chintan_bl
Contributor
Contributor
1,047 Views
Registered: ‎04-20-2020

Hi @sandeepg ,

 

Thanks for the updates. I also had to change the llinux-xlnx.bbappend to linux-xlnx_2020.1.bbappend. After these changes, Yocto build suceeds without failures. On the board, I see that the dmatest driver is loaded at start up.

dmatest: Started 1 threads using dma1chan0 dma1chan1
[ 22.734156] xilinx-vdma a0000000.dma: Channel (____ptrval____) has errors 40, cdr 50c78000 tdr 50c78500
[ 22.786389] mmc0: new high speed SDHC card at address aaaa
[ 22.792261] mmcblk0: mmc0:aaaa SB16G 14.8 GiB
[ 22.801026] mmcblk0: p1
[ 23.124961] [drm] Cannot find any crtc or sizes
[ 54.248951] dma1chan0-dma1c: #0: tx test timed out
[ 84.968949] dma1chan0-dma1c: #1: tx test timed out
[ 115.688948] dma1chan0-dma1c: #2: tx test timed out
[ 146.408949] dma1chan0-dma1c: #3: tx test timed out
[ 177.128948] dma1chan0-dma1c: #4: tx test timed out

177.133744] dma1chan0-dma1c: terminating after 5 tests, 5 failures 0 iops 0 KB/s (status 0)
[ 177.144847] input: gpio-keys as /devices/platform/gpio-keys/input/input0

I will look at my PL AXI DMA loopback. 

So, the problem is not fully solved, but I am past the yocto build errors.

 

Thanks,

Chintan

 

 

 

0 Kudos
sandeepg
Moderator
Moderator
1,040 Views
Registered: ‎04-24-2017

Hi @chintan_bl ,

You opened a thread on build issues which is fixed. You need to fix the vivado design to make it to work. I do have a design for zcu102 board with 2019.1 but I'm not a vivado expert, I will upgrade to 2020.1 and see how it goes with Yocto.

Thanks,
Sandeep
PetaLinux Yocto | Embedded SW Support

---------------------------------------------------------------------------
Don’t forget to Reply, Kudo, and Accept as Solution.
---------------------------------------------------------------------------
0 Kudos
chintan_bl
Contributor
Contributor
1,039 Views
Registered: ‎04-20-2020

Agreed. I will mark as accept as solution. 

Can you send me the zcu102 design vivado design? I can use that as a reference to check my settings in the PL

Chintan

View solution in original post

0 Kudos
sandeepg
Moderator
Moderator
991 Views
Registered: ‎04-24-2017

Hi @chintan_bl ,

Attached one for ZCU102 board. Once driver is up and running it check for dmatest in dmesg, which confirms dma loop back is working.

root@zcu102-zynqmp:~# zcat /proc/config.gz | grep -i xilinx_dma
CONFIG_XILINX_DMA=y
CONFIG_XILINX_DMA_ENGINES=y
CONFIG_XILINX_DMATEST=y
root@zcu102-zynqmp:~#
root@zcu102-zynqmp:~# dmesg | grep -i dma
[    0.000000]   DMA32 zone: 8188 pages used for memmap
[    0.000000]   DMA32 zone: 0 pages reserved
[    0.000000]   DMA32 zone: 524032 pages, LIFO batch:63
[    0.279161] DMA: preallocated 256 KiB pool for atomic allocations
[    4.106901] xilinx-dpdma fd4c0000.dma: Xilinx DPDMA engine is probed
[    4.113341] xilinx-vdma a0002000.dma: Please ensure that IP supports buffer length > 23 bits
[    4.121905] xilinx-vdma a0002000.dma: Xilinx AXI DMA Engine Driver Probed!!
[    4.129079] xilinx-zynqmp-dma fd500000.dma: ZynqMP DMA driver Probe success
[    4.136180] xilinx-zynqmp-dma fd510000.dma: ZynqMP DMA driver Probe success
[    4.143283] xilinx-zynqmp-dma fd520000.dma: ZynqMP DMA driver Probe success
[    4.150385] xilinx-zynqmp-dma fd530000.dma: ZynqMP DMA driver Probe success
[    4.157483] xilinx-zynqmp-dma fd540000.dma: ZynqMP DMA driver Probe success
[    4.164586] xilinx-zynqmp-dma fd550000.dma: ZynqMP DMA driver Probe success
[    4.171688] xilinx-zynqmp-dma fd560000.dma: ZynqMP DMA driver Probe success
[    4.178792] xilinx-zynqmp-dma fd570000.dma: ZynqMP DMA driver Probe success
[    4.185958] xilinx-zynqmp-dma ffa80000.dma: ZynqMP DMA driver Probe success
[    4.193063] xilinx-zynqmp-dma ffa90000.dma: ZynqMP DMA driver Probe success
[    4.200161] xilinx-zynqmp-dma ffaa0000.dma: ZynqMP DMA driver Probe success
[    4.207264] xilinx-zynqmp-dma ffab0000.dma: ZynqMP DMA driver Probe success
[    4.214359] xilinx-zynqmp-dma ffac0000.dma: ZynqMP DMA driver Probe success
[    4.221460] xilinx-zynqmp-dma ffad0000.dma: ZynqMP DMA driver Probe success
[    4.228570] xilinx-zynqmp-dma ffae0000.dma: ZynqMP DMA driver Probe success
[    4.235669] xilinx-zynqmp-dma ffaf0000.dma: ZynqMP DMA driver Probe success
[    5.505211] ata1: SATA max UDMA/133 mmio [mem 0xfd0c0000-0xfd0c1fff] port 0x100 irq 45
[    5.513120] ata2: SATA max UDMA/133 mmio [mem 0xfd0c0000-0xfd0c1fff] port 0x180 irq 45
[    6.177930] mmc0: SDHCI controller on ff170000.mmc [ff170000.mmc] using ADMA 64-bit
[    6.186290] dmatest: Started 1 threads using dma1chan0 dma1chan1
[    6.206668] dma1chan0-dma1c: terminating after 5 tests, 0 failures 2360 iops 27384 KB/s (status 0)
root@zcu102-zynqmp:~#
Thanks,
Sandeep
PetaLinux Yocto | Embedded SW Support

---------------------------------------------------------------------------
Don’t forget to Reply, Kudo, and Accept as Solution.
---------------------------------------------------------------------------
0 Kudos
chintan_bl
Contributor
Contributor
573 Views
Registered: ‎04-20-2020

Hi @sandeepg @stephenm ,

If I add a second DMA engine in the PL, what changes to do I need to make to let software do data transfer using both DMA engines. Currently, we have a loop back test working for one DMA engine using the user space dma proxy test code which creates a tx and rx character device for one DMA engine. For the second engine, I would think the end reult would want a second pair of tx and rx character devices to be created. But for that, do I just change the device tree or is there more needed?

 

Thanks,

Chintan

 

 

0 Kudos