This page is a part of wiki article "Building Qt" wiki page. Do not start using this page directly. Contents[hide]AboutThis page is made with a motivation to guide the users of TI Processors to build Qt Embedded SDK with OpenGL ES 1.x/2.x (3D Graphics) support accelerated by the SGX - 3D Graphics Hardware present on the TI chip.
Versions Tested
PrerequisitesUseful LinksPlease refer to this link
PSP Linux KernelThe latest PSP Linux Kernel should be compiled and tested on the EVM. Test: The EVM board boots up and loads the filesystem without any problem
Graphics SDK
Test: The 3D Graphics Demo located on your target filesystem (/opt/gfxsdkdemos/ogles/) like OGLESChameleonMan, OGLESEvilSkull, OGLESCoverflow etc should run without any errors
File SystemThe user will need to have a copy of the filesystem to be used on target installed on the host machine. The copy of the filesystem on the host machines should have the Graphics SDK libraries installed in it.
Test: The EVM board boots up and loads the filesystem without any problems. No problem in running the 3D Graphics Demo as mentioned above in Graphics SDK - Test.
TslibSource Download - http://prdownload./tslib/tslib-1.0.tar.bz2 About: Tslib is an abstraction layer for touchscreen panel events, as well as a filter stack for the manipulation of those events. It was created by Russell King, of arm.linux.org.uk. Tslib is generally used on embedded devices to provide a common user space interface to touchscreen functionality.
Tslib files paths: tslib.h: $TSLIB_INSTALL_DIR/tslib-1.0/src libts.so: $FILESYSTEM_INSTALL_ROOT/usr/lib/
Host $ cd $FILESYSTEM_INSTALL_ROOT Host $ cd usr/lib Host $ ln -s libts-1.0.so.0 libts.so
Qt Embedded SourceThe user will need to download the latest Qt embedded source code on his host machine which is being used to build Qt.
PATH
Host $ export TOOLCHAIN_INSTALL_ROOT=/path/to/toolchain_install_root Host $ export PATH=$PATH:$TOOLCHAIN_INSTALL_ROOT/bin Test: Execute the commands below and confirm that "g++" being used is from the gcc of the host machine and "arm-none-linux-gnueabi-g++" being used matches the recommeded code sourcery toolchain version from the GFX-SDK guide for the GFX-SDK being used. Host $ g++ --version Host $ arm-none-linux-gnueabi-g++ --version Note: For any problems in any of the prerequisites above. Please refer to Useful links above or post your questions on e2e.
Building Qt with OpenGL ESYou can follow these steps to build Qt with OpenGL ES support for any ARM Cortex-A8 based TI Processor. Step 1: It is assumed that you have satisfied all the prerequisites as mentioned above.
Step 2:
- This tarball has the qmake.conf needed to configure Qt Embedded with OpenGL ES accelerated by SGX - The parent folder is named as linux-TIarmv7-sgx-g++ and this name will be used in configure below for "-xplatform"
Host $ cp linux-TIarmv7-sgx-g++.tar.gz $QT_INSTALL_DIR/mkspecs/qws/
Host $ cd $QT_INSTALL_DIR/mkspecs/qws/ Host $ tar xzvf linux-TIarmv7-sgx-g++.tar.gz
SGX_SDK_ROOT = /directory/path/to/Graphics/SDK/on/host Optional: For touchscreen support in Qt Embedded using tslib library (Note: You will need to fulfull the tslib pre-requisites as mentioned above) TSLIB_INCDIR = $TSLIB_INSTALL_DIR/tslib-1.0/src TSLIB_LIBDIR = $FILESYSTEM_INSTALL_ROOT/usr/lib/
(Refer to Glossary and/or prerequisites above for more information on setting these variables)
Step 3:
Host $ cd $QT_INSTALL_DIR Host $ patch -p1 < 0001-wsegl2-support.patch Step 4:
Host $ cd $QT_INSTALL_DIR Host $ ./configure --help
Host $ ./configure -prefix <QT_SDK_INSTALL_DIR> -embedded arm -platform qws/linux-x86-g++ -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 -qt-mouse-linuxinput -plugin-mouse-linuxtp -plugin-mouse-pc -fast -opengl es2 -qt-gfx-transformed -qt-gfx-vnc -qt-gfx-linuxfb -qt-gfx-multiscreen -qt-mouse-tslib -plugin-gfx-powervr -D QT_NO_QWS_CURSOR -D QT_QWS_CLIENTBLIT Note:
Host $ make Host $ make install
Copy the Qt SDK library to the Target Filesystem
Running the Qt Application
Target # export LD_LIBRARY_PATH=/lib:/usr/lib:/usr/local/lib:/opt/qt-embedded/lib
Target # export TSLIB_TSDEVICE=/dev/input/touchscreen0 Target # export QWS_MOUSE_PROTO=Tslib:/dev/input/touchscreen0
cat > /etc/powervr.ini << _EOF [default] WindowSystem=libpvrQWSWSEGL.so _EOF
Target # cd /opt/qt-embedded/examples/opengl Target # cd textures Target # ./textures -qws -display powervr You can see the output either on the lcd or dvi output depending on how you configured your target board to output. For more info on that please refer http://processors.wiki./index.php?title=Building_Qt#Setting_up_Target_before_Qt_Build
Compiling your Qt Applications
Host $ export PATH= $PATH:$QT_SDK_INSTALL_DIR/bin/qmake
Host $ qmake -project Host $ qmake -spec qws/linux-TIarmv7-g++ (Please see the Note below) Host $ make Note: - The value for -spec is the folder path of qmake.conf relative to "$QT_INSTALL_DIR/mkspecs/" used to configure Qt Embedded. The value is same as the one used for "-xplatform" in the configure above. e.g. In the case above, if the qmake.conf is present at "$QT_INSTALL_DIR/mkspecs/qws/linux-TIarmv7-g++" then the variable used will be "-spec qws/linux-TIarmv7-g++"
Glossary/Acronyms
Command prompts in this guide Commands are preceded by prompts that indicate the environment where the command is to be typed. For example: host $
|
|