Off-topic, after installing opencl successfully, you might want to test this tool which makes use of opencl and opencv.
It’s in the fedora 37 riscv repos.
dnf install waifu2x-converter-cpp
After installing it, I did another clinfo:
clinfo
Number of platforms 1
Platform Name Clover
Platform Vendor Mesa
Platform Version OpenCL 1.1 Mesa 22.2.2
Platform Profile FULL_PROFILE
Platform Extensions cl_khr_icd
Platform Extensions function suffix MESA
Platform Name Clover
Number of devices 0
NULL platform behavior
clGetPlatformInfo(NULL, CL_PLATFORM_NAME, ...) Clover
clGetDeviceIDs(NULL, CL_DEVICE_TYPE_ALL, ...) No devices found in platform [Clover?]
clCreateContext(NULL, ...) [default] No devices found in platform
clCreateContextFromType(NULL, CL_DEVICE_TYPE_DEFAULT) No devices found in platform
clCreateContextFromType(NULL, CL_DEVICE_TYPE_CPU) No devices found in platform
clCreateContextFromType(NULL, CL_DEVICE_TYPE_GPU) No devices found in platform
clCreateContextFromType(NULL, CL_DEVICE_TYPE_ACCELERATOR) No devices found in platform
clCreateContextFromType(NULL, CL_DEVICE_TYPE_CUSTOM) No devices found in platform
clCreateContextFromType(NULL, CL_DEVICE_TYPE_ALL) No devices found in platform
ICD loader properties
ICD loader Name OpenCL ICD Loader
ICD loader Vendor OCL Icd free software
ICD loader Version 2.3.1
ICD loader Profile OpenCL 3.0
Temporarily mounting image-69’s / from the sdcard…
[root@fc38-rv64-vf2-YOW mnt]# mount /dev/mmcblk1p3 /mnt/mysdcardroot/
[root@fc38-rv64-vf2-YOW mnt]# cd /mnt/mysdcardroot/
I found the above recommended files to look for:
[root@fc38-rv64-vf2-YOW mysdcardroot]# find . -name "*OCL*" |xargs ls -lht
lrwxrwxrwx 1 root root 25 Dec 19 08:25 ./usr/lib/riscv64-linux-gnu/libPVROCL.so -> libPVROCL.so.1.17.6210866
lrwxrwxrwx 1 root root 25 Dec 19 08:25 ./usr/lib/riscv64-linux-gnu/libPVROCL.so.1 -> libPVROCL.so.1.17.6210866
-rw-r--r-- 1 root root 405K Dec 19 08:25 ./usr/lib/riscv64-linux-gnu/libPVROCL.so.1.17.6210866
[root@fc38-rv64-vf2-YOW mysdcardroot]# find . -name "*OpenCL*" |xargs ls -lht
lrwxrwxrwx 1 root root 14 Dec 19 08:25 ./usr/lib/riscv64-linux-gnu/libOpenCL.so -> libPVROCL.so.1
lrwxrwxrwx 1 root root 18 Sep 30 2021 ./usr/lib/riscv64-linux-gnu/libOpenCL.so.1 -> libOpenCL.so.1.0.0
-rw-r--r-- 1 root root 44K Sep 30 2021 ./usr/lib/riscv64-linux-gnu/libOpenCL.so.1.0.0
-rw-r--r-- 1 root root 23K Sep 30 2021 ./usr/share/doc/ocl-icd-libopencl1/html/libOpenCL.html
-rw-r--r-- 1 root root 2.4K Sep 30 2021 ./usr/share/man/man7/libOpenCL.7.gz
lrwxrwxrwx 1 root root 14 Sep 30 2021 ./usr/share/man/man7/libOpenCL.so.7.gz -> libOpenCL.7.gz
[root@fc38-rv64-vf2-YOW mysdcardroot]# cat etc/OpenCL/vendors/IMG.icd
libPVROCL.so
Ok let’s lddtree those:
[root@fc38-rv64-vf2-YOW mysdcardroot]# lddtree ./usr/lib/riscv64-linux-gnu/libPVROCL.so.1.17.6210866
libPVROCL.so.1.17.6210866 => ./usr/lib/riscv64-linux-gnu/libPVROCL.so.1.17.6210866 (interpreter => none)
libsrv_um.so => not found
libusc.so => not found
libpthread.so.0 => /lib64/libpthread.so.0
libdl.so.2 => /lib64/libdl.so.2
libstdc++.so.6 => /lib64/libstdc++.so.6
libm.so.6 => /lib64/libm.so.6
libgcc_s.so.1 => /lib64/libgcc_s.so.1
libc.so.6 => /lib64/libc.so.6
ld-linux-riscv64-lp64d.so.1 => /lib/ld-linux-riscv64-lp64d.so.1
[root@fc38-rv64-vf2-YOW mysdcardroot]# lddtree ./usr/lib/riscv64-linux-gnu/libOpenCL.so.1.0.0
libOpenCL.so.1.0.0 => ./usr/lib/riscv64-linux-gnu/libOpenCL.so.1.0.0 (interpreter => none)
libdl.so.2 => /lib64/libdl.so.2
libc.so.6 => /lib64/libc.so.6
ld-linux-riscv64-lp64d.so.1 => /lib/ld-linux-riscv64-lp64d.so.1
The above libsrv_um.so => not found
and libusc.so => not found
I have identified as powervr binaries which others call pvr_binaries. I’ll try and find those as well on the sdcard.
[root@fc38-rv64-vf2-YOW mysdcardroot]# find . -name "libsrv_um.so*" -print |xargs ls -lht
lrwxrwxrwx 1 root root 25 Dec 19 08:25 ./usr/lib/riscv64-linux-gnu/libsrv_um.so -> libsrv_um.so.1.17.6210866
-rw-r--r-- 1 root root 367K Dec 19 08:25 ./usr/lib/riscv64-linux-gnu/libsrv_um.so.1.17.6210866
[root@fc38-rv64-vf2-YOW mysdcardroot]# find . -name "libusc.so*" -print |xargs ls -lht
lrwxrwxrwx 1 root root 22 Dec 19 08:25 ./usr/lib/riscv64-linux-gnu/libusc.so -> libusc.so.1.17.6210866
-rw-r--r-- 1 root root 1.6M Dec 19 08:25 ./usr/lib/riscv64-linux-gnu/libusc.so.1.17.6210866
I’m trying hard. LOL
This is fedora 38’s ldconfig cache for a few related graphics library locations.
[root@fc38-rv64-vf2-YOW ~]# ldconfig --print-cache
libGLX.so.0 (libc6,double-float) => /lib64/lp64d/libGLX.so.0
libGLU.so.1 (libc6,double-float) => /lib64/lp64d/libGLU.so.1
libGLESv2.so.2 (libc6,double-float) => /lib64/lp64d/libGLESv2.so.2
libGLESv1_CM.so.1 (libc6,double-float) => /lib64/lp64d/libGLESv1_CM.so.1
libGL.so.1 (libc6,double-float) => /lib64/lp64d/libGL.so.1
libEGL_mesa.so.0 (libc6,double-float) => /lib64/lp64d/libEGL_mesa.so.0
libEGL.so.1 (libc6,double-float) => /lib64/lp64d/libEGL.so.1
Since /usr/lib/riscv64-linux-gnu/ doesn’t exist on fedora 38, I figured I should give placing these opencl .so’s in /lib64/lp64d/.
rsync --archive /mnt/mysdcardroot/usr/lib/riscv64-linux-gnu/libPVROCL.so /lib64/lp64d/libPVROCL.so
rsync --archive /mnt/mysdcardroot/usr/lib/riscv64-linux-gnu/libPVROCL.so.1 /lib64/lp64d/libPVROCL.so.1
rsync --archive /mnt/mysdcardroot/usr/lib/riscv64-linux-gnu/libPVROCL.so.1.17.6210866 /lib64/lp64d/libPVROCL.so.1.17.6210866
rsync --archive /mnt/mysdcardroot/usr/lib/riscv64-linux-gnu/libOpenCL.so /lib64/lp64d/libOpenCL.so
rsync --archive /mnt/mysdcardroot/usr/lib/riscv64-linux-gnu/libOpenCL.so.1 /lib64/lp64d/libOpenCL.so.1
rsync --archive /mnt/mysdcardroot/usr/lib/riscv64-linux-gnu/libOpenCL.so.1.0.0 /lib64/lp64d/libOpenCL.so.1.0.0
rsync --archive /mnt/mysdcardroot/etc/OpenCL/vendors/IMG.icd /etc/OpenCL/vendors/IMG.icd
rsync --archive /mnt/mysdcardroot/usr/lib/riscv64-linux-gnu/libsrv_um.so /lib64/lp64d/libsrv_um.so
rsync --archive /mnt/mysdcardroot/usr/lib/riscv64-linux-gnu/libsrv_um.so.1.17.6210866 /lib64/lp64d/libsrv_um.so.1.17.6210866
rsync --archive /mnt/mysdcardroot/usr/lib/riscv64-linux-gnu/libusc.so /lib64/lp64d/libusc.so
rsync --archive /mnt/mysdcardroot/usr/lib/riscv64-linux-gnu/libusc.so.1.17.6210866 /lib64/lp64d/libusc.so.1.17.6210866
[root@fc38-rv64-vf2-YOW ~]# lddtree /lib64/lp64d/libPVROCL.so.1.17.6210866
libPVROCL.so.1.17.6210866 => /lib64/lp64d/libPVROCL.so.1.17.6210866 (interpreter => none)
libsrv_um.so => /lib64/libsrv_um.so
librt.so.1 => /lib64/librt.so.1
libdrm.so.2 => /lib64/libdrm.so.2
libusc.so => /lib64/libusc.so
libpthread.so.0 => /lib64/libpthread.so.0
libdl.so.2 => /lib64/libdl.so.2
libstdc++.so.6 => /lib64/libstdc++.so.6
libm.so.6 => /lib64/libm.so.6
libgcc_s.so.1 => /lib64/libgcc_s.so.1
libc.so.6 => /lib64/libc.so.6
ld-linux-riscv64-lp64d.so.1 => /lib/ld-linux-riscv64-lp64d.so.1
But still no luck no devices found:
[root@fc38-rv64-vf2-YOW ~]# clinfo
Number of platforms 1
Platform Name Clover
Platform Vendor Mesa
Platform Version OpenCL 1.1 Mesa 22.2.2
Platform Profile FULL_PROFILE
Platform Extensions cl_khr_icd
Platform Extensions function suffix MESA
Platform Name Clover
Number of devices 0
NULL platform behavior
clGetPlatformInfo(NULL, CL_PLATFORM_NAME, ...) Clover
clGetDeviceIDs(NULL, CL_DEVICE_TYPE_ALL, ...) No devices found in platform [Clover?]
clCreateContext(NULL, ...) [default] No devices found in platform
clCreateContextFromType(NULL, CL_DEVICE_TYPE_DEFAULT) No devices found in platform
clCreateContextFromType(NULL, CL_DEVICE_TYPE_CPU) No devices found in platform
clCreateContextFromType(NULL, CL_DEVICE_TYPE_GPU) No devices found in platform
clCreateContextFromType(NULL, CL_DEVICE_TYPE_ACCELERATOR) No devices found in platform
clCreateContextFromType(NULL, CL_DEVICE_TYPE_CUSTOM) No devices found in platform
clCreateContextFromType(NULL, CL_DEVICE_TYPE_ALL) No devices found in platform
ICD loader properties
ICD loader Name OpenCL ICD Loader
ICD loader Vendor OCL Icd free software
ICD loader Version 2.2.14
ICD loader Profile OpenCL 3.0
Still trying. I’m realizing the vf2 gpu stuff isn’t in this fedora 38 rootfs at all.
wget https://github.com/starfive-tech/soft_3rdpart/blob/JH7110_VisionFive2_devel/IMG_GPU/out/img-gpu-powervr-bin-1.17.6210866.tar.gz?raw=true -O img-gpu-powervr-bin-1.17.6210866.tar.gz
tar zxvf img-gpu-powervr-bin-1.17.6210866.tar.gz
Now we need to place all this stuff in their respective correct locations.
cat /etc/ld.so.conf.d/img-gpu-powervr-bin.conf
/home/davidm/img-gpu-powervr-bin-1.17.6210866/staging/usr/lib
/home/davidm/img-gpu-powervr-bin-1.17.6210866/target/usr/lib
Then integrate into the linker paths:
[root@fc38-rv64-vf2-YOW ~]# ldconfig -v
/home/davidm/img-gpu-powervr-bin-1.17.6210866/staging/usr/lib: (from /etc/ld.so.conf.d/img-gpu-powervr-bin.conf:1)
libVK_IMG.so.1 -> libVK_IMG.so.1.17.6210866
libPVROCL.so.1 -> libPVROCL.so.1.17.6210866
libpvr_dri_support.so -> libpvr_dri_support.so.1.17.6210866
libsrv_um.so -> libsrv_um.so.1.17.6210866
libGLESv1_CM_PVR_MESA.so -> libGLESv1_CM_PVR_MESA.so.1.17.6210866
libusc.so -> libusc.so.1.17.6210866
libglslcompiler.so -> libglslcompiler.so.1.17.6210866
libGLESv2_PVR_MESA.so -> libGLESv2_PVR_MESA.so.1.17.6210866
libufwriter.so -> libufwriter.so.1.17.6210866
libvulkan.so.1 -> libvulkan.so.1.17.6210866
libsutu_display.so -> libsutu_display.so.1.17.6210866
libPVRScopeServices.so -> libPVRScopeServices.so.1.17.6210866
/home/davidm/img-gpu-powervr-bin-1.17.6210866/target/usr/lib: (from /etc/ld.so.conf.d/img-gpu-powervr-bin.conf:2)
libVK_IMG.so.1 -> libVK_IMG.so.1.17.6210866
libPVROCL.so.1 -> libPVROCL.so.1.17.6210866
libpvr_dri_support.so -> libpvr_dri_support.so.1.17.6210866
libsrv_um.so -> libsrv_um.so.1.17.6210866
libGLESv1_CM_PVR_MESA.so -> libGLESv1_CM_PVR_MESA.so.1.17.6210866
libusc.so -> libusc.so.1.17.6210866
libglslcompiler.so -> libglslcompiler.so.1.17.6210866
libGLESv2_PVR_MESA.so -> libGLESv2_PVR_MESA.so.1.17.6210866
libufwriter.so -> libufwriter.so.1.17.6210866
libvulkan.so.1 -> libvulkan.so.1.17.6210866
libsutu_display.so -> libsutu_display.so.1.17.6210866
libPVRScopeServices.so -> libPVRScopeServices.so.1.17.6210866
After a shutdown and power on, clinfo still doesn’t see any devices.
YES, I FORGOT. Somebody in another thread mentioned opencl doesn’t get enabled when there is nothing connected to the HDMI port and there was no desktop started. I’ll try plugging the board into a 1080p monitor now and running clinfo after that.