oe-setup-builddir: create conf/multiconfig/ from TEMPLATECONF

Submitted by gr embeter on Sept. 16, 2020, 3:10 p.m. | Patch ID: 176568

Details

Message ID CAGFuAuz+8M62V2qkc5HutJZDDLXxacF2ajr-4wuZaOKqZ1i-nw@mail.gmail.com
State New
Headers show

Commit Message

gr embeter Sept. 16, 2020, 3:10 p.m.
Retrieve multiconfig automatically from meta-layer if it exists,
so that it is possible to use it "out-of-the-box".

Signed-off-by: Grygorii Tertychnyi <grygorii.tertychnyi@leica-geosystems.com>
---
 scripts/oe-setup-builddir | 4 ++++
 1 file changed, 4 insertions(+)

Patch hide | download patch | download mbox

diff --git a/scripts/oe-setup-builddir b/scripts/oe-setup-builddir
index 30eaa8efbe1f..0077c13110b9 100755
--- a/scripts/oe-setup-builddir
+++ b/scripts/oe-setup-builddir
@@ -65,6 +65,7 @@  if [ -n "$TEMPLATECONF" ]; then
     OECORELAYERCONF="$TEMPLATECONF/bblayers.conf.sample"
     OECORELOCALCONF="$TEMPLATECONF/local.conf.sample"
     OECORENOTESCONF="$TEMPLATECONF/conf-notes.txt"
+    OECOREMULTICONF="$TEMPLATECONF/multiconfig"
 fi

 unset SHOWYPDOC
@@ -80,6 +81,9 @@  for more information as common configuration options
are commented.

 EOM
     cp -f $OECORELOCALCONF "$BUILDDIR/conf/local.conf"
+    if [ -d "$OECOREMULTICONF" ]; then
+        cp -af -t "$BUILDDIR/conf" "$OECOREMULTICONF"
+    fi
     SHOWYPDOC=yes
 fi

Comments

Christopher Larson Sept. 16, 2020, 3:30 p.m.
Why copy this from TEMPLATECONF when they can be supplied by any layer in
your BBLAYERS?

On Wed, Sep 16, 2020 at 8:10 AM gr embeter <grembeter@gmail.com> wrote:

> Retrieve multiconfig automatically from meta-layer if it exists,
> so that it is possible to use it "out-of-the-box".
>
> Signed-off-by: Grygorii Tertychnyi <
> grygorii.tertychnyi@leica-geosystems.com>
> ---
>  scripts/oe-setup-builddir | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/scripts/oe-setup-builddir b/scripts/oe-setup-builddir
> index 30eaa8efbe1f..0077c13110b9 100755
> --- a/scripts/oe-setup-builddir
> +++ b/scripts/oe-setup-builddir
> @@ -65,6 +65,7 @@ if [ -n "$TEMPLATECONF" ]; then
>      OECORELAYERCONF="$TEMPLATECONF/bblayers.conf.sample"
>      OECORELOCALCONF="$TEMPLATECONF/local.conf.sample"
>      OECORENOTESCONF="$TEMPLATECONF/conf-notes.txt"
> +    OECOREMULTICONF="$TEMPLATECONF/multiconfig"
>  fi
>
>  unset SHOWYPDOC
> @@ -80,6 +81,9 @@ for more information as common configuration options
> are commented.
>
>  EOM
>      cp -f $OECORELOCALCONF "$BUILDDIR/conf/local.conf"
> +    if [ -d "$OECOREMULTICONF" ]; then
> +        cp -af -t "$BUILDDIR/conf" "$OECOREMULTICONF"
> +    fi
>      SHOWYPDOC=yes
>  fi
>
> --
> 2.25.1
>
> 
>
>
gr embeter Sept. 16, 2020, 5:08 p.m.
> Why copy this from TEMPLATECONF when they can be supplied by any layer in your BBLAYERS?

At the stage of creating build directory I think it is logically to
use TEMPLATECONF both for "local.conf" and "multiconfig"
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#142623): https://lists.openembedded.org/g/openembedded-core/message/142623
Mute This Topic: https://lists.openembedded.org/mt/76889431/3617530
Group Owner: openembedded-core+owner@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [oe-patchwork@oe-patch.openembedded.org]
-=-=-=-=-=-=-=-=-=-=-=-
Mark Hatle Sept. 16, 2020, 10:42 p.m.
In my configurations, we refernce the multiconfig directories inside of our many
layers.  I definitely don't want the copied into the conf/* directory structure,
since I don't want users modifying the prebuilt ones.

