This is the guide that I went through to successfully set the environment. If you get stuck on something, feel free to have a look at the references in the bottom most.
These are the steps that worked for me so I hope it helps.
- Just making sure of the dependencies
- sudo apt-get update
- sudo apt-get upgrade
- sudo apt-get install lib32z1 lib32ncurses5 lib32bz2-1.0 libstdc++6:i386 ia32-libs
- Assuming that you can get access to the root
- Set up Cross compiler
- Download and install
- wget -c https://releases.linaro.org/components/toolchain/binaries/6.4-2018.05/arm-linux-gnueabihf/gcc-linaro-6.4.1-2018.05-x86_64_arm-linux-gnueabihf.tar.xz
- tar xf gcc-linaro-6.4.1-2018.05-x86_64_arm-linux-gnueabihf.tar.xz
- export CC=`pwd`/gcc-linaro-6.4.1-2018.05-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-
- Test installation
- ${CC}gcc --version
- Download qt source
- #do this in a directory that is not in your root filesystem, i.e. ~
- git clone git://code.qt.io/qt/qt5.git
- cd qt5
- ./init-repository
- Fix symlinks
- git clone git://gitorious.org/cross-compile-tools/cross-compile-tools.git
- cd cross-compile-tools
- ./fixQualifiedLibraryPaths /Rootfs/of/the/target_device/ /home/cosik/gcc-linaro-arm-linux-gnueabihf-4.8-2013.09_linux/bin/arm-linux-gnueabihf-g++
- Running Qt configuration script
- go to qt5 directory
- It is best to paste the following instruction in a bash script file and edit it however wanted:
- ./configure \
-opengl es2 \
-device linux-beagleboard-g++ \
-device-option CROSS_COMPILE=/home/angelos/Tools/qt/gcc-linaro-6.4.1-2018.05-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf- \
-sysroot /home/angelos/Projects/innov8/rootfs/ \
-opensource \
-confirm-license \
-optimized-qmake \
-linuxfb \
-release \
-make libs \
-prefix /home/angelos/Tools/qt/qt_build \
-no-pch \
-nomake examples \
-nomake tests \
-no-xcb \
-eglfs \
-v
- NOTE:
- Some parameters are probably not needed but here are the important ones:
- CROSS_COMPILE - your own beaglebone cross compiler location
- Device - is the directory name in …../qt5/qtbase/mkspecs
- sysroot - rootfs of the target device.
- Prefix - install target directory
- Linuxfb - Enable Linux Framebuffer support
- The rest of the parameter definition can be found by typing:
- ./configure -embedded -help
- Install!
- make -j 2 && sudo make install
- Integrating with Qt creator
- Download and install qt creator
- Follow the following link
- Note before go to the link:
- The options menu will be slightly different since this manual was done in an older version of qt
- If you can’t find qmake in the prefix directory you set in the qt configuration, it should be in /qt5/qtbase/
- References
Comments
Post a Comment