summaryrefslogtreecommitdiffstats
path: root/mkspecs
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@digia.com>2014-07-04 14:43:57 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-07-04 18:46:06 +0200
commit14a80bd4df83e960de458403deaf895a3d2c8812 (patch)
tree1bf8a79b746378b14f64dbb32bb3bf5119d22f0c /mkspecs
parent3acd4b546ded7523f65d60cee6f3809113a91a16 (diff)
parent39a290af6cea538dbbdb207d03d2af3602015c95 (diff)
Merge "Merge remote-tracking branch 'origin/5.3' into dev" into refs/staging/dev
Diffstat (limited to 'mkspecs')
-rw-r--r--mkspecs/devices/linux-arm-hisilicon-hix5hd2-g++/qeglfshooks_hix5hd2.cpp118
-rw-r--r--mkspecs/devices/linux-arm-hisilicon-hix5hd2-g++/qmake.conf44
-rw-r--r--mkspecs/devices/linux-arm-hisilicon-hix5hd2-g++/qplatformdefs.h42
-rw-r--r--mkspecs/devices/linux-mipsel-broadcom-97425-g++/qdirectfbeglhooks_bcm97425.cpp2
4 files changed, 205 insertions, 1 deletions
diff --git a/mkspecs/devices/linux-arm-hisilicon-hix5hd2-g++/qeglfshooks_hix5hd2.cpp b/mkspecs/devices/linux-arm-hisilicon-hix5hd2-g++/qeglfshooks_hix5hd2.cpp
new file mode 100644
index 0000000000..a148a30adf
--- /dev/null
+++ b/mkspecs/devices/linux-arm-hisilicon-hix5hd2-g++/qeglfshooks_hix5hd2.cpp
@@ -0,0 +1,118 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** 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 Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/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 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qeglfshooks.h"
+#include <EGL/fbdev_window.h>
+
+#include <unistd.h>
+#include <fcntl.h>
+#include <sys/ioctl.h>
+#include <linux/fb.h>
+
+#include <private/qcore_unix_p.h>
+
+QT_BEGIN_NAMESPACE
+
+class QEglFSHiX5Hd2Hooks : public QEglFSHooks
+{
+private:
+ void fbInit();
+public:
+ void platformInit() Q_DECL_OVERRIDE;
+ EGLNativeWindowType createNativeWindow(QPlatformWindow *window, const QSize &size, const QSurfaceFormat &format) Q_DECL_OVERRIDE;
+ void destroyNativeWindow(EGLNativeWindowType window) Q_DECL_OVERRIDE;
+};
+
+void QEglFSHiX5Hd2Hooks::fbInit()
+{
+ int fd = qt_safe_open("/dev/fb0", O_RDWR, 0);
+ if (fd == -1)
+ qWarning("Failed to open fb to detect screen resolution!");
+
+ struct fb_var_screeninfo vinfo;
+ memset(&vinfo, 0, sizeof(vinfo));
+ if (ioctl(fd, FBIOGET_VSCREENINFO, &vinfo) == -1)
+ qWarning("Could not get variable screen info");
+
+ vinfo.bits_per_pixel = 32;
+ vinfo.red.length = 8;
+ vinfo.green.length = 8;
+ vinfo.blue.length = 8;
+ vinfo.transp.length = 8;
+ vinfo.blue.offset = 0;
+ vinfo.green.offset = 8;
+ vinfo.red.offset = 16;
+ vinfo.transp.offset = 24;
+ vinfo.yres_virtual = 2 * vinfo.yres;
+
+ if (ioctl(fd, FBIOPUT_VSCREENINFO, &vinfo) == -1)
+ qErrnoWarning(errno, "Unable to set double buffer mode!");
+
+ qt_safe_close(fd);
+ return;
+}
+
+void QEglFSHiX5Hd2Hooks::platformInit()
+{
+ QEglFSHooks::platformInit();
+ fbInit();
+}
+
+EGLNativeWindowType QEglFSHiX5Hd2Hooks::createNativeWindow(QPlatformWindow *window, const QSize &size, const QSurfaceFormat &format)
+{
+ fbdev_window *fbwin = reinterpret_cast<fbdev_window *>(malloc(sizeof(fbdev_window)));
+ if (NULL == fbwin)
+ return 0;
+
+ fbwin->width = size.width();
+ fbwin->height = size.height();
+ return (EGLNativeWindowType)fbwin;
+}
+
+void QEglFSHiX5Hd2Hooks::destroyNativeWindow(EGLNativeWindowType window)
+{
+ free(window);
+}
+
+QEglFSHiX5Hd2Hooks eglFSHiX5Hd2Hooks;
+QEglFSHooks *platformHooks = &eglFSHiX5Hd2Hooks;
+
+QT_END_NAMESPACE
diff --git a/mkspecs/devices/linux-arm-hisilicon-hix5hd2-g++/qmake.conf b/mkspecs/devices/linux-arm-hisilicon-hix5hd2-g++/qmake.conf
new file mode 100644
index 0000000000..851d08600f
--- /dev/null
+++ b/mkspecs/devices/linux-arm-hisilicon-hix5hd2-g++/qmake.conf
@@ -0,0 +1,44 @@
+#
+# qmake configuration for linux-arm-hisilicon-hix5hd2-g++ using the arm-linux-gnueabihf-g++ crosscompiler
+#
+# A typical configure line looks like this:
+# <path-to-qt-src>/configure -opensource -confirm-license -release -make libs -make examples -optimized-qmake
+# -platform linux-g++-64 -device linux-arm-hisilicon-hix5hd2-g++ -device-option CROSS_COMPILE=arm-linux-gnueabihf-
+# -opengl es2 -no-qml-debug -no-directfb -no-kms -no-xcb -no-alsa -no-audio-backend -qt-zlib -qt-libjpeg -qt-libpng
+# -no-icu -no-nis -sysroot <path-to-rootfs> -extprefix <path-to-targetinstall> -hostprefix <path-to-hostinstall>
+# -prefix <path-to-prefix>
+#
+# such as
+# ./configure -opensource -confirm-license -release -make libs -make examples -optimized-qmake
+# -platform linux-g++-64 -device linux-arm-hisilicon-hix5hd2-g++ -device-option CROSS_COMPILE=arm-linux-gnueabihf-
+# -opengl es2 -no-qml-debug -no-directfb -no-kms -no-xcb -no-alsa -no-audio-backend -qt-zlib -qt-libjpeg -qt-libpng
+# -no-icu -no-nis -sysroot /home/abc/project/sysbase
+# -extprefix /home/abc/project/sysbase/qt_install
+# -hostprefix /home/abc/project/qtdir/qtbase_hostinstall
+# -prefix /home/abc/project/sysbase/qt_install
+
+include(../common/linux_device_pre.conf)
+EGLFS_PLATFORM_HOOKS_SOURCES = $$PWD/qeglfshooks_hix5hd2.cpp
+
+QMAKE_INCDIR += /usr/arm-linux-gnueabihf/include
+QMAKE_LIBDIR += /usr/arm-linux-gnueabihf/lib
+
+QMAKE_LIBS += -lrt
+
+QMAKE_INCDIR_EGL += $$[QT_SYSROOT]/egl/include
+QMAKE_LIBDIR_EGL += $$[QT_SYSROOT]/egl/lib
+QMAKE_INCDIR_OPENGL_ES2 += $$QMAKE_INCDIR_EGL
+QMAKE_LIBDIR_OPENGL_ES2 += $$QMAKE_LIBDIR_EGL
+
+QMAKE_LIBS_EGL += -lMali
+QMAKE_LIBS_OPENGL_ES2 += $$QMAKE_LIBS_EGL
+QMAKE_LIBS_OPENVG += $$QMAKE_LIBS_EGL
+
+DISTRO_OPTS += hard-float
+
+QMAKE_CFLAGS +=-march=armv7-a -mcpu=cortex-a9 -mfpu=vfpv3-d16
+QMAKE_CXXFLAGS += $$QMAKE_CFLAGS
+
+include(../common/linux_arm_device_post.conf)
+
+load(qt_config)
diff --git a/mkspecs/devices/linux-arm-hisilicon-hix5hd2-g++/qplatformdefs.h b/mkspecs/devices/linux-arm-hisilicon-hix5hd2-g++/qplatformdefs.h
new file mode 100644
index 0000000000..9236ebd657
--- /dev/null
+++ b/mkspecs/devices/linux-arm-hisilicon-hix5hd2-g++/qplatformdefs.h
@@ -0,0 +1,42 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** 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 Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/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 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "../../linux-g++/qplatformdefs.h"
diff --git a/mkspecs/devices/linux-mipsel-broadcom-97425-g++/qdirectfbeglhooks_bcm97425.cpp b/mkspecs/devices/linux-mipsel-broadcom-97425-g++/qdirectfbeglhooks_bcm97425.cpp
index 8c59d1cfa3..b07e4ab217 100644
--- a/mkspecs/devices/linux-mipsel-broadcom-97425-g++/qdirectfbeglhooks_bcm97425.cpp
+++ b/mkspecs/devices/linux-mipsel-broadcom-97425-g++/qdirectfbeglhooks_bcm97425.cpp
@@ -57,7 +57,7 @@ void QDirectFBEGLHooks::platformInit()
void QDirectFBEGLHooks::platformDestroy()
{
- DBPL_UnregisterDirectFBDisplayPlatform(&dbpl_handle);
+ DBPL_UnregisterDirectFBDisplayPlatform(dbpl_handle);
dbpl_handle = 0;
}