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: 
Highlighted
Newbie sohu_wj
Newbie
8,554 Views
Registered: ‎06-05-2015

DMA module compilation

Jump to solution

Hi,

 

I'm currently running a Debian LInux on my Zynq ZC706. I've already made a bare-metal program which configures DMAs on PL, and now I'm trying to migrating this design into Linux system. But I got totally lost in this part. 

 

I found two designs from Github:

1.https://github.com/dhytxz/zynq-linux-dma

2.https://github.com/bmartini/zynq-xdma

 

The first demo uses PetaLinux to compile the DMA device module, however, I just found that the kernel version running on my board is different from those of PetaLinux.

The uImage of my system is based on this one:

https://github.com/analogdevicesinc/linux.git

And the version is 3.18.0, which is different from the kernel version of PetaLinux.

Therefore, I wrote a simple Makefile in my Linux directory to compile the dma.c, but got some errors indicating the missing of XILINX_DMA_DEVICE_ID_SHIFT. I modified the .c file to add in the code defining this parameter as 28 (I copied this one from https://github.com/Xilinx/linux-xlnx/blob/master/include/linux/amba/xilinx_dma.h) and passed the compilation of .ko file, but failed when using the insmod on my Zynq device.

 

I got the same error message for the second design.  Could anyone offer me some help on this problem? Thanks a lot!

 

Best Regards,

Jay

 

 

 

 

 

0 Kudos
1 Solution

Accepted Solutions
Newbie sohu_wj
Newbie
15,756 Views
Registered: ‎06-05-2015

Re: DMA module compilation

Jump to solution

Hi,

 

I've solved this problem by replacing the Linux kernel. I used the kernel files from Xilinx and it now works. Thanks!

 

Best,

Jay

0 Kudos
4 Replies
8,540 Views
Registered: ‎03-27-2014

Re: DMA module compilation

Jump to solution
git clone https://github.com/analogdevicesinc/linux.git
cd linux
make menuconfig
-> device drivers
-> [*] DMA Engine support
[*] Xilinx DMA Engines

this should cause the xilinx dma modules to be compiled.As for the compilation error, I doubt the kernel version is the problem. A #include is probably missing.

 

 

 

G.W.,
NIST - Time Frequency metrology
0 Kudos
Newbie sohu_wj
Newbie
8,524 Views
Registered: ‎06-05-2015

Re: DMA module compilation

Jump to solution

Hi,

 

Thanks. I checked this, and my kernel has already included the Xilinx DMA driver. I just downloaded the 3.15 Linux Kernel from Xilinx, and I'm working on compiling it to make a new uImage instead of my old one. I'll update the progress and post here.

 

Regards,

Jay 

0 Kudos
Newbie sohu_wj
Newbie
15,757 Views
Registered: ‎06-05-2015

Re: DMA module compilation

Jump to solution

Hi,

 

I've solved this problem by replacing the Linux kernel. I used the kernel files from Xilinx and it now works. Thanks!

 

Best,

Jay

0 Kudos
Visitor kate_sch
Visitor
7,813 Views
Registered: ‎07-13-2015

Re: DMA module compilation

Jump to solution

Hi Jay,

 

in your first msg you sad, you run Debian Linux on zc706.

May i ask you where did you find Debian for Zynq??? (maybe some links)

 

Thanks!

Kate

0 Kudos