Beagle black, SGX, OpenGL, and Graphics SDK with 3.8 kernel....no luck...

So, for over a week I have been trying to get Qt 5.3.2 working with OpenGL on a BBB with a 3.8 kernel. So far, I haven’t made much progress even though I"ve spent many hours.

I am stuck just trying to get OpenGL/SGX working on the black using the TI graphics SDK. I have tried 4 different 3.8 kernels, including the official ones as well as RobertCNelson’s stuff. I have applied about 10 patches to the graphics SDK and the kernel. I can get the Graphics SDK built and installed, but I keep coming back to this:

[ 5.263934] PVR: PVRCore_Init
[ 5.270060] PVR: PVRSRVDriverProbe(pDevice=df0c2e00)
[ 5.270176] PVR: SGX register base: 0x56000000
[ 5.270189] PVR: SGX register size: 16777215
[ 5.270200] PVR: SGX IRQ: 37
[ 5.270233] PVR: EnableSystemClocks: Enabling System Clocks
[ 5.270283] PVR_K:(Error): EnableSystemClocks: Couldn’t get GPTIMER11 functional clock [512, opt/Graphics_SDK_4_10_00_ 01/GFX_Linux_KM/services4/system/ti335x/sysutils_linux.c]
[ 5.270305] PVR_K:(Error): SysInitialise: Failed to Enable system clocks (171) [481, opt/Graphics_SDK_4_10_00_01/GFX_L inux_KM/services4/system/ti335x/sysconfig.c]
[ 5.274037] PVR: PVRCore_Init: major device 240

When the pvrsvrkm driver tries to load, a “clk_get()” function fails in the driver and I cannot for the life of me figure out why? It’s unclear exactly what timer this is, as the error indicates GPTIMER11, but inside the driver code it’s referring to “gpt7_fck”. I assume this is timer7 in the Sitara?

I have recompiled several versions of 3.8 kernels many, many times. I"ve applied several patches. I have tried cutting out device tree objects and disabling many things to no avail. I have seen 3 or 4 folks who supposedly have gotten this TI “pvrsrvkm” and “omaplfb” driver to load and some of the test graphics apps to actually work…I’d really like to know how they did it?

The patches I have I collected from an FSE at TI, as well as some guy named Alexander. These apply to the Graphics SDk and the kernel, but nothing I have tried seems to get rid of this clock issue?

I have built the graphics SDK with make BUILD=debug OMAPES=8.x PM_RUNTIME=1 all, and left out PM_RUNTIME, which seems to affect which portion of init code in the driver is executed…but I get another clock error, so no dice!

Does anyone have a 3.8 kernel with OpenGL working? I tried installing the packaged drivers with Angstrom…but had no success there either. I know TI is only supporting the 3.12 kernel…but there are cape issues there, plus I have Xenomai running with 3.8 and I hate to jump to 3.12.

Anyone have any success running OpenGL on 3.8 with a bone-black???

I had problems getting cross compile to work.
The kernel needed for ti graphics was different than the linaro toolchain, so my cross compile failed even when I specified sysroot as the SD card.
So, I built the whole thing on the beaglebone.
To develop applications, I installed QT Creator on a x86 32bit debian image, developed the application for the desktop, copied the project to the beaglebone and compiled it there.

Here’s how I set up my qt 5.3.2 production image:

install base image: bone-debian-7.6-console-armhf-2014-09-04-2gb.img on a SD card

Put the SD card in your beaglebone and boot to the SD card

Log in

Change the default password

