All of lore.kernel.org
 help / color / mirror / Atom feed
* Is it possible to add machine specific changes in a separate custom layer?
@ 2013-09-23 16:40 Felix01 Fischer
  2013-09-24  8:52 ` Paul Eggleton
  0 siblings, 1 reply; 6+ messages in thread
From: Felix01 Fischer @ 2013-09-23 16:40 UTC (permalink / raw)
  To: yocto

[-- Attachment #1: Type: text/plain, Size: 1813 bytes --]

Hello,
My goal is to build a custom-layer which supports 2 devices building on 
top of the meta-intel and meta-ivi layer without changing anything except 
my meta-custom layer.

Is it possible to have machine specific changes in a separate layer 
building on top of  another layer?
I want to costumise meta-intel/meta-crownbay and 
meta-intel/meta-chiefriver without changing something inside the 
meta-intel layer.
My goal is to have modifications for the meta-intel layer in a meta-custom 
layer, which only get considered if a certain MACHINE ?= "XXXX"  (crownbay 
or chiefriver) from the meta-intel layer is set.
Is this possible?
I have the same question regarding DISTRO. I want some changes to be 
considered if DISTRO = poky and some other changes when DISTRO = 
poky-ivi-systemd.
Is it possible to maintain these modifications in ONE custom layer or do I 
need to have seperate layers (one for poky, one for poky-ivi-systemd and 
machine specific changes inside the meta-intel layer)?
I would like to change nothing in the "official" yocto-layers and handle 
everything in a custom layer, but right now I don't know how to do that.

Regards,
Felix




Viele Grüße

Felix Fischer

Studentischer Mitarbeiter (VC-D1)
Vehicle Cockpit Electronics Devices

IAV GmbH
Carnotstr. 1
10587 BERLIN
GERMANY

Phone: +49 30 39978-9540
Fax:      +49 30 39978-9411
E-Mail:  <mailto:felix01.fischer@iav.de>
Internet: http://www.iav.com

Sitz/Registered Office: Berlin, 
Registergericht/Registration Court: Amtsgericht Charlottenburg, 
Registernummer/Company Registration Number: HRB 21 280, 
Geschäftsführer/Managing Directors: Kurt Blumenröder, Michael Schubert, 
Dr. Rüdiger Goyk
Vorsitzender des Aufsichtsrates/Chairman of the Supervisory Board: Dr. 
Harald Ludanek

[-- Attachment #2: Type: text/html, Size: 2348 bytes --]

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

* Re: Is it possible to add machine specific changes in a separate custom layer?
  2013-09-23 16:40 Is it possible to add machine specific changes in a separate custom layer? Felix01 Fischer
@ 2013-09-24  8:52 ` Paul Eggleton
  2013-09-25  8:19   ` Antwort: " Felix01 Fischer
  0 siblings, 1 reply; 6+ messages in thread
From: Paul Eggleton @ 2013-09-24  8:52 UTC (permalink / raw)
  To: Felix01 Fischer; +Cc: yocto

Hi Felix,

On Monday 23 September 2013 18:40:19 Felix01 Fischer wrote:
> My goal is to build a custom-layer which supports 2 devices building on
> top of the meta-intel and meta-ivi layer without changing anything except
> my meta-custom layer.
> 
> Is it possible to have machine specific changes in a separate layer
> building on top of  another layer?
> I want to costumise meta-intel/meta-crownbay and
> meta-intel/meta-chiefriver without changing something inside the
> meta-intel layer.
> My goal is to have modifications for the meta-intel layer in a meta-custom
> layer, which only get considered if a certain MACHINE ?= "XXXX"  (crownbay
> or chiefriver) from the meta-intel layer is set.
> Is this possible?

This is definitely possible - the key is to make use of bbappends and machine
overrides. Append files are covered here:

http://www.yoctoproject.org/docs/current/dev-manual/dev-manual.html#using-bbappend-files

Overrides effectively make an assignment statement apply only when the
specified override appears in the value of the OVERRIDES variable. For
example:

VARIABLENAME = "the default value"
VARIABLENAME_crownbay = "value specific to crownbay machine"

You can use append/prepend to add to the variable value instead of just
setting it:

ANOTHERVARIABLE_append_chiefriver = " appended only for chiefriver"
ANOTHERVARIABLE_prepend_crownbay = "prepended only for crownbay "

By default, the value of OVERRIDES includes the value of MACHINE, DISTRO, etc.
If you run bitbake -e | less and then search (with /) for OVERRIDES= you can
see how how OVERRIDES is constructed.

> I have the same question regarding DISTRO. I want some changes to be
> considered if DISTRO = poky and some other changes when DISTRO =
> poky-ivi-systemd.

Same as above only you'd be using the distro name as the override e.g.

SOMETHING_append_poky = " whatever poky-specific additions are needed"

> Is it possible to maintain these modifications in ONE custom layer or do I
> need to have seperate layers (one for poky, one for poky-ivi-systemd and
> machine specific changes inside the meta-intel layer)?

You don't have to, but generally we recommend keeping the machine
customisations separate from policy (distro) customisations. This can make
things easier if you have to change the machine later.

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre


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

* Antwort: Re: Is it possible to add machine specific changes in a separate custom layer?
  2013-09-24  8:52 ` Paul Eggleton
