[yocto] Which is the best strategy to customize Qt configuration?

Pampolini Matteo matteo.pampolini at selex-es.com
Mon Jul 13 09:18:55 PDT 2015


Thanks Paul.

It was also my idea to override QT_PHONON variable inside my .bbappend file, but the fact is that this does not prevent BitBake from downloading and compiling glib/gstreamer.

In my first hack, when I modified the original qt.inc file, I had to make both changes, DEPENDS variable for BitBake and QT_PHONON for Qt itself.

As I wrote in my answer to Leonardo the issue is: how can I override the value of DEPENDS variable in my own layer, if possible?

Matteo
________________________________________
From: Paul Eggleton <paul.eggleton at linux.intel.com>
Sent: Monday, July 13, 2015 6:05 PM
To: Pampolini Matteo; Leonardo Sandoval
Cc: yocto at yoctoproject.org
Subject: Re: [yocto] Which is the best strategy to customize Qt configuration?

On Monday 13 July 2015 10:47:45 Leonardo Sandoval wrote:
> On 07/13/2015 09:23 AM, Pampolini Matteo wrote:
> > I'm involved in a project that requires a very customized Linux
> > installation and I think Yocto is the best choice for this purpose.
> >
> > I was able to build and run some images from Poky 1.8 reference and now
> > I'm trying to create my own one, with a custom configuration of Qt for
> > X11.
> >
> > In particular I would like to remove Phonon support to avoid
> > GStreamer/GLib dependencies: the quickest (and bad) solution was to
> > modify meta/recipes-qt/qt4/qt4.inc file and it works, of course.
> >
> > But in order to follow Yocto guidelines and learn the right approach, I
> > would like to create a new layer and, with proper use of .bbappend files,
> > create my own Qt custom configuration.
>
> For this point, you can create a new layer and inside a new image file.
> This image will basically inherit the one you want, then you need to
> remove the specific recipe. A possible way to remove it is though
> IMAGE_INSTALL_remove = "<pkg to remove">

That doesn't really help with Qt configuration - you can't change any of that
at the image level.

The way to set this properly is to look at how qt4.inc is structured - note
that the -phonon / -no-phonon option for example is set through a variable
QT_PHONON. There are several different ways you could set this:

1) Use a bbappend on the qt4-x11-free recipe that sets
QT_PHONON = "-no-phonon"

2) Set it from your distro config (or some include file from there) using
QT_PHONON_pn-qt4-x11-free = "-no-phonon"

3) Since this variable specifically is being set in the .inc file with ?= and is
reasonably well namespaced (i.e. has a name which is unlikely to clash with
variables used in other recipes for a different purpose), you could
alternatively just set it from your distro config simply as
QT_PHONON = "-no-phonon"

Cheers,
Paul

--

Paul Eggleton
Intel Open Source Technology Centre



More information about the yocto mailing list