This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Problem with integrating Qt and SGX drivers

Other Parts Discussed in Thread: OMAP3530, AM3517

Hi,

I'm using CompuLab CM-T35 board and idea is to have a SGX accelerated Qt application running on OMAP3530. I was following your instructions to integrate SGX accelerated Qt (http://processors.wiki.ti.com/index.php/Building_Qt_with_OpenGL_ES_accelerated_by_SGX).

Unfortunatelly, now for quite some time, i'm not able to make these things work so I'm asking here hoping to get some advices :)

First I want to give some details about software used:

  • host machine: Ubuntu 10.04
  • I'm using the OpenEmbedded framework for building the U-Boot, kernel and filesystem applicable for CM-T35 machine.
  • U-Boot (2009.11-rc1-00055-g42a19ba-cm-t35)
  • Linux kernel (2.6.32)
    • with following bootargs: ubi.mtd=4,2048 root=ubi0:cm-t35-rootfs rootfstype=ubifs console=ttyS2,115200 omapfb.mode=dvi:1280x768MR-16@60 omapfb.vram=0:8M vram=8M omapdss.def_disp=dvi
  • Filesystem (angstrom-2008.1)
    • glibc linux
    • console-image
      • I don't need anything but this basic type of image as I don't want to use X11 but Qt's window manager QWS
  • Qt Embedded Platform (4.6.1)
  • TI Graphics drivers (1.6.16.3977 drivers from Graphics_SDK_4_03_00_02)
  • Codesourcery cross-compiler (Sourcery G++ Lite 2010q1-202)

So far what I have done successfully is:

  • Booting up Linux kernel with no errors.
  • Cross-compiled Qt Embedded 4.6.1
    • with following ./configure parameters:
      • -embedded arm -xplatform qws/linux-omap3530-g++ -platform qws/linux-x86-g++
      • -no-accessibility -no-qt3support -no-javascript-jit -no-script -no-scripttools -no-webkit
      • -qt-kbd-linuxinput -qt-mouse-linuxinput -qt-mouse-tslib
      • -depths 16,24,32
      • -opengl es2 -qt-gfx-linuxfb -plugin-gfx-powervr
      • -fast
  • Cross-compiled and installed TI Graphics drivers (1.6.16.3977 drivers from Graphics_SDK_4_03_00_02)
    • driver kernel modules successfully load (omaplfb.ko and pvrsrvkm.ko)
  • Running Qt demos/examples without SGX graphics acceleration.

What is NOT working is:

  • Running OGLES/OGLES2 demos
    • they just segfault without any specific message
  • Running Qt demos/examples using SGX acceleration
    • i.e. running the <path to Qt>/examples/opengl/hellogl_es2/hellogl_es2 -qws -display powervr starts the application but gives the following error messages (with QT_DEBUG_PLUGINS=1):
      • QFactoryLoader::QFactoryLoader() looking at "/usr/local/Trolltech/QtEmbedded-4.6.1-arm/plugins/gfxdrivers/libqgfxpvregl.so" keys ("powervr")
      • QEglContext::createSurface(): Unable to create EGL surface, error = 0x300b
      • QGLContext::makeCurrent(): Cannot make invalid context current
      • QEglContext::createSurface(): Unable to create EGL surface, error = 0x300b
      • QFactoryLoader::QFactoryLoader() looking at "/usr/local/Trolltech/QtEmbedded-4.6.1-arm/plugins/iconengines/libqsvgicon.so" keys ("svg", "svgz", "svg.gz")
    • powervr.ini file is set up correctly
      • [default] WindowSystem=libpvrQWSWSEGL.so
    • SGX drivers are loaded successfully - lsmod prints:
      • Module   Size     Used by                                                                                                                                                             
      • omaplfb  7794     0
      • pvrsrvkm 149701   1 omaplfb

