Rebuilding the Graphics SGX Kernel Modules

本文介绍如何使用TIPS PSDK Kernel Release重建OMAP35x图形演示软件的SGX内核模块,并提供了构建和执行自定义演示的具体步骤。此外还详细说明了设置环境变量、复制库文件以及创建必要的配置文件的方法。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

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.

  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_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.

  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>/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>
  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>/OMAP35x_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>/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
  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>/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.

  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 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

    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>

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值