Skip to contentSkip to conversation

gpu-viv-bin-mx6q: Make backend configurable

PATCH In review Carlos Rafael Giani 3 participants 7 messages Feb 3, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 gpu-viv-bin-mx6q: Make backend configurable

With this change, the user can set USE_X11 etc. in local.conf to override the recipe's DISTRO_FEATURES based choice. This is for example beneficial when both X11 and wayland are supported, or when the user wants to make use of the regular framebuffer backend. (Modifying the distro features list may have far reaching consequences.)

---
 recipes-graphics/gpu-viv-bin-mx6q/gpu-viv-bin-mx6q.inc | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
recipes-graphics/gpu-viv-bin-mx6q/gpu-viv-bin-mx6q.inc +3 -3
index 2b94153..4e37db0 100644
@@ -60,9 +60,9 @@ python __anonymous () {
                 raise bb.parse.SkipPackage("Package Float-Point is not compatible with the machine")
 }
 
-USE_X11 = "${@base_contains("DISTRO_FEATURES", "x11", "yes", "no", d)}"
-USE_DFB = "${@base_contains("DISTRO_FEATURES", "directfb", "yes", "no", d)}"
-USE_WL = "${@base_contains("DISTRO_FEATURES", "wayland", "yes", "no", d)}"
+USE_X11 ?= "${@base_contains("DISTRO_FEATURES", "x11", "yes", "no", d)}"
+USE_DFB ?= "${@base_contains("DISTRO_FEATURES", "directfb", "yes", "no", d)}"
+USE_WL ?= "${@base_contains("DISTRO_FEATURES", "wayland", "yes", "no", d)}"
 
 # Inhibit warnings about files being stripped.
 INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
Signature · 1 line
1.8.5.3
#1 lore raw

Hello Carlos,

Quoted 7 lines · Carlos Rafael Giani

With this change, the user can set USE_X11 etc. in local.conf to override the recipe's DISTRO_FEATURES based choice. This is for example beneficial when both X11 and wayland are supported, or when the user wants to make use of the regular framebuffer backend. (Modifying the distro features list may have far reaching consequences.)

The Wayland and X11 backends are not usable at same time as you need to build apps with different flags. Do you have an usecase in mind?

Signature · 3 lines
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750
#2 lore raw
Quoted 10 lines · Otavio Salvador

Hello Carlos,

Quoted 6 lines · Carlos Rafael Giani

With this change, the user can set USE_X11 etc. in local.conf to override the recipe's DISTRO_FEATURES based choice. This is for example beneficial when both X11 and wayland are supported, or when the user wants to make use of the regular framebuffer backend. (Modifying the distro features list may have far reaching consequences.)

Quoted 4 lines
Quoted 1 line

The Wayland and X11 backends are not usable at same time as you need to build apps with different flags. Do you have an usecase in mind?

For example, when I wanted to try out the framebuffer EGL backend of the eglvivsink element in gstreamer-imx , I had to modify the gpu-viv-bin-mx6q.inc file to force it to not install the X11 binaries. (Same when I tried to develop a directfb EGL backend, which I postponed for now, because there are zero docs and examples on how to actually do this.) I will also need it later, when I start working on the Wayland backend. I also needed it when trying to build an xbmc fork with imx extras ; it can only render to framebuffer, not to X11.

I agree though that a switch-like statement would be better, but I am not sure how to implement that properly (my OE foo is not that high :) )

#3 lore raw

Hello Carlos,

Quoted 25 lines · Carlos Rafael Giani
Quoted 9 lines · Otavio Salvador
Quoted 7 lines · Carlos Rafael Giani

With this change, the user can set USE_X11 etc. in local.conf to override the recipe's DISTRO_FEATURES based choice. This is for example beneficial when both X11 and wayland are supported, or when the user wants to make use of the regular framebuffer backend. (Modifying the distro features list may have far reaching consequences.)

Quoted 5 lines
Quoted 1 line

The Wayland and X11 backends are not usable at same time as you need to build apps with different flags. Do you have an usecase in mind?

For example, when I wanted to try out the framebuffer EGL backend of the eglvivsink element in gstreamer-imx , I had to modify the gpu-viv-bin-mx6q.inc file to force it to not install the X11 binaries. (Same when I tried to develop a directfb EGL backend, which I postponed for now, because there are zero docs and examples on how to actually do this.) I will also need it later, when I start working on the Wayland backend. I also needed it when trying to build an xbmc fork with imx extras ; it can only render to framebuffer, not to X11.

