cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
elkfrawy
Visitor
Visitor
3,095 Views
Registered: ‎09-14-2018

Install Board Driver for VCU1525

Hi everyone,

 

We have Xilinx Virtex UltraScale+ FPGA VCU1525 (https://www.xilinx.com/products/boards-and-kits/vcu1525-a.html). While I was trying to install its driver on Ubuntu 16.04.5 according to the instructions in Here, I got errors with the following output at "sudo ./install.sh -f yes" step:

INFO: Installing firmware for FPGA devices
Found hal zip..ignoring
/tmp/19809/0
Archive:  xocl.zip
  inflating: driver/xclng/drm/xocl/mgmtpf/mgmt-core.c  
  inflating: driver/xclng/drm/xocl/mgmtpf/mgmt-cw.c  
  inflating: driver/xclng/drm/xocl/mgmtpf/mgmt-utils.c  
  inflating: driver/xclng/drm/xocl/mgmtpf/mgmt-ioctl.c  
  inflating: driver/xclng/drm/xocl/mgmtpf/mgmt-sysfs.c  
  inflating: driver/xclng/drm/xocl/mgmtpf/mgmt-core.h  
  inflating: driver/xclng/drm/xocl/mgmtpf/10-xclmgmt.rules  
  inflating: driver/xclng/drm/xocl/mgmtpf/Makefile  
  inflating: driver/xclng/drm/xocl/xocl_drv.h  
  inflating: driver/xclng/drm/xocl/xocl_subdev.c  
  inflating: driver/xclng/drm/xocl/xocl_subdev.h  
  inflating: driver/xclng/drm/xocl/xocl_ctx.c  
  inflating: driver/xclng/drm/xocl/xocl_thread.c  
  inflating: driver/xclng/drm/xocl/xocl_test.c  
  inflating: driver/xclng/drm/xocl/userpf/xdma.c  
  inflating: driver/xclng/drm/xocl/userpf/qdma.c  
  inflating: driver/xclng/drm/xocl/userpf/common.h  
  inflating: driver/xclng/drm/xocl/userpf/xocl_bo.c  
  inflating: driver/xclng/drm/xocl/userpf/xocl_bo.h  
  inflating: driver/xclng/drm/xocl/userpf/xocl_drm.c  
  inflating: driver/xclng/drm/xocl/userpf/xocl_drm.h  
  inflating: driver/xclng/drm/xocl/userpf/xocl_ioctl.c  
  inflating: driver/xclng/drm/xocl/userpf/xocl_sysfs.c  
  inflating: driver/xclng/drm/xocl/userpf/xocl_drv.c  
  inflating: driver/xclng/drm/xocl/userpf/10-xocl.rules  
  inflating: driver/xclng/drm/xocl/userpf/Makefile  
  inflating: driver/xclng/drm/xocl/lib/libxdma.c  
  inflating: driver/xclng/drm/xocl/lib/libxdma.h  
  inflating: driver/xclng/drm/xocl/lib/cdev_sgdma.h  
  inflating: driver/xclng/drm/xocl/lib/libxdma_api.h  
  inflating: driver/xclng/drm/xocl/lib/Makefile.in  
  inflating: driver/xclng/drm/xocl/lib/libqdma/libqdma_export.h  
  inflating: driver/xclng/drm/xocl/lib/libqdma/libqdma_export.c  
  inflating: driver/xclng/drm/xocl/lib/libqdma/qdma_descq.c  
  inflating: driver/xclng/drm/xocl/lib/libqdma/qdma_descq.h  
  inflating: driver/xclng/drm/xocl/lib/libqdma/qdma_device.c  
  inflating: driver/xclng/drm/xocl/lib/libqdma/qdma_device.h  
  inflating: driver/xclng/drm/xocl/lib/libqdma/qdma_intr.c  
  inflating: driver/xclng/drm/xocl/lib/libqdma/qdma_intr.h  
  inflating: driver/xclng/drm/xocl/lib/libqdma/qdma_context.c  
  inflating: driver/xclng/drm/xocl/lib/libqdma/qdma_context.h  
  inflating: driver/xclng/drm/xocl/lib/libqdma/qdma_mbox.c  
  inflating: driver/xclng/drm/xocl/lib/libqdma/qdma_mbox.h  
  inflating: driver/xclng/drm/xocl/lib/libqdma/qdma_sriov.c  
  inflating: driver/xclng/drm/xocl/lib/libqdma/thread.c  
  inflating: driver/xclng/drm/xocl/lib/libqdma/thread.h  
  inflating: driver/xclng/drm/xocl/lib/libqdma/qdma_thread.c  
  inflating: driver/xclng/drm/xocl/lib/libqdma/qdma_thread.h  
  inflating: driver/xclng/drm/xocl/lib/libqdma/version.h  
  inflating: driver/xclng/drm/xocl/lib/libqdma/xdev.h  
  inflating: driver/xclng/drm/xocl/lib/libqdma/xdev.c  
  inflating: driver/xclng/drm/xocl/lib/libqdma/qdma_regs.h  
  inflating: driver/xclng/drm/xocl/lib/libqdma/qdma_regs.c  
  inflating: driver/xclng/drm/xocl/subdev/feature_rom.c  
  inflating: driver/xclng/drm/xocl/subdev/mm_xdma.c  
  inflating: driver/xclng/drm/xocl/subdev/mm_qdma.c  
  inflating: driver/xclng/drm/xocl/subdev/mb_scheduler.c  
  inflating: driver/xclng/drm/xocl/subdev/xvc.c  
  inflating: driver/xclng/drm/xocl/subdev/sysmon.c  
  inflating: driver/xclng/drm/xocl/subdev/firewall.c  
  inflating: driver/xclng/drm/xocl/subdev/microblaze.c  
  inflating: driver/xclng/drm/xocl/subdev/xiic.c  
  inflating: driver/xclng/drm/xocl/subdev/mailbox.c  
  inflating: driver/xclng/drm/xocl/subdev/icap.c  
  inflating: driver/xclng/drm/xocl/subdev/str_qdma.c  
  inflating: driver/xclng/drm/.dir-locals.el  
  inflating: driver/xclng/include/xocl_ioctl.h  
  inflating: driver/xclng/include/mgmt-reg.h  
  inflating: driver/xclng/include/mgmt-ioctl.h  
  inflating: driver/xclng/include/qdma_ioctl.h  
  inflating: driver/xclng/include/drm/drm.h  
  inflating: driver/xclng/include/drm/drm_mode.h  
  inflating: driver/include/ert.h    
  inflating: driver/include/xclfeatures.h  
  inflating: driver/include/xclbin.h  
  inflating: driver/include/xclerr.h  
INFO: building kernel mode driver
echo /tmp/19809/0/driver/xclng/drm/xocl/userpf
/tmp/19809/0/driver/xclng/drm/xocl/userpf
make -C /lib/modules/4.15.0-33-generic/build M=/tmp/19809/0/driver/xclng/drm/xocl/userpf modules
make[1]: Entering directory '/usr/src/linux-headers-4.15.0-33-generic'
  CC [M]  /tmp/19809/0/driver/xclng/drm/xocl/userpf/../xocl_subdev.o
  CC [M]  /tmp/19809/0/driver/xclng/drm/xocl/userpf/../xocl_ctx.o
  CC [M]  /tmp/19809/0/driver/xclng/drm/xocl/userpf/../xocl_thread.o
  CC [M]  /tmp/19809/0/driver/xclng/drm/xocl/userpf/../subdev/mm_xdma.o
  CC [M]  /tmp/19809/0/driver/xclng/drm/xocl/userpf/../subdev/feature_rom.o
  CC [M]  /tmp/19809/0/driver/xclng/drm/xocl/userpf/../subdev/mm_qdma.o
  CC [M]  /tmp/19809/0/driver/xclng/drm/xocl/userpf/../subdev/mb_scheduler.o
  CC [M]  /tmp/19809/0/driver/xclng/drm/xocl/userpf/../subdev/mailbox.o
  CC [M]  /tmp/19809/0/driver/xclng/drm/xocl/userpf/../subdev/xvc.o
  CC [M]  /tmp/19809/0/driver/xclng/drm/xocl/userpf/../subdev/icap.o
/tmp/19809/0/driver/xclng/drm/xocl/userpf/../subdev/icap.c: In function ‘icap_unlock_bitstream’:
/tmp/19809/0/driver/xclng/drm/xocl/userpf/../subdev/icap.c:1746:6: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
   id = &uuid_null;
      ^
  CC [M]  /tmp/19809/0/driver/xclng/drm/xocl/userpf/../subdev/str_qdma.o
  CC [M]  /tmp/19809/0/driver/xclng/drm/xocl/userpf/../lib/libxdma.o
  CC [M]  /tmp/19809/0/driver/xclng/drm/xocl/userpf/../lib/libqdma/qdma_descq.o
  CC [M]  /tmp/19809/0/driver/xclng/drm/xocl/userpf/../lib/libqdma/qdma_device.o
  CC [M]  /tmp/19809/0/driver/xclng/drm/xocl/userpf/../lib/libqdma/qdma_intr.o
  CC [M]  /tmp/19809/0/driver/xclng/drm/xocl/userpf/../lib/libqdma/qdma_regs.o
  CC [M]  /tmp/19809/0/driver/xclng/drm/xocl/userpf/../lib/libqdma/qdma_thread.o
  CC [M]  /tmp/19809/0/driver/xclng/drm/xocl/userpf/../lib/libqdma/qdma_context.o
  CC [M]  /tmp/19809/0/driver/xclng/drm/xocl/userpf/../lib/libqdma/qdma_mbox.o
/tmp/19809/0/driver/xclng/drm/xocl/userpf/../lib/libqdma/qdma_mbox.c: In function ‘qdma_mbox_timer_init’:
/tmp/19809/0/driver/xclng/drm/xocl/userpf/../lib/libqdma/qdma_mbox.c:498:2: error: implicit declaration of function ‘init_timer’ [-Werror=implicit-function-declaration]
  init_timer(timer);
  ^
/tmp/19809/0/driver/xclng/drm/xocl/userpf/../lib/libqdma/qdma_mbox.c:499:7: error: ‘struct timer_list’ has no member named ‘data’
  timer->data = (unsigned long)xdev;
       ^
/tmp/19809/0/driver/xclng/drm/xocl/userpf/../lib/libqdma/qdma_mbox.c: In function ‘qdma_mbox_timer_start’:
/tmp/19809/0/driver/xclng/drm/xocl/userpf/../lib/libqdma/qdma_mbox.c:508:25: error: assignment from incompatible pointer type [-Werror=incompatible-pointer-types]
         timer->function = qdma_mbox_proc;
                         ^
cc1: some warnings being treated as errors
scripts/Makefile.build:332: recipe for target '/tmp/19809/0/driver/xclng/drm/xocl/userpf/../lib/libqdma/qdma_mbox.o' failed
make[2]: *** [/tmp/19809/0/driver/xclng/drm/xocl/userpf/../lib/libqdma/qdma_mbox.o] Error 1
Makefile:1552: recipe for target '_module_/tmp/19809/0/driver/xclng/drm/xocl/userpf' failed
make[1]: *** [_module_/tmp/19809/0/driver/xclng/drm/xocl/userpf] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.15.0-33-generic'
Makefile:53: recipe for target 'all' failed
make: *** [all] Error 2
WARN: Compiling kernel driver failed. Please make sure Linux version is
    Ubuntu 16.04.4 or above
    RHEL/CentOS 7.4 or above
Generating SDAccel runtime environment setup script, setup.sh for bash
Generating SDAccel runtime environment setup script, setup.csh for (t)csh
Runtime drivers are not installed/upgraded

Please let me know what is wrong and how should I fix it.

I'm running Ubuntu 16.04.5 LTS and the kernal is 4.15.0-34-generic.

 

Thanks in advance,

Ayman

 

 

 

0 Kudos
6 Replies
vitesse-ftian
Visitor
Visitor
3,018 Views
Registered: ‎06-14-2018

This is because you sudo apt update/upgraded :-)    See this thread, 