@ 2013-09-25  8:19   ` Felix01 Fischer
  2013-09-25 12:33     ` Paul Eggleton
  0 siblings, 1 reply; 6+ messages in thread
From: Felix01 Fischer @ 2013-09-25  8:19 UTC (permalink / raw)
  To: Paul Eggleton; +Cc: yocto

[-- Attachment #1: Type: text/plain, Size: 3428 bytes --]

Great! Thank you Paul!
I didn't get the "Variable_$machine" part from the documentation.

One Question: I want to add changes to a %MACHINE.conf via my layer
(to be specific: I want to add "APPEND += "video=LVDS-1:d" to 
meta-intel/meta-chiefriver/conf/machine/chiefriver.conf)
Is this also possible via a separate layer? Once again, I didn't find out 
via the documentation. ATM I have to modify the chiefriver.conf directly 
:-(
Thank you for your help so far,
Regards,
Felix

Paul Eggleton <paul.eggleton@linux.intel.com> schrieb am 24.09.2013 
10:52:00:

> Von: Paul Eggleton <paul.eggleton@linux.intel.com>
> An: Felix01 Fischer <felix01.fischer@iav.de>, 
> Kopie: yocto@yoctoproject.org
> Datum: 24.09.2013 10:52
> Betreff: Re: [yocto] Is it possible to add machine specific changes 
> in a separate custom layer?
> 
> Hi Felix,
> 
> On Monday 23 September 2013 18:40:19 Felix01 Fischer wrote:
> > My goal is to build a custom-layer which supports 2 devices building 
on
> > top of the meta-intel and meta-ivi layer without changing anything 
except
> > my meta-custom layer.
> > 
> > Is it possible to have machine specific changes in a separate layer
> > building on top of  another layer?
> > I want to costumise meta-intel/meta-crownbay and
> > meta-intel/meta-chiefriver without changing something inside the
> > meta-intel layer.
> > My goal is to have modifications for the meta-intel layer in a 
meta-custom
> > layer, which only get considered if a certain MACHINE ?= "XXXX" 
(crownbay
> > or chiefriver) from the meta-intel layer is set.
> > Is this possible?
> 
> This is definitely possible - the key is to make use of bbappends and 
machine
> overrides. Append files are covered here:
> 
> http://www.yoctoproject.org/docs/current/dev-manual/dev-
> manual.html#using-bbappend-files
> 
> Overrides effectively make an assignment statement apply only when the
> specified override appears in the value of the OVERRIDES variable. For
> example:
> 
> VARIABLENAME = "the default value"
> VARIABLENAME_crownbay = "value specific to crownbay machine"
> 
> You can use append/prepend to add to the variable value instead of just
> setting it:
> 
> ANOTHERVARIABLE_append_chiefriver = " appended only for chiefriver"
> ANOTHERVARIABLE_prepend_crownbay = "prepended only for crownbay "
> 
> By default, the value of OVERRIDES includes the value of MACHINE, 
DISTRO, etc.
> If you run bitbake -e | less and then search (with /) for OVERRIDES= you 
can
> see how how OVERRIDES is constructed.
> 
> > I have the same question regarding DISTRO. I want some changes to be
> > considered if DISTRO = poky and some other changes when DISTRO =
> > poky-ivi-systemd.
> 
> Same as above only you'd be using the distro name as the override e.g.
> 
> SOMETHING_append_poky = " whatever poky-specific additions are needed"
> 
> > Is it possible to maintain these modifications in ONE custom layer or 
do I
> > need to have seperate layers (one for poky, one for poky-ivi-systemd 
and
> > machine specific changes inside the meta-intel layer)?
> 
> You don't have to, but generally we recommend keeping the machine
> customisations separate from policy (distro) customisations. This can 
make
> things easier if you have to change the machine later.
> 
> Cheers,
> Paul
> 
> -- 
> 
> Paul Eggleton
> Intel Open Source Technology Centre

[-- Attachment #2: Type: text/html, Size: 4555 bytes --]

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

* Re: Antwort: Re: Is it possible to add machine specific changes in a separate custom layer?
  2013-09-25  8:19   ` Antwort: " Felix01 Fischer
@ 2013-09-25 12:33     ` Paul Eggleton
  2013-09-26 10:59       ` Antwort: " Felix01 Fischer
  0 siblings, 1 reply; 6+ messages in thread
From: Paul Eggleton @ 2013-09-25 12:33 UTC (permalink / raw)
  To: Felix01 Fischer; +Cc: yocto

Hi Felix,

On Wednesday 25 September 2013 10:19:41 Felix01 Fischer wrote:
> One Question: I want to add changes to a %MACHINE.conf via my layer
> (to be specific: I want to add "APPEND += "video=LVDS-1:d" to
> meta-intel/meta-chiefriver/conf/machine/chiefriver.conf)
> Is this also possible via a separate layer? Once again, I didn't find out
> via the documentation. ATM I have to modify the chiefriver.conf directly

Really the way to do this kind of thing is to have your own custom distro 
config. If you're doing anything beyond the basics you should probably have one 
anyway. Generally this kind of thing is usually about how you are using the 
machine as opposed to supporting the machine itself, so it's more of a distro 
policy type situation.

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre


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

* Antwort: Re: Antwort: Re: Is it possible to add machine specific changes in a separate custom layer?
  2013-09-25 12:33     ` Paul Eggleton
@ 2013-09-26 10:59       ` Felix01 Fischer
  2013-09-26 11:21         ` Paul Eggleton
  0 siblings, 1 reply; 6+ messages in thread
From: Felix01 Fischer @ 2013-09-26 10:59 UTC (permalink / raw)
  To: Paul Eggleton; +Cc: yocto

[-- Attachment #1: Type: text/plain, Size: 1667 bytes --]

Hi Paul
Another follow up Question :-)

Paul Eggleton <paul.eggleton@linux.intel.com> schrieb am 25.09.2013 
14:33:04:

> Von: Paul Eggleton <paul.eggleton@linux.intel.com>
> An: Felix01 Fischer <felix01.fischer@iav.de>, 
> Kopie: yocto@yoctoproject.org
> Datum: 25.09.2013 14:33
> Betreff: Re: Antwort: Re: [yocto] Is it possible to add machine 
> specific changes in a separate custom layer?
> 
> Hi Felix,
> 
> On Wednesday 25 September 2013 10:19:41 Felix01 Fischer wrote:
> > One Question: I want to add changes to a %MACHINE.conf via my layer
> > (to be specific: I want to add "APPEND += "video=LVDS-1:d" to
> > meta-intel/meta-chiefriver/conf/machine/chiefriver.conf)
> > Is this also possible via a separate layer? Once again, I didn't find 
out
> > via the documentation. ATM I have to modify the chiefriver.conf 
directly
> 
> Really the way to do this kind of thing is to have your own custom 
distro 
> config. If you're doing anything beyond the basics you should 
> probably have one 
> anyway. Generally this kind of thing is usually about how you are using 
the 
> machine as opposed to supporting the machine itself, so it's more ofa 
distro 
> policy type situation.

Is it possible to refer to a whole BSP?
For example, like the cronwbay.conf requires tune-atom.inc.
I would like to require the whole meta-crownbay BSP layer.
I tried this the naive way with a custom "/conf/machine/$MACHINE.conf and 
added
"require xxxxx/meta-crownbay/conf/machine/crownbay.conf" but that didn't 
worked.


> 
> Cheers,
> Paul
> 
> -- 
> 
> Paul Eggleton
> Intel Open Source Technology Centre

Regards,
Felix

[-- Attachment #2: Type: text/html, Size: 2258 bytes --]

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

* Re: Antwort: Re: Antwort: Re: Is it possible to add machine specific changes in a separate custom layer?
  2013-09-26 10:59       ` Antwort: " Felix01 Fischer
@ 2013-09-26 11:21         ` Paul Eggleton
  0 siblings, 0 replies; 6+ messages in thread
From: Paul Eggleton @ 2013-09-26 11:21 UTC (permalink / raw)
  To: Felix01 Fischer; +Cc: yocto

Hi Felix,

On Thursday 26 September 2013 12:59:24 Felix01 Fischer wrote:
> Is it possible to refer to a whole BSP?
> For example, like the cronwbay.conf requires tune-atom.inc.
> I would like to require the whole meta-crownbay BSP layer.
> I tried this the naive way with a custom "/conf/machine/$MACHINE.conf and
> added
> "require xxxxx/meta-crownbay/conf/machine/crownbay.conf" but that didn't
> worked.

This should work though:

require conf/machine/crownbay.conf

(Since "require" searches for files using BBPATH which will point to the base 
of each layer).

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre


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

end of thread, other threads:[~2013-09-26 11:21 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-23 16:40 Is it possible to add machine specific changes in a separate custom layer? Felix01 Fischer
2013-09-24  8:52 ` Paul Eggleton
2013-09-25  8:19   ` Antwort: " Felix01 Fischer
2013-09-25 12:33     ` Paul Eggleton
2013-09-26 10:59       ` Antwort: " Felix01 Fischer
2013-09-26 11:21         ` Paul Eggleton

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.