Quoted 2 lines

I agree though that a switch-like statement would be better, but I am not sure how to implement that properly (my OE foo is not that high :) )

The idea here is you to set:

DISTRO_FEATURES_remove = "x11 wayland"

in your local.conf and you'll get a 'framebuffer' system.

Adding also:

DISTRO_FEATURES += "directfb"

gets you a 'DirectFB' system.

Is it what you are looking for?

Signature · 3 lines
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750
#4 lore raw
Quoted 36 lines · Otavio Salvador

Hello Carlos,

Quoted 25 lines · Carlos Rafael Giani
Quoted 9 lines · Otavio Salvador
Quoted 7 lines · Carlos Rafael Giani

With this change, the user can set USE_X11 etc. in local.conf to override the recipe's DISTRO_FEATURES based choice. This is for example beneficial when both X11 and wayland are supported, or when the user wants to make use of the regular framebuffer backend. (Modifying the distro features list may have far reaching consequences.)

Quoted 5 lines
Quoted 1 line

The Wayland and X11 backends are not usable at same time as you need to build apps with different flags. Do you have an usecase in mind?

For example, when I wanted to try out the framebuffer EGL backend of the eglvivsink element in gstreamer-imx , I had to modify the gpu-viv-bin-mx6q.inc file to force it to not install the X11 binaries. (Same when I tried to develop a directfb EGL backend, which I postponed for now, because there are zero docs and examples on how to actually do this.) I will also need it later, when I start working on the Wayland backend. I also needed it when trying to build an xbmc fork with imx extras ; it can only render to framebuffer, not to X11.

Quoted 2 lines

I agree though that a switch-like statement would be better, but I am not sure how to implement that properly (my OE foo is not that high :) )

The idea here is you to set:

DISTRO_FEATURES_remove = "x11 wayland"

Quoted 7 lines

in your local.conf and you'll get a 'framebuffer' system.

Adding also:

DISTRO_FEATURES += "directfb"

gets you a 'DirectFB' system.

You mean, for DirectFB the needed code is:

	DISTRO_FEATURES_remove = "x11 wayland"
	DISTRO_FEATURES += "directfb"

So, both lines together.

If you only include directfb in DISTRO_FEATURES what probably will happen is an explosion due to universe collapse (x11+wayland+direcftb)

I know you said the same thing in your email, Otavio. But at first, it confused me. So I'm being redundant - just in case -

Quoted 4 lines

Is it what you are looking for?

Signature · 1 line
Daiane
#5 lore raw
Quoted 6 lines · Daiane Angolini

You mean, for DirectFB the needed code is:

DISTRO_FEATURES_remove = "x11 wayland"
DISTRO_FEATURES += "directfb"

Quoted 6 lines

So, both lines together.

If you only include directfb in DISTRO_FEATURES what probably will happen is an explosion due to universe collapse (x11+wayland+direcftb)

I know you said the same thing in your email, Otavio. But at first, it confused me. So I'm being redundant - just in case -

One problem I've had is that modifying DISTRO_FEATURES introduced a lot of changes all over the place, pulling in some dependencies that didn't work well. It has been a while since I did this, but I remember having dependency problems when I switched on directfb (and turned off x11). However, if you say it should work this way, then I accept that. Maybe something wrong was on my end. I was initially under the impression that modifying DISTRO_FEATURES is not recommended.

#6 lore raw
Quoted 16 lines · Carlos Rafael Giani
Quoted 6 lines · Daiane Angolini

You mean, for DirectFB the needed code is:

DISTRO_FEATURES_remove = "x11 wayland"
DISTRO_FEATURES += "directfb"

Quoted 8 lines

So, both lines together.

If you only include directfb in DISTRO_FEATURES what probably will happen is an explosion due to universe collapse (x11+wayland+direcftb)

I know you said the same thing in your email, Otavio. But at first, it confused me. So I'm being redundant - just in case -

Quoted 9 lines

One problem I've had is that modifying DISTRO_FEATURES introduced a lot of changes all over the place, pulling in some dependencies that didn't work well. It has been a while since I did this, but I remember having dependency problems when I switched on directfb (and turned off x11). However, if you say it should work this way, then I accept that. Maybe something wrong was on my end. I was initially under the impression that modifying DISTRO_FEATURES is not recommended.

Please, when you change DISTRO_FEATURES use a clean build folder. I have faced several annoying build errors due to dirty build folder.

And, any other bug must be fixed, so please, if you face any, share with ML.

Signature · 1 line
Daiane