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.

5 comments:
I am thinking, does this process assumes that I am working on the PandaBoard it self, like download and save to the flash on the PandaBoard, or on my Ubuntu Host PC? if on my Ubuntu Host PC then you are assuming I have a Cross Compiler installed?
It does assume you are working on the PandaBoard natively.
Thanks for the complete instructions. I'm curious what kernel you used. I tried MeeGo base's version of 2.6.36-rc4 and also linux-linaro-2.6.38. In both cases I had failures of cpuidle.c to compile with "Arch needs cpu_idle_wait equivalent here." I'm told that cpu_idle_wait has been deprecated and that the drivers must be built with an older kernel, but I haven't tried again, just proceeded with a chroot solution using the Ubuntu 10.10 kernel and TI prebuilt drivers.
Oh wait: I see you compiled the demos but not the pvrsrvrkm module. Never mind!
Can u tell... the steps for running the OpenGL example ??
Post a Comment