Installing SGX drivers - omaplfb & pvrsrvkm not loaded

Hi:

I am running with 4.1.22-ti-rt-r59 and followed the instructions here http://elinux.org/BeagleBoardDebian#SGX_BeagleBone.2FBeagleBone_Black on how to install the SGX drivers.

All seems ok (no error while installing the GFX package) , until I got to check that the omaplfb and pvrsrvkm had loaded correctly.

root@beaglebone:~# lsmod | grep omaplfb
root@beaglebone:~# lsmod | grep omap
omap_rng 4350 0
rng_core 7433 1 omap_rng
spi_omap2_mcspi 10673 0
root@beaglebone:~# lsmod | grep pvrsrvkm
pvrsrvkm 378818 0
root@beaglebone:~#

It doesn’t look like omaplfp is loaded.

What would be your suggestion to debug why omaplfp did not load?

Regards,
JS

By the way I thought I would provide the following information as well:

root@beaglebone:~# sudo /etc/init.d/sgx-startup.sh start
sgx: Starting PVR
mknod: missing operand after ‘0’
Try ‘mknod --help’ for more information.

Regards,
JS

It's not loaded, as the version your linked to on the elinux is an
older SGX release.

Regards,

You mixing sgx instructions..

We don't have either:

v4.1.x-ti
or
v4.4.x-ti

working..

Feel free to use the old "v4.1.x-bone" kernel with those
instructions.. it's fbdev mode only...

I had very specific link in the text at:

http://elinux.org/BeagleBoardDebian#SGX_BeagleBone.2FBeagleBone_Black

->

http://elinux.org/BeagleBoardDebian#Mainline_.28lts.29

Mainline (lts)

4.1.x BeagleBone/BeagleBone Black + SGX
--bone-kernel --lts

4.1.x BeagleBone/BeagleBone Black + RT + SGX
--bone-rt-kernel --lts

cd /opt/scripts/tools/
git pull
sudo ./update_kernel.sh <OPTIONS>

Regards,

Hi Robert:

Thank you for the quick reply.

How should I remove the old version I installed on the BBB? And should the newer version I should get be am33x-rt-v4.8?

Regards,
JS

Well, the "newest" version with any-kinda-working sgx is

am33x-v4.1

Just like those directions say..

Regards,

It looks like we crossed replies/emails.

I am unsure what you mean by:

"
http://elinux.org/BeagleBoardDebian#Mainline_.28lts.29

Mainline (lts)

4.1.x BeagleBone/BeagleBone Black + SGX
–bone-kernel --lts

4.1.x BeagleBone/BeagleBone Black + RT + SGX
–bone-rt-kernel --lts

cd /opt/scripts/tools/
git pull
sudo ./update_kernel.sh "

At this time I am not sure you are implying that I need to update the kernel, or that I need to get a different version of SGX from git. “Install the “4.1.x” lts/bone kernel: http://elinux.org/BeagleBoardDebian#Mainline_.28lts.29”. The kernel I am using is 4.1.22-ti-rt-r59.
Would it be possible for you to clarify whether or not I have the right kernel, and, if not, point me to a kernel that would allow me to install am33x-v4.1, since this is the only version that currently works?

Regards,
JS

Correct, you don't have the correct kernel..

cd /opt/scripts/tools/
git pull
sudo ./update_kernel.sh --bone-rt-kernel --lts

Will get you what you want..

Regards,

Hi Robert:

Thank you for a quick and detailed answer. This is greatly appreciated.
I will give this a try tonight.

Regards,
Jean-Sebastien

Hi Robert:

I did upgrade to the latest -bone-rt kernel.
I am not getting the error I used to have when trying to restart PVR, but suprisingly pvrsvrkm is not loaded

