OpenCL support in BBB

Hi all,

I am trying to make a video capture application with OpenCV and QT in Beaglebone Black RevC(with Debian Jessie image).
When I attempt to run the application in Beaglebone black, the following errors are shown.

CMEM Error: init: Failed to open /dev/cmem: 'No such file or directory’
TIOCL FATAL: The cmemk kernel module is not installed. Consult the OpenCL UserGuide at

As per the link, I tried to solve the issue. But the problem is not solved.

Also the following links shows the TI AM335x doesn’t have a GPU in it. So it cannot support OpenCL.


But is openCL necessary for videostreaming applications ?
Whether openCV is sufficient for that?
Is there any video streaming applications which does not use openCL.
What I understood is openCL is only for parallel processing?
Whether it is necessary to use Beaglebone X15(in which openCL is supported) to run a video streaming applications?

Thanks for the advice in advance.

Thanks and Regards,

No OpenCL isn’t required to run OpenCV. There just happens to be an OpenCL option to accelerate OpenCV.

But that doesn’t really matter for the beaglebone black as you’ll need to do OpenCV in software…

Or upgrade to the BeagleBoard-X15…



Thank You for the advice.

We decided to go for AM57x controllers for our Applications.

Thanks & Regards,

Greetings Robert,

For my clarification, is OpenCL just not possible on the Beaglebone Black? I was hoping maybe we had gotten to the point where we could parallelize across the graphics subsystem, and am guessing since the BBB only has the single application core, the two PRUs, and the graphics system, then the PRUs and the graphics system would be the only options for parallelization.

I ran into the same problem as Sajeevan. I know part of my problem is that I am using a bone kernel, which doesn’t appear to have cmemk available. I’m also using both PRUs in my project, so if OpenCL can’t parallelize across the graphics system, then I know trying to build cmemk to get it to work would be a waste of time, and I should just rebuild OpenCV with OpenCL disabled. Any input appreciated.


"Hardware Accelerated" OpenCL is not currently possible on the BBB..

The BBB utilizes the SGX 530:

Notice the year: Jul 2005

Now look at OpenCL:

"OpenCL 1.0 released with Mac OS X Snow Leopard on August 28, 2009."

So as stated, if you want hardware OpenCL from a board built by the project pick up the x15, where the DSP's have had
software written to implement OpenCL..


Greetings Robert,

Thanks for the information, that does clear things up immensely. If you don’t mind, I have two other questions I was hoping to pose to you (if there is a better place, please let me know).

I’m guessing remoteproc is the future as far as the PRUs go, and I’m still using uio_pruss for my project. In my case, I am receiving an 8 bit parallel feed from a camera module using GRB422 format. If my math is right, 15 frames a second X 320x240 image X 2 bytes per pixel = a little over 2 meg a second that I am sending from the PRU straight to a patch of memory set aside by uio_pruss. My question is, do you think remoteproc could handle that in a way that wouldn’t require tying up the application processor and respect the real time requirements of the video feed? I apologize if this is a vague question. I’m sure I don’t understand remoteproc well enough yet, but I’m afraid of going down a possible dead-end. At the same time, I also want to make my stuff maintainable and future compatible (and do what the cool kids are doing).

The other question (unfortunately, probably just as vague) is related. I use a script to modprobe uio_pruss before I start my program (and the subsequent PRU program). Under Debian 7.8, my script would have to load, unload, and reload uio_pruss like so:

modprobe uio_pruss extram_pool_sz=2097152 #Have to enable uio_pruss kernel module
modprobe -r uio_pruss #then disable it
modprobe uio_pruss extram_pool_sz=2097152 #then enable it again. Dont know why

otherwise, my program would error. In Debian 8.7, I can load it just once, and everything works fine. Now I am trying to do it under Debian 9.3, and have found that if I do it once and run my program, everything runs, but I get no video feed. If I end the program, unload uio_pruss, and reload it, then run my program again, it works. But I can’t do like before where I load, unload, and reload, and then just run my program. If I do, I get a bus fault. But loading it, running the program, closing the program, unloading uio_pruss, reloading it, and then running my program again, works. I know this is weird and probably tied to me doing something obviously wrong, I was just wondering if there are any known issues or things to look out for with uio_pruss under the different Debian versions. And if I need to do more sleuthing and come back with a better defined problem, I will of course understand.

Thanks again for all of your help, and everything you do for the BB community!

which kernel? uname -r

For newer kernels using uio_pruss you should follow:


Greetings Robert,

On Debian 7.8: 3.8.13-bone70
On Debian 8.7: 4.4.127-bone-rt-r22
On Debian 9.3: 4.4.132-bone22

Thanks for the reference. I will probably work with that (translating to C/C++, since I haven’t completely dived into Python yet), and I’m guessing this might be helpful?:

in my code, I’ve been using this:


and this:

pruExternalMemoryPhysical = (void *)prussdrv_get_phys_addr(pruExternalMemoryVirtual);

to get virtual and real addresses to the external ram pool. I’ve been treating it like ‘free real estate’ thinking nothing else was using it. I write the physical address to a pointer in my PRU code (that I get from the map file for the PRU program) so the PRU can write camera data straight to it over the OCP, and in my main program use the virtual pointer to read the image data into OpenCV.

Thanks a million (again)!

Greetings Robert,

On Debian 7.8: 3.8.13-bone70
On Debian 8.7: 4.4.127-bone-rt-r22
On Debian 9.3: 4.4.132-bone22

You really should upgrade to v4.14.x-bone

Thanks for the reference. I will probably work with that (translating to
C/C++, since I haven't completely dived into Python yet), and I'm guessing
this might be helpful?:

No, he just uses python, but he's been working on the memory sharing
interfaces, if you look at the examples..

Just make sure your using v4.14.x-bone to take full advantage of it..


What do I feed to for that?

But before you do that, make sure you run:

sudo apt update
sudo apt install --only-upgrade bb-cape-overlays kmod

Then make sure you have the latest bootloader:

any issues run:

sudo /opt/scripts/tools/

and we can fix the image..


Awesome. Thanks!