韦东山imx6ull QT移植
1. 下载安装 qt-opensource-linux-x64-5.12.8.run
2. 下载 qt-everywhere-src-5.12.8.tar.xz,
tar vxf qt-everywhere-src-5.12.8.tar.xz cd
qt-everywhere-src-5.12.8/
vi qtbase/mkspecs/linux-arm-gnueabi-g++/qmake.conf
vim compile.sh
chmod 777 compile.sh
./compile.sh
make -j 12
make install
3. 在linux的qt designer 配置编译器 和交叉编译器
配置linux的qt环境变量
4. 配置arm开发板 环境
cp arm-qt /usr/lib 将生成的arm-qt文件夹复制arm板的/usr/lib
vi /etc/profile
source /etc/profile
cp /usr/lib/arm-qt/lib/*so* -d /lib
5. 测试
cd /usr/lib/arm-qt/examples/widgets/widgets/digitalclock
./digitalclock
MAKEFILE_GENERATOR = UNIX
CONFIG += incremental
QMAKE_INCREMENTAL_STYLE = sublib
QT_QPA_DEFAULT_PLATFORM = linuxfb
QMAKE_CFLAGS_RELEASE += -O2 -march=armv7-a
QMAKE_CXXFLAGS_RELEASE += -O2 -march=armv7-a
include(../common/linux.conf)
include(../common/gcc-base-unix.conf)
include(../common/g++-unix.conf)
QMAKE_CC = arm-buildroot-linux-gnueabihf-gcc
QMAKE_CXX = arm-buildroot-linux-gnueabihf-g++
QMAKE_LINK = arm-buildroot-linux-gnueabihf-g++
QMAKE_LINK_SHLIB = arm-buildroot-linux-gnueabihf-g++
QMAKE_AR = arm-buildroot-linux-gnueabihf-ar cqs
QMAKE_OBJCOPY = arm-buildroot-linux-gnueabihf-objcopy
QMAKE_NM = arm-buildroot-linux-gnueabihf-nm -P
QMAKE_STRIP = arm-buildroot-linux-gnueabihf-strip
load(qt_config)
./configure -prefix /home/book/13_qt/qt-everywhere-src-5.12.8/arm-qt \
-opensource \
-confirm-license \
-release \
-strip \
-shared \
-xplatform linux-arm-gnueabi-g++ \
-optimized-qmake \
-c++std c++11 \
--rpath=no \
-pch \
-skip qt3d \
-skip qtactiveqt \
-skip qtandroidextras \
-skip qtcanvas3d \
-skip qtconnectivity \
-skip qtdatavis3d \
-skip qtdoc \
-skip qtgamepad \
-skip qtlocation \
-skip qtmacextras \
-skip qtnetworkauth \
-skip qtpurchasing \
-skip qtremoteobjects \
-skip qtscript \
-skip qtscxml \
-skip qtsensors \
-skip qtspeech \
-skip qtsvg \
-skip qttools \
-skip qttranslations \
-skip qtwayland \
-skip qtwebengine \
-skip qtwebview \
-skip qtwinextras \
-skip qtx11extras \
-skip qtxmlpatterns \
-make libs \
-make examples \
-nomake tools -nomake tests \
-gui \
-widgets \
-dbus-runtime \
--glib=no \
--iconv=no \
--pcre=qt \
--zlib=qt \
-no-openssl \
--freetype=qt \
--harfbuzz=qt \
-no-opengl \
-linuxfb \
--xcb=no \
-tslib \
--libpng=qt \
--libjpeg=qt \
--sqlite=qt \
-plugin-sql-sqlite \
-I/home/book/11_tslib/tslib-1.21/tmp/include \
-L/home/book/11_tslib/tslib-1.21/tmp/lib \
-recheck-all
export PATH=/bin:/sbin:/usr/bin:/usr/sbin
if [ "$PS1" ]; then
if [ "`id -u`" -eq 0 ]; then
export PS1='# '
else
export PS1='$ '
fi
fi
export PAGER='/bin/more'
export EDITOR='/bin/vi'
for i in /etc/profile.d/*.sh ; do
if [ -r "$i" ]; then
. $i
fi
done
unset i
export TSLIB_ROOT=/usr/lib/ts
export TSLIB_CONSOLEDEVICE=none
export TSLIB_FBDEVICE=/dev/fb0
export TSLIB_TSDEVICE=/dev/input/event1
export TSLIB_CONFFILE=/etc/ts.conf
export TSLIB_PLUGINDIR=/usr/lib/ts
export TSLIB_CALIBFILE=/etc/pointercal
export QT_ROOT=/usr/lib/arm-qt
export QT_QPA_GENERIC_PLUGINS=tslib:/dev/input/event1
export QT_QPA_FONTDIR=/usr/share/fonts/liberation
export QT_QPA_PLATFORM_PLUGIN_PATH=$QT_ROOT/plugins
export QT_QPA_PLATFORM=linuxfb:tty=/dev/fb0
export QT_PLUGIN_PATH=$QT_ROOT/plugins
export LD_LIBRARY_PATH=$QT_ROOT/lib:$QT_ROOT/plugins/platforms
export QML2_IMPORT_PATH=$QT_ROOT/qml
export QT_QPA_FB_TSLIB=1
export $(dbus-launch)
HOSTNAM='/bin/hostname:'
PS1='\[\e[0;32m\][\u@\h:\w]\$ \[\e[m\]'
shopt -s checkwinsize
resize
export PS1 HOSTNAME