Angstrom GFX

Graphics SDK
TI's Mobile Game Developer portal provides access to OMAP Graphics SDK's. The Graphics SDK typically have pre-built binaries for various platforms and example applications for software developers to utilize the OpenGLES 1.x, 2.x & OpenVG API's. Opensourced kernel drivers may be included in the package. There are several OMAP3430 SDK's supporting OMAP Zoom, Zoom2 & SDP platforms.

There are currently several ways how to get accelerated graphics working:
 * get the SDK, use the kernel + modules + userspace binaries provided with the SDK
 * get the SDK, build everything yourself (except for the userspace binary-only libs)
 * get the SDK, build with OE
 * get packages from the Angstrom feed
 * get an image that already includes all the OGLES stuff from narcissus

Obtaining the Graphics SDK from TI
$ chmod +x OMAP34xx_GFX_SDK_K2.6.27_Zoom2-1.4.14.2514.bin $ ./OMAP34xx_GFX_SDK_K2.6.27_Zoom2-1.4.14.2514.bin Read the license terms and accept them to install the graphics SDK on to your system. After successful installation you will get a directory with name OMAP34xx_GFX_SDK_Zoom2 in a given path. Refer the Readme.txt file in this package for using the package.
 * Send an email to gamingonomap@list.ti.com requesting access to the OMAP – Mobile Gaming extranet
 * You should get a mail as a response to your request. Follow instructions in the mail to register at TI extranet site
 * Go to [OMAP Gaming] and log in with your newly created credentials
 * Download the file named: OMAP34xx_GFX_SDK_K2627_Zoom2_v141425_20091022.zip before that you need to accept the licensing terms
 * Copy to Linux PC, after unzipping the package you should get Linux installer with the file name OMAP34xx_GFX_SDK_K2.6.27_Zoom2-1.4.14.2514.bin
 * You may need to give execute permission with below command
 * Now run this installer

Using the binaries from the SDK
Once a filesystem is ready, either by building it from Openembedded or from downloading using narcissus, make the following changes to the environment:


 * Edit "/etc/inittab" to get debug terminal
 * change ttyS3 to ttyS0 (i.e S:2345:respawn:/sbin/getty 115200 ttyS0)
 * save changes

$ cd ../OMAP34xx_GFX_SDK_Zoom2 $ export DISCIMAGE= $ ./build_SDK.sh --install libs $ ./build_SDK.sh --install demo $ ./build_SDK.sh --install course All Demos and Courses will be copied to target file system's "/usr/local/bin"
 * Change directory to installed SDK package
 * Set the variable DISCIMAGE to the path of the target file system which is us   ed by board.
 * "build_SDK.sh" script in the SDK directory can be used to install the kernel drivers, libraries and application binaries to target file system.
 * Use the below cmd to install kernel modules and libraries in target file system.
 * Use the below cmd to install the Demos from the SDK to target file system.
 * Use the below cmd to install the course from the SDK to target file system.

Note: If filesystem was created using the narcissus progam, libstdc++.so.6 will be missing within the "/lib" directory of the target filesystem. This *.so file is needed to run some of the demos provided withing the SDK package. Some but not all demos will work unless this in included in the target filesystem.

To include this a full build must be done. Once a full build is completed using openembedded, perform the following:

$ cd /tmp/cross/armv7a/arm-angstrom-linux gnueabi/lib/ $ cp libstdc++.so.6 /home///lib

Alternatively, if your target device has internet connectivity and there is an angstrom feed for it (as is the case with Zoom2), just issue:

$ opkg install libstdc++6

(you might need "opkg update" prior to this)

Booting and running apps
# /etc/init.d/rc.pvr start Note: You might have to do a "depmod -a" after the first boot to generate module dependencies, so that the kernel module is loaded correctly by rc.pvr.
 * Refer to Zoom Flashing section for information on how to install the filesystem on the zoom2 device.
 * The driver modules are built against Linux kernel-2.6.27. These drivers may not load with the other kernel. So use the kernel image from the package or if if you want to build drivers for your kernel refer "Building kernel modules" section.
 * Install the kernel drivers and libraries with above procedure.
 * Now power on the board and load the drivers by running following command at board linux prompt

# cd /usr/local/bin # ./gles2test1 1000 By this command you should be able to see the two rotating triangle on the LCD screen.
 * To test the sample graphics applications

# cd /usr/local/bin/Demos # ./OGLESChameleonMan -quitafterframe=1000 Runs application for 1000 frames
 * To test the graphics apps from demos

# cd /usr/local/bin/Course # ./OGLES2AlphaTest -quitaftertime=10 Runs application for 10 seconds
 * To test graphics apps from course

$ /etc/init.d/rc.pvr stop
 * To stop the SGX driver


 * For more information refer to "PowerVR SDK.Release Notes" located within the GFX package.

Building the SDK on your own
(This was tested with OMAP34xx_GFX_SDK_K2627_Zoom2_20090817.zip.)

