BCM7425/Qt4dot8-eglnullws-QWS

From Qt Wiki
Revision as of 14:02, 14 January 2015 by Maintenance script (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Building AppLibs/RefSW for Qt

  1. Locate document named “BroadcomReferencePlatformSetup.pdf” (Usually this will be inside a tar ball named on the lines of refsw_release_<chip-name>_<date>.tgz)
  2. Follow the instructions in “BroadcomReferencePlatformSetup.pdf” to setup the Linux build machine
  3. Locate document named “AppLibsInstallationBuildGuide.pdf” (Usually this will be inside a tar ball named on the lines of applibs_release_<date>.tgz)
  4. Follow the instructions in “AppLibsInstallationBuildGuide.pdf” to build Applibs

Qt 4.8 eglnullws / QWS

This details steps to build Qt with Qt’s OpenGL graphics driver.<br>
This OpenGL graphics driver supports execution of Single Qt app that uses QGLWidget as full-screen (examples/opengl/hello_gles2)

  1. Obtain qt-4.8.0 release from Qt Download site [get.qt.nokia.com] and extract it in a working folder
  2. Obtain 7425 specific files from qt-platform-mkspecs git [gitorious.org] (look for folder “4.8”)
  3. Copy folder named “linux-7425nxs-mipsel-uclibc-g++” to <qt-4.8.0-sources>/mkspecs/qws
  4. Set following environment variables in the shell before configuring/building Qt,
    • BCM_APPLIBS_PATH=<path-till-Applibs-folder>/AppLibs
    • BCM_NEXUS_PATH=<path-till-Applibs-folder>/nexus
    • DEBUG=n
    • for example,
    • $ export BCM_APPLIBS_PATH=/home/qtnokia/WorkDir/97425-P1/stb-rs_p2-al_p2dot1/AppLibs
    • $ export BCM_NEXUS_PATH=/home/qtnokia/WorkDir/97425-P1/stb-rs_p2-al_p2dot1/nexus
  5. Apply patch “7425nxs-eglnullws.patch” to eglnullws Qt GFX Driver located at <qt-4.8.0-sources>/src/plugins/gfxdrivers/eglnullws
    • $ cd <qt-4.8.0-sources>/src/plugins/gfxdrivers/eglnullws
    • $ patch -p5 < 7425nxs-eglnullws.patch
  6. Configure Qt as,
    • $ configure -embedded mips -xplatform qws/linux-7425nxs-mipsel-uclibc-g++ -depths 16,24,32 -no-largefile -no-accessibility \
    • -opensource -verbose -system-zlib -system-libpng -system-libjpeg -system-freetype -fast -plugin-gfx-eglnullws -qt-gfx-vnc \
    • -opengl -webkit -confirm-license -release -make libs -xmlpatterns -exceptions -no-qt3support \
    • -prefix /usr/local/qt-installs/qt480ga-nxs-qws-rel
  7. Build Qt as,
    • $ make
  8. Install Qt on host as,
    • $ make install

Building Qt apps

  1. After the Qt build succeeds, set following environment variables on host before building any fullscreen OpenGL Qt App for the above build,
    • QTDIR=/usr/local/qt-installs/qt480ga-nxs-qws-rel
    • PATH=/usr/local/qt-installs/qt480ga-nxs-qws-rel/bin:$PATH
  2. Ensure that following environment variables in the shell are set,
    • BCM_APPLIBS_PATH=<path-till-Applibs-folder>/AppLibs
    • BCM_NEXUS_PATH=<path-till-Applibs-folder>/nexus
    • BCM_TARGET_LIBDIR=<path-till-nfsrootfs-base-folder>/romfs/lib
    • DEBUG=n
  3. Invoke qmake on the applications .pro file (<qt-4.8.0-sources>/examples/opengl/hello_gles2)
    • $ qmake <application>.pro
  4. Build the application sources as,
    • $ make

Running Qt apps on target

  1. Ensure that folder “qt-installs/qt480ga-nxs-qws-rel” is copied on target file system at “/usr/local”
    • Note – after copying, the path should appear as “/usr/local/qt-installs/qt480ga-nxs-qws-rel”
  2. Copy the application binary and other required resource files on target file-system, say “/root”
  3. Locate a shell script named “start” in “/bin” folder on target.
  4. Copy it in your app folder and edit the paths inside it.
  5. Launch application using same “start” script as,
    • # ./start /root/app1/app1 -qws -display eglnullws