All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] piglit support build without x11
@ 2019-01-15  5:28 changqing.li
  2019-01-15  5:28 ` [PATCH 1/2] waffle: supprt build waffle " changqing.li
  2019-01-15  5:28 ` [PATCH 2/2] piglit: support build piglit " changqing.li
  0 siblings, 2 replies; 10+ messages in thread
From: changqing.li @ 2019-01-15  5:28 UTC (permalink / raw)
  To: openembedded-core

Fixes bug: [YOCTO #6077]

To support piglit without x11 by disable PIGLIT_BUILD_GL_TESTS, but
the result is piglit can use without x11, but only small part of it
can be used. Most of testcase will be skipped.


Changqing Li (2):
  waffle: supprt build waffle without x11
  piglit: support build piglit without x11

 meta/recipes-graphics/piglit/piglit_git.bb   | 12 +++++++-----
 meta/recipes-graphics/waffle/waffle_1.5.2.bb |  5 +----
 2 files changed, 8 insertions(+), 9 deletions(-)

-- 
2.7.4



^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 1/2] waffle: supprt build waffle without x11
  2019-01-15  5:28 [PATCH 0/2] piglit support build without x11 changqing.li
@ 2019-01-15  5:28 ` changqing.li
  2019-01-15  9:15   ` Burton, Ross
  2019-01-15  5:28 ` [PATCH 2/2] piglit: support build piglit " changqing.li
  1 sibling, 1 reply; 10+ messages in thread
From: changqing.li @ 2019-01-15  5:28 UTC (permalink / raw)
  To: openembedded-core

From: Changqing Li <changqing.li@windriver.com>

glx depend on x11, so only enable glx when DISTRO_FEATURES enabled
x11. build waffle support gbm platform when x11 is not enabled

Signed-off-by: Changqing Li <changqing.li@windriver.com>
---
 meta/recipes-graphics/waffle/waffle_1.5.2.bb | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/meta/recipes-graphics/waffle/waffle_1.5.2.bb b/meta/recipes-graphics/waffle/waffle_1.5.2.bb
index 43c3edc..21ae77a 100644
--- a/meta/recipes-graphics/waffle/waffle_1.5.2.bb
+++ b/meta/recipes-graphics/waffle/waffle_1.5.2.bb
@@ -15,10 +15,7 @@ inherit cmake distro_features_check lib_package
 
 # This should be overridden per-machine to reflect the capabilities of the GL
 # stack.
-PACKAGECONFIG ??= "glx"
-
-# libx11 requires x11 in DISTRO_FEATURES.
-REQUIRED_DISTRO_FEATURES = "${@bb.utils.contains('PACKAGECONFIG', 'glx', 'x11', '', d)}"
+PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'glx', 'gbm', d)}"
 
 # virtual/libgl requires opengl in DISTRO_FEATURES.
 REQUIRED_DISTRO_FEATURES += "${@bb.utils.contains('DEPENDS', 'virtual/${MLPREFIX}libgl', 'opengl', '', d)}"
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 2/2] piglit: support build piglit without x11
  2019-01-15  5:28 [PATCH 0/2] piglit support build without x11 changqing.li
  2019-01-15  5:28 ` [PATCH 1/2] waffle: supprt build waffle " changqing.li
@ 2019-01-15  5:28 ` changqing.li
  2019-01-15  9:19   ` Burton, Ross
  1 sibling, 1 reply; 10+ messages in thread
From: changqing.li @ 2019-01-15  5:28 UTC (permalink / raw)
  To: openembedded-core

From: Changqing Li <changqing.li@windriver.com>

1. Only depend on X11_DEPS when DISTRO_FEATURES enabled x11
2. test PIGLIT_BUILD_GL_TESTS depend on glx library, so depend
   on x11, so disable it when x11 is not enabled.
3. mesa-demos depend on libGL.so which is provide by recipe
   mesa, but when x11 is disabled, libGL.so is not generated.
   so we can only depend on this when x11 is enabled

Signed-off-by: Changqing Li <changqing.li@windriver.com>
---
 meta/recipes-graphics/piglit/piglit_git.bb | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/meta/recipes-graphics/piglit/piglit_git.bb b/meta/recipes-graphics/piglit/piglit_git.bb
