Patchwork [meta-fsl-arm,v4,3/3] amd-gpu-bin-mx51: new recipe

login
register
mail settings
Submitter Eric BENARD
Date May 29, 2013, 6:01 p.m.
Message ID <1369850483-17206-3-git-send-email-eric@eukrea.com>
Download mbox | patch
Permalink /patch/50759/
State Changes Requested
Delegated to: Otavio Salvador
Headers show

Comments

Eric BENARD - May 29, 2013, 6:01 p.m.
this provides the GPU libraries for framebuffer

Signed-off-by: Eric Bénard <eric@eukrea.com>
---
 .../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
Javier Viguera - May 30, 2013, 9:49 a.m.
Hi Eric,

On 29/05/13 20:01, Eric Bénard wrote:
> diff --git a/recipes-graphics/amd-gpu-x11-bin/amd-gpu-bin-mx51_11.09.01.bb b/recipes-graphics/amd-gpu-x11-bin/amd-gpu-bin-mx51_11.09.01.bb
> +COMPATIBLE_MACHINE = "(mx5)"

> diff --git a/recipes-graphics/amd-gpu-x11-bin/amd-gpu-x11-bin-mx51_11.09.01.bb b/recipes-graphics/amd-gpu-x11-bin/amd-gpu-x11-bin-mx51_11.09.01.bb
>   COMPATIBLE_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.
Eric BENARD - May 30, 2013, 10:29 a.m.
Hi Javier,

Le Thu, 30 May 2013 11:49:44 +0200,
Javier Viguera <javier.viguera@digi.com> a écrit :
> On 29/05/13 20:01, Eric Bénard wrote:
> > diff --git a/recipes-graphics/amd-gpu-x11-bin/amd-gpu-bin-mx51_11.09.01.bb b/recipes-graphics/amd-gpu-x11-bin/amd-gpu-bin-mx51_11.09.01.bb
> > +COMPATIBLE_MACHINE = "(mx5)"
> 
> > diff --git a/recipes-graphics/amd-gpu-x11-bin/amd-gpu-x11-bin-mx51_11.09.01.bb b/recipes-graphics/amd-gpu-x11-bin/amd-gpu-x11-bin-mx51_11.09.01.bb
> >   COMPATIBLE_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)}"
> 
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
Javier Viguera - May 30, 2013, 12:02 p.m.
Hi Eric,

On 30/05/13 12:29, Eric Bénard wrote:
> This raise an other problem :
> - when x11 is not in DISTRO_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!" :-) )

> - 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.
Eric BENARD - May 30, 2013, 12:07 p.m.
Le Thu, 30 May 2013 14:02:33 +0200,
Javier Viguera <javier.viguera@digi.com> a écrit :

> Hi Eric,
> 
> On 30/05/13 12:29, Eric Bénard wrote:
> > This raise an other problem :
> > - when x11 is not in DISTRO_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!" :-) )
> 
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
Otavio Salvador - May 31, 2013, 1:21 p.m.
On Thu, May 30, 2013 at 9:07 AM, Eric Bénard <eric@eukrea.com> wrote:

> Le Thu, 30 May 2013 14:02:33 +0200,
> Javier Viguera <javier.viguera@digi.com> a écrit :
>
> > Hi Eric,
> >
> > On 30/05/13 12:29, Eric Bénard wrote:
> > > This raise an other problem :
> > > - when x11 is not in DISTRO_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!" :-) )
> >
> 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).
>

I will wait your reworked patchset for review it again.

Thanks for looking at it.
Eric BENARD - May 31, 2013, 8:38 p.m.
Hi Javier,

Le Thu, 30 May 2013 11:49:44 +0200,
Javier Viguera <javier.viguera@digi.com> a écrit :
> On 29/05/13 20:01, Eric Bénard wrote:
> > diff --git a/recipes-graphics/amd-gpu-x11-bin/amd-gpu-bin-mx51_11.09.01.bb b/recipes-graphics/amd-gpu-x11-bin/amd-gpu-bin-mx51_11.09.01.bb
> > +COMPATIBLE_MACHINE = "(mx5)"
> 
> > diff --git a/recipes-graphics/amd-gpu-x11-bin/amd-gpu-x11-bin-mx51_11.09.01.bb b/recipes-graphics/amd-gpu-x11-bin/amd-gpu-x11-bin-mx51_11.09.01.bb
> >   COMPATIBLE_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.
> 
after some testings I confirm you are right.

Eric

Patch

diff --git a/recipes-graphics/amd-gpu-x11-bin/amd-gpu-bin-mx51_11.09.01.bb b/recipes-graphics/amd-gpu-x11-bin/amd-gpu-bin-mx51_11.09.01.bb
new file mode 100644
index 0000000..ecf38f2
--- /dev/null
+++ b/recipes-graphics/amd-gpu-x11-bin/amd-gpu-bin-mx51_11.09.01.bb
@@ -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)"
diff --git a/recipes-graphics/amd-gpu-x11-bin/amd-gpu-x11-bin-mx51_11.09.01.bb b/recipes-graphics/amd-gpu-x11-bin/amd-gpu-x11-bin-mx51_11.09.01.bb
index f33f114..f8dbcc2 100644
--- a/recipes-graphics/amd-gpu-x11-bin/amd-gpu-x11-bin-mx51_11.09.01.bb
+++ b/recipes-graphics/amd-gpu-x11-bin/amd-gpu-x11-bin-mx51_11.09.01.bb
@@ -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)}"