Here's some info from provided SGX utilities:

  • eglinfo
    • every test passed well (i.e. Creating Window/Pbuffer surface ... Creating Open GL ES 1/Open GL ES 2/OpenVG context)
    • but there's one confusing warning:
      • Couldn't load library libGL.so: libGL.so: cannot open shared object file: No such file or directory
    • there's definitely no libGL.so in /usr/lib or in any other path neither is generated after compiling SGX drivers
    • and I don't know why it should be required in the first place as there is libGLES.so which I believe is the correct lib for OpenGLES
  • gles1_texture_stream
    • prints errors:
      • Stream Device (null): numBuffers = 0, width = 0, height = 0, format = 0
      • Failed to open /dev/bc_example (errno=2).
    • which is ok as bufferclass_ti.ko driver isn't installed
  • gles2_texture_stream
    • prints errors:
      • Stream Device (null): numBuffers = 0, width = 0, height = 0, format = 0
      • GL ERROR = 501InitTexStreamDisplay failed.
    • not really sure why it fails
  • gles1test1
    • runs without errors
    • when exiting (CTRL+C) one of these errors appear (in no predictable order)
      • VR_K: HWRecoveryResetSGX: SGX Hardware Recovery triggered
      • Unable to handle kernel paging request at virtual address 44e9000b (this address is not always the same)
    • running other tests after this is not possible (hardware reset needed)
  • gles2test1
    • same as gles1test1
  • ovg_unit_test
    • same as gles1test1
  • pvr2d_test
    • runs without errors
  • services_test
    • runs without errors
  • sgx_blit_test
    • runs without errors
  • sgx_clipblit_test
    • runs without errors
  • sgx_flip_test
    • runs for a while but fails with:
      • Display Class API: map display surface to SGX
      • OK
      • OK
      • OK
      • OK
      • OK
      • OK
      • FAIL - PVRSRV_ERROR_RETRY
  • sgx_init_test
    • runs without errors
  • sgx_render_flip_test
    • runs without errors
  • xgles1test1
    • not of interest as it requires X11
  • xmultiegltest
    • not of interest as it requires X11

So there's obviously a problem when drivers configured to work with Qt (WindowSystem=libpvrQWSWSEGL.so). When using default window system (i.e.WindowSystem=libpvrPVR2D_FRONTWSEGL.so) SGX utilities work mostly fine besides

  • sgx_flip_test
  • gles1_texture_stream
  • gles2_texture_stream

which show the same behavior as in the Qt configuration.

Hope this is enough information for you to give me some advices. And please don't hesitate to ask for more details if needed.

Thank you,

Adi

P.S. there's a log attached from gfx_check script