index 622e046..fbeca0e 100644
--- a/meta/recipes-graphics/piglit/piglit_git.bb
+++ b/meta/recipes-graphics/piglit/piglit_git.bb
@@ -17,11 +17,10 @@ PV = "1.0+gitr${SRCPV}"
 
 S = "${WORKDIR}/git"
 
-DEPENDS = "libpng virtual/libx11 libxkbcommon libxrender waffle virtual/libgl libglu python3-mako-native python3-numpy-native python3-six-native virtual/egl"
+X11_DEPS = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'virtual/libx11 libxrender libglu', '', d)}"
+DEPENDS = "libpng waffle libxkbcommon virtual/libgl python3-mako-native python3-numpy-native python3-six-native virtual/egl ${X11_DEPS}"
 
 inherit cmake pkgconfig python3native distro_features_check bash-completion
-# depends on virtual/libx11
-REQUIRED_DISTRO_FEATURES = "x11"
 
 # depends on virtual/libgl
 REQUIRED_DISTRO_FEATURES += "opengl"
@@ -32,8 +31,10 @@ REQUIRED_DISTRO_FEATURES += "opengl"
 export TEMP = "${B}/temp/"
 do_compile[dirs] =+ "${B}/temp/"
 
-PACKAGECONFIG ??= ""
+PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'opengl', '', d)}"
 PACKAGECONFIG[freeglut] = "-DPIGLIT_USE_GLUT=1,-DPIGLIT_USE_GLUT=0,freeglut,"
+PACKAGECONFIG[opengl] = "-DPIGLIT_BUILD_GL_TESTS=ON,-DPIGLIT_BUILD_GL_TESTS=OFF,,"
+
 
 do_configure_prepend() {
    if [ "${@bb.utils.contains('PACKAGECONFIG', 'freeglut', 'yes', 'no', d)}" = "no" ]; then
@@ -48,7 +49,8 @@ RDEPENDS_${PN} = "waffle waffle-bin python3 python3-mako python3-json \
 	python3-misc \
 	python3-unixadmin python3-xml python3-multiprocessing \
 	python3-six python3-shell python3-io \
-	python3-netserver mesa-demos bash \
+	python3-netserver bash \
+	${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'mesa-demos', '', d)} \
 	"
 
 INSANE_SKIP_${PN} += "dev-so already-stripped"
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH 1/2] waffle: supprt build waffle without x11
  2019-01-15  5:28 ` [PATCH 1/2] waffle: supprt build waffle " changqing.li
@ 2019-01-15  9:15   ` Burton, Ross
  2019-01-15  9:16     ` Burton, Ross
  0 siblings, 1 reply; 10+ messages in thread
From: Burton, Ross @ 2019-01-15  9:15 UTC (permalink / raw)
  To: changqing.li; +Cc: OE-core

On Tue, 15 Jan 2019 at 05:29, <changqing.li@windriver.com> wrote:
> +PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'glx', 'gbm', d)}"

Should this be:

PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11',
'glx', '', d)} gbm"

ie always gbm, and glx if X11 is available?

Ross


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 1/2] waffle: supprt build waffle without x11
  2019-01-15  9:15   ` Burton, Ross
@ 2019-01-15  9:16     ` Burton, Ross
  0 siblings, 0 replies; 10+ messages in thread
From: Burton, Ross @ 2019-01-15  9:16 UTC (permalink / raw)
  To: changqing.li; +Cc: OE-core

On Tue, 15 Jan 2019 at 09:15, Burton, Ross <ross.burton@intel.com> wrote:
> Should this be:
>
> PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11',
> 'glx', '', d)} gbm"
>
> ie always gbm, and glx if X11 is available?

Actually whist we're here, respect the wayland DISTRO_FEATURE too?
And enable egl out of the box?  Turn on as much as possible,
basically.

Ross


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 2/2] piglit: support build piglit without x11
  2019-01-15  5:28 ` [PATCH 2/2] piglit: support build piglit " changqing.li
