GSG: AM35x and OMAP35x Rebuilding the Software

From Texas Instruments Wiki
Jump to: navigation, search

^ Up to main OMAP35x Graphics SDK Getting Started Guide Table of Contents

This chapter describes to how rebuild various components within the OMAP35x Graphics SDK package

Setting up the NFS target file system

Perform the following steps to build and export the NFS target file system.

  1. Log in with a user account on the host Linux workstation. (In the following steps, we refer to the home user directory as "~".)
  2. Perform the following commands to prepare a location for the AM35x/OMAP35x/387x/389x EVM target file system. For Beagleboard users, the filesystem should already be available, and users can directly go to Building_the_OMAP35x_Graphics_Demo_Software.
    host $ cd ~
    host $ mkdir -p workdir/filesys
    host $ cd workdir/filesys
  3. Switch user to "root" on the host Linux workstation.
    host $ su 
    password:

    There will be a prompt for entering the password as shown above. Type the root password, for getting the root permissions

  4. For OMAP35x: Copy the OMAP35x PSP SDK NFS target file system from /home/<useracct>/OMAP35x-PSP-SDK-##.##.##.##/images/fs/omap3530/nfs.tar.gz to a new directory created in step 2. Perform the following commands. NOTE:Un-tar the file with root permissions. (Step 3)
    $ cp /home/<user_account>/OMAP35x-PSP-SDK-##.##.##.##/images/fs/omap3530/nfs.tar.gz .
    $ tar –xvzf nfs.tar.gz .

    For AM35x: Copy the OMAP35x PSP SDK NFS target file system from /home/<useracct>/OMAP35x-PSP-SDK-##.##.##.##/images/fs/am3517/nfs.tar.gz to a new directory created in step 2. Perform the following commands.

    NOTE:Un-tar the file with root permissions. (Step 3)

    $ cp /home/<user_account>/OMAP35x-PSP-SDK-##.##.##.##/images/fs/am3517/nfs.tar.gz .
    $ tar –xvzf nfs.tar.gz .
  5. Perform the following command to make sure you can write into the target file system that you want to export as NFS, from your user account.
    host $ chown -R <user_account> /home/<user_account>/workdir/filesys/.
    host $ chmod -R 755 /home/<user_account>/workdir/filesys/.
  6. Make sure the NFS server is configured and functioning properly. Add the following line to the /etc/exports file of the server. Ensure you have root permission before editing this file.
    /home/<user_account>/workdir/filesys 	(rw,insecure,sync,no_wdelay,no_root_squash)
  7. Then issue the following command to notify the NFS server about the new exported directory.
    host $ /usr/sbin/exportfs –a
    host $ /sbin/service nfs restart
  8. Make sure you exit from having the root permissions after completing all the above steps
    host $ exit
  9. Perform steps 1 to 3 as mentioned in Building_the_OMAP35x_Graphics_Demo_Software. Make sure to set the TARGETFS_INSTALL_DIR to point to the NFS target file system folder (/home/<user_account>/workdir/filesys) as created in this section, in the Rules.make file
  10. The ‘make install’ will install all the necessary libraries and executables required for running the Graphics SDK demos as well as application development using the graphics drivers.


Rebuilding u-boot and Linux Kernel

Ensure that the toolchain setup and install has been completed as mentioned in Installing the Toolchain NOTE: Use arm-2009q1 version for building all the components

Rebuilding U-boot

Rebuilding the U-boot is described in more detail in the LSP User’s Guide available at OMAP35x-PSP-SDK-##.##.##.##/docs/omap3517/UserGuide-##.##.##.##.pdf for AM35x and OMAP35x-PSP-SDK-##.##.##.##/docs/omap3530/UserGuide-##.##.##.##.pdf for OMAP35x

Below steps are provided for illustration purpose only taking OMAP35x as example
For all other platforms(OMAP37x,387x(814x),389x(816x))please refer to the respective u-boot user guide.


Copy the U-Boot source archive from OMAP35x-PSP-SDK-##.##.##.##/src/u-boot directory into your working directory

host $ cd ~
host $ mkdir –p workdir/opt
host $ cp /home/<useracct>/OMAP35x-PSP-SDK-#.##.##.##/src/u-boot/u-boot-##.##.##.##.tar.gz ~/workdir/opt/.