Enter the following (things to type at the console will start with #, don’t type the #)

Change the default password

#passwd

Upgrade the image to latest repositories

#sudo apt-get update

#sudo apt-get upgrade

Install the kernel that works with ti graphics SDK

#sudo apt-get install linux-image-3.14.19-ti-r27

#sudo reboot

Set up your locale information

#sudo apt-get install locales

#sudo dpkg-reconfigure locales

Install network date/time sync

#sudo apt-get install ntpdate chrony

Install touch screen drivers + utilities like ts_calibrate

#sudo apt-get install tslib libts-bin

Install wireless drivers & tools for USB wireless dongle

#sudo apt-get install wireless-tools wpasupplicant

Install pre-requisite for installing ti graphics SDK

#sudo apt-get install lsb-release

Configure wireless to start when system starts

by uncommenting wireless entries

#sudo nano /etc/network/interfaces

auto wlan0

iface wlan0 inet dhcp

wpa-ssid networkname

wpa-psk passphrase

Configure time zone and touch screen environment variables

by appending the following values

#nano .profile

export TZ=‘America/Chicago’

export TSLIB_CONSOLEDEVICE=none

export TSLIB_CONFFILE=/etc/ts.conf

export TSLIB_CALIBFILE=/etc/pointercal

export TSLIB_TSDEVICE=/dev/input/event1

export TSLIB_FBDEVICE=/dev/fb0

export TSLIB_PLUGINDIR=/usr/lib/arm-linux-gnueabihf/ts0

export TSLIB_TSEVENTTYPE=INPUT

The LCD cape will be disabled - you will need to add the following to

re-enable the LCD cape and disable the HDMI

#sudo nano /boot/uEnv.txt

fdtfile=am335x-boneblack-4dcape-43t.dtb

cape_disable=capemgr.disable_partno=BB-BONELT-HDMI,BB-BONELT-HDMIN

#sudo reboot

Now, switch over to a debian 7.6 x86 32 bit linux box

Load pre-requisites for building ti graphics SDK and build it for the kernel

#sudo apt-get install git build-essential device-tree-compiler lzma lzop u-boot-tools libncurses5-dev

#git config —global user.name “name”

#git config —global user.email “email”

#git clone https://github.com/RobertCNelson/ti-linux-kernel-dev.git

#cd ti-linux-kernel-dev

#git checkout 3.14.19-ti-r27

#./build_kernel

#./sgx-build-modules.sh

Copy the compiled ti graphics SDK to the beagle bone

#scp ./release/GFX_5.01.01.01.tar.gz debian@196.168.1.???:~/.

Run the following on your beagle bone

#sudo tar xfv GFX_5.01.01.01.tar.gz -C /

#cd /opt/gfxinstall/

#sudo ./sgx-install.sh

#sudo reboot

Verify the ti graphics SDK installed

After running this line you should see the following output

#lsmod | grep omap

omaplfb 13161 0

pvrsrvkm 178957 1 omaplfb

tilcdc 28310 1 omaplfb

Run a demo to make sure it all works

#cd /opt/gfxsdkdemos/ogles2

#sudo ./OGLES2ChameleonMan

Exit the demo

#q

Shut down

#sudo shutdown now

Power down and insert the SD card into the Linux box

Make a backup of the SD card on the Linux box

#sudo dd if=/dev/sdb bs=1M | gzip > ./debian-7.6-GFX-WIFI-base.gz

Eject the SD card and insert it back in the beaglebone and boot to SD Card

Log in

Execute the following:

#sudo /opt/scripts/tools/grow_partition.sh

#sudo reboot

Copy the qt dev files to the beaglebone from the linux box

#scp qt-everywhere-opensource-src-5.3.1.tar debian@192.168.1.???:~/.

Execute the following on the beaglebone

#sudo apt-get install make gcc g++ alsa libasound2-dev libgles2-mesa-dev mtdev-tools libmtdev-dev libudev-dev

#tar xfv ./qt-everywhere-opensource-src-5.3.2.tar

#mv qt-everywhere-opensource-src-5.3.2 qt-src

#mkdir qt-beagle

#cd qt-beagle

#…/qt-src/configure -v -opensource -confirm-license -prefix /usr/local/qt-5.3.2 -no-largefile -qt-zlib -qt-libpng -qt-libjpeg -no-nis -no-cups -opengl es2 -no-xcb

#make

Wait about 16 hours

#make install

Copy the qt deployed image for future use

#tar -cvzf qt-5.3.2.tgz /usr/local/qt-5.3.2/

Copy the qt-5.3.2.tgz to the linux box

Shutdown the beaglebone and move the SD card back to the linux box

On the linux box,

Restore the base graphics image we saved before

#sudo gzip -dc ./debian-7.6-GFX-WIFI-base.gz | sudo dd of=/dev/sdb

Eject the SD card and insert it in the beaglebone and boot to SD card

Copy the qt libraries to the beaglebone

#scp qt-5.3-libs.tar.gz debian@192.168.1.???:~

On the beaglebone, execute the following:

#sudo tar xfv qt-5.3-libs.tar.gz -C /

#sudo nano /etc/environment

export QT_QPA_PLATFORM=eglfs

export QT_PLUGIN_PATH=/usr/local/plugins

#nano /etc/profile

export PATH=$PATH:/usr/local/qt-5.3.2/bin

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/qt-5.3.2/lib

#sudo apt-get install dbus libpng12-0 libglib2.0-0 mtdev1 libfontconfig1 libts-bin libgles2-mesa-dev mtdev-tools libasound2

#cd /opt/gfxinstall/

#sudo ./sgx-install.sh

#sudo reboot

Your deployment system should be ready to go.

Try running some qt examples.

To build qt applications, install QT Creator on your linux box and qt 5.3.2

Build for the local desktop.

Copy the project to the beaglebone and compile it there when you are ready to test on the beaglebone.

I had problems getting cross compile to work.
The kernel needed for ti graphics was different than the linaro toolchain,
so my cross compile failed even when I specified sysroot as the SD card.
So, I built the whole thing on the beaglebone.
To develop applications, I installed QT Creator on a x86 32bit debian image,
developed the application for the desktop, copied the project to the
beaglebone and compiled it there.

Here's how I set up my qt 5.3.2 production image:

install base image: bone-debian-7.6-console-armhf-2014-09-04-2gb.img on a SD
card

Put the SD card in your beaglebone and boot to the SD card

Log in

Change the default password

Enter the following (things to type at the console will start with #, don’t
type the #)

Change the default password

#passwd

Upgrade the image to latest repositories

#sudo apt-get update

#sudo apt-get upgrade

Install the kernel that works with ti graphics SDK

#sudo apt-get install linux-image-3.14.19-ti-r27

So as of last week you can do:

sudo apt-get install ti-sgx-es8-modules-`uname -r`
sudo depmod -a `uname -r`
sudo update-initramfs -uk `uname -r`

for the sgx modules...

#git clone https://github.com/RobertCNelson/ti-linux-kernel-dev.git

#cd ti-linux-kernel-dev

#git checkout 3.14.19-ti-r27

#./build_kernel

#./sgx-build-modules.sh

With the pre-built modules from the repo, you just have to run this to
get the lib's packaged up..

./sgx_create_package.sh

Copy the compiled ti graphics SDK to the beagle bone

#scp ./release/GFX_5.01.01.01.tar.gz debian@196.168.1.???:~/.

Run the following on your beagle bone

#sudo tar xfv GFX_5.01.01.01.tar.gz -C /

#cd /opt/gfxinstall/

#sudo ./sgx-install.sh

#sudo reboot

Regards,

Well, I have the SGX stuff working with the 3.8 kernel. I do also have Qt 5.3.2 built and working. I have not had a chance to try the opengl platform on qt yet though. This 3.8 kernel is using the Angstrom-Cloud9-IDE-GNOME-eglibc-ipk-v2012.12-beaglebone-2013.09.05.img rootfs. I cross compiled on a 12.04 ubuntu host with the CodeSourcery toolchain.

So, for the TI 4.10.00.01 graphics SDK to work with the 3.8 kernel, there are several patches that will be required. Some of these I got off the TI sitara forum, and the others I developed myself by backporting the 5.01.01.01 graphics sdk. I can tell you that without the patches, the 4.10 sdk will never work with 3.8! I am using the RobertCNelson 3.8 kernel at the moment, but I am pretty sure the “official” beagle repository 3.8 kernel will work also. There are changes to get the device node added, but there are also some timer related changes. I will try to release some patch files later, once I get things tidied up a bit.

I am able to run all the 4.10 sdk ogles demos and they seem to run pretty smooth on the boneblack, and I am running them using a 7" LCD…looks pretty good! This is using soft floating point at the moment, so there is room for improvement.