Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Build Qt5 for BeagleBone Black
QtWS25 Last Chance

Build Qt5 for BeagleBone Black

Scheduled Pinned Locked Moved Mobile and Embedded
24 Posts 9 Posters 37.3k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    luca
    wrote on last edited by
    #1

    Hi all.
    I bought a BBB and now I'm trying to cross-compile Qt5 for it.

    I downloaded the toolchain
    gcc-linaro-arm-linux-gnueabihf-4.7-2013.02-01-20130221_linux.tar.xz
    from
    https://launchpad.net/linaro-toolchain-binaries/

    then I tried to configure Qt 5 this way:
    @
    ./configure -opensource -confirm-license -no-pch -prefix /opt/qt510-bone -release -force-debug-info -device linux-beagleboard-g++ -make libs -nomake tests -nomake examples -device-option CROSS_COMPILE=/opt/arm-toolchain/gcc-linaro-arm-linux-gnueabihf-4.7-2013.02-01-20130221_linux/bin/arm-linux-gnueabihf- -sysroot /mnt/tmp
    @
    where I mounted beaglebone root fs in /mnt/tmp .

    At the end of the configuration process I get the following error:
    @
    WARNING: Unable to find file .device.vars
    No QPA platform plugin enabled!
    If you really want to build without a QPA platform plugin you must pass
    -no-qpa-platform-guard to configure. Doing this will
    produce a Qt that can not run GUI applications.
    The dependencies needed for xcb to build are listed in
    src/plugins/platforms/xcb/README
    @

    This is my linux-beagleboard-g++/qmake.conf :
    @

    qmake configuration for the BeagleBoard and BeagleBoard xM boards

    http://beagleboard.org/

    MAKEFILE_GENERATOR = UNIX
    CONFIG += incremental gdb_dwarf_index
    QMAKE_INCREMENTAL_STYLE = sublib

    include(../../common/linux.conf)
    include(../../common/gcc-base-unix.conf)
    include(../../common/g++-unix.conf)

    load(device_config)

    QT_QPA_DEFAULT_PLATFORM = eglfs

    modifications to g++.conf

    QMAKE_CC = $${CROSS_COMPILE}gcc
    QMAKE_CXX = $${CROSS_COMPILE}g++
    QMAKE_LINK = $${QMAKE_CXX}
    QMAKE_LINK_SHLIB = $${QMAKE_CXX}

    modifications to linux.conf

    QMAKE_AR = $${CROSS_COMPILE}ar cqs
    QMAKE_OBJCOPY = $${CROSS_COMPILE}objcopy
    QMAKE_STRIP = $${CROSS_COMPILE}strip

    #COMPILER_FLAGS = -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp
    COMPILER_FLAGS = -march=armv7-a -mtune=cortex-a9 -mfpu=neon

    #modifications to gcc-base.conf
    QMAKE_CFLAGS += $${COMPILER_FLAGS}
    QMAKE_CXXFLAGS += $${COMPILER_FLAGS}
    QMAKE_CXXFLAGS_RELEASE += -O3

    QMAKE_LIBS += -lrt -lpthread -ldl

    Extra stuff (OpenGL, DirectFB, ...)

    QMAKE_INCDIR_EGL = $$[QT_SYSROOT]/usr/include
    QMAKE_LIBDIR_EGL = $$[QT_SYSROOT]/usr/lib
    QMAKE_INCDIR_OPENGL_ES2 = $${QMAKE_INCDIR_EGL}
    QMAKE_LIBDIR_OPENGL_ES2 = $${QMAKE_LIBDIR_EGL}
    QMAKE_INCDIR_OPENVG = $${QMAKE_INCDIR_EGL}
    QMAKE_LIBDIR_OPENVG = $${QMAKE_LIBDIR_EGL}

    QMAKE_LIBS_EGL = -lEGL -lIMGegl -lsrv_um
    QMAKE_LIBS_OPENGL_ES2 = -lGLESv2 $${QMAKE_LIBS_EGL}
    QMAKE_LIBS_OPENVG = -lOpenVG $${QMAKE_LIBS_EGL}

    Sanity check

    deviceSanityCheckCompiler()

    load(qt_config)

    @

    Can you help me?

    1 Reply Last reply
    0
    • L Offline
      L Offline
      luca
      wrote on last edited by
      #2

      Ok, it seems I used the wrong toochain.

      Now I'm trying the gcc-linaro-arm-linux-gnueabi-2012.04-20120426_linux.tar.bz2 toolchain and it seems to compile.

      1 Reply Last reply
      0
      • L Offline
        L Offline
        luca
        wrote on last edited by
        #3

        Here again.

        I compiled without error Qt5 qtbase source.

        Now the problem is that I only can start applications in BBB using:
        @
        ./myapp -platform linuxfb
        @
        But it seems I can't use mouse or keyboard.

        Have someone compiled Qt5 for BBB without my problems?

        Now I'm also trying to build Qt5 with EGL support but I actually can't.

        1 Reply Last reply
        0
        • J Offline
          J Offline
          jseeQt
          wrote on last edited by
          #4

          Which distribution do you use? Angstrom? Debian?
          just check if you have the EGL, GLESv2 and OpenVG libraries installed on your BBB system, they won't be installed by default.

          1 Reply Last reply
          0
          • L Offline
            L Offline
            luca
            wrote on last edited by
            #5

            [quote author="jseeQt" date="1385142188"]Which distribution do you use? Angstrom? Debian?
            just check if you have the EGL, GLESv2 and OpenVG libraries installed on your BBB system, they won't be installed by default.[/quote]

            I'm using Angstrom.
            Have you compiled Qt5 with EGL support ?

            1 Reply Last reply
            0
            • M Offline
              M Offline
              messi
              wrote on last edited by
              #6

              Hi Luca,

              if you have time and enough HD space you could try yocto with meta-qt5:
              Look here
              http://gpupowered.org/node/20
              and here
              http://gpupowered.org/node/22

              Cheers

              1 Reply Last reply
              0
              • J Offline
                J Offline
                jseeQt
                wrote on last edited by
                #7

                Hey Luca,

                I don't know any prebuild packages with the OpenGL/EGL-libraries for BB(B).
                You get these libraries if you compile the Sitara Graphics SDK on your own (see http://processors.wiki.ti.com/index.php/Graphics_SDK_Quick_installation_and_user_guide).
                This provide you the EGL and the GLESv2 libraries.

                You find the current version of the Graphics SDK at:
                http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/gfxsdk/latest/index_FDS.html

                I tested it with Robert Nelson's Debian Wheezy Image:

                1. Download the image and copy it to SD card, mount the rootfs on it
                2. Download the cross-compiler
                3. Download the kernel and compile it
                4. Download Graphics SDK and compile it against kernel (instructions see first link)
                5. If everything worked fine, boot up BB(B), and run the script /etc/init.d/335x-demo. It will install the modules and libraries. With this libraries, you will be able to compile OpenGL/EGL-stuff (maybe you should then pass the "-opengl es2" option to the Qt configure)

                Maybe this steps also works for the Angstrom image...

                If some guys are interested, maybe we could create a Debian-package to install the libraries with apitude, apt-get, etc. (like on Raspberry Pi the librasberrypi-dev)

                1 Reply Last reply
                0
                • J Offline
                  J Offline
                  john3909
                  wrote on last edited by
                  #8

                  I would be very much interested in Debian-package to install the libraries.

                  Regards,
                  John

                  1 Reply Last reply
                  0
                  • V Offline
                    V Offline
                    vveliev
                    wrote on last edited by
                    #9

                    +1
                    I would be interested in Debian-packages as well

                    Thank you

                    1 Reply Last reply
                    0
                    • J Offline
                      J Offline
                      jseeQt
                      wrote on last edited by
                      #10

                      I compiled the OpenGLES and EGL libraries against the 3.8 kernel.
                      Currently, the "out-of-the-box" wheezy-image from Robert Nelson also includes the 3.8 kernel, so you can test them really quickly. LINK:

                      https://rcn-ee.net/deb/rootfs/wheezy/debian-7.3-console-armhf-2014-01-24.tar.xz

                      My question: Do you like a debian package or tar.* archive?
                      (Have to say, I have no excperience with making a debian package...)

                      1 Reply Last reply
                      0
                      • V Offline
                        V Offline
                        vveliev
                        wrote on last edited by
                        #11

                        thanks a lot , for your time ,

                        i don't really mind any right now :)

                        Since i'm trying to figure out how everything works ...

                        1 Reply Last reply
                        0
                        • L Offline
                          L Offline
                          luca
                          wrote on last edited by
                          #12

                          Hi jseeQt,
                          I think a tar archive can be enough.

                          Thanks!

                          [quote author="jseeQt" date="1391695537"]I compiled the OpenGLES and EGL libraries against the 3.8 kernel.
                          Currently, the "out-of-the-box" wheezy-image from Robert Nelson also includes the 3.8 kernel, so you can test them really quickly. LINK:

                          https://rcn-ee.net/deb/rootfs/wheezy/debian-7.3-console-armhf-2014-01-24.tar.xz

                          My question: Do you like a debian package or tar.* archive?
                          (Have to say, I have no excperience with making a debian package...)[/quote]

                          1 Reply Last reply
                          0
                          • L Offline
                            L Offline
                            luca
                            wrote on last edited by
                            #13

                            jseeQt, why have you compiled a new kernel for you board ?
                            Is it impossible to use the kernel you already have in the BBB?

                            Thanks

                            1 Reply Last reply
                            0
                            • J Offline
                              J Offline
                              jseeQt
                              wrote on last edited by
                              #14

                              I did not compiled the kernel again.
                              But the SGX driver (which give us the GLESv2 and EGL libraries) have to be build against kernel sources...so I checked-out the (current) standard 3.8 kernel and compiled the SGX driver.
                              So: If you compilethe SGX driver against the 3.2 or 3.12 kernel, you cannot use them with a 3.8 kernel.

                              1 Reply Last reply
                              0
                              • L Offline
                                L Offline
                                luca
                                wrote on last edited by
                                #15

                                Thanks jseeQt,
                                I have in my BBB the 3.8.13-bone30 Kernel (i'm using ubuntu-saucy-13.10-armhf-3.8.13-bone30.img.xz from armhf.com).
                                Can you please tell me where to find the 3.8.13-bone30 kernel source?

                                Another question, in "this link":http://www.elinux.org/Beagleboard:BeagleBoneBlack#Known_Issues they tell:
                                @2) SGX support is not currently provided i the 3.8 kernel.@
                                why can you use it building with 3.8 kernel?

                                Thanks

                                [quote author="jseeQt" date="1392114832"]I did not compiled the kernel again.
                                But the SGX driver (which give us the GLESv2 and EGL libraries) have to be build against kernel sources...so I checked-out the (current) standard 3.8 kernel and compiled the SGX driver.
                                So: If you compilethe SGX driver against the 3.2 or 3.12 kernel, you cannot use them with a 3.8 kernel.[/quote]

                                1 Reply Last reply
                                0
                                • J Offline
                                  J Offline
                                  jseeQt
                                  wrote on last edited by
                                  #16

                                  Ok, I managed it to run with 3.2, I currently working to compile it for 3.8, but that's now wasted time...
                                  I check it with the 3.2 kernel again...I will post updates here!

                                  1 Reply Last reply
                                  0
                                  • L Offline
                                    L Offline
                                    luca
                                    wrote on last edited by
                                    #17

                                    Ok, thanks!

                                    [quote author="jseeQt" date="1392127023"]Ok, I managed it to run with 3.2, I currently working to compile it for 3.8, but that's now wasted time...
                                    I check it with the 3.2 kernel again...I will post updates here![/quote]

                                    1 Reply Last reply
                                    0
                                    • V Offline
                                      V Offline
                                      vveliev
                                      wrote on last edited by
                                      #18

                                      [quote author="jseeQt" date="1392127023"]Ok, I managed it to run with 3.2, I currently working to compile it for 3.8, but that's now wasted time...
                                      I check it with the 3.2 kernel again...I will post updates here![/quote]

                                      Hey thanks for your help , I'm having a bit of difficulty to figure out correct steps for compiling SGX right now.

                                      but talking about kernel 3.8 it seems to me that it been fixed. Based on discussions from:
                                      1 "Here":https://groups.google.com/forum/#!topic/beagleboard/qQTC7C8g0I8
                                      2 and here "here":http://e2e.ti.com/support/arm/sitara_arm/f/791/p/298596/1087282.aspx#1087282

                                      and i assume that we need "this version (bone40.1) ":https://github.com/RobertCNelson/linux-dev/tree/am33x-v3.8 of kernel where patches have been applied

                                      1 Reply Last reply
                                      0
                                      • X Offline
                                        X Offline
                                        XelaG
                                        wrote on last edited by
                                        #19

                                        @Luca: Did you manage to compile Qt5 for beaglebone black running angstrom distribution ?

                                        "Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live." - Martin Golding

                                        1 Reply Last reply
                                        0
                                        • L Offline
                                          L Offline
                                          luca
                                          wrote on last edited by
                                          #20

                                          [quote author="XelaG" date="1392643385"]@Luca: Did you manage to compile Qt5 for beaglebone black running angstrom distribution ?[/quote]

                                          Hi,
                                          yes, I built Qt 5 for BBB but I didn't use angstrom, I used "this":http://www.armhf.com/index.php/boards/beaglebone-black/#saucy .

                                          1 Reply Last reply
                                          0

                                          • Login

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • Users
                                          • Groups
                                          • Search
                                          • Get Qt Extensions
                                          • Unsolved