root@beaglebone:~# lsmod | grep omaplfb
root@beaglebone:~# sudo /etc/init.d/sgx-startup.sh start
sgx: Starting PVR
root@beaglebone:~# lsmod | grep omaplfb
root@beaglebone:~# lsmod | grep omapl
root@beaglebone:~# lsmod | grep omap
omap_sham 19380 0
omap_aes 13255 0
omap_rng 4338 0
rng_core 7209 1 omap_rng
snd_soc_omap 2565 1 snd_soc_davinci_mcasp
snd_soc_core 157683 3 snd_soc_davinci_mcasp,snd_soc_edma,snd_soc_omap
snd_pcm_dmaengine 5045 2 snd_soc_core,snd_soc_omap
snd_pcm 77695 4 snd_soc_davinci_mcasp,snd_soc_core,snd_soc_omap,snd_pcm_dmaengine
spi_omap2_mcspi 10456 0
root@beaglebone:~# lsmod | grep pvrsrvkm
root@beaglebone:~# sudo /etc/init.d/sgx-startup.sh restart
sgx: Restarting PVR
root@beaglebone:~# lsmod | grep pvr

Is there another way of checking whether omaplfb and pvrsrvkm are loaded?

Regards,
JS

Hi Robert:

Would you have an additional suggestion on this issue? If not, where would you suggest I turn to to investigate this further?

Regards,
JS

I know nothing about this but here’s what I did tonight to get this going (its failed many times in the past for me!)

Now, for the SGX I followed the instructions at http://elinux.org/BeagleBoardDebian#SGX_BeagleBone.2FBeagleBone_Black but they didn’t work. I ended up with a ‘.bin’ rather than a tar file, in a dl folder but there was no deploy folder. Anyway, I had done this a few months ago and saved the tar file from then. I installed that tar per the instructions.

Then I followed the instructions at https://groups.google.com/forum/?hl=en&fromgroups#!msg/beagleboard/sOhHuq_T6KQ/xDeaoWyeBgAJ;context-place=msg/beagleboard/D-lhg28O5m4/yqRTbZPFDQAJ, namely:-

sudo apt-get install ti-sgx-es8-modules-uname -rsudo depmod -auname -rsudo update-initramfs -ukuname -rcode here…
`

Rebooted.

The result:

`

Last login: Fri Oct 14 19:27:03 2016 from 192.168.1.66
debian@beaglebone:~$ lsmod | grep omaplfb
omaplfb 12048 0
tilcdc 28057 1 omaplfb
pvrsrvkm 147997 1 omaplfb
debian@beaglebone:~$ glxgears
26 frames in 5.0 seconds = 5.161 FPS
54 frames in 5.1 seconds = 10.644 FPS
54 frames in 5.0 seconds = 10.700 FPS
54 frames in 5.1 seconds = 10.670 FPS
54 frames in 5.0 seconds = 10.709 FPS
54 frames in 5.1 seconds = 10.670 FPS
54 frames in 5.0 seconds = 10.707 FPS
54 frames in 5.1 seconds = 10.670 FPS
54 frames in 5.0 seconds = 10.704 FPS
^C
debian@beaglebone:~$ uname -a
Linux beaglebone 4.1.34-bone-rt-r24 #1 PREEMPT RT Thu Oct 13 03:42:46 UTC 2016 armv7l GNU/Linux
debian@beaglebone:~$

