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. Cross-Compile on Banana Pi
QtWS25 Last Chance

Cross-Compile on Banana Pi

Scheduled Pinned Locked Moved Mobile and Embedded
9 Posts 3 Posters 9.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.
  • S Offline
    S Offline
    Sebbo
    wrote on 20 Oct 2014, 14:18 last edited by
    #1

    Hi guys!

    I successfully cross-compiled Qt on my Raspberry Pi but due to performance issues I needed to get faster hardware. Therefore I bought a Banana Pi which does the job.
    Apparently I'm not able to cross-compile Qt on that device. My host system is Ubuntu 14.04.1 LTS and the Pi runs with Bananian Linux.
    I already tried the "Beginners guide":http://qt-project.org/wiki/RaspberryPi_Beginners_guide and used different image files.
    Well I guess I'm using the wrong toolchain since I only found the gcc-4.7-linaro-rpi-gnueabihf which is for the Raspberry Pi.

    Did anyone face the same problems or is there a guide like there is for the Raspberry Pi?

    I am very grateful for help or any advice!! :)

    Thanks.

    Seb

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 20 Oct 2014, 20:26 last edited by
      #2

      Hi and welcome to devnet,

      What error are you getting ?

      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
      • T Offline
        T Offline
        tomasz3dk
        wrote on 20 Oct 2014, 20:54 last edited by
        #3

        The Banana PI board is similar to Cubieboard2, so you can try "this":http://wickwire2099.blogspot.com/2014/02/qt5-on-cubieboard-a10a20.html tutorial.

        1 Reply Last reply
        0
        • S Offline
          S Offline
          Sebbo
          wrote on 21 Oct 2014, 07:18 last edited by
          #4

          Thank you so much for your quick replies.

          SGaist:
          The errors appear while running the ./configure command with the following parameters:

          @./configure -v -opengl es2 -device linux-rasp-pi-g++ -device-option CROSS_COMPILE=~/opt/gcc-4.7-linaro-rpi-gnueabihf/bin/arm-linux-gnueabihf- -sysroot /mnt/ban-pi-rootfs -opensource -confirm-license -optimized-qmake -reduce-exports -release -make libs -prefix /usr/local/qt5pi@

          The errors itself are as follows (just a small extract):

          @/opt/gcc-4.7-linaro-rpi-gnueabihf/bin/arm-linux-gnueabihf-g++ -c -pipe -marm -mfpu=vfp -mtune=arm1176jzf-s -march=armv6zk -mabi=aapcs-linux -mfloat-abi=hard --sysroot=/mnt/ban-pi-rootfs -g -Wall -W -fPIE -I../../mkspecs/devices/linux-rasp-pi-g++ -I. -o arch.o arch.cpp
          arch.cpp:45:19: fatal error: stdio.h: No such file or directory
          compilation terminated.
          make: *** [arch.o] Error 1
          Unable to determine architecture!

          Could not determine the target architecture!
          Turn on verbose messaging (-v) to see the final report.
          Determining architecture... ()
          g++ -c -pipe -g -Wall -W -fPIE -I../../mkspecs/linux-g++ -I. -o arch.o arch.cpp
          g++ -o arch arch.o
          Found architecture in binary
          CFG_HOST_ARCH="i386"
          CFG_HOST_CPUFEATURES=""
          System architecture: 'unknown'
          Host architecture: 'i386'
          C++11 auto-detection... ()

          [..]

          /opt/gcc-4.7-linaro-rpi-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/4.7.2/../../../../arm-linux-gnueabihf/include/c++/4.7.2/arm-linux-gnueabihf/bits/os_defines.h:40:22: fatal error: features.h: No such file or directory
          compilation terminated.
          make: *** [c++11.o] Error 1
          C++11 disabled.
          floatmath auto-detection... ()
          @
          etc.

          diabolic:
          Thanks for the link. I'll give it a try and get back to you as soon as I tested it.

          1 Reply Last reply
          0
          • T Offline
            T Offline
            tomasz3dk
            wrote on 21 Oct 2014, 07:40 last edited by
            #5

            Of course in this tutorial you must use rootfs from bananapi, instead from cubieboard. Toolchain can be the same (banana and cubieboard have same CPU and GPU).

            1 Reply Last reply
            0
            • S Offline
              S Offline
              Sebbo
              wrote on 21 Oct 2014, 10:52 last edited by
              #6

              -Sorry but I already get stuck after the first few steps.-

              -I downloaded all the necessary files like the image file for the BananaPi, the toolchain and the sunxi-bsp.-

              -But there is no BananaPi environment selectable for the ./configure command of the sunxi-bsp. This needs to be -modified according to "this tutorial":https://github.com/bananapi-dev/BPi/blob/master/HowToBuild_BPi_image.en.txt .-

              -As pointed out in recital 4 the environment needs to be set as follows:-
              -$ source bpi_env.sh-

              -But I can't figure out where to get that file..-
              -Does it work with the "cubietruck" or "cubieboard2" entry as well?-

              NVM - got that one working!

              1 Reply Last reply
              0
              • T Offline
                T Offline
                tomasz3dk
                wrote on 21 Oct 2014, 20:01 last edited by
                #7

                Mark topic as solved.

                1 Reply Last reply
                0
                • S Offline
                  S Offline
                  Sebbo
                  wrote on 27 Oct 2014, 09:15 last edited by
                  #8

                  Sorry, my bad. The comment was misleading.
                  I found out how to set up the BananaPi environment for the sunxi-bsp but after hours of loading/working I still didn't manage to cross-compile the Pi..

                  1 Reply Last reply
                  0
                  • S Offline
                    S Offline
                    Sebbo
                    wrote on 28 Oct 2014, 07:59 last edited by
                    #9

                    Well, I don't find any rootfs for the BananaPi. In particular, for the Bananian Linux which is a debian based image.
                    Do you have any suggestions where I can get those since the "Linaro Releases":https://releases.linaro.org/ site doesn't provide it?

                    1 Reply Last reply
                    0

                    6/9

                    21 Oct 2014, 10:52

                    • Login

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