The goal is to compile the examples from the Imaginations Technologies Graphics SDK to run OpenGL ES software on a BeagleBoard/PandaBoard:
BACKGROUND:
The OMAP4430 contains several things. One area of the silicon is the Imaginations Technologies' licenced intellectual property in the Power SGX540. This section of the die supports hardward processing of the OpenGL ES 1.1 and 2.0 standards.
The exact nature of the hardware which processes the graphics is proprietary and deliberately kept closed. To protect the knowledge of how to implement graphics drivers in silicon it is assumed that it is necessary to restrict access to the low level software which interacts with it.
To this end you are unlikely to ever see the source code for the device drivers which operate the SGX540. What you do get is the binary driver. TI distribute this within the Ubuntu package "ubuntu-omap4-extras-graphics".
Therefore there are several sources of information involved to getting OpenGL ES 2.0 code to compile on the PandaBoard or the BeagleBoard etc.
Now you will need to install the PowerVR SDK from Imagination Technologies:
You will probably need to register an account on that website before you can download the SDK.
Have a quick read through the PDF "OpenGL ES 2.x SDK.User Guide.1.32.2.2f.External.pdf" or similar.
We will focus on the "TrainingCourse" directory and the"Builds" directory mostly.
Then you need to modify the Makefile found at /Builds/OGLES2/LinuxGeneric/make_demo.mak
I modified it to include to the absolute path to the "make_platofrm.mak" file
#---------------------------------------------------------------------
#Replaced by Dingo_aus include $(SDKDIR)/Builds/OGLES2/$(PLATFORM)/make_platform.mak
include /media/restore/pandaboard/powervr_sdk/SDKPackage_OGLES2/Builds/OGLES2/LinuxARMV7/make_platform.mak
#---------------------------------------------------------------------
You can replace this with whatever path you can give make to see the "make_platform.mak" file.
All bar the first two demos in the "Trainingcourse" folder need to compile the tools as well as their code. Therefore we will n
Modify Tools Makefile @ SDKPackage_OGLES2/Tools/OGLES2/Build/LinuxGeneric
.PHONY: clean
SDKDIR = ../../../..
#include $(SDKDIR)/Builds/OGLES2/$(PLATFORM)/make_platform.mak
include /media/restore/pandaboard/powervr_sdk/SDKPackage_OGLES2/Builds/OGLES2/LinuxARMV7/make_platform.mak
OUTNAME = libogles2tools.a
INCLUDES += -I$(SDKDIR)/Tools -I$(SDKDIR)/Tools/OGLES2 $(addprefix -I, $(PLAT_INC))
VPATH = $(SDKDIR)/Tools : $(SDKDIR)/Tools/OGLES2
The beginning of my make_platform.mak file looks like:
ifdef TOOLCHAIN
PLAT_CC = $(TOOLCHAIN)/bin/arm-none-linux-gnueabi-gcc
PLAT_CPP = $(TOOLCHAIN)/bin/arm-none-linux-gnueabi-g++
PLAT_AR = $(TOOLCHAIN)/bin/arm-none-linux-gnueabi-ar
else
PLAT_CC = arm-linux-gnueabi-gcc
PLAT_CPP = arm-linux-gnueabi-g++
PLAT_AR = ar
endif
I have created a file called "dingo_build.sh" which contains the following text:
I save this file in the same directory as the makefile for a particular training course's code. I then run it with:
BACKGROUND:
The OMAP4430 contains several things. One area of the silicon is the Imaginations Technologies' licenced intellectual property in the Power SGX540. This section of the die supports hardward processing of the OpenGL ES 1.1 and 2.0 standards.
The exact nature of the hardware which processes the graphics is proprietary and deliberately kept closed. To protect the knowledge of how to implement graphics drivers in silicon it is assumed that it is necessary to restrict access to the low level software which interacts with it.
To this end you are unlikely to ever see the source code for the device drivers which operate the SGX540. What you do get is the binary driver. TI distribute this within the Ubuntu package "ubuntu-omap4-extras-graphics".
Therefore there are several sources of information involved to getting OpenGL ES 2.0 code to compile on the PandaBoard or the BeagleBoard etc.
STEP 1
- Download the PowerVR SDKNow you will need to install the PowerVR SDK from Imagination Technologies:
http://www.imgtec.com/powervr/insider/sdkdownloads/index.asp
You will probably need to register an account on that website before you can download the SDK.
Have a quick read through the PDF "OpenGL ES 2.x SDK.User Guide.1.32.2.2f.External.pdf" or similar.
We will focus on the "TrainingCourse" directory and the"Builds" directory mostly.
STEP 2
- Modify the make_demo.mak MakefileThen you need to modify the Makefile found at /Builds/OGLES2/LinuxGeneric/make_demo.mak
I modified it to include to the absolute path to the "make_platofrm.mak" file
#---------------------------------------------------------------------
#Replaced by Dingo_aus include $(SDKDIR)/Builds/OGLES2/$(PLATFORM)/make_platform.mak
include /media/restore/pandaboard/powervr_sdk/SDKPackage_OGLES2/Builds/OGLES2/LinuxARMV7/make_platform.mak
#---------------------------------------------------------------------
You can replace this with whatever path you can give make to see the "make_platform.mak" file.
STEP 3
- Modify the tools Makefile All bar the first two demos in the "Trainingcourse" folder need to compile the tools as well as their code. Therefore we will n
Modify Tools Makefile @ SDKPackage_OGLES2/Tools/OGLES2/Build/LinuxGeneric
.PHONY: clean
SDKDIR = ../../../..
#include $(SDKDIR)/Builds/OGLES2/$(PLATFORM)/make_platform.mak
include /media/restore/pandaboard/powervr_sdk/SDKPackage_OGLES2/Builds/OGLES2/LinuxARMV7/make_platform.mak
OUTNAME = libogles2tools.a
INCLUDES += -I$(SDKDIR)/Tools -I$(SDKDIR)/Tools/OGLES2 $(addprefix -I, $(PLAT_INC))
VPATH = $(SDKDIR)/Tools : $(SDKDIR)/Tools/OGLES2
STEP 4
- Modify the "make_platform.mak" MakefileThe beginning of my make_platform.mak file looks like:
ifdef TOOLCHAIN
PLAT_CC = $(TOOLCHAIN)/bin/arm-none-linux-gnueabi-gcc
PLAT_CPP = $(TOOLCHAIN)/bin/arm-none-linux-gnueabi-g++
PLAT_AR = $(TOOLCHAIN)/bin/arm-none-linux-gnueabi-ar
else
PLAT_CC = arm-linux-gnueabi-gcc
PLAT_CPP = arm-linux-gnueabi-g++
PLAT_AR = ar
endif
STEP 5
- Create a script to set the environment variables.I have created a file called "dingo_build.sh" which contains the following text:
# Script to set variables for OMAP4 build by Dingo_aus
export LIBDIR=/usr/lib
export X11ROOT=/usr/include/X11
make PLATFORM=LinuxOMAP4 X11BUILD=1
export LIBDIR=/usr/lib
export X11ROOT=/usr/include/X11
make PLATFORM=LinuxOMAP4 X11BUILD=1
I save this file in the same directory as the makefile for a particular training course's code. I then run it with:
sh ./dingo_build.sh
You should now be able to build the demonstrations. If you have any issues, please feel free to post a comment below.
Comments
* Edit Builds/OGLES2/LinuxGeneric/make_common.mak, add to COMMON_CFLAGS: -mfloat-abi=hard
* In Builds/OGLES2/LinuxARMV7/make_platform.mak should read
PLAT_CC = arm-linux-gnueabihf-gcc
PLAT_CPP = arm-linux-gnueabihf-g++
PLAT_AR = ar
and in both PLAT_CFLAGS -mfloat-abi=hard (NOTE: these flags might not be needed as it is defined in make_common.mak)
* Build script for samples in TrainingCourse/*/OGLES2/Build/LinuxGeneric:
export LIBDIR=/usr/lib
export X11ROOT=/usr/include/X11
make PLATFORM=LinuxARMV7 X11BUILD=1
* Launch samples from ../LinuxARMV7/ReleaseX11
http://www.imgtec.com/downloadconfirmation.asp?SDK=OMAP4430Linux&Title=OpenGL%20ES2%20Linux%20TI%20OMAP4430%20v2.10
SDK was used on Pandaboard, so I did not need to configure a cross-compiling toolchain.