amd-gpu-x11-bin-mx51: only enable when x11 is in DISTRO_FEATURES
PATCH v4 1/3 amd-gpu-x11-bin-mx51: only enable when x11 is in DISTRO_FEATURES
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
@@ -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)', '', d)}" PACKAGE_ARCH = "${MACHINE_ARCH}"
Signature · 1 line
1.7.10.4
PATCH v4 2/3 amd-gpu-x11-bin-mx51: factorize the recipes
this will allow easier addition of non x11 package
---
recipes-graphics/amd-gpu-x11-bin/amd-gpu-mx51.inc | 82 ++++++++++++++++++++
.../amd-gpu-x11-bin-mx51_11.09.01.bb | 74 +-----------------
.../fix-linux-build-check.patch | 0
3 files changed, 83 insertions(+), 73 deletions(-)
create mode 100644 recipes-graphics/amd-gpu-x11-bin/amd-gpu-mx51.inc
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 new file +82 -0
@@ -0,0 +1,82 @@ +# Copyright (C) 2011, 2012 Freescale +# Released under the MIT license (see COPYING.MIT for the terms) + +LICENSE = "Proprietary" +SECTION = "libs" + +# FIXME: Replace for correct AMD license +LIC_FILES_CHKSUM = "file://usr/include/VG/openvg.h;endline=30;md5=b0109611dd76961057d4c45ae6519802" + +PROVIDES = "virtual/egl virtual/libgles1 virtual/libgles2" + +SRC_URI = "${FSL_MIRROR}/${PN}-${PV}.bin;fsl-eula=true \ + file://fix-linux-build-check.patch" + +inherit fsl-eula-unpack + +# FIXME: All binaries lack GNU_HASH in elf binary but as we don't have +# the source we cannot fix it. Disable the insane check for now. +python populate_packages_prepend() { + for p in d.getVar('PACKAGES', True).split(): + d.setVar("INSANE_SKIP_%s" % p, "ldflags") +} + +do_install () { + install -d ${D}${libdir} + install -d ${D}${bindir} + install -d ${D}${includedir} + + cp -axr ${S}/usr/bin/* ${D}${bindir} + cp -axf ${S}/usr/lib/* ${D}${libdir} + cp -axr ${S}/usr/include/* ${D}${includedir} + + find ${D}${bindir} -type f -exec chmod 755 {} \; + find ${D}${libdir} -type f -exec chmod 644 {} \; + find ${D}${includedir} -type f -exec chmod 644 {} \; + + # FIXME: Fix sonames of broken libraries + mv ${D}${libdir}/lib2dz160.so ${D}${libdir}/lib2dz160.so.0 + mv ${D}${libdir}/lib2dz430.so ${D}${libdir}/lib2dz430.so.0 + + # FIXME: Remove unkown files + rm -r ${D}${libdir}/libcsi.a \ + ${D}${libdir}/libres.a +} + +PACKAGES =+ "libgsl-fsl-mx51 libgsl-fsl-mx51-dev libgsl-fsl-mx51-dbg \ + libegl-mx51 libegl-mx51-dev libegl-mx51-dbg \ + libgles-mx51 libgles-mx51-dev libgles-mx51-dbg \ + libgles2-mx51 libgles2-mx51-dev libgles2-mx51-dbg \ + libopenvg-mx51 libopenvg-mx51-dev libopenvg-mx51-dbg \ + lib2dz160-mx51 lib2dz160-mx51-dbg \ + lib2dz430-mx51 lib2dz430-mx51-dbg" + +FILES_${PN}-dbg = "${bindir}/.debug/*" + +FILES_libgsl-fsl-mx51 = "${libdir}/libgsl-fsl${SOLIBS}" +FILES_libgsl-fsl-mx51-dev = "${libdir}/libgsl-fsl${SOLIBSDEV}" +FILES_libgsl-fsl-mx51-dbg = "${libdir}/.debug/libgsl-fsl${SOLIBS}" + +FILES_libegl-mx51 = "${libdir}/libEGL${SOLIBS}" +FILES_libegl-mx51-dev = "${includedir}/EGL ${includedir}/KHR ${libdir}/libEGL${SOLIBSDEV}" +FILES_libegl-mx51-dbg = "${libdir}/.debug/libEGL${SOLIBS}" + +FILES_libgles-mx51 = "${libdir}/libGLESv1*${SOLIBS}" +FILES_libgles-mx51-dev = "${includedir}/GLES ${libdir}/libGLESv1*${SOLIBSDEV}" +FILES_libgles-mx51-dbg = "${libdir}/.debug/libGLESv1*${SOLIBS}" + +FILES_libgles2-mx51 = "${libdir}/libGLESv2${SOLIBS}" +FILES_libgles2-mx51-dev = "${includedir}/GLES2 ${libdir}/libGLESv2${SOLIBSDEV}" +FILES_libgles2-mx51-dbg = "${libdir}/.debug/libGLESv2${SOLIBS}" + +FILES_libopenvg-mx51 = "${libdir}/libOpenVG${SOLIBS}" +FILES_libopenvg-mx51-dev = "${includedir}/VG ${libdir}/libOpenVG${SOLIBSDEV}" +FILES_libopenvg-mx51-dbg = "${libdir}/.debug/libOpenVG${SOLIBS}" + +FILES_lib2dz160-mx51 = "${libdir}/lib2dz160${SOLIBS}" +FILES_lib2dz160-mx51-dbg = "${libdir}/.debug/lib2dz160${SOLIBS}" + +FILES_lib2dz430-mx51 = "${libdir}/lib2dz430${SOLIBS}" +FILES_lib2dz430-mx51-dbg = "${libdir}/.debug/lib2dz430${SOLIBS}" + +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
Signature · 1 line
1.7.10.4
PATCH v4 3/3 amd-gpu-bin-mx51: new recipe
In reply to Eric Bénardthis 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
@@ -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
@@ -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)', '', d)}"
Signature · 1 line
1.7.10.4
Re: [PATCH v4 3/3] amd-gpu-bin-mx51: new recipe
Hi Eric,
recipes-graphics/amd-gpu-x11-bin/amd-gpu-x11-bin-mx51_11.09.01.bb include amd-gpu-mx51.inc · line 18
Quoted 5 lines · Eric Bénard
recipes-graphics/amd-gpu-x11-bin/amd-gpu-bin-mx51_11.09.01.bb +1
-0+COMPATIBLE_MACHINE = "(mx5)"recipes-graphics/amd-gpu-x11-bin/amd-gpu-x11-bin-mx51_11.09.01.bb +0
-0COMPATIBLE_MACHINE = "${@base_contains('DISTRO_FEATURES', 'x11', '(mx5)', '', d)}"
I'm still learning yocto/openembedded so bear with me if all the following does not make sense, but is this correct?
When DISTRO_FEATURES contains x11, *both* packages will have:
COMPATIBLE_MACHINE = "(mx5)"
so both will be available.
When DISTRO_FEATURES does *NOT* contain x11, then:
amd-gpu-bin-mx51: COMPATIBLE_MACHINE = "(mx5)" amd-gpu-x11-bin-mx51: COMPATIBLE_MACHINE = ""
But in this case if i have not misunderstood the semantics of COMPATIBLE_MACHINE both will be again available as an empty COMPATIBLE_MACHINE means that it's available.
Not sure it it's very elegant, but i have seen in meta-openembedded layer something similar using "Invalid!" string to invalidate one or the other recipe depending on the distro feature.
Shouldn't then be something like the following:
amd-gpu-bin-mx51:COMPATIBLE_MACHINE = "${@base_contains('DISTRO_FEATURES', 'x11', 'Invalid!', '(mx5)', d)}"
amd-gpu-x11-bin-mx51:COMPATIBLE_MACHINE = "${@base_contains('DISTRO_FEATURES', 'x11', '(mx5)', 'Invalid!', d)}"
-
Javier Viguera
Software Engineer
Digi International® Spain S.A.U.
Re: [PATCH v4 3/3] amd-gpu-bin-mx51: new recipe
Hi Javier,
Quoted 29 lines · Javier Viguera
recipes-graphics/amd-gpu-x11-bin/amd-gpu-x11-bin-mx51_11.09.01.bb include amd-gpu-mx51.inc · line 18
Quoted 5 lines · Eric Bénard
recipes-graphics/amd-gpu-x11-bin/amd-gpu-bin-mx51_11.09.01.bb +1
-0+COMPATIBLE_MACHINE = "(mx5)"recipes-graphics/amd-gpu-x11-bin/amd-gpu-x11-bin-mx51_11.09.01.bb +0
-0COMPATIBLE_MACHINE = "${@base_contains('DISTRO_FEATURES', 'x11', '(mx5)', '', d)}"I'm still learning yocto/openembedded so bear with me if all the following does not make sense, but is this correct?
When
DISTRO_FEATUREScontains x11, *both* packages will have:
COMPATIBLE_MACHINE= "(mx5)"so both will be available.
When
DISTRO_FEATURESdoes *NOT* contain x11, then:amd-gpu-bin-mx51: COMPATIBLE_MACHINE = "(mx5)" amd-gpu-x11-bin-mx51: COMPATIBLE_MACHINE = ""But in this case if i have not misunderstood the semantics of
COMPATIBLE_MACHINEboth will be again available as an emptyCOMPATIBLE_MACHINEmeans that it's available.Not sure it it's very elegant, but i have seen in meta-openembedded layer something similar using "Invalid!" string to invalidate one or the other recipe depending on the distro feature.
Quoted 8 lines
Shouldn't then be something like the following:
amd-gpu-bin-mx51:
COMPATIBLE_MACHINE= "${@base_contains('DISTRO_FEATURES', 'x11', 'Invalid!', '(mx5)', d)}"amd-gpu-x11-bin-mx51:
COMPATIBLE_MACHINE= "${@base_contains('DISTRO_FEATURES', 'x11', '(mx5)', 'Invalid!', d)}"
interesting I didn't tought in that way but that seems possible and as the warnings disapeared I thought the x11 package was no more available.
This raise an other problem :
- when x11 is not in DISTRO_FEATURES, we shouldn't have the x11-bin package.
- when x11 is in DISTRO_FEATURES, we could have the non x11 package as nothing prevents users to have x11 in their distro features _and_ to build non x11 images : how to handle that (same problem in the mx6 gpu package) ?
Eric
Re: [PATCH v4 3/3] amd-gpu-bin-mx51: new recipe
Hi Eric,
Quoted 3 lines · Eric Bénard
This raise an other problem :
- when x11 is not inDISTRO_FEATURES, we shouldn't have the x11-bin package.
Well, this probably is solved by something like:
amd-gpu-x11-bin-mx51:COMPATIBLE_MACHINE = "${@base_contains('DISTRO_FEATURES', 'x11', '(mx5)', 'Invalid!', d)}"
If x11 is not in DISTRO_FEATURES, then COMPATIBLE_MACHINE becomes 'Invalid!' and that does not match your machine (unless you have a machine named "Invalid!" :-) )
Quoted 4 lines
- when x11 is in
DISTRO_FEATURES, we could have the non x11 package as nothing prevents users to have x11 in their distro features _and_ to build non x11 images : how to handle that (same problem in the mx6 gpu package) ?
Agree with you that this is a real problem, but unfortunately my yocto skills are not good enough to know how to solve it. Hopefully someone in the list will shed some light.
-
Javier Viguera
Software Engineer
Digi International® Spain S.A.U.
Re: [PATCH v4 3/3] amd-gpu-bin-mx51: new recipe
Quoted 7 lines · Javier Viguera
Hi Eric,
Quoted 3 lines · Eric Bénard
This raise an other problem :
- when x11 is not inDISTRO_FEATURES, we shouldn't have the x11-bin package.
Quoted 9 lines
Well, this probably is solved by something like:
amd-gpu-x11-bin-mx51:
COMPATIBLE_MACHINE= "${@base_contains('DISTRO_FEATURES', 'x11', '(mx5)', 'Invalid!', d)}"If x11 is not in
DISTRO_FEATURES, thenCOMPATIBLE_MACHINEbecomes 'Invalid!' and that does not match your machine (unless you have a machine named "Invalid!" :-) )
yes that's the behaviour I expected by emptying the COMPATIBLE_MACHINE value. I have to check that more in detail to see if that works (and why my change allowed to get rid of the warnings).
Eric
Re: [PATCH v4 3/3] amd-gpu-bin-mx51: new recipe
Quoted 16 lines · Eric Bénard
Quoted 11 lines · Javier Viguera
Hi Eric,
Quoted 3 lines · Eric Bénard
This raise an other problem :
- when x11 is not inDISTRO_FEATURES, we shouldn't have the x11-bin package.Well, this probably is solved by something like:
amd-gpu-x11-bin-mx51:
COMPATIBLE_MACHINE= "${@base_contains('DISTRO_FEATURES', 'x11','(mx5)', 'Invalid!', d)}"
Quoted 1 line
Quoted 8 lines
Quoted 4 lines
If x11 is not in
DISTRO_FEATURES, thenCOMPATIBLE_MACHINEbecomes 'Invalid!' and that does not match your machine (unless you have a machine named "Invalid!" :-) )yes that's the behaviour I expected by emptying the
COMPATIBLE_MACHINEvalue. I have to check that more in detail to see if that works (and why my change allowed to get rid of the warnings).
I will wait your reworked patchset for review it again.
Thanks for looking at it.
Signature · 3 lines
Otavio Salvador O.S. Systems http://www.ossystems.com.br http://projetos.ossystems.com.br Mobile: +55 (53) 9981-7854 Mobile: +1 (347) 903-9750
Re: [PATCH v4 3/3] amd-gpu-bin-mx51: new recipe
In reply to Javier VigueraHi Javier,
Quoted 16 lines · Javier Viguera
recipes-graphics/amd-gpu-x11-bin/amd-gpu-x11-bin-mx51_11.09.01.bb include amd-gpu-mx51.inc · line 18
Quoted 5 lines · Eric Bénard
recipes-graphics/amd-gpu-x11-bin/amd-gpu-bin-mx51_11.09.01.bb +1
-0+COMPATIBLE_MACHINE = "(mx5)"recipes-graphics/amd-gpu-x11-bin/amd-gpu-x11-bin-mx51_11.09.01.bb +0
-0COMPATIBLE_MACHINE = "${@base_contains('DISTRO_FEATURES', 'x11', '(mx5)', '', d)}"I'm still learning yocto/openembedded so bear with me if all the following does not make sense, but is this correct?
When
DISTRO_FEATUREScontains x11, *both* packages will have:
COMPATIBLE_MACHINE= "(mx5)"so both will be available.
Quoted 9 lines
When
DISTRO_FEATURESdoes *NOT* contain x11, then:amd-gpu-bin-mx51: COMPATIBLE_MACHINE = "(mx5)" amd-gpu-x11-bin-mx51: COMPATIBLE_MACHINE = ""But in this case if i have not misunderstood the semantics of
COMPATIBLE_MACHINEboth will be again available as an emptyCOMPATIBLE_MACHINEmeans that it's available.
after some testings I confirm you are right.
Eric