To build the modules and demos, you have to have a tree with the appropriate kernel build first, for details see. You might want to use two different toolchains during the build -- one for the kernel and the kernel modules (2.6.27 doesn't compile with GCC 4.4.0), another for the userspace components (the SDK demos need libstdc++, but the one included in CSL 2008q3 toolchain is incompatible with current Angstrom libstdc++). That should be ok, as long as the C runtime of your toolchain/distro is compatible with that the prebuild SDK userspace binaries expect (the SDK includes binary-only dynamic libraries).

The SDK build scripts unfortunately don't always honour CROSS_COMPILE environment variable and use hardcoded CSL-like arm-none-linux-gnueabi- prefix. You can fix that with fix-sdk-cross-compile.sh.

You should do things in this order:
 * 1) Set up environment for the toolchain you want to use for the kernel part: export CROSS_COMPILE=your-toolchain-prefix- and update PATH if your toolchain lives off-path.
 * 2) Build kernel (make uImage && make modules) -- more info in
 * 3) Pick a dir for your root fs: export DISCIMAGE=/blah/rootfs; mkdir -p $DISCIMAGE (it can be yet unpopulated)
 * 4) Install kernel modules to rootfs: make INSTALL_MOD_PATH=$DISCIMAGE modules_install
 * 5) Extract SDK, cd OMAP34xx_GFX_SDK_Zoom2
 * 6) Fix SDK file permissions, links. etc: ./build_SDK.sh --set
 * 7) Fix broken cross-compilation: /path/to/fix-sdk-cross-compile.sh.
 * 8) Setup SDK environment: export KERNELDIR=/path/to/kernel/you/just/built (You also need DISCIMAGE as mentioned above.)
 * 9) To build the kernel modules: ./build_SDK.sh --kernel
 * 10) To install the modules and the basic userspace stuff: ./build_SDK.sh --install libs
 * 11) Optionally:
 * 12) If you want/have to use a different toolchain for userspace, adapt CROSS_COMPILE and PATH as needed.
 * 13) To build and install demos: ./build_SDK.sh --build demo && ./build_SDK.sh --install demo
 * 14) To build and install course: ./build_SDK.sh --build course && ./build_SDK.sh --install course

Building Kernel Modules
Some warnings first:
 * The kernel modules are quite sensitive to kernel changes, so without patching them you won't be able to build them for any recent kernel and you have to stick to some old one. This may depend on the version of the PVR SDK.
 * There were several versions of the Graphics SDK for Zoom2 released, including: OMAP34xx_GFX_SDK_K2627_Zoom2_20090817.zip, OMAP34xx_GFX_SDK_K2627_Zoom2_v141425_20091126.zip
 * To get a kernel with which the PVR Modules compile nicely (tested with OMAP34xx_GFX_SDK_K2627_Zoom2_v141425_20091126.zip):
 * use the tree git://git.omapzoom.org/repo/omapkernel.git
 * use revision 571770a16d95a0eaae9740ee0c58246700b345c7 (you could use the branch ti-2.6.27-omap3, but that sufferes from the white screen bug that was fixed only in 571770a16d95a0eaae9740ee0c58246700b345c7)
 * there is some info on compiling the PVR modules for Maemo; the modules compile and load fine, but if you try to use it, you just get EGL_BAD_ALLOC Maybe a newer userspace is needed (?)
 * the dated kernel seems to be sensitive to GCC version you use -- with 4.4.0 I got things like "pvrsrvkm: unknown relocation: 43", so better stick to the version that the SDK recommends (Readme.txt) - that is arm-2008q3 release from CodeSourcery for OMAP34xx_GFX_SDK_K2627_Zoom2_v141425_20091126.zip (2008q3-72 worked ok for me)

$ cd OMAP34xx_GFX_SDK_Zoom2
 * Change directory to SDK package
 * To build the graphics kernel modules you need to have a 2.6.27 kernel built for Zoom2 board. Refer to Building Linux Kernel for building Linux kernel.

$ export KERNELDIR=/path/to/prebuilt/kernel $ ./build_SDK.sh --kernel After successful build the kernel modules (*.ko) files will be copied to "bin/binary_omap3430_linux_release"
 * Set below environment variables
 * Corss tool path (Use tool chain "arm-2008q3" from Codesourcery)
 * Set path for prebuilt kernel source
 * Use the "build_SDK.sh" script to build the drives
 * Follow the installation procedure for using the new built drivers.

Using packages from the feed
There are already build packages that add accelerated OGLES support included in the Angstrom Zoom2 feed. You need to install the following packages:
 * omap3-sgx-modules (kernel modules; you have to use corresponding Angstrom kernel for them to work, obviously)
 * libgles-omap3 (basic userspace: libraries, init script)

Furthermore, you can install:
 * libgles-omap3-rawdemos (non-X11 demos)
 * libgles-omap3-x11demos (X11 demos)
 * quake3-pandora-gles (not tested)
 * ti-julius-demo (not tested)

for example:
 * 1) opkg update && opkg install omap3-sgx-modules libgles-omap3 libgles-omap3-rawdemos libgles-omap3-x11demos

To get a list of what is included in a package (e.g. to see what demos are there), after installing the package do:
 * 1) opkg files packagename