• TSLIB source code compilation
    Since QT relies on TSLIB, compile TSLIB before compiling QT source code.
    Download tslib-1.15tar.bz2 from https://github.com/libts/tslib/releases/tag/1.15 to the Linux system and decompress it, enter the decompression directory, and create a new install directory:
    #cd tslib-1.15
    #mkdir install

    Confirm whether the cross compilation chain matches:

    Get the full path of the install directory:

    Start cross compilation:
    #./configure --prefix=/home/ronnie/work/ssd201/qt/tslib-1.15/install -host=arm-linux-gnueabihf
    #make
    #make install
  • QT source code compilation
  1. Download qt-everywhere-src-5.15.0.tar.xz from http://download.qt.io/archive/qt/5.15/5.15.0/single/ to the Linux system and unzip:
  2. Enter the decompression directory, and then create a new compilation script make.sh
    #cd qt-everywhere-src-5.15.0
    #touch make.sh

    #vi make.sh

    Start cross compilation:
    #./make.sh
    After waiting for a period of time, the compilation is complete:

    Set the qmake environment variable:
    #vi ~/.bashrc
    export PATH=/home/ronnie/work/ssd201/qt/qt-everywhere-src-5.15.0/install/bin:$PATH

    #source ~/.bashrc
  1. Download JpegPlayer.rar to the Linux system, and unzip it to the same level directory of the project:
  2. Enter the decompression directory and copy logo.c to disp_init.c:
  3. Modify disp_init.c to delete the code other than initialization:

  4. Copy the adjusted screen parameter header file to the JpegPlayer directory:
  5. Modify sstardisp.c to include the screen parameter header file:
  6. Modify makefile
  7. Compile, the disp_init executable file will be generated in the directory:
    #make
  • Verification
  1. Create a new project hello through QT Creator, and then copy it to the Linux system:
  2. In the hello directory, execute qmake -project to generate hello.pro:
  3. Edit hello.pro and make the following changes:
  4. Ensure that the cross-compilation chain environment configuration is correct:
  5. Compile the project
    #qmake
    #ARCH=arm make
  6. After the compilation is completed, the hello executable file will be generated in the directory:
  7. Copy libts.so* to the /usr/lib directory of the board:
  8. Copy the font library to the /usr/lib/font directory, the font library can be obtained from sdk/verify/application/zk_full/res/font/:
  9. Add QT environment variables:
    #vi /etc/profile

    #source /etc/profile
  10. Copy disp_init and hello to the board, first run disp_init in the background, and then run hello:
    #./disp_init &
    #./hello

    The screen can be displayed normally, indicating that QT transplantation is successful.
文档更新时间: 2020-10-24 20:28   作者:admin