Un-tar the U-Boot source archive by performing the command given below.

host $ cd workdir/opt
host $ tar -zxvf u-boot-##.##.##.##.tar.gz

For AM35x:

To configure U-Boot for building, issue the following commands:

host $ cd uboot-##.##.##.##
host $ make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm distclean
host $ make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm am3517_evm_config

For OMAP35x:

To configure U-Boot for building, issue the following commands:

host $ cd uboot-##.##.##.##
host $ make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm distclean
host $ make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm omap3_evm_config

Once ready to build U-Boot, run the command:

host $ make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm

The resulting U-Boot image named u-boot.bin will be in the current directory, ready to be loaded on the target.

NOTE: Please note that the by default U-Boot image supports Micron NAND Flash, for the EVM's where SamSung OneNAND flash is populated user need to rebuild the U-Boot image after applying below patch -


diff --git a/include/configs/omap3_evm.h b/include/configs/omap3_evm.h
index 73a5c98..ff81237 100644
--- a/include/configs/omap3_evm.h
+++ b/include/configs/omap3_evm.h
@@ -152,8 +152,8 @@

 #define CONFIG_CMD_I2C         /* I2C serial bus support       */
 #define CONFIG_CMD_MMC         /* MMC support                  */
-#undef CONFIG_CMD_ONENAND      /* ONENAND support              */
-#define CONFIG_CMD_NAND                /* NAND support                 */
+#define CONFIG_CMD_ONENAND     /* ONENAND support              */
+#undef CONFIG_CMD_NAND         /* NAND support                 */
 #define CONFIG_CMD_DHCP
 #define CONFIG_CMD_PING

Rebuilding the Linux Kernel

Rebuilding the kernel is described in more detail in the User’s Guide available at OMAP35x-PSP-SDK-##.##.##.##/docs/omap3517/UserGuide-##.##.##.##.pdf for AM35x and OMAP35x-PSP-SDK-##.##.##.##/docs/omap3530/UserGuide-##.##.##.##.pdf for OMAP35x

'The below steps are provided for illustration purpose only taking OMAP35x'as example

For all other platforms(OMAP37x,387x(814x),389x(816x))please refer to the respective Linux PSP user guide.


Note that building the kernel requires using mkimage, a host side utility built by the u-boot makefile. If you have not already done so please build u-boot using the instructions in the Rebuilding U-Boot section. You will need to build U-boot and place mkimage in your Path. A command like below can be used. If you are using a bash shell, kindly add the following in the .bashrc file in your user account.

export PATH=/<path_to_uboot>/tools:$PATH

Copy the Linux kernel source archive from OMAP35x-PSP-SDK-##.##.##.##/src directory into your working directory.

host $ cd ~
host $ mkdir –p workdir/opt
host $ cp /home/<useracct>/OMAP35x-PSP-SDK-##.##.##.##/src/kernel/linux-##.##.##.##.tar.gz ~/workdir/opt/.

Un-tar the Linux kernel source archive by performing the commands given below.

host $ cd /home/<useracct>/workdir/opt
host $ tar -zxvf linux-##.##.##.##.tar.gz

In order to prepare the kernel for building, follow these commands:

For AM35x:

host $ cd linux-##.##.##.##
host $ make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm am3517_evm_defconfig

For OMAP35x:

host $ cd linux-##.##.##.##
host $ make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm omap3_evm_defconfig

If you need to make changes to the default configuration, perform the following command.

host $ make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm menuconfig

Once ready to build the kernel, run the following command

host $ make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm uImage modules

The resulting kernel image uImage will be placed under arch/arm/boot and is ready to be loaded on the target.

Building the OMAP35x/387x/389x Graphics Demo Software

This section describes how to rebuild AM35x/OMAP35x/387x(TI814X)/389x(TI816X) Graphics SDK demos.

Pre-Requisites:

  1. Ensure that toolchain installation is complete
  2. Ensure that the NFS target is setup
  3. Ensure that the setup and build for u-boot is complete
  4. Ensure that the setup and build for Linux Kernel is complete

Refer Rebuilding_u-boot_and_Linux_Kernel for more information to perform the above steps

