Hello,
I successfully managed to cross-compile Qt and run my Qt apps on Beaglebone.
Here is my configure:
./configure -prefix ~/armhf-build -opensource -confirm-license -embedded arm -platform qws/linux-x86-g++ -xplatform qws/linux-omap3-g++ -little-endian -host-little-endian -no-webkit
Here is mkspec:
#
# qmake configuration for linux-g++
#
#Pretty good source of SGX information although it is about the pandaboard
#[url]http://tigraphics.blogspot.com/2011/07/running-qtgles-on-omap4.html[/url]
MAKEFILE_GENERATOR = UNIX
TARGET_PLATFORM = unix
TEMPLATE = app
CONFIG += qt warn_on release incremental link_prl gdb_dwarf_index
QT += core gui
QMAKE_INCREMENTAL_STYLE = sublib
include(../common/linux.conf)
include(../common/gcc-base-unix.conf)
include(../common/g++-unix.conf)
SYSROOT=/media/rootfs
GCC_PREFIX=/usr/bin/arm-linux-gnueabihf
# modifications to g++.conf
QMAKE_CC = $${GCC_PREFIX}-gcc --sysroot=$${SYSROOT}
QMAKE_CXX = $${GCC_PREFIX}-g++ --sysroot=$${SYSROOT}
QMAKE_LINK = $${QMAKE_CXX}
QMAKE_LINK_SHLIB = $${QMAKE_CXX}
# modifications to linux.conf
QMAKE_AR = $${GCC_PREFIX}-ar cqs
QMAKE_OBJCOPY = $${GCC_PREFIX}-objcopy
QMAKE_STRIP = $${GCC_PREFIX}-strip
QMAKE_CFLAGS_RELEASE = -O3 -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=hard
QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE
#QMAKE_LIBDIR_X11 = /usr/lib/arm-linux-gnueabihf
#QMAKE_INCDIR_X11 = /usr/include
QMAKE_LIBDIR = $${SYSROOT}/usr/lib/arm-linux-gnueabihf $${SYSROOT}/lib/arm-linux-gnueabihf
# Work round PowerVR SGX 1.3 driver bug with glScissor & FBOs:
#DEFINES += QT_GL_NO_SCISSOR_TEST
# Work round SGX 1.4 driver bug (text corrupted), modify glyph cache width:
#DEFINES += QT_DEFAULT_TEXTURE_GLYPH_CACHE_WIDTH=1024
#QMAKE_LIBS_OPENGL_ES2 = -lEGL -lGLESv2 -lGLES_CM -lIMGegl -lsrv_um
load(qt_config)
#
# qmake configuration for linux-g++
#
#Pretty good source of SGX information although it is about the pandaboard
#[url]http://tigraphics.blogspot.com/2011/07/running-qtgles-on-omap4.html[/url]
MAKEFILE_GENERATOR = UNIX
TARGET_PLATFORM = unix
TEMPLATE = app
CONFIG += qt warn_on release incremental link_prl gdb_dwarf_index
QT += core gui
QMAKE_INCREMENTAL_STYLE = sublib
include(../common/linux.conf)
include(../common/gcc-base-unix.conf)
include(../common/g++-unix.conf)
SYSROOT=/media/rootfs
GCC_PREFIX=/usr/bin/arm-linux-gnueabihf
# modifications to g++.conf
QMAKE_CC = $${GCC_PREFIX}-gcc --sysroot=$${SYSROOT}
QMAKE_CXX = $${GCC_PREFIX}-g++ --sysroot=$${SYSROOT}
QMAKE_LINK = $${QMAKE_CXX}
QMAKE_LINK_SHLIB = $${QMAKE_CXX}
# modifications to linux.conf
QMAKE_AR = $${GCC_PREFIX}-ar cqs
QMAKE_OBJCOPY = $${GCC_PREFIX}-objcopy
QMAKE_STRIP = $${GCC_PREFIX}-strip
QMAKE_CFLAGS_RELEASE = -O3 -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=hard
QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE
#QMAKE_LIBDIR_X11 = /usr/lib/arm-linux-gnueabihf
#QMAKE_INCDIR_X11 = /usr/include
QMAKE_LIBDIR = $${SYSROOT}/usr/lib/arm-linux-gnueabihf $${SYSROOT}/lib/arm-linux-gnueabihf
# Work round PowerVR SGX 1.3 driver bug with glScissor & FBOs:
#DEFINES += QT_GL_NO_SCISSOR_TEST
# Work round SGX 1.4 driver bug (text corrupted), modify glyph cache width:
#DEFINES += QT_DEFAULT_TEXTURE_GLYPH_CACHE_WIDTH=1024
#QMAKE_LIBS_OPENGL_ES2 = -lEGL -lGLESv2 -lGLES_CM -lIMGegl -lsrv_um
load(qt_config)
To copy to clipboard, switch view to plain text mode
Hope this helps.
Cheers.
Michal
Bookmarks