https://forums.xilinx.com/t5/SDAccel/Patch-to-run-SDAccel-2018-2-on-Ubuntu-18-xx/td-p/889948

 

I have verified that after applying this patch, I'm able to build linux driver and run my kernel.   Good luck. 

siktap
Scholar
Scholar
2,993 Views
Registered: ‎06-14-2012

@elkfrawy Did the earlier patch helped you? If you are still facing the problem, Please let us know.

 

Regards

Sikta

0 Kudos
elkfrawy
Visitor
Visitor
2,970 Views
Registered: ‎09-14-2018

Thanks @vitesse-ftian and @siktap for your replies. I applied the suggested changes in the patch and was able to build and install the driver. I got the following output at the end:

INFO: Installing new kernel mode driver xclmgmt version 2018.2.2
echo /tmp/22659/0/driver/xclng/drm/xocl/mgmtpf
/tmp/22659/0/driver/xclng/drm/xocl/mgmtpf
make -C /lib/modules/4.15.0-34-generic/build M=/tmp/22659/0/driver/xclng/drm/xocl/mgmtpf modules
make[1]: Entering directory '/usr/src/linux-headers-4.15.0-34-generic'
  Building modules, stage 2.
  MODPOST 1 modules
make[1]: Leaving directory '/usr/src/linux-headers-4.15.0-34-generic'
make -C /lib/modules/4.15.0-34-generic/build M=/tmp/22659/0/driver/xclng/drm/xocl/mgmtpf modules_install
make[1]: Entering directory '/usr/src/linux-headers-4.15.0-34-generic'
  INSTALL /tmp/22659/0/driver/xclng/drm/xocl/mgmtpf/xclmgmt.ko
