Showing posts with label sgx. Show all posts
Showing posts with label sgx. Show all posts

Tuesday, August 6, 2013

Qt5 with KMS on Jacinto6 / OMAP5 with GLSDK 6.01.00.01

The latest release of Qt5 with KMS support is available on OMAP5 and Jacinto6 platforms. The main features validated are OpenGLES 2.0, Neon and KMS.

The example applications tested are :
  • opengl/hellowindow
  • opengl/paintedwindow
  • gui/analogclock
  • widgets/animation/moveblocks
  • effects/blurpicket
Pre-Requisites
  1. OMAP5 uEVM / Jacinto6 EVM
  2. Qt5.1.0 release
  3. Linaro GCC 4.7-2013.03 ARM Linux gnueabi hard float cross compiler toolchain
  4. Ensure that the board boots successfully and the terminal is visible on the display
  5. Ensure that kmscube application runs on the board
Run Qt5 example applications
    Target filesystem based on TI GLSDK 6.01.00.01 with prebuilt Qt5 binaries are available at:
    https://gforge.ti.com/gf/download/docmanfileversion/320/6656/ti-glsdk_omap5-uevm_6_01_00_01.tar.gz


    The Qt5 installation is at /usr/local/qt5.1 on this file system. The stock GLSDK 6.01.00.01 filesystem has missing dependencies for building and running Qt5. These libraries and header files have been added to the file system shared above.
    • Untar the filesystem to the second partition on your SD card. This will replace your current filesystem on the SD card. The same filesystem can be used for both OMAP5 and Jacinto6
    • Create a soft link to satisfy Qt5 build time configurations
    target # mkdir -p /home1/anand/targetnfs/ti-glsdk_omap5-uevm_6_01_00_01 
    target # cd /home1/anand/targetnfs/ti-glsdk_omap5-uevm_6_01_00_01 
    target # ln -s /usr usr
    • Initialize SGX as follows:
    target # pvrsrvinit
    • Set the loader library path
    target # export LD_LIBRARY_PATH=/lib:/usr/lib:/usr/local/qt5.1/lib
    • Run the example Qt5 application using kms platform
    target # cd /usr/local/qt5.1/examples/opengl/hellowindow
    target # ./hellowindow -platform kms
    Note
    In step 1, if you want to retain your own filesystem, copy /usr/local/qt5.1 from the prebuilt filesystem to your filesystem on SD card. In addition, add the missing dependencies by checking the differences in /lib, /usr/lib and /usr/include between the prebuilt filesystem and your filesystem.

    Building Qt5


    The mkspecs that configure Qt for OMAP5/Jacinto6 are available at:
    https://gitorious.org/tigraphics/qtsupport

    • Untar Qt5.1.0 source
    • Add the Qt mkspecs directory linux-omap5-g++ into $QT/qtbase/mkspecs
    https://gitorious.org/tigraphics/qtsupport/trees/master/qt5-omap5-kms/linux-omap5-g++
    host $ cd $QTDIR/qtbase
    host $ patch -p1 < 0001-Remove-GBM_BO_FORMAT-and-use-GBM_FORMAT-directly.patch
    • Configure Qt
    host $ cd $QTDIR
    host $ ./configure -prefix /home1/anand/targetnfs/ti-glsdk_omap5-uevm_6_01_00_01/usr/local/qt5.1 -release -make libs -make examples -nomake tools -xplatform linux-omap5-g++ -opengl es2 -confirm-license -opensource -no-xcb -no-pch -verbose -kms -sysroot /home1/anand/targetnfs/ti-glsdk_omap5-uevm_6_01_00_01 -v -no-icu
    • This configures Qt for the following:
      • Release mode
      • Libraries and Examples are built, but tools are not built
      • Cross compiler platform is linux-omap5-g++
      • OpenGL ES2
      • XCB, PCH, ICU are disabled
      • KMS is enabled
      • Sysroot is set to /home1/anand/targetnfs/ti-glsdk_omap5-uevm_6_01_00_01. All libraries and header files are picked up relative to this path
      • Prefix is set to /home1/anand/targetnfs/ti-glsdk_omap5-uevm_6_01_00_01/usr/local/qt5.1. After building, Qt is installed to this path
      • Side effect of having the Qt prefix is that we need to create a symbolic link on the target filesystem that ensures that the prefix is valid even on the target
    • Build Qt by running "make" 
    • Install Qt by running "make install"
    TODO
    • Execution of certain applications give a PVR map error when run with KMS resulting in a blank screen
    • evdevmouse and evdevkeyboard plugins have some problems
    • Cursor support is not available
    • Webkit2 is not validated
    • Testing of features and example applications other than those listed at the top

    Friday, June 28, 2013

    Qt5 with BuildRoot on Beagle, with TI Graphics SDK

    The recent work with the Buildroot team has produced good results, with the Graphics SDK recipes, and Qt5 patches being used in Buildroot, and functional on Beagle.

    http://permalink.gmane.org/gmane.comp.lib.uclibc.buildroot/61974

    A video of the Qt5.0.2 based demos is shown by Thomas below:

    http://free-electrons.com/~thomas/pub/opengl-beagle.mp4

    Per Thomas, the RFC will soon be made a patch to be included into the official Buildroot tree.

    Monday, April 8, 2013

    Qt5 (minimal) on Beaglebone with Yocto

    While eglfs works for most Qt5 applications on AM33x EVM/ derived boards, Yocto integration has not been done so far. This post introduces changes to get Qt5 built for Beaglebone using Yocto. Performance is not yet tuned, and all platform plugins are not yet available, but this will help teams starting on Beaglebone and related boards with Yocto. The output is a core-image-minimal Yocto image, with Qt5 (qtbase) example and dependencies added to the image.

    Introduction:
    To build Qt5 for Beaglebone, the below repos are needed:
    poky
    meta-oe
    meta-ti
    meta-qt5

    Downloading the configuration files:
    git clone git://git.yoctoproject.org/poky
    cd poky
    git clone https://github.com/openembedded/meta-oe
    git clone git://git.yoctoproject.org/meta-ti
    git clone git@github.com:prabindh/meta-qt5.git

    Further information and next steps at,
    http://gpupowered.org/node/20

    TODO:
    - fonts are not installed to (image) target, so text is garbled
    - eglfs with virtual/gles2 configuration update

    - Qt 5.1 update
    - webkit update
    - Beaglebone itself runs only at 250 MHz (!) in the default Yocto core-image-minimal. To update with TI scripts for a better performance profile

    Tuesday, March 19, 2013

    Moksha - HTML5/CSS with Snowshoe/Qt5.0.1

    Qt5.0.1 was released recently, and Qt5.0.1, and its Webkit2 build are now available for testing on TI platforms. To show-case the capability of HTML5 based Data visualisation on TI platforms with Webkit2, a simple CSS layout has been created to be readily used for evaluation in compliant Browsers.

    Snowshoe, a Qt5 QML based browser has been used for this experiment. CSS, SVG, and Webkit specific optimisations are used. AM335x EVM was the HW platform used.

    Video snapshot of the HTML5 capabilities, using the Moksha layout is available at below link:

    http://www.youtube.com/watch?v=nztgCone4jI


    Detailed information on running the demo are available at,

    http://gpupowered.org/node/19

    Snowshoe Patches, and HTML/CSS layout files are available at,

    https://github.com/prabindh/moksha


    Saturday, January 5, 2013

    Qt 5.0.0 Final (Dec 2012) - Available on TI Linux platforms with SGX

    Latest version of Qt5 is now available on TI platforms. Configuration of Qt5 can be done with the conf files available at the below tree.

    https://github.com/prabindh/qt-configs/tree/master/qt5_1.0_Dec12

    UPDATE FEB 2013: refer patch for eglfs at http://tigraphics.blogspot.in/2013/02/qt500-eglfs-could-not-create-egl.html

    Steps:

    - Download the latest Qt5 archive from

    http://releases.qt-project.org/qt5/5.0.0/single/qt-everywhere-opensource-src-5.0.0.tar.gz

    - Ensure a working root-filesystem, and a corresponding tool-chain is available for cross-compiling.  A sample (Ubuntu based) target root filesystem is provided at

    https://gforge.ti.com/gf/download/docmanfileversion/301/6353/Browser-21-Dec.tar.gz

    - Extract the Qt5  archive

    - Download the qt5 patches from the github tree into the qt5 source archive, make updates to match the target paths, and configure using the steps mentioned in the README at

    https://github.com/prabindh/qt-configs/blob/master/qt5_1.0_Dec12/README

    Result of a successful configure should enable  NEON, GLES2, ICU, linuxfb, eglfs. ICU is needed for Webkit to be built. Post-configure, a regular make can be done.

    After building qtbase, additional packages necessary for qt3d can be built - qtdeclarative, qtjsbackend.

    Note: Previous posts on Qt5 are below:

    Beta2 - http://tigraphics.blogspot.in/2012/11/qt5-beta2-on-ti-platforms-with-opengles2.html

    Beta1 - http://tigraphics.blogspot.in/2012/10/qt5-beta1-on-ti-platforms-with-opengles2.html

    Alpha - http://tigraphics.blogspot.in/2012/04/qt5-alpha-status-part-2-with-xcb.html

    Tuesday, January 1, 2013

    WebGL and HTML5 with Firefox 19.a1 on non-Xorg TI platforms


    In an earlier post (http://tigraphics.blogspot.in/2012/04/sgx-hw-accelerated-webgl-with-firefox14.html), Firefox 14 porting on DM3730 was discussed. In this post, the changes in Firefox 19 are discussed, and
    performance benchmarked. Firefox 19 brings in changes in rendering architecture, and a new widget class "LinuxGL" is introduced by romaxa to cater to plain Framebuffer ports. Gonk is the name of the port given to the Android port of B2G. In this post, only the plain-linux Framebuffer Linux version is considered.

    Getting the binaries

    Get the filesystem and boot images from:

    https://gforge.ti.com/gf/download/docmanfileversion/301/6353/Browser-21-Dec.tar.gz

    The filesystem contains TI AM335x linux PSP kernel, and TI SGX framebuffer drivers.

    Get the b2g linuxgl port from below, and extract it into the target filesystem.

    https://gforge.ti.com/gf/download/docmanfileversion/302/6357/b2g-19.0a1.en-US.linux-gnueabi-arm.tar.gz

    The binary b2g application is to be executed with the below command:

    MOZ_HOMESCREEN= ./b2g

    Patchset:


    Patches for the AM335x port are maintained in github in below link. Patches relate to fullscreen rendering (As there is no window), and Accessibility availability, and display of cursor onscreen.

    https://github.com/prabindh/mozilla-embedded

    Relevant Bugzilla bugs are filed at,

    https://bugzilla.mozilla.org/show_bug.cgi?id=731498
    https://bugzilla.mozilla.org/show_bug.cgi?id=823985


    Videos  /screenshots on AM335x HW:

    http://www.youtube.com/user/videos4tigraphics


    Performance:

    Firefox 19 gives 381 on HTML5test.com, compared to more than 420 on Chrome. Primary contributor is lack of Video format support (Firefox only supports Theora). WebGL demos and CSS/ Canvas demos have been tested. The code still uses glTexSubImage2d, and performance can be improved by optimising some of the texture upload paths.

    Sunday, October 7, 2012

    Qt5 Beta1 on TI platforms with OpenGLES2

    Qt5 Beta1 release is now available. The package can be downloaded from,

    http://releases.qt-project.org/qt5.0/beta1/

    Build patches are available at,

    https://github.com/prabindh/qt-configs

    Qt5 Beta1 - configure and build steps at the below blog post.

    http://gpupowered.org/node/14

    Applicable Platforms - 3730, Beagleboard, BeagleXM, Beaglebone, and other SGX530 based devices.

    Wednesday, February 29, 2012

    8% CPU - Ultrasound viewer with v3dfx-base

    This post shows the benefit of using v3dfx-base in a complex end-user application - An Ultrasound Image Viewer.

    This Qt application loads a real Ultrasound file consisting of 128 layers of captured images, renders using v3dfx-base in a QGraphicsView using V3dfxGLScene, blends all 128 layers of them to recreate the final image. With a regular glTexImage2D approach, this needs 100% CPU loading. With the v3dfx-base, this needs < 8% CPU loading on SGX530@200MHz (Beaglebone/3730 class). This show-cases the powerful capabilities of the SGX with image/video streaming use-cases in both ARGB and YUV modes.


    Screenshot:

    https://github.com/prabindh/v3dfx-base/blob/master/test/platforms/qt_ultrasound/Photo0039.jpg

    README, and complete code:

    https://github.com/prabindh/v3dfx-base/tree/master/test/platforms/qt_ultrasound

    Please see earlier blog post for introduction to v3dfx-base.