Skip to contentSkip to conversation

amd-gpu-x11-bin-mx51: only enable when x11 is in DISTRO_FEATURES

PATCH New Eric Bénard 1 participant 5 messages Jun 3, 2013 Arm i.MX and Layerscape

lore
Share & tools
lore
#0 lore raw

PATCH v6 1/5 amd-gpu-x11-bin-mx51: only enable when x11 is in DISTRO_FEATURES

From: Eric BENARD <[email protected]>

this prevent warnings and parse errors

---
 recipes-graphics/amd-gpu-x11-bin/amd-gpu-x11-bin-mx51_11.09.01.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
recipes-graphics/amd-gpu-x11-bin/amd-gpu-x11-bin-mx51_11.09.01.bb +1 -1
index 2dee47a..70568f9 100644
@@ -84,5 +84,5 @@ FILES_lib2dz160-mx51-dbg = "${libdir}/.debug/lib2dz160${SOLIBS}"
 FILES_lib2dz430-mx51 = "${libdir}/lib2dz430${SOLIBS}"
 FILES_lib2dz430-mx51-dbg = "${libdir}/.debug/lib2dz430${SOLIBS}"
 
-COMPATIBLE_MACHINE = "(mx5)"
+COMPATIBLE_MACHINE = "${@base_contains('DISTRO_FEATURES', 'x11', '(mx5)', 'Invalid!', d)}"
 PACKAGE_ARCH = "${MACHINE_ARCH}"
Signature · 1 line
1.7.11.2.249.g31c7954
#1 lore raw

PATCH v6 2/5 amd-gpu-x11-bin-mx51: factorize the recipes

this will allow easier addition of non x11 package

---
 ...u-x11-bin-mx51_11.09.01.bb => amd-gpu-mx51.inc} |  8 +--
 .../amd-gpu-x11-bin-mx51_11.09.01.bb               | 74 +---------------------
 .../fix-linux-build-check.patch                    |  0
 3 files changed, 2 insertions(+), 80 deletions(-)
 copy recipes-graphics/amd-gpu-x11-bin/{amd-gpu-x11-bin-mx51_11.09.01.bb => amd-gpu-mx51.inc} (88%)
 rename recipes-graphics/amd-gpu-x11-bin/{amd-gpu-x11-bin-mx51 => files}/fix-linux-build-check.patch (100%)
recipes-graphics/amd-gpu-x11-bin/amd-gpu-mx51.inc renamed from recipes-graphics/amd-gpu-x11-bin/amd-gpu-x11-bin-mx51_11.09.01.bb +1 -7
similarity index 88%
copy from recipes-graphics/amd-gpu-x11-bin/amd-gpu-x11-bin-mx51_11.09.01.bb
copy to recipes-graphics/amd-gpu-x11-bin/amd-gpu-mx51.inc
index 70568f9..b081695 100644
@@ -1,21 +1,16 @@
 # Copyright (C) 2011, 2012 Freescale
 # Released under the MIT license (see COPYING.MIT for the terms)
 
-DESCRIPTION = "GPU driver and apps for x11 on mx51"
 LICENSE = "Proprietary"
 SECTION = "libs"
-PR = "r12"
 
 # FIXME: Replace for correct AMD license
 LIC_FILES_CHKSUM = "file://usr/include/VG/openvg.h;endline=30;md5=b0109611dd76961057d4c45ae6519802"
-DEPENDS = "virtual/libx11 libxrender"
 
 PROVIDES = "virtual/egl virtual/libgles1 virtual/libgles2"
 
-SRC_URI = "${FSL_MIRROR}/amd-gpu-x11-bin-mx51-${PV}.bin;fsl-eula=true \
+SRC_URI = "${FSL_MIRROR}/${PN}-${PV}.bin;fsl-eula=true \
            file://fix-linux-build-check.patch"
-SRC_URI[md5sum] = "54391a4e670b597d06d01253fb217cad"
-SRC_URI[sha256sum] = "c7a6fa03b7aa2a375556c59908876554ba720c1e744baba2debb84a408f790db"
 
 inherit fsl-eula-unpack
 
