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
Adventurer
Adventurer
858 Views

Patch to run SDAccel 2018.2 on Ubuntu 18.xx

Jump to solution

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).

1 Solution

Accepted Solutions
Moderator
Moderator
831 Views

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

Jump to solution
Ubuntu 18.xx is not a supported operating system for SDAccel 2018.2.
-------------------------------------------------------------------------
Don't forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
0 Kudos
7 Replies
Moderator
Moderator
832 Views

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

Jump to solution
Ubuntu 18.xx is not a supported operating system for SDAccel 2018.2.
-------------------------------------------------------------------------
Don't forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
0 Kudos
Adventurer
Adventurer
814 Views

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

Jump to solution

That's exactly the point :-)

 

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

0 Kudos
Adventurer
Adventurer
806 Views

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

Jump to solution

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

0 Kudos
759 Views

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

Jump to solution

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

Moderator
Moderator
696 Views

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

Jump to solution

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

-------------------------------------------------------------------------
Don't forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
0 Kudos
Observer yanhan
Observer
423 Views

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

Jump to solution

This patch is also worked on ubuntu 16.04.5 LTS. 

0 Kudos
Adventurer
Adventurer
410 Views

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

Jump to solution

Thanks for the heads up!

0 Kudos