My favorites | Sign in
Project Home Downloads Wiki Issues Source
Search
for
HowtoUseSGXunderAngstrom  
A cookbook on how to download, build, install and run the SGX drivers for OMAP 35x under the Linux / Angstrom distribution.
Updated Jul 27, 2011

Introduction

This may not be perfect, but will give you a head start should you decide to try the OpenGL/ES drivers for the SGX in the OMAP 35x. Please remember that this software is alpha quality. So it does work, but it has many problems.

Known Problems

Each of the below problems is software related and either has a work-around or will be addressed in some upcoming release.

  • Requires 16 bits-per-pixel framebuffer operation. To ensure this, add 'omapfb.video_mode=1024x768MR-16@60' to the bootargs command in your u-boot environment. Note that the -16 is what's important. The default is -24 which will not work. Other resolutions will work.
  • Seems to show a vertical discontinuity (tearing) down the centerline when operating at 1024x768 resolution.
  • Seems to run the SGX block at half its normal speeed (55 MHz versus 110 MHz). There is a workaround for this problem in the procedure below.

Prerequisites

  • This cookbook assumes that you have already installed Bitbake and Open Embedded. And that you have an up-to-date copy of the openembedded metadata installed on a Linux machine. Refer to: http://elinux.org/BeagleBoardAndOpenEmbeddedGit for instructions on installing bitbake and the metadata. You will need to do the entire procedure.
  • You will need to have an SD card with the console image (or other Angstrom image) built and installed on it. Note that the SGX drivers here do not play that nicely with X11. So a console image may be the best bet.
  • This procedure assumes that you are permitted to obtain the OMAP 35x Graphics SDK version 3.00.00.06 from Texas Instruments, and that you are willing and able to accept the terms of the click-wrap license agreement that accompanies this SDK. Access to the SDK is controlled by Texas Instruments. And this procedure does not include any rights or implication regarding rights to access this SDK.
  • This procedure assumes that your Beagleboard has a web connection via wired or wireless ethernet etc. Usually this is done with a USB-to-Ethernet dongle plugged into a powered USB hub, which is, in turn, plugged into the Beagleboard. See BeagleBoardShoppingList for some hints on ethernet interfaces. The ethernet interface is needed simply for the opkg install commands listed below in Step IV. If need be, there may be a way to do the opkg installs without network access.

Procedure for Building the SGX User-mode Libraries for OpenGL/ES