0564.gfxlog.txt

  • Please read the README inside the below archive, and use the patch.

    https://gforge.ti.com/gf/download/docmanfileversion/263/4451/wsegl_pvr2d_1.6.3977.tar.gz

    The architecture of the window system has changed with latest SGX drivers. Qt's powervr driver needs an update for this, and this change will be pushed to mainline Qt.

     

  • The earlier link only has the header files, the below one has the README and the patch.

    https://gforge.ti.com/gf/download/docmanfileversion/264/4456/qt_wsegl_1.6.tar.gz

     

    The glestest and reports you had have no relevance to the Qt issue. Also please see if you can upgrade to AM3517 or AM/DM37xx devices.

     

  • Prabindh, thank you very much! I've lost days and days trying to figure it out.

    It seems like hellogl_es2 example works fine.

    But when running other Qt demos like ../demos/affine, application slows down drammatically when Use OpenGL button is clicked. The same behaviour have also other demos with that capability (i.e. deform, pathstroke etc.).

    I'll try out some other apps and XgxPerf toolkit as well and get back here with results.

    Thanks,

    Adi

     

  • Good to see it worked. To understand how SGX is being used, please refer to below link.

    http://processors.wiki.ti.com/index.php/XgxPerf_HMI#Using_Qt.27s_Powervr_backend_for_display.2F_3D_acceleration_in_XgxPerf

    Performance will vary depending on how GLES is being used.

  • Ok. One more question :)

    Is it neccessary to rebuild the SGX drivers with a given new headers (pvr.h, wsegl.h)?

    It seems to me like a sane step.

  • The drivers released are already built that way.

     

  • Thanks for the info. I thought I had the same error, now I am not sure as driver version is 1.4. The README says "The output should be greater than 1.6. If it is 1.4, no need to use this patch." As this is my first attempt at cross compiling I may have misunderstood something.......

    target$> cat /proc/pvr/version    ..gives..;

    SGX driver information
    Version 1.4.14.2616 (release) /OE/angstrom-dev/work/beagleboard-angstrom-linux-gnueabi/omap3-sgx-modules-1.4.14.2616-r100h/Graphics_SDK_4_00_00_01/GFX_Linux_KM
    System Version String: SGX revision = 1.2.5

    I am cross compiling using qt-everywhere-opensource-src-4.6.3 and Graphics_SDK_4_03_00_02 / gfx_dbg_es5.x. The target is Beagleboard Xm using file system from Narcissus image builder. This included all qt options. I have since cross compiled qt and updated the target with the new libraries.

    QEglContext::createSurface(): Unable to create EGL surface, error = 0x3001

    hellogl_es2 fails green window only. Note error number is 0x3001 not 0x300B

    cat /etc/powervr.ini

    [default]

    WindowSystem=libpvrPVR2D_FRONTWSEGL.so.1

    Changing this to libpvrQWSWSEGL.so gives the same error.

    Any advice would be appreciated.

    Thanks, Phil

    root@beagleboard:~# /Files/sgxperf_check.sh
    WSEGL settings
    [default]
    WindowSystem=libpvrPVR2D_FRONTWSEGL.so.1
    ------
    ARM CPU information
    Processor    : ARMv7 Processor rev 2 (v7l)
    BogoMIPS    : 521.97
    Features    : swp half thumb fastmult vfp edsp thumbee neon vfpv3
    CPU implementer    : 0x41
    CPU architecture: 7
    CPU variant    : 0x3
    CPU part    : 0xc08
    CPU revision    : 2

    Hardware    : OMAP3 Beagle Board
    Revision    : 0020
    Serial        : 0000000000000000
    ------
    SGX driver information
    Version 1.4.14.2616 (release) /OE/angstrom-dev/work/beagleboard-angstrom-linux-gnueabi/omap3-sgx-modules-1.4.14.2616-r100h/Graphics_SDK_4_00_00_01/GFX_Linux_KM
    System Version String: SGX revision = 1.2.5
    ------
    Framebuffer settings

    mode "1280x720-60"
        # D: 64.000 MHz, H: 44.444 kHz, V: 59.979 Hz
        geometry 1280 720 1280 720 16
        timings 15625 80 48 3 13 32 5
        rgba 5/11,6/5,5/0,0/0
    endmode

    Frame buffer device information:
        Name        : omapfb
        Address     : 0x80ad2000
        Size        : 1843200
        Type        : PACKED PIXELS
        Visual      : TRUECOLOR
        XPanStep    : 1
        YPanStep    : 1
        YWrapStep   : 0
        LineLength  : 2560
        Accelerator : No
    ------
    Rotation settings
    0
    ------
    Kernel Module information
    Module                  Size  Used by
    bufferclass_ti          4596  0
    omaplfb                 8749  0
    pvrsrvkm              126503  2 bufferclass_ti,omaplfb
    sdmak                   3743  0
    lpm_omap3530            6605  0
    dsplinkk              125793  1 lpm_omap3530
    cmemk                  21482  0
    rfcomm                 33484  0
    ircomm_tty             30305  0
    ircomm                 16429  1 ircomm_tty
    irda                  162973  2 ircomm_tty,ircomm
    ipv6                  249063  14
    hidp                   11193  0
    l2cap                  30104  4 rfcomm,hidp
    bluetooth              49221  3 rfcomm,hidp,l2cap
    rfkill                 14838  2 bluetooth
    minix                  25759  0
    rtc_twl                 4451  0
    rtc_core               12535  1 rtc_twl
    ------
    Boot settings
    mem=99M@0x80000000 mem=384M@0x88000000 console=ttyS2,115200n8 omapfb.mode=dvi:1280x720MR-16@60 root=/dev/mmcblk0p2 rootfstype=ext3 rootwait init=/usr/bin/bootchart-lite
    ------
    Linux Kernel version
    Linux beagleboard 2.6.32 #3 PREEMPT Thu Mar 17 08:56:19 CET 2011 armv7l GNU/Linux
    root@beagleboard:~#

     

     

  • - Is the application correctly invoked - hellogl_es2 -qws -display powervr ?

    - Are the GLES2.0 standalone demos from the graphics SDK working in FLIP mode ? This is important - as I see that you have not allocated memory for vram explicitly to allow triple buffering.

    - If other demos are working, perhaps you can send the log with the debug version of the SGX drivers installed, to find the cause.

     

     

  • 1/ Yes , hellogl_es2 -qws -display powervr

    2/  SGX demos included in Narcissus build all work ok. FLIP mode?? vram?? will have to look that up..any tips/info/links on this?

    3/  Just starting on all this so can you advise exact steps to do debug.


    As I have just started building system I may not have got the best combination of versions/ builds etc. I would rather do a clean build with known working combinations than chase lots of issues, although happy to provide info if it helps others or fix bugs. Can you please advise the most reliable / least issues approach. eg Angstrom Narcissus online build , cross compile qt everywhere,... Narcissus build uses qt 4.6.3 hence why I chose this. I would rather work with more recent qt everywhere 4.7.2 if possible.

    Thanks for the prompt response. This is a great product....although it looks like I have to do a lot more online reading....., Phil

  • Please add "omapfb.vram=8M" to your bootargs. It should ideally read like this:

    mem=99M@0x80000000 mem=384M@0x88000000 console=ttyS2,115200n8 omapfb.vram=8M omapfb.mode=dvi:1280x720MR-16@60 root=/dev/mmcblk0p2 rootfstype=ext3 rootwait init=/usr/bin/bootchart-lite

     

    To enable flip mode, you can edit /etc/powervr.ini and set WindowSystem to "libpvrPVR2D_FLIPWSEGL.so" as below:

    [default]

    #WindowSystem=libpvrQWSWSEGL.so
    #WindowSystem=libpvrPVR2D_FRONTWSEGL.so
    WindowSystem=libpvrPVR2D_FLIPWSEGL.so

     

    Couple of points to note:

    1. Ensure that /etc/powervr.ini is in UNIX format - no trailing CRLF characters.

    2. WindowSystem should point to "libpvrQWSWSEGL.so" if you want to enable Qt demos with SGX

     

    If you still have problems, can you send config.status and qmake.conf used for building Qt? Also, send the debug logs

    Regards,

    Anand

  • Thanks for the response, very helpful.  I am not sure if I have installed sgx properly. Now I notice that there is an install.sh in /usr/local/Graphics_SDK_4_03_00_02/gfx_dbg_es5.x. Should I have used that or does Narcissus online builder look after everything?

    1/ I have updated bootargs as suggested.

    2/ Copied fresh powervr.ini file from SDK to ensure correct format.

    running hellogl_es2 with WindowSystem=libpvrPVR2D_FLIPWSEGL gives greeen window and error = 0x300b

    running hellogl_es2 with WindowSystem=libpvrQWSWSEGL.so gives greeen window and error = 0x3001

    Looking into how to get debug logs.

    At the same time as trying to resolve this issue I am currently doing a build using qt everywhere 4.7.2 with the patch applied. I will try that today after making another sd card with original image from Narcissus online builder to try and go back to as clean a build as possible.

    Command used to build qt4.6.3;

      /media/Projects/qt-everywhere-opensource-src-4.6.3/configure -prefix /opt/qt-sgx/ -embedded arm -platform /qws/linux-x86-g++ -xplatform /qws/linux-TIarmv7-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 -no-dbus -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 -plugin-gfx-powervr -D QT_NO_QWS_CURSOR -D QT_QWS_CLIENTBLIT -D __linux__ 

    Changes required to get the build to complete qt 4.6.3 build;

    qmake.conf;
    Add  --sysroot to linker;  QMAKE_LINK = /usr/local/angstrom/arm/arm-angstrom-linux-gnueabi/bin/g++ --sysroot=/media/Projects/beagleSGX/

    Add -lusc to linker lib; QMAKE_LIBS = $$QMAKE_LIBS_OPENGL_ES2 -lts -lusc

    make errors;
    1/ Could not find wsegl.h   added -I/media/Projects/qt-everywhere-opensource-src-4.6.3/src/3rdparty/powervr to Makefile

    2/ uic segmentation faults; solution use 4.7.2 uic to generate .h file then copy to hidden  .uic folder. Not sure if this is a valid solution, got same error with build of 4.7.2 overcame by removing uic qpagesetupwidget.ui from the Makefile, so will not have qpagesetupwidget.
    These cause uic segmentation fault during make;
    /media/Projects/qt-everywhere-opensource-src-4.6.3/src/gui/dialogs/qpagesetupwidget.ui
    /media/Projects/qt-everywhere-opensource-src-4.6.3/examples/animation/easing/form.ui
    /media/Projects/qt-everywhere-opensource-src-4.6.3/examples/widgets/validators/.uic/release-shared-emb-arm/validators.ui

    qmake; Note I am not using Touch Screen;

    #w
    # qmake configuration for building with arm-linux-g++
    #

    include(../../common/g++.conf)
    include(../../common/linux.conf)
    include(../../common/qws.conf)

    SYSROOT = /media/Projects/beagleSGX/

    # modifications to g++.conf
    QMAKE_CFLAGS_RELEASE    = -O3 -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp
    QMAKE_CXXFLAGS_RELEASE    = -O3 -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp --sysroot=/media/Projects/beagleSGX/

    QMAKE_CC = /usr/local/angstrom/arm/arm-angstrom-linux-gnueabi/bin/gcc
    QMAKE_CXX = /usr/local/angstrom/arm/arm-angstrom-linux-gnueabi/bin/g++
    QMAKE_LINK = /usr/local/angstrom/arm/arm-angstrom-linux-gnueabi/bin/g++ --sysroot=/media/Projects/beagleSGX/
    QMAKE_LINK_SHLIB = /usr/local/angstrom/arm/arm-angstrom-linux-gnueabi/bin/g++

    #QMAKE_CC                = /usr/local/CodeSourcery/Sourcery_G++_Lite/bin/arm-none-eabi-gcc
    #QMAKE_CXX               = /usr/local/CodeSourcery/Sourcery_G++_Lite/bin/arm-none-eabi-g++
    #QMAKE_LINK              = /usr/local/CodeSourcery/Sourcery_G++_Lite/bin/arm-none-eabi-g++ --sysroot=/media/Projects/beagleSGX/
    #QMAKE_LINK_SHLIB        = /usr/local/CodeSourcery/Sourcery_G++_Lite/bin/arm-none-eabi-g++

    #User specific Path - To Be edited by User
    #e.g
    SGX_SDK_ROOT    = /usr/local/Graphics_SDK_4_03_00_02
    TSLIB_INCDIR    = $TSLIB_INSTALL_DIR/include
    #TSLIB_LIBDIR     =  $FILESYSTEM_INSTALL_ROOT/usr/lib
    TSLIB_LIBDIR     =  /media/Projects/beagleSGX/usr/lib

    #Do not edit beyond this
    QT_INSTALL_DIR_TIBLT    = $$PWD/../../..

    QMAKE_INCDIR_OPENGL_ES2 = $$SGX_SDK_ROOT/GFX_Linux_SDK/OGLES2/SDKPackage/Builds/OGLES2/Include/
    QMAKE_INCDIR_OPENGL_ES2 += $$SGX_SDK_ROOT/GFX_Linux_SDK/OGLES2/SDKPackage/Builds/OGLES2/LinuxOMAP3/Include/
    QMAKE_INCDIR_OPENGL_ES2 += $$SGX_SDK_ROOT/include
    QMAKE_INCDIR_OPENGL_ES2 += $$SGX_SDK_ROOT/GFX_Linux_SDK/OGLES/SDKPackage/Builds/OGLES/Include/
    QMAKE_LIBDIR_OPENGL_ES2 = $$SGX_SDK_ROOT/gfx_dbg_es5.x/
    QMAKE_LIBS_OPENGL_ES2 = -lEGL -lGLESv2 -lGLES_CM -lIMGegl -lsrv_um

    QMAKE_INCDIR_OPENGL += $$SGX_SDK_ROOT/GFX_Linux_SDK/OGLES/SDKPackage/Builds/OGLES/Include/
    QMAKE_LIBDIR_OPENGL = $$SGX_SDK_ROOT/gfx_dbg_es5.x
    QMAKE_LIBDIR_OPENGL_QT = $$SGX_SDK_ROOT/gfx_dbg_es5.x
    QMAKE_LIBS_OPENGL_ES1 = -lEGL -lGLES_CM -lIMGegl -lsrv_um

    QMAKE_INCDIR_OPENVG = $$SGX_SDK_ROOT/GFX_Linux_SDK/OVG/SDKPackage/Builds/OVG/Include/
    QMAKE_LIBDIR_OPENVG = $$SGX_SDK_ROOT/gfx_dbg_es5.x/
    QMAKE_LIBS_OPENVG = -lEGL -lGLESv2 -lGLES_CM -lIMGegl -lsrv_um -lOpenVG -lOpenVGU

    QMAKE_INCDIR_EGL = $$QMAKE_INCDIR_OPENGL_ES2
    QMAKE_INCDIR_EGL += $$QT_INSTALL_DIR/src/3rdparty/powervr/
    QMAKE_LIBDIR_EGL = $$QMAKE_LIBDIR_OPENGL_ES2
    QMAKE_LIBS_EGL = -lEGL -lIMGegl -lsrv_um -lGLESv2 -lGLES_CM

    QMAKE_INCDIR += $$TSLIB_INCDIR
    QMAKE_INCDIR += $$QMAKE_INCDIR_OPENGL_ES2
    QMAKE_LIBDIR += $$QMAKE_LIBDIR_OPENGL_ES2
    QMAKE_LIBDIR += $$TSLIB_LIBDIR
    #QMAKE_LIBS = $$QMAKE_LIBS_OPENGL_ES2 -lt
    # PWedit added -lusc
    QMAKE_LIBS = $$QMAKE_LIBS_OPENGL_ES2 -lts -lusc

    # modifications to linux.conf
    QMAKE_AR = /usr/local/angstrom/arm/arm-angstrom-linux-gnueabi/bin/ar cqs
    QMAKE_OBJCOPY = /usr/local/angstrom/arm/arm-angstrom-linux-gnueabi/bin/objcopy
    QMAKE_STRIP = /usr/local/angstrom/arm/arm-angstrom-linux-gnueabi/bin/strip

    #QMAKE_AR                = /usr/local/CodeSourcery/Sourcery_G++_Lite/bin/arm-none-eabi-ar cqs
    #QMAKE_OBJCOPY           = /usr/local/CodeSourcery/Sourcery_G++_Lite/bin/arm-none-eabi-objcopy
    #QMAKE_STRIP             = /usr/local/CodeSourcery/Sourcery_G++_Lite/bin/arm-none-eabi-strip

    load(qt_config)

  • Your Qt build steps look quite fine. However, the build error #1 should not have occured. The file wsegl.h should be available in the GFX_SDK include.

    For 720P, you would need larger buffers. Please use "omapfb.vram=16M" for flip mode.

    To install SGX, please update Rules.make in Graphics_SDK_4_03_00_02 and do "make OMAPES=5.x install". On rebooting, you should get the updated DDK version if you run gfxcheck.sh

    The following are the steps to check your graphics SDK setup:

    1. Install Graphics SDK to the target

    2. Set the WindowSystem to Front mode

    3. Run "gles2test1 -t" from the target. This should be available in your gfx_dbg_5.x directory on your target

    4. Set the WindowSystem to Flip mode

    5. Run "glestest1 -t" again from the target.

    Steps 3 and 5 should show you valid output. If this is fine, your Graphics SDK setup is fine.

    Once Graphics SDK is validated, you can turn to Qt.

    1. Set WindowSystem to Qt-WSEGL mode. This is the only mode to be used while running with Qt

    2. Run hellogl_es2 with "-display powervr"

    Regards,

    Anand

  • Thanks for the detailed response.Just thought I would check before doing the SDK install;  the first test, item 3/ passes , but second one, FLIP mode fails with eglCreateWindowSurface' returned error 'EGL_NOT_INITIALIZED' ( 0x3001).

    Now to install sgx

    re update Rules.make I am a bit unsure about what the KERNEL_INSTALL_DIR should be . I am setting up to run the install direct on the target beagle boardxM with Angstrom.

    I have /lib/modules/2.6.32/kernel which has dir / arch crypto drivers fs lib net sound.  Please advise.....Thanks

  • A side issue, when I try and run cross compiled examples on the target, eg mainwindows, I get error 

    "QFontDatabase::loadFromCache: Font path doesn't match. Found /usr/lib/fonts in database, expected /opt/qt-sgx/lib/fonts"

    I have searched for a solution to this and have not found anything. The image I used included qt so clearly confusion about where fonts are. Fonts exist at both locations. Do you know if there is a way to clear/modify the database? Thanks

  • Qt installation folder on target needs to be on the same path as it was on your host while you were compiling. So what happens is that Qt is searching for the fonts on the wrong path and clearly cannot find them.


    You could also try to play with PREFIX flag while running Qt ./configure and set the path manually.

  • Thanks for this. I was aware of this and hence built qt on host  in /usr/opt/qt-sgx and created the same directory on target and copied the folder from host. The image that I used from the online builder included qt and hence already had qt installed on target in /usr/lib and hence fonts at /usr/lib/fonts . So I think this is more a conflict between the two builds. I am not sure what database it refers to, ie is it linux or qt. The error message says it finds the fonts but that the program that I am attempting to execute wants to use them from /usr/opt/qt-sgx where they are also. I would prefer to keep both builds on the same machine but perhaps this creates too many issues. Thanks Phil

  • Correction..build was to /opt/qt-sgx on host and hence this folder also created on target.

  • Hi,

     

    This patch was very helpful. Thank you!

    After applying patch, new problem came out. At first, i thought my application is working well. I'm not sure why but when tried to test again after few days, green screen and following errors came up:

     

    QGLShader: could not create shader                                                                                                                                                                                
    Vertex shader for simpleShaderProg (MainVertexShader & PositionOnlyVertexShader) failed to compile                                                                                                                
    QGLShader: could not create shader                                                                                                                                                                                
    Fragment shader for simpleShaderProg (MainFragmentShader & ShockingPinkSrcFragmentShader) failed to compile                                                                                                       
    QGLShaderProgram: could not create shader program                                                                                                                                                                 
    Errors linking simple shader: ""                                                                                                                                                                                  
    QGLShader: could not create shader                                                                                                                                                                                
    Vertex shader for blitShaderProg (MainWithTexCoordsVertexShader & UntransformedPositionVertexShader) failed to compile                                                                                            
    QGLShader: could not create shader                                                                                                                                                                                
    Fragment shader for blitShaderProg (MainFragmentShader & ImageSrcFragmentShader) failed to compile                                                                                                                
    QGLShaderProgram: could not create shader program                                                                                                                                                                 
    Errors linking blit shader: ""                                                                                                                                                                                    
    QGLShader: could not create shader                                                                                                                                                                                
    Warning: "" failed to compile!                                                                                                                                                                                    
    QPixmap::scaled: Pixmap is a null pixmap

    QPixmap::scaled: Pixmap is a null pixmap  

    QPixmap::scaled: Pixmap is a null pixmap  

    QPixmap::scaled: Pixmap is a null pixmap                                                                                                                                                                         

     

    Application is using QGLWidget  and QGraphicsScene::addPixmap to add pixmap.

    Same issue if not using QGraphicsScene and overriding paintEvent.

    Looks like there is some kind of pixmap related issue.

  • >> At first, i thought my application is working well. I'm not sure why but when tried to test again after few days

    If this application was working earlier, try to find out what changed.

    Are the SGX Graphics drivers installed, and Graphics SDK demos functional ?

    How are you invoking the application ? Do you have -display powervr in the argument list ?

  • Like i said, I'm not sure is it worked well as I'm not sure if i maybe forgot "-display powervr" when testing first time.

     

    I tried demo having rotating triangles, It's working well with libpvrQWSWSEGL.so also but slower then with other drivers, except green background. Yes, I'm using "-display powervr".

     

    I noticed same error on my laptop when user has no enough priviledges to "/dev/nvidia*". But, on bb user is root so privileges should not be a  problem.

     

    Looks like it happens only when QPixmap should be used in code.

     

    Is there any detailed procedure to test?

     

    Thank you

  • Did you ever get an answer to this?

    I too have tests 3) and 5) passed but when I run "/examples/opengl/hellogl_es2/hellogl_es2 -display powervr -qws" I get a window with a green background appearing, and the console says:

    QEglContext::createSurface(): Unable to create EGL surface, error = 0x3001

    Please can someone help?

    Thanks,
    Ralph

  • After applying the patch (from the verified answer), I managed to run apps with no errors.

  • Hi Bakamovic, thanks for replying. Can I ask which version of Qt you are using? Did you make any changes to qmake.conf apart from specifying where the graphics directory was in the EZSDK?

    Thanks again,

    Ralph

  • No. As much as I can remember I didn't change any configuration. My whole setup is explained in my first post (I'm using Qt Embedded 4.6.1).

    Given patch sort of worked for me with this version of Qt. I didn't manage to find out why the OpenGL-accelerated Qt demos weren't fast enough. Unfortunately I didn't have more time to investigate such behaviour.

    Good luck,

    Adi

  • Okay that's useful to know. I have Qt embedded 4.7.2 plus I'm using a DM8168. The acceleration is slowed down I believe if you mix OpenGL with 2D acceleration as the API cannot handle 2D and 3D acceleration calls efficiently.

    I'm going to create a new thread in a forum closer to home but thanks for your reply.

    Ralph

  • How to I add safely the init=/usr/bin/bootchart-lite to the cmdline of my system ?

    I have the bootchart-lite install already but was not sure how to make it work ...

    Brahim