@ 2019-01-15  9:19   ` Burton, Ross
  2019-01-16  3:04     ` [PATCH V2 0/2] piglit support build " changqing.li
  0 siblings, 1 reply; 10+ messages in thread
From: Burton, Ross @ 2019-01-15  9:19 UTC (permalink / raw)
  To: changqing.li; +Cc: OE-core

On Tue, 15 Jan 2019 at 05:29, <changqing.li@windriver.com> wrote:
> +X11_DEPS = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'virtual/libx11 libxrender libglu', '', d)}"
> +DEPENDS = "libpng waffle libxkbcommon virtual/libgl python3-mako-native python3-numpy-native python3-six-native virtual/egl ${X11_DEPS}"

This...

> +       ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'mesa-demos', '', d)} \

...and this are basically the buildtime and runtime dependencies for
the 'opengl' packageconfig, so they should be in the
PACKAGECONFIG[opengl] line.

Also if you rename [opengl] to [x11] and then you can just use
bb.utils.filter().

Ross


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH V2 0/2] piglit support build without x11
  2019-01-15  9:19   ` Burton, Ross
@ 2019-01-16  3:04     ` changqing.li
  2019-01-16  3:04       ` [PATCH V2 1/2] waffle: supprt build waffle " changqing.li
  2019-01-16  3:04       ` [PATCH V2 2/2] piglit: support build piglit " changqing.li
  0 siblings, 2 replies; 10+ messages in thread
From: changqing.li @ 2019-01-16  3:04 UTC (permalink / raw)
  To: openembedded-core

From: Changqing Li <changqing.li@windriver.com>

To support piglit without x11 by disable PIGLIT_BUILD_GL_TESTS, but
the result is piglit can use without x11, but only small part of it
can be used. Most of testcase will be skipped.

Changqing Li (2):
  waffle: supprt build waffle without x11
  piglit: support build piglit without x11

 meta/recipes-graphics/piglit/piglit_git.bb   | 13 ++++++++-----
 meta/recipes-graphics/waffle/waffle_1.5.2.bb |  7 +++----
 2 files changed, 11 insertions(+), 9 deletions(-)

-- 
2.7.4



