cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Adventurer
Adventurer
3,092 Views
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).

7 Replies
Highlighted
Moderator
Moderator
3,065 Views
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.
-------------------------------------------------------------------------
0 Kudos
Highlighted
Adventurer
Adventurer
3,048 Views
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.

0 Kudos
Highlighted
Adventurer
Adventurer
3,040 Views
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.

0 Kudos
Highlighted
2,993 Views
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.

Highlighted
Moderator
Moderator
2,930 Views
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.
-------------------------------------------------------------------------
0 Kudos
Highlighted
Contributor
Contributor
2,657 Views
Registered: ‎05-11-2018

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

This patch is also worked on ubuntu 16.04.5 LTS. 

0 Kudos
Highlighted
Adventurer
Adventurer
2,644 Views
Registered: ‎02-16-2017

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

Thanks for the heads up!

0 Kudos