Jump to: navigation, search

SGX SDK 5 Alpha

For Toggle to work as planned, it needs hardware acceleration of the user interface rendering. What that meas is that the OpenGL ES 2 API must be hardware accelerated. The BeagleBone has an PowerVR SGX 530 3D engine made by | Imagination Technologies.

As of this writing, there is no DRM support for the SGX core with the 3.12 kernel and there is also no X nor Wayland drivers available.

What does work is programming through the API directly and running the demos etc. When trying to compile the SGX SDK towards the BeagleBoard Kernel, there were a lot of patching that had to be done both to the kernel and to the kernel modules used in the SDK (which are open source). Therefore I decided to upload the changes to a repository so that others do not have to redo the same work. Here is the link:

https://bitbucket.org/intelligentagent/bb-sgx

How to reproduce

Get the code:

 git clone https://bitbucket.org/intelligentagent/bb-sgx
 cd bb-sgx

Configure for your system:

 nano Rules.make
 

Change all the variables with @@var@@ around them. This is the same as the normal procedure. I recommend making a folder in your current dir. Do something like this:

 mkdir -p remotefs/etc/init.d

Build the stuff:

 make all
 make install

Copy the files to your BB:

 scp -r rootfs/* root@192.168.7.2:/

Ssh to your bone:

 ssh root@192.168.7.2
 

Run the install script:

 /etc/init.d/335x-demo

The script will try to start the demo, but will fail since the srvpvrkm.ko is inserted with device tree. So instead, sync and reboot.

 sync
 reboot

Enable the SGX by making a device tree overlay with status OK:

 nano BB-SGX-00A0.dts

Copy-paste in this:

 /dts-v1/;
 /plugin/;
 
 / {
 	compatible = "ti,beaglebone", "ti,beaglebone-black";
 
 	part-number = "BB-SGX";
 	version = "00A0";
 
 	fragment@0 {
             target = <&sgx>;
                __overlay__ {
 		       status          = "okay";
 	       };
 	};
 };

Compile it:

 dtc -O dtb -o BB-SGX-00A0.dtbo -b 0 -@ BB-SGX-00A0.dts

Move it:

 cp BB-SGX-00A0.dtbo /lib/firmware/

Enable it:

 echo BB-SGX > /sys/devices/bone_capemgr.*/slots

Check for kernel messages:

 dmesg

start the server:

 /etc/init.d/rc.pvr start

You should see the PowerVR server starting:

 PVR: 
 PVR: Memory Stats
 PVR: ------------
 PVR: 
 PVR: High Water Mark = 0 bytes
 Loaded PowerVR consumer services.