^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH V2 1/2] waffle: supprt build waffle without x11
  2019-01-16  3:04     ` [PATCH V2 0/2] piglit support build " changqing.li
@ 2019-01-16  3:04       ` changqing.li
  2019-01-16  3:04       ` [PATCH V2 2/2] piglit: support build piglit " changqing.li
  1 sibling, 0 replies; 10+ messages in thread
From: changqing.li @ 2019-01-16  3:04 UTC (permalink / raw)
  To: openembedded-core

From: Changqing Li <changqing.li@windriver.com>

respect DISTRO_FEATURES to make waffle support different platform,
gbm platform is supported by default.

Signed-off-by: Changqing Li <changqing.li@windriver.com>
---
 meta/recipes-graphics/waffle/waffle_1.5.2.bb | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/meta/recipes-graphics/waffle/waffle_1.5.2.bb b/meta/recipes-graphics/waffle/waffle_1.5.2.bb
index 43c3edc..31572f2 100644
--- a/meta/recipes-graphics/waffle/waffle_1.5.2.bb
+++ b/meta/recipes-graphics/waffle/waffle_1.5.2.bb
@@ -15,10 +15,9 @@ inherit cmake distro_features_check lib_package
 
 # This should be overridden per-machine to reflect the capabilities of the GL
 # stack.
-PACKAGECONFIG ??= "glx"
-
-# libx11 requires x11 in DISTRO_FEATURES.
-REQUIRED_DISTRO_FEATURES = "${@bb.utils.contains('PACKAGECONFIG', 'glx', 'x11', '', d)}"
+PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'glx x11-egl', '', d)} \
+                   ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', '', d)} \
+                   gbm"
 
 # virtual/libgl requires opengl in DISTRO_FEATURES.
 REQUIRED_DISTRO_FEATURES += "${@bb.utils.contains('DEPENDS', 'virtual/${MLPREFIX}libgl', 'opengl', '', d)}"
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH V2 2/2] piglit: support build piglit without x11
  2019-01-16  3:04     ` [PATCH V2 0/2] piglit support build " changqing.li
  2019-01-16  3:04       ` [PATCH V2 1/2] waffle: supprt build waffle " changqing.li
@ 2019-01-16  3:04       ` changqing.li
  2019-02-27  6:44         ` Changqing Li
  1 sibling, 1 reply; 10+ messages in thread
From: changqing.li @ 2019-01-16  3:04 UTC (permalink / raw)
  To: openembedded-core

From: Changqing Li <changqing.li@windriver.com>

*  test PIGLIT_BUILD_GL_TESTS depend on glx library, so depend
   on x11, so respect the DISTRO_FEATURES, only enable it when
   x11 is enabled.
*  mesa-demos depend on libGL.so which is provide by recipe
   mesa, but when x11 is disabled, libGL.so is not generated.
   so we can only rdepend on this when x11 is enabled
*  add x11 PACKAGECONFIG to add correct config/depend/rdepend

Signed-off-by: Changqing Li <changqing.li@windriver.com>
---
 meta/recipes-graphics/piglit/piglit_git.bb | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/meta/recipes-graphics/piglit/piglit_git.bb b/meta/recipes-graphics/piglit/piglit_git.bb
index 622e046..0737d02 100644
--- a/meta/recipes-graphics/piglit/piglit_git.bb
+++ b/meta/recipes-graphics/piglit/piglit_git.bb
@@ -17,11 +17,12 @@ PV = "1.0+gitr${SRCPV}"
 
 S = "${WORKDIR}/git"
 
-DEPENDS = "libpng virtual/libx11 libxkbcommon libxrender waffle virtual/libgl libglu python3-mako-native python3-numpy-native python3-six-native virtual/egl"
+X11_DEPS = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'virtual/libx11 libxrender libglu', '', d)}"
+X11_RDEPS = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'mesa-demos', '', d)}"
+
+DEPENDS = "libpng waffle libxkbcommon virtual/libgl python3-mako-native python3-numpy-native python3-six-native virtual/egl"
 
 inherit cmake pkgconfig python3native distro_features_check bash-completion
-# depends on virtual/libx11
-REQUIRED_DISTRO_FEATURES = "x11"
 
 # depends on virtual/libgl
 REQUIRED_DISTRO_FEATURES += "opengl"
@@ -32,8 +33,10 @@ REQUIRED_DISTRO_FEATURES += "opengl"
 export TEMP = "${B}/temp/"
 do_compile[dirs] =+ "${B}/temp/"
 
-PACKAGECONFIG ??= ""
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}"
 PACKAGECONFIG[freeglut] = "-DPIGLIT_USE_GLUT=1,-DPIGLIT_USE_GLUT=0,freeglut,"
+PACKAGECONFIG[x11] = "-DPIGLIT_BUILD_GL_TESTS=ON,-DPIGLIT_BUILD_GL_TESTS=OFF,${X11_DEPS}, ${X11_RDEPS}"
+
 
 do_configure_prepend() {
    if [ "${@bb.utils.contains('PACKAGECONFIG', 'freeglut', 'yes', 'no', d)}" = "no" ]; then
@@ -48,7 +51,7 @@ RDEPENDS_${PN} = "waffle waffle-bin python3 python3-mako python3-json \
 	python3-misc \
 	python3-unixadmin python3-xml python3-multiprocessing \
 	python3-six python3-shell python3-io \
-	python3-netserver mesa-demos bash \
+	python3-netserver bash \
 	"
 
 INSANE_SKIP_${PN} += "dev-so already-stripped"
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH V2 2/2] piglit: support build piglit without x11
  2019-01-16  3:04       ` [PATCH V2 2/2] piglit: support build piglit " changqing.li