To rebuild the AM35x/OMAP35x/387x/389x Graphics SDK demos, perform the following steps.

  1. Change the directory to ~/Graphics_SDK_#_##_##_##.
  2. Export the architecture to enviournment variables as shown below.
    host $ export ARCH=arm 
  3. Edit the ~/Graphics_SDK_#_##_##_##/Rules.make file.
    • Set GRAPHICS_INSTALL_DIR to the top-level graphics installation directory as follows
    HOME=/home/<user_account>
    GRAPHICS_INSTALL_DIR=${HOME}/Graphics_SDK_#_##_##_##
    • Set the toolchain installation directory path to where you have installed the CodeSourcery tool-chain
    CSTOOL_DIR = <your_toochain_installation_path> 
    
    For example, in our case
    CSTOOL_DIR = /home/<user_account>/toolchain/arm-2009q1
    • Set the kernel installation directory path
    KERNEL_INSTALL_DIR = <your_kernel_installation_directory_path>
    
    For example, in our case
    KERNEL_INSTALL_DIR = /home/<user_account>/workdir/opt/linux-##.##.##.##
    • Modify the TARGETFS_INSTALL_DIR to point to the correct location where the user’s target file system resides
    TARGETFS_INSTALL_DIR=/home/<user_account>/workdir/filesys
  4. While in the same directory that contains Rules.make, use the following commands to build the AM35x/OMAP35x/387x/389x Graphics SDK demo applications

    The top level Graphics SDK Makefile supports the AM35x/OMAP35x/387x/389x Graphics SDK demos to be built for both debug and release options for OMAP ES2.x and ES3.x silicon versions. 387x/389x with OMAPES=6.x option(Note that AM35x Silicon contains the same version of SGX as in OMAP35x ES3.x, and hence will be considered the same as OMAP3530 ES3.x version). Execute the following command for usage options

    For Graphics SDK versions 04.03.00.02 and later please follow these steps
    host $ make help

    This will print the usage as follows:

    Usage (for build): make BUILD={debug | release} OMAPES={2.x | 3.x | 5.x | 6.x} FBDEV={yes | no} all
          Platform                                  OMAPES
          --------                                  ------
          OMAP35x(for SGX core 1.0.3)                2.x
          OMAP35x                                    3.x
          OMAP37x/AM37x                              5.x
          816x(389x)/814x(387x)                      6.x
    --> Specifying OMAPES is mandatory. BUILD=release and FBDEV=yes by default
    Usage (for install): make BUILD=(debug | release} OMAPES={2.x | 3.x | 5.x | 6.x} install
    --> See online Graphics Getting Started Guide for further details.
    

    Based on the TI platform or chipset you are using, execute the make command with appropriate value for OMAPES as shown above. Also please note that the option FBDEV=yes | no is supported for 387x/389x platforms only.

    One more important thing to note is the Fbdev dependancy on syslink for 387x(TI814x) and 389x(TI816X).
    Please follow intsructions as below
    1. Use the right Linux PSP version and other software versions as listed in release notes(can be found under the prerequisite section) -

    http://processors.wiki.ti.com/index.php/RN_4_03_00_02

    2.Once you have satisfied all the prerequisites, then you should build and install the Graphics SDK by following the instructions as provided in this guide.

    Some key steps/instructions are provided below-


    • Build the kernel uImage(Linux PSP) first by enabling Fbdev (instructions in respective PSP user guide).
    • Build syslink(instructions in respective syslink installation guide).
    • cd to Linux PSP path again and build VPSS,fbdev modules now (instructions in respective PSP, VPSS user guide)
    • Build graphics SDK as shown below.





    For Graphics SDK versions 3.01.00.04 and later please follow these steps

    host $ make help

    This will print the usage as follows:

    Usage: make BUILD=<options> OMAPES=<options> FBDEV=<options>
    Default install is for silicon version ES3.x
    Usage (for build): make BUILD={debug | release} OMAPES={2.x | 3.x | 5.x | 6.x} FBDEV={yes | no} all
    --> Specifying OMAPES is mandatory. BUILD=release by default. FBDEV=yes by default
    Usage (for install): make BUILD=(debug | release} OMAPES={2.x | 3.x | 5.x | 6.x} install
    --> See online Graphics Getting Started Guide for further details.
    

    Based on the TI platform you are using, pass the OMAPES command line argument to make as shown above.


    For Graphics SDK versions prior to 3.01.00.04, please follow these steps

    host $ make help

    This will print the usage as follows:

    Usage: make BUILD=<options> OMAPES=<options>
    Default install is for silicon version ES3.x
    Usage for ES2.x debug Build: make OMAPES=2.x BUILD=debug
    Usage for ES2.x release Build: make OMAPES=2.x BUILD=release
    Usage for ES3.x debug Build: make OMAPES=3.x BUILD=debug
    Usage for ES3.x release Build: make OMAPES=3.x BUILD=release
    
    Usage: make install OMAPES=<options>
    Default install is for silicon version ES3.x
    Usage for ES2.x : make install OMAPES=2.x
    Alternative usage for for ES3.x : make install OMAPES=3.x
    

    Check for the silicon version on your EVM board and based on whether it is OMAPv2.x ,OMAPv3.x or AM35x(Es 3.x) execute the appropriate command as given below. By default "make all" will build the Graphics SDK Demos for OMAP ES v3.x and in Release Mode

    How to check for SGX core revision

    Perform the following commands on the target (ex. via terminal) with an utility like devmem2.

    
    For OMAP35x/AM35x/37xx family of chipsets
    
    ./devmem2 0x48004B48 w 0x2
    
    ./devmem2 0x48004B10 w 0x1
    
    ./devmem2 0x48004B00 w 0x2
    
    ./devmem2 0x50000014 > sgxrevision.txt


    For 38xx(387x,389x)

    ./devmem2 0x48180F04 w 0x0

    ./devmem2 0x48180900 w 0x2

    ./devmem2 0x48180920 w 0x2

    ./devmem2 0x56000014 > /etc/init.d/sgxrevision.txt


    Depending on the value read out in the last step, OMAPES is determined for the build.

    • If value == 0x10205

    Use OMAPES=5.x

    • If value == 0x10201

    Use OMAPES=3.x

    • If value == 0x10003

    Use OMAPES=2.x

    Please follow below steps

    If your device is 387x or 389x, execute the following command to build the Graphics SDK Demos in Release Mode

    host $ make all OMAPES=6.x BUILD=release

    If your device is 387x or 389x and you are using Graphics SDK version 04.03.00.01 and you don't require Fbdev(require only PIXMAP support), then -

    host $ make all OMAPES=6.x BUILD=release FBDEV=no 


    If your device is 387x or 389x execute the following command to build the Graphics SDK Demos in Debug Mode

    host $ make all OMAPES=6.x BUILD=debug

    If your device is 387x or 389x and you are using Graphics SDK version 04.03.00.01 and you don't require Fbdev(require only PIXMAP support), then -

    host $ make all OMAPES=6.x BUILD=debug FBDEV=no 


    If your EVM supports OMAP3 ES 5.x, execute the following command to build the Graphics SDK Demos in Release Mode

    host $ make all OMAPES=5.x BUILD=release

    If your EVM supports OMAP3 ES 5.x, execute the following command to build the Graphics SDK Demos in Debug Mode

    host $ make all OMAPES=5.x BUILD=debug

    If your EVM supports OMAP3 ES 3.x, execute one of the following commands to build the Graphics SDK Demos in release Mode

    host $ make all OMAPES=3.x BUILD=release

    If your EVM supports OMAP3 ES 3.x, execute the following command to build the Graphics SDK Demos in Debug Mode

    host $ make all OMAPES=3.x BUILD=debug

    If your EVM supports OMAP3 ES 2.x, execute the following command to build the Graphics SDK Demos in Release Mode

    host $ make all OMAPES=2.x BUILD=release

    If your EVM supports OMAP3 ES 2.x, execute the following command to build the Graphics SDK Demos in Debug Mode

    host $ make all OMAPES=2.x BUILD=debug

    NOTE 1: The above command will build the following Graphics SDK components

    • Graphics SGX Kernel Modules.
      • This requires the kernel to be installed as per the steps mentioned here as well setting the variables correctly in Rules.make file as mentioned in step 2
    • Graphics SDK Demos - OGLES1.x and OGLES2.x


    NOTE 2:This MAKEFILE does not have rules to rebuild the OMAP35x Graphics Sample Applications and the Training Material examples.

