BeagleBoneBlack/SGX + Qt EGLFS + Weston

< BeagleBoneBlack
Revision as of 18:36, 17 March 2019 by ReRRemi (talk | contribs) (Created page with "= Introduction = The SoC of [ BeagleBone Black] is an AM335x by [ Texas Instruments].<br> The graphi...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


The SoC of BeagleBone Black is an AM335x by Texas Instruments.
The graphic accelerator by Imagination Technologies is PowerVR chipset, the serie 5 (SGX530).
I don't have a very good english, thanks to the people who will be able to correct me ;-)



Texas Instruments

Imagination Technologies


  1. We must have "-ti-" on the BBB kernel. Type uname -r to verify your kernel version
  2. We connect a screen to the BBB with a micro HDMI to HDMI cable
  3. We need an ethernet cable to connect the beaglebone to the internet
  4. A lot of place if you want install demos and Weston without Cross Compilation
  5. All orders will be in "root" mode here (sudo -i). Sorry if it's not secure ^^
  6. All packages are up to date (apt-get update).

For my tests I use :

  • Debian 9.3 2018-01-28 4GB SD IoT (kernel: 4.9.78-ti-r94)
  • Debian 9.5 2018-10-07 4GB SD LXQT (kernel: 4.14.71-ti-r80)

you can download the last image of BBB here

Install PowerVR Module

The OLD Version

It's not a good solution and I have not test.
The older version may run on versions lower or equal than 4.4.68-bone17.
The old version use the FBDEV.
So you need a lts/bone kernel to download :

cd /opt/scripts/tools/
git pull
./ --kernel 4.4.`your version here`-bone17
apt-get install ti-sgx-es8-modules-`uname -r`
depmod -a

Build SGX userspace for 4.4.x (must be done on an x86, due to the TI blob extractor)

git clone
cd bb-kernel/
git checkout origin/am33x-v4.4 -b tmp-sgx

Copy ./deploy/GFX_5.01.01.02_es8.x.tar.gz to BeagleBone/BeagleBone Black and install

tar xfv GFX_5.01.01.02_es8.x.tar.gz -C /
cd /opt/gfxinstall/
apt-get install lsb-release insserv

Verify omaplfb & pvrsrvkm loaded

debian@arm:~$ lsmod | grep omaplfb
omaplfb                12065  0 
pvrsrvkm              178782  1 omaplfb

But when I test with lastest 4.4-bone kernel, the omapfbl module was not loaded

The NEW Version

Check access of SGX drivers

ls /sys/devices/platform/ocp/56000000.sgx
driver  driver_override  drm  modalias  of_node  power  subsystem  uevent

If you are on 4.9.X kernel, you don't have access to the SGX drivers, update your dtb files for solve this problem:

cd /opt/source/dtb-4.9-ti/
git pull
make install

The git pull command patch the dtb files to apply this patch. And retry the command to verify the access of SGX drivers, it's very important else you can't continue this tutorial...

Installing the module

apt-get install ti-sgx-ti335x-modules-`uname -r`
depmod -a

The GBM Library


The GBM library is patched by Texas Instruments for use the PowerVR module.
The library on /usr/lib/arm-linux-gnueabihf/ is not a good library for use the graphic accelerator.

Add news directories of libs

Edit /etc/ file, and add /usr/lib and /usr/local/lib after the first line.

cat /etc/
# Multiarch support

After your file saved, type ldconfig to reload the new directories of libraries.

Download/Install library

cd /opt/
git clone git:// -b next
cd libgbm/
git apply
make install
cd /opt/
rm -r libgbm
ln -s /usr/local/lib/ /usr/local/lib/

How get the GOOD library

Note: If you want just use the graphic accelerator, this part is not important.
I explain how I sought to get the patches from Texas Instruments. You can go to the next step if you want.
I created a SD with am335x-evm-linux-XX.XX.XX.XX.img image and the graphic accelerator work fine on the BeagleBone Black. So I download the last SDK of AM335X from this page. Must be done on an x86 because this repo is very big, I use PSDK for this example:

$ cd /opt/
$ git clone git:// tisdk
$ cd tisdk
$ ./ -f configs/processor-sdk/processor-sdk-
$ find /opt/tisdk/sources -iname "*libgbm*"
$cat /opt/tisdk/sources/meta-ti/recipes-graphics/gbm/
BRANCH = "next"
SRC_URI = "git://;protocol=git;branch=${BRANCH}"
$ls /opt/tisdk/sources/meta-processor-sdk/recipes-graphics/gbm/libgbm

I have the git source with the branch and I know there is only one patch !


Download/Install SGX SDK

cd /opt/
git clone -b ti-img-sgx/1.14.3699939 git://
cd omap5-sgx-ddk-um-linux/
export DISCIMAGE=/
export TARGET_PRODUCT=ti335x
make install
cd /usr/lib/
ln -s
mkdir /usr/local/lib/gbm/
cd /usr/local/lib/gbm/
ln -s ../../../lib/
rm -r /opt/omap5-sgx-ddk-um-linux

File powervr.ini

As explained on the texas instruments wiki, the configuration of the /etc/powervr.ini file is important. I advise you to configure your file as mine:

cat /etc/powervr.ini

The PVR Tools and Examples