以下是s5p4418上qt5.7.1的移植记录,下载qt5.7.1源码qt-everywhere-opensource-src-5.7.1.tar.gz这个可以去官方网站下载.
修改qtbase/mkspecs/linux-arm-gnueabi-g++/qmake.conf,修改为如下:
#
# qmake configuration for building with arm-cortex_a9-linux-gnueabi-g++
#
MAKEFILE_GENERATOR = UNIX
CONFIG += incremental
QMAKE_INCREMENTAL_STYLE = sublib
#QT_QPA_DEFAULT_PLATFORM = linux
QT_QPA_DEFAULT_PLATFORM = eglfs
QMAKE_CFLAGS_RELEASE += -O2 -march=armv7-a -mcpu=cortex-a9
QMAKE_CXXFLAGS_RELEASE += -O2 -march=armv7-a -mcpu=cortex-a9
include(../common/linux.conf)
include(../common/gcc-base-unix.conf)
include(../common/g++-unix.conf)
include(./opengl.conf)
# modifications to g++.conf
QMAKE_CC = arm-cortex_a9-linux-gnueabi-gcc
QMAKE_CXX = arm-cortex_a9-linux-gnueabi-g++
QMAKE_LINK = arm-cortex_a9-linux-gnueabi-g++
QMAKE_LINK_SHLIB = arm-cortex_a9-linux-gnueabi-g++
# modifications to linux.conf
QMAKE_AR = arm-cortex_a9-linux-gnueabi-ar cqs
QMAKE_OBJCOPY = arm-cortex_a9-linux-gnueabi-objcopy
QMAKE_NM = arm-cortex_a9-linux-gnueabi-nm -P
QMAKE_STRIP = arm-cortex_a9-linux-gnueabi-strip
EGLFS_PLATFORM_HOOKS_SOURCES = $$PWD/qeglfshooks_icool4418.cpp
# Preferred eglfs backend
#EGLFS_DEVICE_INTEGRATION = eglfs_viv
load(qt_config)
其中需要注意的有两个地方,一个是include(./opengl.conf)一个是EGLFS_PLATFORM_HOOKS_SORCES中的qeglfshooks_icool4418.cpp
这个文件与qmake.conf在同一级目录下,内容如下:
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the qmake spec of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 3 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL3 included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 3 requirements
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 2.0 or (at your option) the GNU General
** Public license version 3 or any later version approved by the KDE Free
** Qt Foundation. The licenses are as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements wi