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. Qmake configuration for building with arm-linux-g++ with imx6 linaro
Forum Updated to NodeBB v4.3 + New Features

Qmake configuration for building with arm-linux-g++ with imx6 linaro

Scheduled Pinned Locked Moved Mobile and Embedded
12 Posts 2 Posters 13.5k Views 1 Watching
  • 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.
  • SGaistS Offline
    SGaistS Offline
    SGaist
    Lifetime Qt Champion
    wrote on last edited by
    #2

    Hi,

    Did you first cross-compile Qt 5 ?

    Interested in AI ? www.idiap.ch
    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

    1 Reply Last reply
    0
    • H Offline
      H Offline
      houmingc
      wrote on last edited by
      #3

      i did. below is my steps. Pls advice
      How does buildroot comes into picture??

      Below is the information on how I setup QT environment for building imx6 application.

      1. My environment

      lsb_release –a

      • Host: Ubuntu 12.04.5 LTS
      • Release: 12.04
      • Codename: precise
      • QT version

      .qmake -version

      • Qmake version 2.01a
      • Using Qt version 4.8.1 in /usr/lib/i386-linux-gnu

      1. Cross-compiler1 path(arm-linux-gnueabihf g++) for Qtcreator
        /opt/gcc-linaro-arm-linux-gnueabihf-4.7.2013-20130313_linux/bin/arm-linux-gnueabihf g++
        Cross-compiler2 path (arm-none-gnueabi-gcc-4.3.3 g++) for Qtcreator
        /opt/codesourcery/arm-2009q1/bin/arm-none-gnueabi-gcc-4.3.3

      2. Configuring qmake.conf to work with cross compiler

      qmake configuration for building with arm-none-linux-gnueabi-g++

      MAKEFILE_GENERATOR = UNIX
      CONFIG += incremental gdb_dwarf_index
      QMAKE_INCREMENTAL_STYLE = sublib

      #INCPATH +=
      /usr/arm-linux-gnueabi/include

      INCPATH
      #/opt/codesourcery/arm-none-linux-gnueabi/include
      /opt/gcc-linaro-arm-linux-gnueabihf-4.7-2013.03-20130313_linux/arm-linux-gnueabihf/include

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

      #Compiler Flags to take advantage of the ARM architecture
      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

      modifications to g++.conf

      QMAKE_CC = /opt/gcc-linaro-arm-linux-gnueabihf-4.7-2013.03-20130313_linux/arm-linux-gnueabihf/arm-none-linux-gnueabi-gcc
      QMAKE_CXX = /opt/gcc-linaro-arm-linux-gnueabihf-4.7-2013.03-20130313_linux/arm-linux-gnueabihf/arm-none-linux-gnueabi-g++
      QMAKE_LINK = /opt/gcc-linaro-arm-linux-gnueabihf-4.7-2013.03-20130313_linux/arm-linux-gnueabihf/arm-none-linux-gnueabi-g++
      QMAKE_LINK_SHLIB = /opt/gcc-linaro-arm-linux-gnueabihf-4.7-2013.03-20130313_linux/arm-linux-gnueabihf/arm-none-linux-gnueabi-g++

      modifications to linux.conf

      QMAKE_AR = /opt/gcc-linaro-arm-linux-gnueabihf-4.7-2013.03-20130313_linux/arm-linux-gnueabihf/arm-none-linux-gnueabi-ar cqs
      QMAKE_OBJCOPY = /opt/gcc-linaro-arm-linux-gnueabihf-4.7-2013.03-20130313_linux/arm-linux-gnueabihf/arm-none-linux-gnueabi-objcopy
      QMAKE_STRIP = /opt/gcc-linaro-arm-linux-gnueabihf-4.7-2013.03-20130313_linux/arm-linux-gnueabihf/arm-none-linux-gnueabi-strip

      load(qt_config)

      #-----------------------------------------------------------------------------

      #/home/common/Desktop/qt-opensource/qt-everywhere-opensource-src-4.7.3/mkspecs

      export DISPLAY=:0
      #export QT_QWS_FONTDIR=/opt/

      1. Build and install
        $ make –j 4
        $ sudo make install

      2. Configure Compiler
        Build & Run ->Compilers and click Add-> GCC
        Select compiler path:
        opt/gcc-linaro-arm-linux-gnueabihf-4.7.2013-20130313_linux/bin/arm-linux-gnueabihf g++

      3. Configure Kit
        Kits and click add
        Call new kit sabrelite
        • Name: ARM g++
        • Device type: Generic Linux Device
        • Sysroot: opt/gcc-linaro-arm-linux-gnueabihf-4.7.2013-20130313_linux/bin/arm-linux-gnueabihf g++
        • Compiler: arm-linux-gnueabihf g++
        • Qt version: Qt 5.3.0 GCC 32 bit
        • Qt mkspec: leave empty

      4. Build Qt Application
        Create new project (console)
        Edit project (.pro) file
        Target.path =/home/root
        INSTALL =target

      1 Reply Last reply
      0
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #4

        Which qmake are you using ? The one from your system Qt or the one you cross-built ?

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply
        0
        • H Offline
          H Offline
          houmingc
          wrote on last edited by
          #5

          qmake on pc for the system. qmake amendment as above for the target, of course??
          you did not answer first question. Can you write more for me to understand your thought, thought process, to absorb some of your know-how

          1 Reply Last reply
          0
          • H Offline
            H Offline
            houmingc
            wrote on last edited by
            #6

            It is not working on my target. Pls advice

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #7

              There's something absolutely not clear about your setup, there's Qt 5.3.0 Qt 4.8.1 and 4.7.3 mentioned in there.

              Which version of Qt do you want to use on your target, which one did you install on your system ? How did you install it ?

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              0
              • H Offline
                H Offline
                houmingc
                wrote on last edited by
                #8

                Hi

                I will announced my steps in another day, they are proven working until i put the image into target.

                I did succeed putting the image into target. But in the target, when i touch my dialog boxes. it is removed/deleted reviewing the background. What did i done wrongly. do i need Tslib to be installed to enable touchscreen.

                1 Reply Last reply
                0
                • SGaistS Offline
                  SGaistS Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on last edited by
                  #9

                  I can't answer that, I don't know your software or how it is supposed to run

                  Interested in AI ? www.idiap.ch
                  Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                  1 Reply Last reply
                  0
                  • H Offline
                    H Offline
                    houmingc
                    wrote on last edited by
                    #10

                    My video has been published at http://youtu.be/LIgq7m1fU5A. Please kindly take a look. And what information i need to discosed

                    1 Reply Last reply
                    0
                    • H Offline
                      H Offline
                      houmingc
                      wrote on last edited by
                      #11

                      Below is my build process
                      Building and setting up QT environment for IMX 6

                      1. Set cross compile path

                      export PATH=$PATH:/opt/freescale/usr/local/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/fsl-linaro-toolchain/bin/

                      arm-none-linux-gnueabi-gcc -v

                      You will see “gcc version 4.6.2 20110630 (prerelease) (Freescale MAD -- Linaro 2011.07 -- Built at 2011/08/10 09:20)” at last line
                      2. In your qt-everywhere-opensource-src-4.7.4
                      Modify mkspecs/qws/linux-arm-g++/qmake.conf
                      QMAKE_CC = arm-none-linux-gnueabi-gcc
                      QMAKE_CXX = arm-none-linux-gnueabi-g++
                      QMAKE_LINK = arm-none-linux-gnueabi-g++
                      QMAKE_LINK_SHLIB = arm-none-linux-gnueabi-g++
                      QMAKE_AR = arm-none-linux-gnueabi-ar cqs
                      QMAKE_OBJCOPY = arm-none-linux-gnueabi-objcopy
                      QMAKE_STRIP = arm-none-linux-gnueabi-strip
                      3. In your qt-everywhere-opensource-src-4.7.4

                      ./configure -embedded arm -qt-zlib -qt-libpng -qt-gif -qt-libtiff -qt-libmng -qt-libjpeg -qt-freetype -no-openssl -static -prefix /media/jt_disk2/QT

                      “/media/jt_disk2/QT” is my QT install path
                      4. make
                      5. make install
                      Building your code to target board

                      1. Set environment variable

                      export QTDIR=/media/jt_disk2/QT/

                      export PATH=$QTDIR/bin:$PATH

                      export LD_LIBRARY_PATH=$QTDIR/lib:$LD_LIBRARY_PATH

                      qmake -version

                      You will see QT version and QT in your install path
                      2. In your code dir

                      qmake -project

                      qmake

                      make

                      1. Copy binary file to target board
                      2. Copy ${QT install}/lib/fonts to target board's /usr/lib/
                      3. export QT_QWS_FONTDIR=/usr/lib/fonts
                      4. Run QT binary file

                      ./Your_QT -qws

                      1 Reply Last reply
                      0
                      • SGaistS Offline
                        SGaistS Offline
                        SGaist
                        Lifetime Qt Champion
                        wrote on last edited by
                        #12

                        Before anything else, if you're not tied to that particularly old version of Qt you should first update to 4.8.6

                        Interested in AI ? www.idiap.ch
                        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                        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