Rebuilding the Graphics SGX Kernel Modules
Perform the following steps to build the graphics SGX kernel modules with the TI PSP SDK Kernel Release.
Perform steps 1 and 2 as mentioned in Building the OMAP35x Graphics Demo Software.
Navigate to the installed Graphics SDK folder
host $ cd /home/user_account/OMAP35x_Graphics_SDK_#_##_##_##
Check for the silicon version on your EVM board and based on whether it is OMAPv2.x (with ES2.1 silicon) or OMAPv3.x (With ES3.0 silicon) or AM35x, execute the appropriate command as given below.
If your EVM supports OMAP3 ES 3.x, execute one of the following commands to build the Graphics SGX kernel modules in release mode
Either host $ make buildkernel or host $ make buildkernel OMAPES=3.x BUILD=release
If your EVM supports OMAP3 ES 3.x, execute the following command to build the Graphics SGX kernel modules in debug mode
host $ make buildkernel OMAPES=3.x BUILD=debug
If your EVM supports OMAP3 ES 2.x, execute the following command to build the Graphics SGX kernel modules in release mode
host $ make buildkernel OMAPES=2.x BUILD=release
If your EVM supports OMAP3 ES 2.x, execute the following command to build the Graphics SGX kernel modules in debug mode
host $ make buildkernel OMAPES=2.x BUILD=debug
NOTE: Rebuilding the SGX kernel modules will replace the default pre-built kernel modules with the latest re-built kernel modules under the gfx_dbg_es2.x, gfx_dbg_es3.x, gfx_rel_es2.x or gfx_rel_es3.x folders depending on the type of command execution as mentioned above in this section.
Building and Executing Your Own Demos
This section describes the steps required to build user implemented demonstrations.
- Place your demos in the same directory format as default graphics SDK demos
- Copy the release or debug versions of the shared and static libraries from the appropriate gfx_dbg_es2.x, gfx_dbg_es3.x, gfx_rel_es2.x or gfx_rel_es3.x folders to the OpenGL ES demo locations as shown below In case of OpenGL ES1.1 demos, perform the following steps
host $ mkdir -p /home/<user_account>/OMAP35x_Graphics_SDK_#_##_##_##/GFX_Linux_SDK/OGLES/SDKPackage/Builds/OGLES/LinuxOMAP3/lib host $ cp /home/<user_account>/OMAP35x_Graphics_SDK_#_##_##_##/gfx_rel_es3.x/*.so /home/<user_account>/OMAP35x_Graphics_SDK_#_##_##_##/GFX_Linux_SDK/OGLES/SDKPackage/Builds/OGLES/LinuxOMAP3/lib host $ cp /home/<user_account>/OMAP35x_Graphics_SDK_#_##_##_##/gfx_rel_es3.x/*.a /home/<user_account>/OMAP35x_Graphics_SDK_#_##_##_##/GFX_Linux_SDK/OGLES/SDKPackage/Builds/OGLES/LinuxOMAP3/lib
In case of OpenGL ES2.0 demos, perform the following steps
host $ mkdir -p /home/<user_account>/OMAP35x_Graphics_SDK_#_##_##_##/GFX_Linux_SDK/OGLES2/SDKPackage/Builds/OGLES/LinuxOMAP3/lib host $ cp /home/<user_account>/OMAP35x_Graphics_SDK_#_##_##_##/gfx_rel_es3.x/*.so /home/<user_account>/OMAP35x_Graphics_SDK_#_##_##_##/GFX_Linux_SDK/OGLES2/SDKPackage/Builds/OGLES/LinuxOMAP3/lib host $ cp /home/<user_account>/OMAP35x_Graphics_SDK_#_##_##_##/gfx_rel_es3.x/*.a /home/<user_account>/OMAP35x_Graphics_SDK_#_##_##_##/GFX_Linux_SDK/OGLES2/SDKPackage/Builds/OGLES/LinuxOMAP3/lib
Perform similar steps as above for OpenVG demos as well.
- Set the following environment variables
- Ensure that the ARM toolchain path is included in the PATH variable
host $ export PATH=/home/<user_account>/toolchain/arm-2009q1/bin:$PATH
- Set the PLATFORM environment variable to LinuxOMAP3
host $ export PLATFORM = LinuxOMAP3
- Set the LIBDIR environment variable to the path where the graphics driver libraries are copied.
For OpenGL ES1.x demos, set the following
host $ export LIBDIR = /home/<user_account>/OMAP35x_Graphics_SDK_#_##_##_##/GFX_Linux_SDK/OGLES/SDKPackage/Builds/OGLES/LinuxOMAP3/lib
For OpenGL ES2.x demos, set the following
host $ export LIBDIR = /home/<user_account>/OMAP35x_Graphics_SDK_#_##_##_##/GFX_Linux_SDK/OGLES/SDKPackage/Builds/OGLES2/LinuxOMAP3/lib
- Set the DISCIMAGE to your target file system install directory. This is required when the graphics and the dependent libraries are installed
host $ export DISCIMAGE = <your_target_file_system>
- Copy libstdc++.so, libstdc++.so.6 and libstdc++.so.6.0.9 from the toolchain path to your target file system's /usr/lib directory
host $ cp /home/<user_account>/toolchain/arm-2009q1/arm-none-linux-gnueabi/lib/libstdc++.so* /home/<user_account>/workdir/filesys/usr/lib
- Perform the build of your demonstration
host $ cd /home/<user_account>/OMAP35x_Graphics_SDK_#_##_##_##/GFX_Linux_SDK/OGLES/SDKPackage/Demos/<your_OpenGL_ES1.x_demo>/OGLES/Build/LinuxGeneric host $ make
- Copy the built executables to the target file system
host $ cp /home/<user_account>/OMAP35x_Graphics_SDK_#_##_##_##/GFX_Linux_SDK/OGLES/SDKPackage/Demos/<your_OpenGL_ES1.x_demo>/OGLES/Build/LinuxOMAP3/ReleaseRaw/<demo_executable> /home/<user_account>/workdir/filesys/opt/gfxsdkdemos
- Create a file called gfxinstallinfo.txt and depending on the AM/OMAP3 silicon version used in your EVM and based on the type of build (debug or release) you desire, edit this file to include the following text. Alternatively you could also use the following commands to create the file as well add the appropriate text.
host $ echo "release3.x" > /home/<user_account>/OMAP35x_Graphics_SDK_#_##_##_##/gfxinstallinfo.txt or host $ echo "debug3.x" > /home/<user_account>/OMAP35x_Graphics_SDK_#_##_##_##/gfxinstallinfo.txt or host $ echo "release2.x" > /home/<user_account>/OMAP35x_Graphics_SDK_#_##_##_##/gfxinstallinfo.txt or host $ echo "debug2.x" > /home/<user_account>/OMAP35x_Graphics_SDK_#_##_##_##/gfxinstallinfo.txt
Copy this file to the target file system
host $ cp /home/<user_account>/OMAP35x_Graphics_SDK_#_##_##_##/gfxinstallinfo.txt /home/<user_account>/workdir/filesys/opt/gfxsdkdemos/.
This is used by the omap-demo script to identify which pre-built version of SGX user modules and kernel modules need to be installed on your DVEVM device for your demo to execute properly.
- Before running your graphics SDK demo application from the command line, it is necessary to install the appropriate SGX user libraries as well as kernel modules, based on the AM/OMAP35x silicon version used in EVM and the debug or release version of the build being used. This is done by default, on DVEVM power up, when using the NFS based target file system built using the steps mentioned GSG:_AM35x_and_OMAP35x_Rebuilding_the_Software#Installing_the_NFS_Target_File_System_with_Graphics_SDK_Demos here.
In case the omap-demo script is not executed, execute the following command, after linux boottarget $ cd /etc/init.d target $ ./omap-demo
This will install all the necessary SGX user modules and kernel modules as well as performs the necessary initializations. Executing omap-demo in turn calls the appropriate install.sh on the target, based on the silicon version and the build type (debug or release version) used. This will also execute the rc.pvr script to load kernel modules and initialize the relevant SGX modules.
- Execute your graphics SDK demo
target $ cd /opt/gfxdemos target $ ./<your_demo_exec>