--Mark

On 9/16/20 12:08 PM, gr embeter wrote:
>> Why copy this from TEMPLATECONF when they can be supplied by any layer in your BBLAYERS?
> 
> At the stage of creating build directory I think it is logically to
> use TEMPLATECONF both for "local.conf" and "multiconfig"
> 
> 
> 
> 
>
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#142624): https://lists.openembedded.org/g/openembedded-core/message/142624
Mute This Topic: https://lists.openembedded.org/mt/76889431/3617530
Group Owner: openembedded-core+owner@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [oe-patchwork@oe-patch.openembedded.org]
-=-=-=-=-=-=-=-=-=-=-=-
gr embeter Sept. 17, 2020, 6:39 a.m.
Just for the sake of knowing, how do you reference multiconfig directories?
Do you copy them manually to $BUILDDIR/conf after setup-env is done?
I mean when I run `bitbake multiconfig:configA:core-image-minimal'
there should be "$BUILDDIR/conf/multiconfig/configA.conf" file, right?

On Thu, Sep 17, 2020 at 12:42 AM Mark Hatle
<mark.hatle@kernel.crashing.org> wrote:
>
> In my configurations, we refernce the multiconfig directories inside of our many
> layers.  I definitely don't want the copied into the conf/* directory structure,
> since I don't want users modifying the prebuilt ones.
>
> --Mark
>
> On 9/16/20 12:08 PM, gr embeter wrote:
> >> Why copy this from TEMPLATECONF when they can be supplied by any layer in your BBLAYERS?
> >
> > At the stage of creating build directory I think it is logically to
> > use TEMPLATECONF both for "local.conf" and "multiconfig"
> >
> >
> >
> > 
> >
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#142630): https://lists.openembedded.org/g/openembedded-core/message/142630
Mute This Topic: https://lists.openembedded.org/mt/76889431/3617530
Group Owner: openembedded-core+owner@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [oe-patchwork@oe-patch.openembedded.org]
-=-=-=-=-=-=-=-=-=-=-=-
Mark Hatle Sept. 17, 2020, 8:28 p.m.
On 9/17/20 1:39 AM, gr embeter wrote:
> Just for the sake of knowing, how do you reference multiconfig directories?
> Do you copy them manually to $BUILDDIR/conf after setup-env is done?
> I mean when I run `bitbake multiconfig:configA:core-image-minimal'
> there should be "$BUILDDIR/conf/multiconfig/configA.conf" file, right?


My layer contains:

my_layer/conf/multiconfig/multiconfig1.conf
my_layer/conf/multiconfig/multiconfig2.conf
my_layer/conf/multiconfig/multiconfig3.conf
my_layer/conf/multiconfig/multiconfig4.conf

My build directory:

conf/bblayers.conf contains:

BBLAYERS ?= " \
  /scratch1/fray/xilinx/poky/meta \
  /scratch1/fray/xilinx/poky/meta-poky \
  /scratch1/fray/xilinx/poky/meta-yocto-bsp \
  /scratch1/fray/xilinx/my_layer \
  "

conf/local.conf contains:

BBMULTICONFIG = "multiconfig1 multiconfig2 multiconfig3 multiconfig4"

...

The user is responsible for providing their own BBMULTICONFIG.  However, if you
want to provide a default one, you can already including the BBMULTICONFIG for
the setting in your layer set.

--Mark


> On Thu, Sep 17, 2020 at 12:42 AM Mark Hatle
> <mark.hatle@kernel.crashing.org> wrote:
>>
>> In my configurations, we refernce the multiconfig directories inside of our many
>> layers.  I definitely don't want the copied into the conf/* directory structure,
>> since I don't want users modifying the prebuilt ones.
>>
>> --Mark
>>
>> On 9/16/20 12:08 PM, gr embeter wrote:
>>>> Why copy this from TEMPLATECONF when they can be supplied by any layer in your BBLAYERS?
>>>
>>> At the stage of creating build directory I think it is logically to
>>> use TEMPLATECONF both for "local.conf" and "multiconfig"
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> 
>>>
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#142638): https://lists.openembedded.org/g/openembedded-core/message/142638
Mute This Topic: https://lists.openembedded.org/mt/76889431/3617530
Group Owner: openembedded-core+owner@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [oe-patchwork@oe-patch.openembedded.org]
-=-=-=-=-=-=-=-=-=-=-=-