@@ -84,5 +79,4 @@ FILES_lib2dz160-mx51-dbg = "${libdir}/.debug/lib2dz160${SOLIBS}"
 FILES_lib2dz430-mx51 = "${libdir}/lib2dz430${SOLIBS}"
 FILES_lib2dz430-mx51-dbg = "${libdir}/.debug/lib2dz430${SOLIBS}"
 
-COMPATIBLE_MACHINE = "${@base_contains('DISTRO_FEATURES', 'x11', '(mx5)', 'Invalid!', d)}"
 PACKAGE_ARCH = "${MACHINE_ARCH}"
recipes-graphics/amd-gpu-x11-bin/amd-gpu-x11-bin-mx51_11.09.01.bb +1 -73

88 lines not on this page · raw message

recipes-graphics/amd-gpu-x11-bin/files/fix-linux-build-check.patch renamed from recipes-graphics/amd-gpu-x11-bin/amd-gpu-x11-bin-mx51/fix-linux-build-check.patch +0 -0
similarity index 100%
rename from recipes-graphics/amd-gpu-x11-bin/amd-gpu-x11-bin-mx51/fix-linux-build-check.patch
rename to recipes-graphics/amd-gpu-x11-bin/files/fix-linux-build-check.patch
Signature · 1 line
1.7.11.2.249.g31c7954
#2 lore raw

PATCH v6 3/5 amd-gpu-bin-mx51: new recipe

In reply to Eric Bénard

this provides the GPU libraries for framebuffer

---
 .../amd-gpu-x11-bin/amd-gpu-bin-mx51_11.09.01.bb            | 13 +++++++++++++
 .../amd-gpu-x11-bin/amd-gpu-x11-bin-mx51_11.09.01.bb        |  2 ++
 2 files changed, 15 insertions(+)
 create mode 100644 recipes-graphics/amd-gpu-x11-bin/amd-gpu-bin-mx51_11.09.01.bb
recipes-graphics/amd-gpu-x11-bin/amd-gpu-bin-mx51_11.09.01.bb new file +13 -0
new file mode 100644
index 0000000..ecf38f2
@@ -0,0 +1,13 @@
+# Copyright (C) 2011, 2012 Freescale
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+DESCRIPTION = "GPU driver and apps for frambuffer on mx51"
+
+include amd-gpu-mx51.inc
+
+SRC_URI[md5sum] = "9f9b5f67b595721a08793aae8bd8fc46"
+SRC_URI[sha256sum] = "f0db68a764b5fb199729e7435f606b8d12b61ca97990336c647b7e81f4a584d9"
+
+RCONFLICTS_${PN} = "amd-gpu-x11-bin-mx51"
+
+COMPATIBLE_MACHINE = "(mx5)"
recipes-graphics/amd-gpu-x11-bin/amd-gpu-x11-bin-mx51_11.09.01.bb +2 -0
index a041231..886d041 100644
@@ -13,4 +13,6 @@ include amd-gpu-mx51.inc
 SRC_URI[md5sum] = "54391a4e670b597d06d01253fb217cad"
 SRC_URI[sha256sum] = "c7a6fa03b7aa2a375556c59908876554ba720c1e744baba2debb84a408f790db"
 
+RCONFLICTS_${PN} = "amd-gpu-bin-mx51"
+
 COMPATIBLE_MACHINE = "${@base_contains('DISTRO_FEATURES', 'x11', '(mx5)', 'Invalid!', d)}"
Signature · 1 line
1.7.11.2.249.g31c7954
#3 lore raw

PATCH v6 4/5 layer.conf: handle dynamic layer configuration

In reply to Eric Bénard

this patch is taken from :
http://git.yoctoproject.org/cgit/cgit.cgi/meta-mentor/tree/conf/layer.conf#n9,
as suggested by Chris Larson

---
 conf/layer.conf | 5 +++++
 1 file changed, 5 insertions(+)
conf/layer.conf +5 -0
index c4b9cd1..e260e62 100644
@@ -16,3 +16,8 @@ FSL_MIRROR ?= "http://www.freescale.com/lgfiles/NMG/MAD/YOCTO/"
 MIRRORS += " \
 ${FSL_MIRROR}	http://download.ossystems.com.br/bsp/freescale/source/ \n \
 "