At main.c:160:
- SSL error:02001002:system library:fopen:No such file or directory: bss_file.c:175
- SSL error:2006D080:BIO routines:BIO_new_file:no such file: bss_file.c:178
sign-file: certs/signing_key.pem: No such file or directory
  DEPMOD  4.15.0-34-generic
make[1]: Leaving directory '/usr/src/linux-headers-4.15.0-34-generic'
depmod -a
install -m 644 10-xclmgmt.rules /etc/udev/rules.d
rmmod -s xclmgmt || true
modprobe xclmgmt
Generating SDAccel runtime environment setup script, setup.sh for bash
Generating SDAccel runtime environment setup script, setup.csh for (t)csh
Runtime drivers are installed/upgraded successfully

It seems the driver was install successfully, but I'm not sure if the highlighted errors are significant or not. Keep in mind that I'm using a proxy to connect to the internet.

 

To verify board installation, I ran "./verify.exe verify.xclbin" after sourcing "setup.sh" but I got the following result:

Unable to open /sys/bus/pci/devices/0000:83:00.1/userbar
Segmentation fault (core dumped)

If I use "sudo ./verify.exe verify.xclbin" then I get the following error:

./verify.exe: error while loading shared libraries: libxilinxopencl.so: cannot open shared object file: No such file or directory

