Patchwork [7/7] core-image-gtk-directfb.bb: add an image for gtk over directfb

login
register
mail settings
Submitter Xiaofeng Yan
Date Dec. 12, 2011, 11:28 a.m.
Message ID <fbfec531140ee0c6848402faf94ba93b903d02ef.1323688580.git.xiaofeng.yan@windriver.com>
Download mbox | patch
Permalink /patch/16731/
State New
Headers show

Comments

Xiaofeng Yan - Dec. 12, 2011, 11:28 a.m.
From: Xiaofeng Yan <xiaofeng.yan@windriver.com>

This file can make an image to run gtk over directfb.

[YOCTO #1674]

Signed-off-by: Xiaofeng Yan <xiaofeng.yan@windriver.com>
---
 .../images/core-image-gtk-directfb.bb              |   21 ++++++++++++++++++++
 1 files changed, 21 insertions(+), 0 deletions(-)
 create mode 100644 meta/recipes-graphics/images/core-image-gtk-directfb.bb
Otavio Salvador - Dec. 12, 2011, 11:40 a.m.
On Mon, Dec 12, 2011 at 09:28, Xiaofeng Yan <xiaofeng.yan@windriver.com>wrote:

> From: Xiaofeng Yan <xiaofeng.yan@windriver.com>
>
> This file can make an image to run gtk over directfb.
>

I think this ought to be done on core-image-gtk not a specific one for
directfb as it depends on a distro feature and you can't just generate an
image with this, if the distro has no directfb feature enabled.
Xiaofeng Yan - Dec. 13, 2011, 10:51 a.m.
On 2011?12?12? 19:40, Otavio Salvador wrote:
> On Mon, Dec 12, 2011 at 09:28, Xiaofeng Yan 
> <xiaofeng.yan@windriver.com <mailto:xiaofeng.yan@windriver.com>> wrote:
>
>     From: Xiaofeng Yan <xiaofeng.yan@windriver.com
>     <mailto:xiaofeng.yan@windriver.com>>
>
>     This file can make an image to run gtk over directfb.
>
>
> I think this ought to be done on core-image-gtk not a specific one for 
> directfb as it depends on a distro feature and you can't just generate 
> an image with this, if the distro has no directfb feature enabled.
> -- 
> Otavio Salvador                             O.S. Systems
> E-mail: otavio@ossystems.com.br <mailto:otavio@ossystems.com.br> 
> http://www.ossystems.com.br
> Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br
>
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
I can add a mechanism to inform user to add "gtk-directfb" to 
DISTRO_FEATURES by adding like the following steps
$touch meta/class/gtk-directfb.bbclass
$cat  meta/class/gtk-directfb.bbclass
python () {
     import os
     import signal
     packages = d.getVar('DISTRO_FEATURES', 1).split()
     for pkg in packages:
         if pkg == "x11":
             print("Please remove x11 from DISTRO_FEATURES, use 
\"gtk-directfb\" instead of it\n")
             pid = os.getpid()
             os.kill(pid,signal.SIGCLD) # it could have some issues
}

$cat core-image-gtk-directfb.bb
LICENSE = "MIT"
PR="r0"

inherit gtk-directfb

LIC_FILES_CHKSUM = 
"file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58 \
                     
file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"


DEPENDS += "task-core-gtk-directfb"

RDEPENDS_${PN} += " \
     task-core-gtk-directfb-base \
     "

inherit core-image

IMAGE_INSTALL += "\
     ${POKY_BASE_INSTALL} \
     task-core-basic \
     module-init-tools \
     task-core-gtk-directfb-base \
"
Do you have any comment about above method ?

Thanks
Yan
Otavio Salvador - Dec. 13, 2011, 10:57 a.m.
On Tue, Dec 13, 2011 at 08:51, Xiaofeng Yan <xiaofeng.yan@windriver.com>wrote:

> **
> ...
>
IMAGE_INSTALL += "\
>     ${POKY_BASE_INSTALL} \
>     task-core-basic \
>     module-init-tools \
>     task-core-gtk-directfb-base \
> "
> Do you have any comment about above method ?
>

All is fine except I don't see the need of having one specific image for
gtk-directfb use. The case, in case it is required, you might include in
case gtk-directfb feature is listed, avoiding an image specific to this.

Why do you want a specific image for it?
Richard Purdie - Dec. 13, 2011, 12:06 p.m.
On Tue, 2011-12-13 at 08:57 -0200, Otavio Salvador wrote:
> On Tue, Dec 13, 2011 at 08:51, Xiaofeng Yan
> <xiaofeng.yan@windriver.com> wrote:
>         ... 
>         IMAGE_INSTALL += "\
>             ${POKY_BASE_INSTALL} \
>             task-core-basic \
>             module-init-tools \
>             task-core-gtk-directfb-base \
>         "
>         Do you have any comment about above method ?
>
> All is fine except I don't see the need of having one specific image
> for gtk-directfb use. The case, in case it is required, you might
> include in case gtk-directfb feature is listed, avoiding an image
> specific to this.
>
> Why do you want a specific image for it?

To put what Otavio is asking in different words, couldn't we have a
generic "gtk test" image which would work with both directfb and x11?

I think the problem is that such an image gets tricky to construct as X
requires a lot of extras such as an xserver, a general directfb image
has a much simpler content and is quite a different entity. I can
therefore see why a separate image has been created and whilst I agree
its not ideal, I think the alternatives are worse.

I think Yan's patch with the anonymous python is along the right lines
but please lookup SkipPackage() instead of using getpid and kill!

Cheers,

Richard

Patch

diff --git a/meta/recipes-graphics/images/core-image-gtk-directfb.bb b/meta/recipes-graphics/images/core-image-gtk-directfb.bb
new file mode 100644
index 0000000..b0ae469
--- /dev/null
+++ b/meta/recipes-graphics/images/core-image-gtk-directfb.bb
@@ -0,0 +1,21 @@ 
+LICENSE = "MIT"
+PR="r0"
+
+LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58 \
+                    file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
+
+
+DEPENDS += "task-core-gtk-directfb"
+
+RDEPENDS_${PN} += " \
+	task-core-gtk-directfb-base \
+	"
+
+inherit core-image
+
+IMAGE_INSTALL += "\
+	${POKY_BASE_INSTALL} \
+	task-core-basic \
+	module-init-tools \
+	task-core-gtk-directfb-base \
+"