+
+# Let us add layer-specific bbappends which are only applied when that
+# layer is included in our configuration
+BBFILES += "${@' '.join('${LAYERDIR}/%s/recipes*/*/*.bbappend' % layer \
+               for layer in BBFILE_COLLECTIONS.split())}"
Signature · 1 line
1.7.11.2.249.g31c7954
#4 lore raw

PATCH v6 5/5 qt5: add mx5 and mx6 support

In reply to Eric Bénard

- this allow to build qt5 with OpenGL ES support for i.MX5 and i.MX6
- tested on i.MX51, i.MX53 and i.MX6Q

---
 .../recipes-qt/qt5/qtbase/mx5/qeglfshooks_imx5.cpp | 105 +++++++++++++++++++++
 qt5-layer/recipes-qt/qt5/qtbase_5.0.2.bbappend     |  68 +++++++++++++
 2 files changed, 173 insertions(+)
 create mode 100644 qt5-layer/recipes-qt/qt5/qtbase/mx5/qeglfshooks_imx5.cpp
 create mode 100644 qt5-layer/recipes-qt/qt5/qtbase_5.0.2.bbappend
qt5-layer/recipes-qt/qt5/qtbase/mx5/qeglfshooks_imx5.cpp new file +105 -0
new file mode 100644
index 0000000..43e6d8d
@@ -0,0 +1,105 @@
+/****************************************************************************
+**
+** hacked by Eric Bénard - Eukréa Electromatique
+** inspired from https://community.freescale.com/docs/DOC-94123
+** and from fbset.c http://users.telenet.be/geertu/Linux/fbdev/
+**
+** based on qeglfshooks_imx6.cpp which is :
+** 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 <fcntl.h>    /* For O_RDWR */
+#include <unistd.h>   /* For open(), creat() */
+#include "qeglfshooks.h"
+#include <EGL/egl.h>
+#include <linux/fb.h>
+#include <sys/ioctl.h>
+
+QT_BEGIN_NAMESPACE
+
+class QEglFSImx5Hooks : public QEglFSHooks
+{
+public:
+    QEglFSImx5Hooks();
+    virtual QSize screenSize() const;
+    virtual EGLNativeWindowType createNativeWindow(const QSize &size, const QSurfaceFormat &format);
+    virtual void destroyNativeWindow(EGLNativeWindowType window);
+
+private:
+    QSize mScreenSize;
+    EGLNativeDisplayType mNativeDisplay;
+};
+
+
+QEglFSImx5Hooks::QEglFSImx5Hooks()
+{
+    int width, height;
+    /* code taken from fbset.c */
+    int fh;
+    struct fb_var_screeninfo var;
+    fh = open("/dev/fb0", O_RDONLY);
+    ioctl(fh, FBIOGET_VSCREENINFO, &var);
+    mScreenSize.setHeight(var.yres);
+    mScreenSize.setWidth(var.xres);
+    close(fh);
+    mNativeDisplay = EGL_DEFAULT_DISPLAY;
+}
+
+QSize QEglFSImx5Hooks::screenSize() const
+{
+    return mScreenSize;
+}
+
+EGLNativeWindowType QEglFSImx5Hooks::createNativeWindow(const QSize &size, const QSurfaceFormat &format)
+{
+    Q_UNUSED(format);
+
+    EGLNativeWindowType eglWindow =  open("/dev/fb0", O_RDWR);
+    return eglWindow;
+}
+
+
+void QEglFSImx5Hooks::destroyNativeWindow(EGLNativeWindowType window)
+{
+    close(window);
+}
+
+QEglFSImx5Hooks eglFSImx5Hooks;
+QEglFSHooks *platformHooks = &eglFSImx5Hooks;
+
+QT_END_NAMESPACE
qt5-layer/recipes-qt/qt5/qtbase_5.0.2.bbappend new file +68 -0

68 lines not on this page · raw message

Signature · 1 line
1.7.11.2.249.g31c7954