Since I spent way too much time on figuring this out, confused by plenty of old and outdated online
sources, here is how one would get the PowerVR SGX driver running on a current
Linux in 2019 - in this case a debian 9.6 with a 4.4 kernel. Other combinations
might/should work also, but I have not tested them.
To summarize briefly, the difference to the previous ways of getting the SGX
stuff running, is that the old GFX_SDK_* based setups are outdated. This
includes omaplfb.ko kernel module based instructions, which also come from the
Last but not least, it looks like one has to run a TI kernel (updated
to with flag --ti-kernel, see below), as the bone kernels (--bone-kernel)
don't seem to have the new SGX driver stack.
I used bone-debian-9.6-console-armhf-2018-12-10-2gb.img.xz from RobertCNelson's
site at https://rcn-ee.com/rootfs/2018-12-10/microsd/, as I wanted a leaner
base system than what's available on https://beagleboard.org/latest-images.
To put it in a nutshell, we need to run a TI kernel, and install the matching
SGX DDK, and ideally initialize it on startup. So on your system on the BBB
the following should install the TI kernel (v4.4, which worked for me) - the below assumes
that the default user debian of the image is used, so some sudo is needed occasionally:
sudo ./update_kernel.sh --ti-kernel --lts-4_4
Now the SGX DDK, which we'll build from source:
sudo apt install -y libdrm-omap1 libgbm1
git clone -b ti-img-sgx/1.14.3699939_k4.4 git://git.ti.com/graphics/omap5-sgx-ddk-um-linux.git --depth=1
sudo env DISCIMAGE=/ TARGET_PRODUCT=ti335x make install
rm -rf ./omap5-sgx-ddk-um-linux
sudo ln -s /usr/lib/arm-linux-gnueabihf/libgbm.so.1 /usr/lib/arm-linux-gnueabihf/libgbm.so.2
lsmod | grep pvr
dmesg | grep -i -C1 'drm\|sgx\|pvr'
sudo rm /etc/powervr.ini
sudo tee -a /etc/powervr.ini <<EOF
sudo /usr/bin/pvrsrvctl --start --no-module
If the above installed fine, and all the test steps in the above block also
worked, let's automate the SGX initialization at startup via systemd:
sudo tee -a /etc/systemd/system/pvr-init.service <<"TTT"
# startup fails sometimes (too early?), retry in loop - this paired with TimeoutStartSec is a
# workaround to oneshot services refusing decent Restart= settings (at least for systemd <= 232)
ExecStart=/bin/sh -c 'while ! /etc/init.d/rc.pvr start; do sleep 5; done'
sudo systemctl enable pvr-init