I'm not sure if the driver was installed successfully or if I'm missing something.

 

Thanks,

Ayman

0 Kudos
vitesse-ftian
Visitor
Visitor
2,955 Views
Registered: ‎06-14-2018

The first one is probably due to kernel module signing stuff -- probably the easiest way is to just disable secure boot.  

 

The second one is because you don't have opencl.so in your LD_LIBRARY_PATH.   The .so file should be in the xbinst/runtime/lib.   Source the setup.sh shipped with xbinst should fix this.

0 Kudos
elkfrawy
Visitor
Visitor
2,942 Views
Registered: ‎09-14-2018

Thanks again @vitesse-ftian for your reply. Does the first problem prevent the driver from working probably? For the second problem, I do "source setup.sh" before running "verify.exe" and as I said I get the following error:

Unable to open /sys/bus/pci/devices/0000:83:00.1/userbar
Segmentation fault (core dumped)

I tried to run it with sudo as following and it still showing the same error above:

sudo -s
source setup.sh
./test/verify.exe test/verify.xclbin
0 Kudos
kthangav
Xilinx Employee
Xilinx Employee
1,755 Views
Registered: ‎06-26-2018

Goto /opt/dsa/xilinx_vcu1525_dynamic_5_1/xbinst/runtime/platforms/xilinx_vcu1525_dynamic_5_1/driver/

There you can see xocl.zip

unzip xocl.zip
vim xclng/drm/xocl/mgmtpf/mgmt-core.c +51

int skip_load_dsabin = 0;

Change the value to 1, this will skip the FW loading.

int skip_load_dsabin = 1;

Board will be shipped with default FW. 

0 Kudos