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!

Patch to run SDAccel 2018.2 on Ubuntu 18.xx

Reply
Highlighted
Contributor
Posts: 44
Registered: ‎02-16-2017

Patch to run SDAccel 2018.2 on Ubuntu 18.xx

Hi all,

 

When installing our VCU1525, we ran into a problem with the Linux kernel of Ubuntu 16.xx (unrelated to the FPGA), and thus decided to install 18.04 instead.

This fixed the initial problem, but we ran into compilation issues with the xocl kernel driver due to deprecated and changed functions in the Linux kernel.

 

In case anyone is interested, I managed to compile and run the verification kernel with the following patch:

 

 

diff -r driver/xclng/drm/xocl/lib/libqdma/qdma_mbox.c driver_old/xclng/drm/xocl/lib/libqdma/qdma_mbox.c
215c215
< static void qdma_mbox_proc(struct timer_list *arg /* unsigned long arg */)
---
> static void qdma_mbox_proc(unsigned long arg)
324c324
< static void qdma_mbox_proc(struct timer_list *arg /* unsigned long arg */)
---
> static void qdma_mbox_proc(unsigned long arg)
498,500c498,499
<       timer_setup(timer, timer->function, 0);
<       /* init_timer(timer); */
<       /* timer->data = (unsigned long)xdev; */
---
>       init_timer(timer);
>       timer->data = (unsigned long)xdev;
diff -r driver/xclng/drm/xocl/userpf/xocl_bo.c driver_old/xclng/drm/xocl/userpf/xocl_bo.c
117c117
<                       release_pages(xobj->pages, npages/*, 0*/);
---
>                       release_pages(xobj->pages, npages, 0);
1101c1101
<       release_pages(unmgd->pages, unmgd->npages/*, 0*/);
---
>       release_pages(unmgd->pages, unmgd->npages, 0);
1114c1114
<       release_pages(unmgd->pages, unmgd->npages/*, 0*/);
---
>       release_pages(unmgd->pages, unmgd->npages, 0);
diff -r driver/xclng/drm/xocl/userpf/xocl_drm.c driver_old/xclng/drm/xocl/userpf/xocl_drm.c
279,281c279,281
< /* #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 18, 0) */
< /*    .set_busid                      = drm_pci_set_busid, */
< /* #endif */
---
> #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 18, 0)
>       .set_busid                      = drm_pci_set_busid,
> #endif

 

 

I'm by no means convinced that this is correct (the cast from struct timer_list* to struct xlnx_dma_dev* seems very dubious), but at least the verification kernel runs successfully (any insight on this would be appreciated).

Moderator
Posts: 479
Registered: ‎11-04-2010

Re: Patch to run SDAccel 2018.2 on Ubuntu 18.xx

Ubuntu 18.xx is not a supported operating system for SDAccel 2018.2.
-------------------------------------------------------------------------
Don't forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
Contributor
Posts: 44
Registered: ‎02-16-2017

Re: Patch to run SDAccel 2018.2 on Ubuntu 18.xx

That's exactly the point :-)

 

These small changes were sufficient to compile the kernel driver with the Linux kernel used by Ubuntu 18.xx.

Contributor
Posts: 44
Registered: ‎02-16-2017

Re: Patch to run SDAccel 2018.2 on Ubuntu 18.xx

I can confirm that this works with the vadd and gmem_2banks_c samples from the SDAccel examples repository.

Newbie
Posts: 3
Registered: ‎06-14-2018

Re: Patch to run SDAccel 2018.2 on Ubuntu 18.xx

Just to add that latest ubuntu 1604 LTS also requires this patch to compile driver.

Moderator
Posts: 479
Registered: ‎11-04-2010

Re: Patch to run SDAccel 2018.2 on Ubuntu 18.xx

In the new release of SDx, Ubuntu 18.xx will be supported.

-------------------------------------------------------------------------
Don't forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------