【瑞芯微】【rk3128】【移植 qt 5.12.9】

一、移植 QT 5.12.9

1. 源码下载

qt5.12.9源码下载

2. 配置 QT

进入 rk3128 docker 环境

复制代码
./rk3128_docker_env/init.sh
c 复制代码
进入已存在的开发环境...
my_rk3128_dev
developer@c8aa26115a95:/workspace$ vim /home/developer/.bashrc 
c 复制代码
ARM_BIN_PATH=/workspace/RK3128/buildroot/output/rockchip_rk312x/host/bin
export PATH=$ARM_BIN_PATH:$PATH
c 复制代码
developer@c8aa26115a95:/workspace/qt-everywhere-src-5.12.9$ vim qtbase/mkspecs/linux-arm-gnueabi-g++/qmake.conf


MAKEFILE_GENERATOR      = UNIX
CONFIG                 += incremental
QMAKE_INCREMENTAL_STYLE = sublib

include(../common/linux.conf)
include(../common/gcc-base-unix.conf)
include(../common/g++-unix.conf)

# modifications to g++.conf  修改为 buildroot 里面的 交叉工具链
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++

# modifications to linux.conf
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)

进入qt-everywhere-src-5.12.9文件夹下 配置一个编辑文件 名字可以自己命名

shell 复制代码
cd qt-everywhere-src-5.12.9
gedit autoconfigure.sh
c 复制代码
./configure -prefix /workspace/qt-everywhere-src-5.12.9/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 \
--libpng=qt \
--libjpeg=qt \
--sqlite=qt \
-plugin-sql-sqlite \
-recheck-all
c 复制代码
developer@c8aa26115a95:/workspace/qt-everywhere-src-5.12.9$ ./autoconfigure.sh



Note: Also available for Linux: linux-clang linux-icc

Note: -optimized-tools is not useful in -release mode.

WARNING: Cross compiling without sysroot. Disabling pkg-config

Qt is now configured for building. Just run 'make'.
Once everything is built, you must run 'make install'.
Qt will be installed into '/workspace/qt-everywhere-src-5.12.9/arm-qt'.

Prior to reconfiguration, make sure you remove any leftovers from
the previous build.

3. 编译安装

c 复制代码
# 直接在 当前目录执行

make

make install  # 最终将 编译后的 QT 生成到 /workspace/qt-everywhere-src-5.12.9/arm-qt 目录下

4. 放到板子里

将上面编译出来的 arm-qt 放到我们的板子里面就可以了

c 复制代码
cp -r arm-qt/ /usr/lib/

在板子里面更新环境变量

c 复制代码
vi /etc/profile

export QT_ROOT=/usr/lib/arm-qt
export QT_QPA_FONTDIR=/usr/share/fonts
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
相关推荐
幼儿园蛋小黑5 天前
ARM 时钟与定时器详解:从原理到实践
arm
幼儿园蛋小黄5 天前
从定时器到时钟:ARM 嵌入式学习总结
arm
慧都小项5 天前
当边缘AI上产线:QtitanDocking 如何让工业 HMI 实现多视图协同
人工智能·qt·ui·边缘计算·qt6.3
祖力555 天前
ARM时钟
嵌入式硬件·arm·时钟·imx6ull
koi77u5 天前
嵌入式学习——ARM(3)
arm
Quz5 天前
QML SwipeDelegate 滑动委托
qt
Quz5 天前
QML 列表中的四种委托:ItemDelegate、CheckDelegate、RadioDelegate、SwitchDelegate
qt
实心儿儿5 天前
Qt — 显示类控件
qt
学linux的QQ蛋5 天前
i.MX6ULL GIC 中断整体知识点总结和ARM时钟重点总结
arm·时钟·中断
G.E.M.小白5 天前
【IMX6ULL ARM内核启动与时钟系统超详解】PLL/PFD/分频/根时钟配置
嵌入式·arm·时钟·imx6ull