Angstrom GFX

From OMAPpedia

Revision as of 21:50, 24 May 2010 by Hari s (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


[edit] 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:

[edit] Obtaining the Graphics SDK from TI

     $ chmod +x OMAP34xx_GFX_SDK_K2.6.27_Zoom2-
     $ ./OMAP34xx_GFX_SDK_K2.6.27_Zoom2-

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.

[edit] 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:

      $ cd ../OMAP34xx_GFX_SDK_Zoom2
      $ export DISCIMAGE=<path/to/target/filesystem>
       $ ./ --install libs
       $ ./ --install demo
       $ ./ --install course

All Demos and Courses will be copied to target file system's "/usr/local/bin"

Note: If filesystem was created using the narcissus progam, 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 <path_to_openembedded_source>/tmp/cross/armv7a/arm-angstrom-linux gnueabi/lib/
      $ cp /home/<user_name>/<path_to_target_filesystem>/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)

[edit] 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.

       # cd /usr/local/bin
       # ./gles2test1 1000
   By this command you should be able to see the two rotating triangle on the LCD screen.
       # cd /usr/local/bin/Demos
       # ./OGLESChameleonMan -quitafterframe=1000

Runs application for 1000 frames

       # cd /usr/local/bin/Course
       # ./OGLES2AlphaTest -quitaftertime=10

Runs application for 10 seconds

      $ /etc/init.d/rc.pvr stop

[edit] Building the SDK on your own

(This was tested with

To build the modules and demos, you have to have a tree with the appropriate kernel build first, for details see #Building Kernel Modules. 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

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 #Building Kernel Modules
  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: ./ --set
  7. Fix broken cross-compilation: /path/to/ .
  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: ./ --kernel
  10. To install the modules and the basic userspace stuff: ./ --install libs
  11. Optionally:
    1. If you want/have to use a different toolchain for userspace, adapt CROSS_COMPILE and PATH as needed.
    2. To build and install demos: ./ --build demo && ./ --install demo
    3. To build and install course: ./ --build course && ./ --install course

[edit] Building Kernel Modules

Some warnings first:

      $ cd OMAP34xx_GFX_SDK_Zoom2
      $ export KERNELDIR=/path/to/prebuilt/kernel
      $ ./ --kernel

After successful build the kernel modules (*.ko) files will be copied to "bin/binary_omap3430_linux_release"

[edit] 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:

Furthermore, you can install:

for example:

# 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:

# opkg files packagename
Personal tools