Installing the NFS Target File System with Graphics SDK Demos

The necessary executables and libraries required for running graphics SDK demos as well as for developing applications on top of graphics SDK can be installed to the NFS target file system using the following steps.

Pre-Requisites

  • Ensure NFS target is setup as described here
  • Ensure AM35x/OMAP35x/387x(TI814X)/389x(TI816X) Graphics SDK demos are built as described here

Note

  • The installation step from the host, only copies the install scripts to the target. The actual installation of the drivers happens when the target boots up. Hence, the drivers will be installed with root permissions by the target itself. Hence it is advisable to use sudo permissions to do a make install from the host, for the next time.


To install the Graphics SDK demos, SGX user libraries, kernel modules and generated support files on the target file system specified by EXEC_DIR, execute the following command for each silicon version.
</pre>

NOTE - If your Graphics SDK version is 04.03.00.02 or above then the command make help would print the usage as -

Usage (for build): make BUILD={debug | release} OMAPES={2.x | 3.x | 5.x | 6.x} FBDEV={yes | no} all
      Platform                                  OMAPES
      --------                                  ------
      OMAP35x(for SGX core 1.0.3)                2.x
      OMAP35x                                    3.x
      OMAP37x/AM37x                              5.x
      816x(389x)/814x(387x)                      6.x
