Graphics SDK Quick installation and user guide

本文介绍如何在嵌入式Linux环境下构建并运行图形应用,包括安装必要的内核模块、设置环境变量、构建示例程序及验证SGX核心版本等关键步骤。

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

参考:http://processors.wiki.ti.com/index.php/SGXDbg#Introduction



The latest Linux Graphics SDK can be downloaded from the below link. The download does not require any registration.

http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/gfxsdk/latest/index_FDS.html


Components that require installation onto the target

Kernel Modules

omaplfb, pvrsrvkm, and bufferclass_ti are the modules that need to be inserted at runtime. omaplfb is responsible for interfacing to the platform specific FrameBuffer driver. pvrsrvkm is responsible for interfacing the user-side PVR services layer. Bufferclass_ti is responsible for enabling a proprietary extension that allows streaming playback through SGX.

Graphics SDK - examples, headers

This component allows users to build Graphics applications using the provided binaries. GLES11/2.0/VG headers are provided by this component


Sample usage

Non-Xorg build
  • make BUILD=release OMAPES=8.x all_km - This command will build only Graphics kernel modules(pvrsrvkm.ko, omaplfb.ko) for AM335x.
  • make BUILD=release OMAPES=8.x all - This command will build the complete graphics SDK for AM335x.
  • make BUILD=release OMAPES=8.x install_km - This command will install only the graphics kernel modules(pvrsrvkm.ko, omaplfb.ko)to target file system as mentioned in Rules.make.
  • make BUILD=release OMAPES=8.x install - This command will install the complete graphics SDK to target file system as mentioned in Rules.make.

In the above set of commands,one can replace OMAPES values with values based on TI device in use(OMAPES to TI device mapping information can be obtained by issuing make help command).

Xorg build
  • make BUILD=release OMAPES=6.x SUPPORT_XORG=1 all_km - This command will build only Graphics kernel modules(pvrsrvkm.ko, drm.ko) for 387x/389x, TI816x/TI814x devices.
  • make BUILD=release OMAPES=6.x SUPPORT_XORG=1 all - This command will build the complete graphics SDK for 387x/389x, TI816x/TI814x devices.
  • make BUILD=release OMAPES=6.x SUPPORT_XORG=1 install_km - This command will install only the graphics kernel modules(pvrsrvkm.ko, drm.ko) to target file system as mentioned in Rules.make
  • make BUILD=release OMAPES=6.x SUPPORT_XORG=1 install - This command will install the complete graphics SDK to target file system as mentioned in Rules.make

In the above set of commands,one can replace OMAPES values with values based on TI device in use(OMAPES to TI device mapping information can be obtained by issuing make help command). 


For OMAP35x:

 # setenv bootargs console=ttyS0,115200n8 noinitrd rw ip=dhcp  root=/dev/nfs nfsroot=<nfshost>:<rootpath>,nolock mem=128M vram=8M omapfb.vram=0:8M


OMAP35x Execution instructions

  • For OMAP35x/37x the graphics drivers are all installed by default. omap-demo script takes care of that. If not run by default, you can run it manually as /etc/init.d/omap-demo. 

OMAP35x/AM35x/37xx/AM335x 

  • If one has built and installed the graphics SDK with SUPPORT_XORG=1 option, then the EVM will boot up with omap-demo script run by default and installing the required Xorg driver and file system.
  • In case the demo script has not run, one can run it as /etc/init.d/omap-demo for OMAP devices. For AM335x run the demo script /etc/init.d/335x-demo.
  • If there are problems in installation, issue depmod -a command on linux command prompt and reboot. Now the Xorg drivers should be installed correctly.
  • To cross check whether system is fine(ready to run X apps) make sure lsmod command on EVM shows pvrsrvkm.ko, drm.ko inserted successfully and ps shows X process running.
  • Issue commands export LD_LIBRARY_PATH=/usr/local/XSGX/lib and export DISPLAY=:0 on the EVM command prompt.
  • Now the system is ready to run any X app. One can run the unit test application present under /usr/local/XSGX/bin/glxgears to confirm the system is fine. 

Running Graphics SDK OpenGL ES2.0 Demos

To run OpenGLES2.0 demos, perform the following steps:

target $ cd /opt/gfxsdkdemos/ogles2
target $ ./OGLES2Coverflow

This will execute the OGLES2Coverflow demo. Press ‘q’ on the host machine console window (TeraTerm or HyperTerminal or Minicom) to stop the demo.

Similarly, the user could execute other OpenGL ES2.0 demos.

For more information and command line options on the demos, refer to the OpenGL ES2.x SDK user guide available under Graphics_SDK_#_##_##_##\GFX_Linux_SDK\OGLES2\SDKPackage 




How to build training course examples, openVG demo

By default openGL ES1.1 and 2.0 demos are built when you do a build of standalone graphics SDK release.

If you want to build any other training course example or openVG demo then you should set the PLATFORM, LIBDIR variables. Its LinuxOMAP3 for all devices.

How to build training course examples, OpenVG demo -

  • Set and export the variable LIBDIR. It should point to the path mentioned below. For eg for openGL ES2.0, path is as as below-

export LIBDIR=GFX_INSTALLATION_ROOT/GFX_Linux_SDK/OGLES2/SDKPackage/Builds/OGLES2/LinuxOMAP3/lib where GFX_INSTALLATION_ROOT is the path name where you have installed graphics SDK. Replace all instances of OGLES2 with OGLES if you are building an openGL ES1.1 app/example.

  • Set and export the variable PLATFORM as –

export PLATFORM = LinuxOMAP3.

  • cd to app directoty having makefile. For eg to build first example in training course -

cd to ./GFX_Linux_SDK/OGLES/SDKPackage/TrainingCourse/01_Initialization/OGLES/Build/LinuxOMAP3 for OpenGLES1.1

  • Issue make Common=1 for openGLES1.1 apps and build will be done. If its openGLES 2.0 or openVG, issue just make without any arguments.
  • The application executable will be placed under - ./GFX_Linux_SDK/OGLES/SDKPackage/TrainingCourse/01_Initialization/OGLES/Build/LinuxOMAP3/ReleaseRaw.

How to check for SGX core revision

Perform the following commands on the target (ex. via terminal) with an utility like devmem2. This section is applicable for OMAP35x/AM35x/37xx and 387x/389x devices only.

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




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 mentionedGSG:_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>








评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值