NUC972开发板qt移植

NUC972开发板qt移植1、开发环境
编译器:官⽅提供的arm-linux-gcc 4.8.4
操作系统:ubuntu 14.04 32位
2、步骤
(1)运⾏BSP⽬录的install.sh,QT/ReadMe⽬录下的software.sh。
(2)编译uboot,之后会产⽣mkimage,把mkimage添加到环境变量。
氢化可的松(3)按照⼿册配置内核,编译内核。根⽂件系统在nfs服务器。
(4)编译busybox,制作根⽂件系统。
(5)从⽹上下载tslib。配置,编译,脚本如下:
#!/bin/bash
./autogen.sh
党校学历echo "ac_cv_func_malloc_0_nonnull=yes">arm-linux.cache
mkdir /opt/tslib
./configure --prefix=/opt/tslib --host=arm-linux --cache-file=arm-linux.cache
编译完毕,记得修改tslib/fig,去掉module_raw_input前⾯的#。
之前⽤4.4.3的编译器编译的错误:selected device is not a touchscreen I understand
1.将内核源代码⾥的include/linux/input.h中的
#define EV_VERSION0x010001
改为:
#define EV_VERSION0x010000
2.将arm交叉编译⼯具中的头⽂件库中的
linux/input.h中的
#define EV_VERSION0x010000
改为
#define EV_VERSION0x010001
然后再编译tslib库
复制tslib⽂件夹到开发板根⽂件系统的/opt/⽬录下。
(6)编译qt:
先要修改f,
#
# qmake configuration for building with arm-linux-g++ #
include(../../f)
include(../../f)
include(../../common/g++-f)
include(../../f)
# modifications to g++.conf
QMAKE_CC                = arm-linux-gcc -lts
QMAKE_CXX              = arm-linux-g++ -lts QMAKE_LINK              = arm-linux-g++ -lts QMAKE_LINK_SHLIB        = arm-linux-g++ -lts
# modifications f
QMAKE_AR                = arm-linux-ar cqs
QMAKE_OBJCOPY          = arm-linux-objcopy QMAKE_STRIP            = arm-linux-strip
# Support static build.
#QMAKE_LFLAGS            = -static
# Reduce code size.
QMAKE_CFLAGS_RELEASE    = -Os
QMAKE_CXXFLAGS_RELEASE  = -Os
# Include/library path for tslib
QMAKE_INCDIR            = /opt/tslib/include QMAKE_LIBDIR            = /opt/tslib/lib
load(qt_config)
配置脚本如下:
#!/bin/sh
rm -rf /opt/qt
mkdir -p /opt/qt
chmod 777 /opt/qt
./configure -force-pkg-config \
-
prefix /opt/qt \
-release \
-opensource \
-shared \
-qconfig dist \
-no-exceptions \
-no-accessibility \
-no-stl \
-no-qt3support \
-no-xmlpatterns \
-no-multimedia \
-
no-audio-backend \
-no-phonon \
-no-phonon-backend \
-no-svg \
-no-webkit \
-no-javascript-jit \
-no-script \
-no-scripttools \
-no-declarative \
-no-declarative-debug \
-qt-zlib \
-
qt-freetype \
-qt-freetype \
-no-gif \
-qt-libpng \
-no-libmng \
-no-libtiff \
-qt-libjpeg \
-no-openssl \
-nomake tools \
-nomake demos \
-nomake examples \
-
nomake docs \
再战轴心帝国
-nomake translations \
-no-nis \
-no-cups \
-no-iconv \
-no-pch \
-no-dbus \
-embedded arm \
-platform qws/linux-x86-g++ \
-xplatform qws/linux-nuc970-g++ \
-no-gtkstyle \
-
多媒体课件制作软件
no-nas-sound \
-no-opengl \
-no-openvg \
-no-sm \
-no-xshape \
-no-xvideo \
-no-xsync \
-no-xinerama \-no-xcursor \
-no-xfixes \
-no-xrandr \
-no-xrender \
二苯甲烷二异氰酸酯
-
no-mitshm \
-no-fontconfig \
-no-xinput \
-no-xkb \
-no-glib \
-qt-gfx-linuxfb \
-qt-mouse-tslib \
-qt-kbd-linuxinput
然后make,make install。
执⾏完毕,复制qt⽂件夹到开发板根⽂件系统的/opt/⽬录下。(7)设置环境变量。
export TSLIB_TSDEVICE=/dev/input/event0
export TSLIB_CALIBFILE=/etc/pointercal
export TSLIB_CONFFILE=/opt/tslib/f
export TSLIB_PLUGINDIR=/opt/tslib/lib/ts
export TSLIB_CONSOLEDEVICE=none
export TSLIB_FBDEVICE=/dev/fb0
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/tslib/lib:/opt/qt/lib
export TSLIB_INFO_FILE=/sys/class/input/event0/uevent
export QWS_MOUSE_PROTO=Tslib:/dev/input/event0
export QWS_DISPLAY="LinuxFB:mmWidth=129:mmHight=80:offect=0"
export QT_QWS_FONTDIR=/opt/qt/lib/fonts
#这⾥存放qt的可执⾏程序
export PATH=$PATH:/apps
3、中⽂显⽰
下载⽂泉驿正⿊字体qpf字体库
把下载好的字体库解压后的qpf⽂件放⼊lib/fonts中
把lib/fonts中的其他字体全部删除,只保留泉驿正⿊字体的qpf字体库。这样只需要运⾏./hello -qws 即可 不过这样以来就⽤不了其他字体了。姚俐竹
经过测试:中⽂显⽰正常。

本文发布于:2024-09-22 15:46:21,感谢您对本站的认可!

本文链接:https://www.17tex.com/xueshu/264610.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

标签:编译   字体   开发   内核
留言与评论(共有 0 条评论)
   
验证码:
Copyright ©2019-2024 Comsenz Inc.Powered by © 易纺专利技术学习网 豫ICP备2022007602号 豫公网安备41160202000603 站长QQ:729038198 关于我们 投诉建议