`

I think this is a complete account, I hope it helps.

Regards,
James

James:

Thanks for the detailed email, it is very much appreciated. I did have to install the correct Linux headers as well though I did not install the TI modules. I will give this a try tonight.

Regards,
JS

James:

Thank you for the reply, your instructions worked! This is great.

Does installing the SGX driver also install the headers required for openGL development? I am trying to compile Qt directly on the BBB. So far I had been using Qt libraries I had cross compiled.
When compiling Qt on the BBB, I can’t seem to find the gl2.h drivers which are related to openGL. I was hoping installing the SGX drivers would take care of this.

At this time I am not sure if the headers where actually installed and I just need to add an include to wherever they are (could not locate them on my system), or if further steps are required to install the headers.

Are you at all familiar with the issue, and would you be able to provide suggestions?

Regards,
JS

A follow up, I was looking at the install directory, which is part of the instructions Robert had posted. The SGX package does include the library files but does not include the source. Or the headers. And so I am thinking that somehow I need to know exactly what version this SGX is, download the source and add the headers to the include path.

Somehow I got to print $SGX_REVISON and $BUILDTYPE and I get the following value: “0x10205” and “release9.x”.

Where to get the source and header files for this SGX revision?

Regards,
JS

Welcome to the sgx… we get Linux header source which we used to build the kernel modules.

While everything else is a blob from ti… which they got from imgtek…

Using the sgx is just a waste of time.

Regards,

Hi Robert:

On a secondary remark, why is TI seemingly making it so hard for people to
develop applications targeting their processors, using community tools? The
easy answer is evidently to promote vendor tools, but in the end they still
end up selling chips even though people don't buy the software tools.

TI does promote CCS, but it's not particularly hard to develop applications
on the beaglebone. A matter of fact, it's just like with any Linux system,
but with added peripherals to toy with, or use. You would need the same
tools on an x86 Linux system to develop C/C++, GO, Nodejs( and much more )
applications. With perhaps some slightly different tool setup at the
beginning.

With the SGX drivers however, it's been this way since the beginning. Well,
it's actually slightly better now, but 4 years later . . . not by much.

The board I'm bringing up right now is a customized BBB with integrated
LCD.
I was just thinking this morning while trying to get QT to compile that it
would be so easy to switch to a different platform, including turnkey LCD
controllers from FTDI, to bypass the OpenGL mess of the BBB.

So I'm curious as to why exactly you need Qt, then assuming you really do
require Qt, why would you be required to use hardware acceleration. It's
been a long time since I've written anything using Qt, but it's my
understanding that Qt is just a set of API's that lend its self to
developing desktop applications(forms drop downs, buttons, etc ). There
should not be any hardware requirements period. Unless it's changed that
much in the last 3-4 years.

Anyway, the beaglebone's strong suite has never been it's graphics. It's
strong points have been the large amount of peripherals it has access to
out of the box. Including, but not limited to PRU's, ADC, PWMs, quadrature
encoders, eCAP modules, SPI, I2C, UART CANBus . . .

Plus a truly open source model, for hardware, and software.

Hi Robert:

Thanks for the reply. Well your reply seems a bit discouraging.
Right now I've been using Qt (The legacy or orange final, GUI type before
the advent of touch devices) to develop Qt applications on the BBB. It's
been working great though now I'd like to use Qt with the Qt Quick way of
developing applications using Qml.
It is my current understanding that this requires OpenGL and Es2, and I need
to install SGX.

Well, the sgx 530 doesn't support "OpenGL" just OpenGL ES1/ES2..

The only thing it seems I'm missing now are the headers, I guess don't even
have to be the exact version of what's installed as long as the function
prototypes match the libraries?

On a secondary remark, why is TI seemingly making it so hard for people to
develop applications targeting their processors, using community tools? The
easy answer is evidently to promote vendor tools, but in the end they still
end up selling chips even though people don't buy the software tools.
The board I'm bringing up right now is a customized BBB with integrated LCD.
I was just thinking this morning while trying to get QT to compile that it
would be so easy to switch to a different platform, including turnkey LCD
controllers from FTDI, to bypass the OpenGL mess of the BBB.

Remember, SGX is from Imgtek, they are the one's who hamstrung TI,
(and every other Silicon Vendor) who's mistakenly licensed their
Graphics Core. At-least TI haven't wasted $ upgrading their core, as
they still use the same-ish SGX 530 that's been used in
dm3730/omap3's.. (droid one era phones)..

Just OpenGL ES 2.0

Regards,

Hi Robert.

I have the same problem with the drivers.

There is no way to boot with instructions on the wiki beaglebonedebian - sgx.

I tested with different kernel 4.1 and headers, and when I run the test to see if you boot the pvr module, gives no signal at the terminal.

There is a correct guide for installing the graphics driver for BEAGLEBONE black ?.

Can someone put the steps please. It would be a great help.

Thank you