Okay, I think I have something that works. This completes the configure step, completes make, and make install.
As far as the issue where it is still picking up the previous toolchain in your config, each time after I compile or run into an issue, I remove the build, the qt source, the toolchain folders and anything else that indicates it was touched during the build of qt. I had to remove the sysroot folder and resync the files from the Beaglebone at least once.
With my config, I found I was missing a couple of folders from the BB where there were files linked to other locations. This is what I have for creating the sysroot for the BB.
mkdir -p sysroot/{lib,sbin,usr/{include,lib,bin},etc/alternatives}
rsync -avz debian@192.168.7.2:/lib sysroot/
rsync -avz debian@192.168.7.2:/sbin sysroot/
rsync -avz debian@192.168.7.2:/usr/include sysroot/usr
rsync -avz debian@192.168.7.2:/usr/lib sysroot/usr
rsync -avz debian@192.168.7.2:/usr/bin sysroot/usr
rsync -avz debian@192.168.7.2:/etc/alternatives sysroot/etc
Get this tool to fix relative links:
wget https://raw.githubusercontent.com/riscv/riscv-poky/master/scripts/sysroot-relativelinks.py
chmod +x sysroot-relativelinks.py
./sysroot-relativelinks.py sysroot
This is the qmake.conf that I am using
#
# qmake configuration for the BeagleBoard and BeagleBoard xM boards
# http://beagleboard.org/
MAKEFILE_GENERATOR = UNIX
CONFIG += incremental
QMAKE_INCREMENTAL_STYLE = sublib
#include(…/…/common/linux.conf)
#include(…/…/common/gcc-base-unix.conf)
#include(…/…/common/g+±unix.conf)
include(…/common/linux_device_pre.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_NM = $${CROSS_COMPILE}nm -P
QMAKE_STRIP = $${CROSS_COMPILE}strip
COMPILER_FLAGS = -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mthumb
#modifications to gcc-base.conf
QMAKE_CFLAGS += $${COMPILER_FLAGS}
QMAKE_CXXFLAGS += $${COMPILER_FLAGS}
QMAKE_CXXFLAGS_RELEASE += -O3
INCLUDEPATH += /home/bbbuild/develop/bbuild/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabihf/arm-linux-gnueabihf/include/c++/7.5.0
QMAKE_LIBS += -lrt -lpthread -ldl
# Extra stuff (OpenGL, DirectFB, …)
QMAKE_INCDIR_EGL = /home/bbbuild/develop/bbuild/sysroot/usr/include
QMAKE_LIBDIR_EGL = /home/bbbuild/develop/bbuild/sysroot/usr/lib/arm-linux-gnueabihf
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_EGL = -lEGL
QMAKE_LIBS_OPENGL_ES2 = -lGLESv2 $${QMAKE_LIBS_EGL}
QMAKE_LIBS_OPENVG = -lOpenVG $${QMAKE_LIBS_EGL}
DISTRO_OPTS += hard-float
# No need for any special EGL device integration.
# Prioritize the default, compiled-in integration over any plugins.
EGLFS_DEVICE_INTEGRATION = none
include(…/common/linux_arm_device_post.conf)
load(qt_config)
Note, I had to add an INCLUDEPATH entry to point to the includes in the toolchain since qmake was not finding it.
Then I ran configure from the build folder as such:
…/qt-everywhere-src-5.12.5/configure -platform linux-g+±64 -prefix /home/bbbuild/opt/qt512bb/qt512 -extprefix /home/bbbuild/opt/qt512bb/binaries -hostprefix /home/bbbuild/opt/qt512bb/tool -release -opengl es2 -device linux-beagleboard-g++ -device-option CROSS_COMPILE=/home/bbbuild/develop/bbuild/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf- -no-sql-db2 -no-sql-ibase -no-sql-mysql -no-sql-oci -no-sql-odbc -no-sql-psql -no-sql-sqlite -no-sql-sqlite2 -no-sql-tds -sysroot /home/bbbuild/develop/bbuild/sysroot -opensource -confirm-license -skip qtwayland -skip qtlocation -skip qtscript -make libs -nomake examples -nomake tests -v -no-gbm
Then run make && make install
This is part of the config.status output from the build folder
EGL … yes
OpenVG … no
OpenGL:
Desktop OpenGL … no
OpenGL ES 2.0 … yes
OpenGL ES 3.0 … yes
OpenGL ES 3.1 … yes
OpenGL ES 3.2 … yes
Vulkan … yes
Session Management … yes
Features used by QPA backends:
evdev … yes
libinput … yes
INTEGRITY HID … no
mtdev … yes
tslib … yes
xkbcommon … yes
X11 specific:
XLib … yes
XCB Xlib … yes
EGL on X11 … yes
QPA backends:
DirectFB … no
EGLFS … yes
EGLFS details:
EGLFS OpenWFD … no
EGLFS i.Mx6 … no
EGLFS i.Mx6 Wayland … no
EGLFS RCAR … no
EGLFS EGLDevice … yes
EGLFS GBM … no
EGLFS VSP2 … no
EGLFS Mali … no
EGLFS Raspberry Pi … no
EGLFS X11 … yes
LinuxFB … yes
VNC … yes
Mir client … no
This is what is in the binaries folder from the extprefix option
~/opt/qt512bb$ ls -lt binaries/
total 52
drwxr-xr-x 2 bbbuild bbbuild 12288 Oct 25 19:00 translations
drwxr-xr-x 23 bbbuild bbbuild 4096 Oct 25 19:00 qml
drwxr-xr-x 80 bbbuild bbbuild 4096 Oct 25 19:00 include
drwxr-xr-x 4 bbbuild bbbuild 20480 Oct 25 19:00 lib
drwxr-xr-x 2 bbbuild bbbuild 4096 Oct 25 19:00 bin
drwxr-xr-x 25 bbbuild bbbuild 4096 Oct 25 18:59 plugins
drwxr-xr-x 3 bbbuild bbbuild 4096 Oct 25 18:58 doc
I hope this helps.
Cheers,
Jon