iTop 4412 移植QtE5.7

配套组件:
Ubuntu环境: Ubuntu 16.04
arm 编译器: arm-20140.05-29
触摸tslib: 1.4版本
QtE 源码: QtE5.7.0


1. 编译器环境变量的配置:

  1. 加入到PATH
    1. arm-none-inux-gnuwabi-gcc -v 异常:
      sudo apt-get install lib32zl lib32ncurses5 ia-32libs


2. 编译tslib –触摸屏代码;

  1. 解压源码 tslib-1.4.tar.gz
sudo apt-get install autoconf
sudo apt-get install automake
sudo apt-get install libtool

./autogen.sh
./configure CC=arm-none-linux-gnueabi-gcc CXX=arm-none-linux-gnueabi-g++ --host=arm-none-linux-gnueabi -prefix=/opt/tslib1.4
make && make install 
//将会被安装在  /opt/tslib1.4/  目录下;


3. Qt源码编译。 将gcc g++编译器修改为arm交叉编译器即可;

1.  vi    qt-everywhere-opensource-src-5.7.0/qtbase/mkspecs/linux-arm-gnueabi-g++/qmake.conf

        #
        # qmake configuration for building with arm-linux-gnueabi-g++
        #
        MAKEFILE_GENERATOR      = UNIX
        CONFIG                 += incremental
        QMAKE_INCREMENTAL_STYLE = sublib

        QT_QPA_DEFAULT_PLATFORM = linux #eglfs
        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)

        # modifications to g++.conf
        QMAKE_CC                = arm-none-linux-gnueabi-gcc
        QMAKE_CXX               = arm-none-linux-gnueabi-g++
        QMAKE_LINK              = arm-none-linux-gnueabi-g++
        QMAKE_LINK_SHLIB        = arm-none-linux-gnueabi-g++

        # modifications to linux.conf
        QMAKE_AR                = arm-none-linux-gnueabi-ar cqs
        QMAKE_OBJCOPY           = arm-none-linux-gnueabi-objcopy
        QMAKE_NM                = arm-none-linux-gnueabi-nm -P
        QMAKE_STRIP             = arm-none-linux-gnueabi-strip
        load(qt_config)


2. vi    qt-everywhere-opensource-src-5.7.0/autoConfigure.sh


        #!/bin/sh
        ./configure \
        -v \
        -prefix /opt/qt-5.7.0 \
        -release \
        -opensource \
        -no-accessibility
        -make libs \
        -xplatform linux-arm-gnueabi-g++ \
        -optimized-qmake \
        -pch \
        -qt-sql-sqlite \
        -qt-zlib \
        -tslib \
        -no-opengl \
        -no-sse2 \
        -no-openssl \
        -no-nis \
        -no-cups \
        -no-glib \
        -no-pkg-config \
        -no-separate-debug-info \
        -I/opt/tslib1.4/include -L/opt/tslib1.4/lib


3.    make && make install 

    将/opt/qt-5.7.0和/opt/tslib1.4 拷贝到开发板的文件系统中对应的目录中。
     /放置到开发板opt/ 目录下即可;    设置环境变量,并source生效;


tslib qt5.7移植参考

tslib 编译常见问题 以及解决办法

欣赏此文? 求鼓励,求支持!