http://processors.wiki.ti.com/index.php/Building_Qt_with_OpenGL_ES_accelerated_by_SGX#Building_Qt_with_OpenGL_ES
http://processors.wiki.ti.com/index.php/SGXDbg#Introduction
http://processors.wiki.ti.com/index.php/GSG:_AM35x_and_OMAP35x_Rebuilding_the_Software#Setting_up_the_NFS_target_file_system
1 配置内核:
1)通过下列命令,参照omap3_evm_defconfig,在.config文件中配置:CONFIG_OMAP2_DSS=y
make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm omap3_beagle_defconfig
2)make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm modules
3)编译内核
1、配置Graphics_SDK(前提条件:内核中配置的.config文件中配置:CONFIG_OMAP2_DSS=y)
1) 修改主目录下Rules.make,更改以下路径:(最后用绝对路径)
GRAPHICS_INSTALL_DIR:当前Graphics_SDK目录的路径
CSTOOL_DIR:编译环境的路径
KERNEL_INSTALL_DIR:内核路径(最好用当前目标机运行的内核的源文件路径)
TARGETFS_INSTALL_DIR:编译完成后,安装到目标机的路径(关联的还有:EXEC_DIR路径)
2) 修改GFX_Linux_KM目录下Makefile文件,更改一下路径
KERNELDIR:内核路径(最好用当前目标机运行的内核的源文件路径)
3) 1、Edit the GFX_Linux_KM/Kbuild in SDK package to add below line -
obj-y += services4/3rdparty/bufferclass_example/
2、将GFX_Linux_KM/services4/3rdparty/bufferclass_example/kbuild/Makefile 转移至GFX_Linux_KM/services4/3rdparty/bufferclass_example/ 目录中
用以下内容,覆盖里面的内容:
include /usr/local/dvsdk/omap35x_graphics/GFX_Linux_KM/eurasiacon/build/linux/kbuild/Makefile.kbuild_subdir_common
MODULE = bc_example
INCLUDES = -I/usr/local/dvsdk/omap35x_graphics/GFX_Linux_KM/include4 \
-I/usr/local/dvsdk/omap35x_graphics/GFX_Linux_KM/services4/include \
-I/usr/local/dvsdk/omap35x_graphics/GFX_Linux_KM/services4/system/$(PVR_SYSTEM) \
-I/usr/local/dvsdk/omap35x_graphics/GFX_Linux_KM/services4/system/include \
SOURCES = ../bufferclass_example.c \
../bufferclass_example_linux.c \
../bufferclass_example_private.c
EXTRA_CFLAGS=-DLINUX \
-I/usr/local/dvsdk/omap35x_graphics/GFX_Linux_KM/include4 \
-I/usr/local/dvsdk/omap35x_graphics/GFX_Linux_KM/services4/include \
-I/usr/local/dvsdk/omap35x_graphics/GFX_Linux_KM/services4/system/$(PVR_SYSTEM) \
-I/usr/local/dvsdk/omap35x_graphics/GFX_Linux_KM/services4/system/include \
obj-m := bc_example.obc_example-y := bufferclass_example.o bufferclass_example_linux.o bufferclass_example_private.o
SYM_VERS_DEPS = /usr/local/dvsdk/omap35x_graphics/GFX_Linux_KM/services4/srvkm/env/linux
3、Edit the bufferclass_example_linux.c file to enable -
#define DEBUG
#define LDM_PLATFORM
4) 编译:make OMAPES=5.x
安装:make OMAPES=5.x install //如果“modules.order 不存在”,在内核目录运行:make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm modules
拷贝bc_example.ko文件到TARGETFS_INSTALL_DIR/opt/gfxlibraries/gfx_rel_es5.x 文件夹下面
5) TARGETFS_INSTALL_DIR下回出现opt目录(如果上面1)最后一点的EXEC_DIR没有修改)、etc目录,将这两个目录拷贝到/根目录下面
执行:
cp -dr etc /
cp -dr opt /
/etc/init.d/omap-demo #每次打开一个会话时需重新运行
vi etc/powervr.ini #更改里面的内容
#更改为:
[default]
WindowSystem=libpvrPVR2D_FRONTWSEGL.so
#WindowSystem=libpvrPVR2D_FLIPWSEGL.so
#WindowSystem=libpvrQWSWSEGL.so
6) 可以将usr/local/bin路径添加到path路径中(此目录中有一些测试代码),此时可以运行在host主机上,生成的例子(GFX_Linux_SDK下)
GFX_Linux_SDK\OGLES\SDKPackage\Binaries\CommonRaw\Demos有相应的测试代码供测试
2、配置QT(主机上)
1) 下载qt-embedded-linux-opensource-src-4.5.3(以下简称qt目录),下载linux-TIarmv7-sgx-g++(官方提供)需要根据实际情况,修改qmake.conf的参数
QT_INSTALL_DIR = QT目录 //安装的/mnt/usr_fs/tmp/gaoyz/omap35x_graphics)
export SGX_SDK_ROOT = Graphics_SDK目录 //dvsdk下
2) 到qt目录下执行如下配置命令:
./configure -prefix /mnt/usr_fs/tmp/gaoyz/omap35x_graphics/ -embedded arm -xplatform qws/linux-TIarmv7-sgx-g++ -depths 16,24,32 -no-mmx -no-3dnow -no-sse -no-sse2 -no-glib -no-cups -no-largefile -no-accessibility -no-openssl -no-gtkstyle -qt-mouse-pc -qt-mouse-linuxtp -plugin-mouse-linuxtp -plugin-mouse-pc -fast -opengl es1 -qt-gfx-transformed -qt-gfx-vnc -qt-gfx-linuxfb -qt-gfx-multiscreen -plugin-gfx-powervr -D QT_NO_QWS_CURSOR -D QT_QWS_CLIENTBLIT -v
make //大约1个半小时
make install //程序安装到/mnt/usr_fs/tmp/gaoyz/omap35x_graphics/目录下面(板子上的qt目录)
3)先配置环境:
export PATH=qt目录/bin:$PATH
export LD_LIBRARY_PATH=qt目录/lib:$LD_LIBRARY_PATH
编译自己的程序
qmake -project //如需要用opengl,需在生成的.pro文件中,添加"QT += opengl"字样
qmake -spec qws/linux-TIarmv7-sgx-g++
make
3、执行qt程序:
1) 配置路径(在板子上)
export LD_LIBRARY_PATH=qt目录/lib:/lib:/usr/lib:/usr/local/lib
export QT_PLUGIN_PATH=qt目录/plugins:/lib:/usr/lib:/usr/local/lib
export PATH=/usr/local/bin:$PATH
/etc/init.d/rc.pvr start //加载驱动
2)./app -qws -display powervr
以下是在执行过程可能会遇见的问题:
1.找到powervr的驱动的加载办法
export QT_PLUGIN_PATH=/lib:/usr/lib:/usr/local/lib:/mnt/usr_fs/tmp/gaoyz/plugins
2.CONFIG_OMAP2_DSS=y
参见:http://e2e.ti.com/support/dsp/omap_applications_processors/f/447/t/41403.aspx
参照omap3_evm_defconfig,修改omap3_beagle_defconfig
\\192.168.1.117\dvsdk\usr\local\dvsdk\psp\linux-2.6.32-psp03.00.01.06.sdk\arch\arm\configs
make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm omap3_beagle_defconfig // i use beagle not evm
make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm modules
3、'pOMAPLFBVSyncISRHandle' undeclared (first use in this function)
应先编译内核
4、qtembedded 4.5.3 配置参数
./configure -prefix /mnt/usr_fs/tmp/gaoyz/omap35x_graphics/ -embedded arm -xplatform qws/linux-TIarmv7-sgx-g++ -depths 16,24,32 -no-mmx -no-3dnow -no-sse -no-sse2 -no-glib -no-cups -no-largefile -no-accessibility -no-openssl -no-gtkstyle -qt-mouse-pc -qt-mouse-linuxtp -plugin-mouse-linuxtp -plugin-mouse-pc -fast -opengl es1 -qt-gfx-transformed -qt-gfx-vnc -qt-gfx-linuxfb -qt-gfx-multiscreen -plugin-gfx-powervr -D QT_NO_QWS_CURSOR -D QT_QWS_CLIENTBLIT -v
5、不选用4.7版本的qt,和官方提供的新的
6、无法安装omaplfb.ko pvrsrvkm.ko驱动
先检查:检查CONFIG_OMAP2_DSS=y;
http://e2e.ti.com/support/dsp/omap_applications_processors/f/447/t/109667.aspx#387786
然后,核对是否需要修改board_omap3beagle.c文件,增加dvi设备
7、在配置QT过程中出错
分析出错原因,尝试在qmake.conf中使用绝对路径
8、blit_16
http://groups.google.com/group/beagleboard/browse_thread/thread/06354a2c618365d6
http://groups.google.com/group/beagleboard/browse_thread/thread/58c2b1b7bdd248c0/5b6681f9fffc7181?#5b6681f9fffc7181
9、检查脚本:eglinfo
10、尝试使用opengl 1.0 1.1版本,demo跑不起来,提示opengl的版本不对
11、使用opengl 2.0版本,hello 可以跑起来;我们的QT程序在跑的过程中,遇到以下信息
"QGLContext::chooseContext(): The screen is not a QGLScreen
QEglContext::chooseConfig(): Could not find a suitable EGL configuration
Requested: "type=es2 rgba=1,1,1,-1 surface-type=window level=0"
Available:
"id=1 type=es1,vg rgba=5,6,5,0 depth=24 stencil=8 surface-type=window,pbuffer,vg-colorspace-linear,vg-alpha-format-pre
caveat=none level=0 max-pbuffer-size=2048x2048
native-renderable=false visual-id=0 visual-type=0
Illegal instruction
12 hellow_ges2 没显示