@ 2019-02-27  6:44         ` Changqing Li
  0 siblings, 0 replies; 10+ messages in thread
From: Changqing Li @ 2019-02-27  6:44 UTC (permalink / raw)
  To: openembedded-core

ping

On 1/16/19 11:04 AM, changqing.li@windriver.com wrote:
> From: Changqing Li <changqing.li@windriver.com>
>
> *  test PIGLIT_BUILD_GL_TESTS depend on glx library, so depend
>     on x11, so respect the DISTRO_FEATURES, only enable it when
>     x11 is enabled.
> *  mesa-demos depend on libGL.so which is provide by recipe
>     mesa, but when x11 is disabled, libGL.so is not generated.
>     so we can only rdepend on this when x11 is enabled
> *  add x11 PACKAGECONFIG to add correct config/depend/rdepend
>
> Signed-off-by: Changqing Li <changqing.li@windriver.com>
> ---
>   meta/recipes-graphics/piglit/piglit_git.bb | 13 ++++++++-----
>   1 file changed, 8 insertions(+), 5 deletions(-)
>
> diff --git a/meta/recipes-graphics/piglit/piglit_git.bb b/meta/recipes-graphics/piglit/piglit_git.bb
> index 622e046..0737d02 100644
> --- a/meta/recipes-graphics/piglit/piglit_git.bb
> +++ b/meta/recipes-graphics/piglit/piglit_git.bb
> @@ -17,11 +17,12 @@ PV = "1.0+gitr${SRCPV}"
>   
>   S = "${WORKDIR}/git"
>   
> -DEPENDS = "libpng virtual/libx11 libxkbcommon libxrender waffle virtual/libgl libglu python3-mako-native python3-numpy-native python3-six-native virtual/egl"
> +X11_DEPS = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'virtual/libx11 libxrender libglu', '', d)}"
> +X11_RDEPS = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'mesa-demos', '', d)}"
> +
> +DEPENDS = "libpng waffle libxkbcommon virtual/libgl python3-mako-native python3-numpy-native python3-six-native virtual/egl"
>   
>   inherit cmake pkgconfig python3native distro_features_check bash-completion
> -# depends on virtual/libx11
> -REQUIRED_DISTRO_FEATURES = "x11"
>   
>   # depends on virtual/libgl
>   REQUIRED_DISTRO_FEATURES += "opengl"
> @@ -32,8 +33,10 @@ REQUIRED_DISTRO_FEATURES += "opengl"
>   export TEMP = "${B}/temp/"
>   do_compile[dirs] =+ "${B}/temp/"
>   
> -PACKAGECONFIG ??= ""
> +PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}"
>   PACKAGECONFIG[freeglut] = "-DPIGLIT_USE_GLUT=1,-DPIGLIT_USE_GLUT=0,freeglut,"
> +PACKAGECONFIG[x11] = "-DPIGLIT_BUILD_GL_TESTS=ON,-DPIGLIT_BUILD_GL_TESTS=OFF,${X11_DEPS}, ${X11_RDEPS}"
> +
>   
>   do_configure_prepend() {
>      if [ "${@bb.utils.contains('PACKAGECONFIG', 'freeglut', 'yes', 'no', d)}" = "no" ]; then
> @@ -48,7 +51,7 @@ RDEPENDS_${PN} = "waffle waffle-bin python3 python3-mako python3-json \
>   	python3-misc \
>   	python3-unixadmin python3-xml python3-multiprocessing \
>   	python3-six python3-shell python3-io \
> -	python3-netserver mesa-demos bash \
> +	python3-netserver bash \
>   	"
>   
>   INSANE_SKIP_${PN} += "dev-so already-stripped"

-- 
BRs

Sandy(Li Changqing)



^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2019-02-27  6:44 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-15  5:28 [PATCH 0/2] piglit support build without x11 changqing.li
2019-01-15  5:28 ` [PATCH 1/2] waffle: supprt build waffle " changqing.li
2019-01-15  9:15   ` Burton, Ross
2019-01-15  9:16     ` Burton, Ross
2019-01-15  5:28 ` [PATCH 2/2] piglit: support build piglit " changqing.li
2019-01-15  9:19   ` Burton, Ross
2019-01-16  3:04     ` [PATCH V2 0/2] piglit support build " changqing.li
2019-01-16  3:04       ` [PATCH V2 1/2] waffle: supprt build waffle " changqing.li
2019-01-16  3:04       ` [PATCH V2 2/2] piglit: support build piglit " changqing.li
2019-02-27  6:44         ` Changqing Li

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.