This post describe how to build the latest Qt version for BeagleBone Black on a Linux 64bit PC.

Before starting Qt building for your BBB you should read prevoius articles in this blog.

After configuring my BBB running on uSD, I turn off the BBB and mount the uSD on my PC:

mount /dev/sdx1 /mnt/bbbhf

Where sdx1 is the uSD device connected to your PC.

Now you need to download the proper toolchain and extract it. I'm using gcc-linaro-4.9-2014.11-x86_64_arm-linux-gnueabihf.tar.xz downloaded from:

mkdir /opt/arm-toolchain
tar -C /opt/arm-toolchain -xvJf gcc-linaro-4.9-2014.11-x86_64_arm-linux-gnueabihf.tar.xz

You also need the cross-compile-tools. I used the following link:

but it seems unavailable at the moment so you can use the tar.gz I downloaded before:


after downloaded and extracted where you prefer:

cd cross-compile-tools
./fixQualifiedLibraryPaths /mnt/bbbhf/ /opt/arm-toolchain/gcc-linaro-4.9-2014.11-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-g++

this command adjusts some libraries symbolic links on the uSD.

It's time to download and extract Qt 5.5.1, then:

cd qt-everywhere-opensource-src-5.5.1
cp -r qtbase/mkspecs/devices/linux-beagleboard-g++ qtbase/mkspecs/devices/linux-bbbhf-g++
vi qtbase/mkspecs/devices/linux-bbbhf-g++/qmake.conf

in qmake.conf file you must replace:

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


  COMPILER_FLAGS          = -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=hard

Now you can configure and build Qt...

./configure -opensource -confirm-license -no-pch -prefix /opt/qt551-bbbhf -release -force-debug-info -device linux-bbbhf-g++ -make libs -nomake tests -nomake examples -device-option CROSS_COMPILE=/opt/arm-toolchain/gcc-linaro-4.9-2014.11-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf- -sysroot /mnt/bbbhf -v -qt-zlib

... and take a coffee...

After build completed you must install the libraries but you should consider that all Qt libs and build tools will be installed un the uSD and should require up to 1GB. So if you want to flash the uSD to internal BBB eMMC memory you must be under 4GB of total space. Because I don't need all the Qt module, I installed that way:

make module-qtbase-install_subtargets module-qtscript-install_subtargets module-qtserialport-install_subtargets module-qtsvg-install_subtargets

If all the operations completed successfully you will find all in /mnt/bbbhf/opt/qt551-bbbhf .

Now you can flash the uSD (if you want to) to your BBB as explained in a previous blog post.


... to be continued...