--> Specifying OMAPES is mandatory. BUILD=release and FBDEV=yes by default
Usage (for install): make BUILD=(debug | release} OMAPES={2.x | 3.x | 5.x | 6.x} install
--> See online Graphics Getting Started Guide for further details.


For Graphics version 3.01.00.05 and above please follow below steps

host $ make help

This will print the usage as follows:

Usage (for build): make BUILD={debug | release} OMAPES={2.x | 3.x | 5.x | 6.x} all
--> Specifying OMAPES is mandatory. BUILD=release by default
Usage (for install): make BUILD=(debug | release} OMAPES={2.x | 3.x | 5.x | 6.x} install
--> See online Graphics Getting Started Guide for further details.




Check for the SGX version and based on whether it is OMAPES 2.x,OMAPES 3.x or OMAPES 5.x execute the appropriate command as given below. 
<br>

If your device is 387x or 389x, execute the following command to the Graphics SDK demos, SGX user libraries, kernel modules and generated support files on the target file system 
<pre>host $ make install OMAPES=6.x 

If your EVM supports AM35x ES 5,x, execute the following command to the Graphics SDK demos, SGX user libraries, kernel modules and generated support files on the target file system

host $ make install OMAPES=5.x 

If your EVM supports AM35x ES 3,x, execute the following command to the Graphics SDK demos, SGX user libraries, kernel modules and generated support files on the target file system

host $ make install OMAPES=3.x 

If your EVM supports OMAP3 ES 2.x, execute the following command to the Graphics SDK demos, SGX user libraries, kernel modules and generated support files on the target file system

host $ make install OMAPES=2.x 

For Graphics SDK versions prior to 3.01.00.04 please follow these steps

host $ make help

This will print the usage as follows:

Usage: make BUILD=<options> OMAPES=<options>
Default install is for silicon version ES3.x
Usage for ES2.x debug Build: make OMAPES=2.x BUILD=debug
Usage for ES2.x release Build: make OMAPES=2.x BUILD=release
Usage for ES3.x debug Build: make OMAPES=3.x BUILD=debug
Usage for ES3.x release Build: make OMAPES=3.x BUILD=release

Usage: make install OMAPES=<options>
Default install is for silicon version ES3.x
Usage for ES2.x : make install OMAPES=2.x
Alternative usage for for ES3.x : make install OMAPES=3.x

Check for the silicon version on your EVM board and based on whether it is OMAPv2.x ,OMAPv3.x or AM35x(ES 3.x) execute the appropriate command as given below. By default "make install" will install the Graphics SDK demos, SGX user libraries, kernel modules and generated support files on the target file system for OMAP ES v3.x.
If your EVM supports OMAP3 ES 3.x, execute one of the following commands to the Graphics SDK demos, SGX user libraries, kernel modules and generated support files on the target file system