Step I: Obtain the Graphics SDK from TI

  • Obtain a http://my.ti.com account by visiting the site and registering appropriately.
  • Send an email to 'gamingonomap@list.ti.com' requesting extranet access to the OMAP35x_Graphics_SDK_setuplinux_3_00_00_06.bin release through your my.ti.com account, and give them your my.ti.com username (email address).
  • Download the file named: OMAP35x_Graphics_SDK_setuplinux_3_00_00_06.bin. (I'll call it the .bin file for short). It's about 270 MB. So it may take a while.
  • Do a 'chmod +x' on the .bin file. (If it's not executable the Bitbake will fail)

Step II: Build the user-mode libraries for OpenGL/es 2.0 and 1.1

  • Copy the .bin file from Step I into your $OE_HOME/openembedded/packages/powervr-drivers/ folder.
  • Do 'source $OE_HOME/beagleboard/beagleboard/profile.sh' to establish the bitbake environment variables.
  • Do 'bitbake libgles-omap3-3.00.00.06'. This will fire off a build of the ipk files. It should start a build with 500 or more steps.
  • Answer the dialog boxes with yes, or default answers.

  • When the bitbake completes, you will should have four .ipk files in: $OE_HOME/tmp/deploy/glibc/ipk/armv7a/ named:

     libgles-omap3_3.00.00.06-r5.1_armv7a.ipk
     libgles-omap3-dbg_3.00.00.06-r5.1_armv7a.ipk
     libgles-omap3-dev_3.00.00.06-r5.1_armv7a.ipk
     libgles-omap3-tests_3.00.00.06-r5.1_armv7a.ipk
  • Copy the four .ipk files onto your Angstrom SD Card in the /home/root folder of the Angstrom Linux Partition on the SD card.
  • Print out the file: $OE_HOME/tmp/work/armv7a-angstrom-linux-gnueabi/libgles-omap3-3.00.00.06-r5/OMAP35x_Graphics_SDK_3_00_00_06/OMAP35x_Graphics_SDK_GettingStartedGuide.pdf. This file is full of information. But remember: This document is written for the Texas Instruments OMAP 35x EVM running the Texas Instruments Linux distribution. So not everything in here applies directly to the Angstrom environment running on Beagleboard.

Step III: Configuring your Beagleboard for 16-bit Framebuffer Operation

By default, the Beagleboard boots with 24 bit-per-pixel frame buffer operation. The SGX drivers do not support this mode.

  • Connect your Beagleboard's serial port to a terminal emulator (minicom, teraterm, etc). Set the emulator software to 115200 baud, no parity, 8-bits, 1 stop-bit, no flow control.
  • Turn on your Beagleboard. When it starts its countdown, hit any key to get to the u-boot prompt.
  • At the u-boot prompt, do: 'nand erase 260000 20000'. This will erase the settings in the NAND and restore them to their defaults.
  • Do: setenv mmcargs 'setenv bootargs console=ttyS2,115200n8 root=/dev/mmcblk0p2 rw rootfstype=ext3 rootwait omapfb.video_mode=1024x768MR-16@60'
  • Do: saveenv

  • Do: 'printenv' to see that the changes are there properly.

  • Now cycle power and the system should boot up with the monitor in 1024x768 60Hz resolution, with 16bpp.

Step IV: Install the Libraries in Your Angstrom System

  • Now put the SD Card in the Beagleboard, boot up Angstrom, and log in as root.
  • Make sure that your internet connection is working properly by doing a ping google.com or something like that. Sometimes getting the DHCP to work requires cycling the power and trying again. These opkg install and update commands use the internet to access the Angstrom package feeds and to download the appropriate packages as necessary.
  • Do 'opkg update'. This may take a few minutes and it will update your local list of packages available from the Angstrom feeds.
  • Do 'opkg install /home/root/libgles-omap3_3.00.00.06-r5.1_armv7a.ipk'. This will install the OpenGL/ES libraries onto your system.
  • Do 'opkg install /home/root/libgles-omap3-tests_3.00.00.06-r5.1_armv7a.ipk'. This will install the SGX Test programs.
  • Do 'opkg install devmem2'. This will install a little utility that will let you run the SGX at its normal speed of 110 MHz.

Step V: Running the SGX Software

  • Reboot your Beagleboard.
  • Do: 'dmesg | grep PVR'. And you should see 'PVRSRV_PIXEL_FORMAT_RGB565'. If you get RGB888, then you are in 24-bpp mode and the software will not work. Refer to Section III.
  • Do: 'devmem2 0x48004b40 w 0'. This should change the register from an original value of 2 to a new value of 0. The effect of this is that it will double the speed of the SGX accelerator. But this change will need to be done each time you reboot.
  • Now you can run the test programs as described in section 3.4.1 of the OMAP35x Graphics SDK Getting Started Guide that was printed out in Section 2. Note that not all the tests seem to run. Again, note that this is not a product release but an early alpha stage release.
Comment by DrT...@gmail.com, Mar 31, 2009

In Step II: The path of where to place the TI driver binary is wrong (as of 3/31/09) should be; $OE_HOME/openembedded/recipes/powervr-drivers/libgles-omap3/

Awesome job btw

Comment by Gogan...@gmail.com, Apr 2, 2009

Don't know about path where to place the TI driver binary, work good for me thogu...

Comment by omap...@onycha-blue.com, Apr 17, 2009

Thanks so much, that really made things a lot easier.

This may be part of the recipe's soon but there are also a few pre-built versions of the SDK demos (with required media if you want to try something quickly):

Src location:

oe\tmp\work\armv7a-angstrom-linux-gnueabi\libgles-omap3-3.00.00.06-r7\OMAP35x_Graphics_SDK_3_00_00_06\GFX_Linux_SDK\[OGXXX]\SDKPackage\Demos

Binary location:

oe\tmp\work\armv7a-angstrom-linux-gnueabi\libgles-omap3-3.00.00.06-r7\OMAP35x_Graphics_SDK_3_00_00_06\targetfs\nfs.tar.gz

inside archive: in opt/gfxsdkdemos

where oe\tmp is your open embedded temp directory.

re: Note that not all the tests seem to run. Again, note that this is not a product release but an early alpha stage release.

The only ones that seem to have problems are the flip tests (possibly related to the tearing problem), and the texture_stream test. ogles2test1 does seem require the fragment shader text to be in the current directory.

Comment by mrmarkcr...@gmail.com, Apr 26, 2009

In Step III: To set the video mode in the current version of the kernel use omapfb.mode=dvi:1024x768MR-16@60

Awesome guide, many thanks.

Comment by azapa...@gmail.com, May 12, 2009

I have to do following to make my monitor work in 640x480 mode:

echo "dvi p:25175" > /sys/devices/platform/omapfb/displays

Comment by beyo...@gmail.com, Jun 5, 2009

"do not play that nicely with X11" - what if I would like to use any engine that expects X11?, can someone put a comment on that please

Comment by bubba...@gmail.com, Jul 8, 2009

I believe the "vertical discontinuity (tearing) down the centerline" is due to the message "no flipping" being written to the log by either the dynamic LIBGLES_CM or the gpu .ko driver(s) every time eglSwapBuffers is called. It is simply bringing my board to its knees. When running the TI GFX_Linux_SDK X11 Demo examples this tearing does not happen nor does the "no flipping" message.

Comment by joelai85, Jul 17, 2009

i use kernel-2.6.29. i setup the sgx drivers following the above steps, but i can not initial the drivers under the angstrom-2.6.29. I think that because the driver module generated by the above steps is for kernel-2.6.22. How could get the sgx driver for kernel-2.6.29?

Comment by eon.walb...@gmail.com, Jul 24, 2009

2 questions :-

1. If all the steps above are followed what can you check to show the newer driver is being used?

2. When is the new driver update expected with the flipping supported?

Thanks

Comment by Krokoshn...@gmail.com, Aug 1, 2009

When I try to run gles1test1 on my Beagle Board, I get the following message: 'eglInitialize' returned egl error 'EGL_BAD_ALLOC' (0x3003) I have found other cases of people having this message but no solution.

Comment by robert.k...@gmail.com, Oct 17, 2009
Comment by adela...@gmail.com, Nov 16, 2009

while running opkg upgrade our board crashed. now at the log in screen it allows us to log in but jumps back to the log in screen after trying to load the user for about 10sec (whether it is the user or the root). hyperterminal works but each time we try to upgrade we get different error messages. Any help? Should we install another linux distribution?

Comment by genpfa...@gmail.com, Jan 15, 2010

PROTIP: If you're running Ubuntu Hardy (8.04) server in an amd64 virtual machine for OpenEmbedded? use, make sure to install ia32-libs. Otherwise OMAP35x_Graphics_SDK_setuplinux_3_00_00_09.bin (a 32-bit ELF binary) will silently fail to extract anything useful when executed by bitbake.

Comment by greggleb...@gmail.com, Feb 10, 2010

in Step II "Do 'source $OE_HOME/beagleboard/beagleboard/profile.sh' to establish the bitbake environment variables":

There are no instructions anywhere on what goes into the beagleboard profile.sh. I followed the complete instructions on the Angstrom distribution site and they do not discuss this profile. Is this the source-me.txt file they refer to?

Comment by epid...@gmail.com, Feb 26, 2010

Vertical tearing SOLVED! I had the same vertical discontinuities (tearing) on my lcd screen, running either OE Base-image or OE console-image (not running X at all). This has to do with the way the framebuffer is written to/buffered.

The solution was to edit the file: /etc/powervr.ini By default it had the line: WindowSystem?=libpvrPVR2D_FLIPWSEGL.so The solution was to change the line to this: WindowSystem?=libpvrPVR2D_BLITWSEGL.so

Other details are here (but the object name they use is wrong for newer SDK versions. I'm running OMAP35x_Graphics_SDK_3_00_00_09): http://wiki.davincidsp.com/index.php/GSG:_OMAP35x_Graphics_SDK_Additional_Procedures

Comment by tirumal....@gmail.com, May 4, 2010

Beagleboard: Kernel 2.6.29 with Angstrom Distribution. I downloaded packages (.ipk) directly from http://www.angstrom-distribution.org/repo/ and by searching 'libgles-omap' and installed manually using opkg with all its associated dependencies and it worked well.

except In Step III: To set the video mode in the current version of the kernel use omapfb.mode=dvi:1024x768MR-16@60, which has been comented by mrmarkcraig.

thank you for sharing!!

Comment by zhg...@gmail.com, Sep 13, 2010

Do you know how to compile the kernel modules for omap? My omap version is OMAP35x_Graphics_SDK_setuplinux_3_01_00_07.bin

After using create_sgx_package.sh, I get some directories. I enter into SDK_BIN/OMAP35x_Graphics_SDK_setuplinux_3_01_00_07, modify Rules.make to set the proper enviroment, but when I make buildkernel OMAPES=3.x BUILD=debug, It seems that It cannot correcly find the include path, I set the kernel include path using EXTRA_CFLAGS in the Makefile, It still fails in compiling, Is there anyway to set the proper compiling environment?

Comment by siavash_...@yahoo.com, Feb 11, 2011

I need to do this for kernel 2.6.34 I was wondering where does the version of your kernel comes into play? Because it is not mentioned anywhere in this procedure.


Sign in to add a comment
Powered by Google Project Hosting