Either
host $ make install
or
host $ make install OMAPES=3.x 

If your EVM supports OMAP3 ES 2.x, execute the following command to the Graphics SDK demos, SGX user libraries, kernel modules and generated support files on the target file system

host $ make install OMAPES=2.x 

If your EVM supports AM35x ES 3,x, execute the following command to the Graphics SDK demos, SGX user libraries, kernel modules and generated support files on the target file system

host $ make install OMAPES=3.x 

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/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 you are working on TI814x(387x) or TI816x(389x) EVM then OMAPES=6.x, so execute one of the following commands to build the Graphics SGX kernel modules in release mode

host $ make OMAPES=6.x BUILD=release all_km


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 all_km
or
host $ make OMAPES=3.x BUILD=release all_km

If your EVM supports OMAP3 ES 3.x, execute the following command to build the Graphics SGX kernel modules in debug mode

host $ make OMAPES=3.x BUILD=debug all_km

If your EVM supports OMAP3 ES 2.x, execute the following command to build the Graphics SGX kernel modules in release mode

host $ make OMAPES=2.x BUILD=release all_km

If your EVM supports OMAP3 ES 2.x, execute the following command to build the Graphics SGX kernel modules in debug mode

host $ make OMAPES=2.x BUILD=debug all_km

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_dbg_es5.x,gfx_dbg_es6.x, gfx_rel_es2.x, gfx_rel_es3.x, gfx_rel_es5.x,gfx_rel_es6.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.

  1. Place your demos in the same directory format as default graphics SDK demos
  2. Copy the release or debug versions of the shared and static libraries from the appropriate gfx_dbg_es2.x, gfx_dbg_es3.x,gfx_dbg_es5.x,gfx_dbg_es6.x or gfx_rel_es2.x or gfx_rel_es3.x,gfx_rel_es5.x,gfx_rel_es6.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>/Graphics_SDK_#_##_##_##/GFX_Linux_SDK/OGLES/SDKPackage/Builds/OGLES/LinuxOMAP3/lib 
    host $ cp /home/<user_account>/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>/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>/Graphics_SDK_#_##_##_##/GFX_Linux_SDK/OGLES2/SDKPackage/Builds/OGLES/LinuxOMAP3/lib 
    host $ cp /home/<user_account>/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>/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.

  3. 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>/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>/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>
  4. 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
  5. Perform the build of your demonstration
    host $ cd /home/<user_account>/Graphics_SDK_#_##_##_##/GFX_Linux_SDK/OGLES/SDKPackage/Demos/<your_OpenGL_ES1.x_demo>/OGLES/Build/LinuxGeneric
    host $ make
  6. Copy the built executables to the target file system
    host $ cp /home/<user_account>/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
  7. 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>/Graphics_SDK_#_##_##_##/gfxinstallinfo.txt
    or
    host $ echo "debug3.x" > /home/<user_account>/Graphics_SDK_#_##_##_##/gfxinstallinfo.txt
    or
    host $ echo "release5.x" > /home/<user_account>/Graphics_SDK_#_##_##_##/gfxinstallinfo.txt
    or
    host $ echo "debug6.x" > /home/<user_account>/Graphics_SDK_#_##_##_##/gfxinstallinfo.txt
    or
    host $ echo "release6.x" > /home/<user_account>/Graphics_SDK_#_##_##_##/gfxinstallinfo.txt
    or
    host $ echo "debug5.x" > /home/<user_account>/Graphics_SDK_#_##_##_##/gfxinstallinfo.txt
    or
    host $ echo "release2.x" > /home/<user_account>/Graphics_SDK_#_##_##_##/gfxinstallinfo.txt
    or
    host $ echo "debug2.x" > /home/<user_account>/Graphics_SDK_#_##_##_##/gfxinstallinfo.txt

    Copy this file to the target file system

    host $ cp /home/<user_account>/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.

  8. 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/387x/389x 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 boot
    target $ cd /etc/init.d
    target $ ./omap-demo

    If your EVM is 387x(TI814x) or 389x(TI816x), then-

    target $ cd /etc/init.d
    target $ ./38xx-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.

  9. Execute your graphics SDK demo
    target $ cd /opt/gfxdemos
    target $ ./<your_demo_exec>