All of lore.kernel.org
 help / color / mirror / Atom feed
* patching an .inc file?
@ 2020-03-28 21:42 Derek Dresser
  2020-03-28 21:59 ` [yocto] " Konrad Weihmann
  0 siblings, 1 reply; 6+ messages in thread
From: Derek Dresser @ 2020-03-28 21:42 UTC (permalink / raw)
  To: Yocto discussion list

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

Hello,

I am trying to update a build for a custom board based on the Xilinx
zcu102-zynqmp (using meta-xilinx)  to 'zeus' and am getting the following
error message:

Toolchain tunings invalid:
Tuning 'microblaze' has the following errors:
Feature 'v11.0' is not defined.


I have tracked this down to the following file:

poky/meta/conf/machine/include/microblaze/feature-microblaze-versions.inc

Editing this file allows me to build without errors.  I'd like to apply a
patch to this file (or override the file with an edited version.)

diff --git
meta/conf/machine/include/microblaze/feature-microblaze-versions.inc
meta/conf/machine/include/microblaze/feature-microblaze-versions.inc
index 955674fff9..3221e2aab7 100644
--- meta/conf/machine/include/microblaze/feature-microblaze-versions.inc
+++ meta/conf/machine/include/microblaze/feature-microblaze-versions.inc
@@ -44,6 +44,7 @@ TUNEVALID[v9.4]  = "MicroBlaze version 9.4"
 TUNEVALID[v9.5]  = "MicroBlaze version 9.5"
 TUNEVALID[v9.6]  = "MicroBlaze version 9.6"
 TUNEVALID[v10.0] = "MicroBlaze version 10.0"
+TUNEVALID[v11.0] = "MicroBlaze version 11.0"

 # Version conflict matrix
 TUNECONFLICTS[v8.00] = ""
@@ -60,6 +61,7 @@ TUNECONFLICTS[v9.4]  = "v8.00 v8.10 v8.20 v8.30 v8.40
v8.50 v9.0 v9.1 v9.2 v9.3"
 TUNECONFLICTS[v9.5]  = "v8.00 v8.10 v8.20 v8.30 v8.40 v8.50 v9.0 v9.1 v9.2
v9.3 v9.4"
 TUNECONFLICTS[v9.6]  = "v8.00 v8.10 v8.20 v8.30 v8.40 v8.50 v9.0 v9.1 v9.2
v9.3 v9.4 v9.5"
 TUNECONFLICTS[v10.0] = "v8.00 v8.10 v8.20 v8.30 v8.40 v8.50 v9.0 v9.1 v9.2
v9.3 v9.4 v9.5 v9.6"
+TUNECONFLICTS[v11.0] = "v8.00 v8.10 v8.20 v8.30 v8.40 v8.50 v9.0 v9.1 v9.2
v9.3 v9.4 v9.5 v9.6 v10.0"

 # Version flags
 TUNE_CCARGS += "-mcpu=${@microblaze_current_version(d, True)}"

I know how to apply a patch against a recipe source file, but not this
toolchain tuning include file.   How can I accomplish this without editing
the files in openembedded-core?   I'd like to override or patch this in my
own layer.

Thanks,
Derek

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

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

* Re: [yocto] patching an .inc file?
  2020-03-28 21:42 patching an .inc file? Derek Dresser
@ 2020-03-28 21:59 ` Konrad Weihmann
  2020-03-28 22:12   ` Alejandro Hernandez
  2020-03-29 13:38   ` Derek Dresser
  0 siblings, 2 replies; 6+ messages in thread
From: Konrad Weihmann @ 2020-03-28 21:59 UTC (permalink / raw)
  To: Derek Dresser; +Cc: yocto

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

What you could do is to override the file in a layer with higher priority.
Just create the same file under the same path (e.g. 
<your-layer>/conf/machine/include/microblaze/feature-microblaze-versions.inc) 
and apply the changes there - this should help for now.

But be aware that this way could lead to trouble in case the overridden 
file does change on an update - so use with caution.
Unfortunately you can't BBMASK the original inc file, you have to rely 
on layer prio.

On 28.03.20 22:42, Derek Dresser wrote:
> Hello,
>
> I am trying to update a build for a custom board based on the Xilinx 
> zcu102-zynqmp (using meta-xilinx)  to 'zeus' and am getting the 
> following error message:
>
>     Toolchain tunings invalid:
>     Tuning 'microblaze' has the following errors:
>     Feature 'v11.0' is not defined.
>
>
> I have tracked this down to the following file:
>
>     poky/meta/conf/machine/include/microblaze/feature-microblaze-versions.inc
>
> Editing this file allows me to build without errors.  I'd like to 
> apply a patch to this file (or override the file with an edited version.)
>
>     diff --git
>     meta/conf/machine/include/microblaze/feature-microblaze-versions.inc
>     meta/conf/machine/include/microblaze/feature-microblaze-versions.inc
>     index 955674fff9..3221e2aab7 100644
>     ---
>     meta/conf/machine/include/microblaze/feature-microblaze-versions.inc
>     +++
>     meta/conf/machine/include/microblaze/feature-microblaze-versions.inc
>     @@ -44,6 +44,7 @@ TUNEVALID[v9.4]  = "MicroBlaze version 9.4"
>      TUNEVALID[v9.5]  = "MicroBlaze version 9.5"
>      TUNEVALID[v9.6]  = "MicroBlaze version 9.6"
>      TUNEVALID[v10.0] = "MicroBlaze version 10.0"
>     +TUNEVALID[v11.0] = "MicroBlaze version 11.0"
>
>      # Version conflict matrix
>      TUNECONFLICTS[v8.00] = ""
>     @@ -60,6 +61,7 @@ TUNECONFLICTS[v9.4]  = "v8.00 v8.10 v8.20 v8.30
>     v8.40 v8.50 v9.0 v9.1 v9.2 v9.3"
>      TUNECONFLICTS[v9.5]  = "v8.00 v8.10 v8.20 v8.30 v8.40 v8.50 v9.0
>     v9.1 v9.2 v9.3 v9.4"
>      TUNECONFLICTS[v9.6]  = "v8.00 v8.10 v8.20 v8.30 v8.40 v8.50 v9.0
>     v9.1 v9.2 v9.3 v9.4 v9.5"
>      TUNECONFLICTS[v10.0] = "v8.00 v8.10 v8.20 v8.30 v8.40 v8.50 v9.0
>     v9.1 v9.2 v9.3 v9.4 v9.5 v9.6"
>     +TUNECONFLICTS[v11.0] = "v8.00 v8.10 v8.20 v8.30 v8.40 v8.50 v9.0
>     v9.1 v9.2 v9.3 v9.4 v9.5 v9.6 v10.0"
>
>      # Version flags
>      TUNE_CCARGS += "-mcpu=${@microblaze_current_version(d, True)}"
>
> I know how to apply a patch against a recipe source file, but not this 
> toolchain tuning include file.   How can I accomplish this without 
> editing the files in openembedded-core?   I'd like to override or 
> patch this in my own layer.
>
> Thanks,
> Derek
>
> 

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

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

* Re: [yocto] patching an .inc file?
  2020-03-28 21:59 ` [yocto] " Konrad Weihmann
@ 2020-03-28 22:12   ` Alejandro Hernandez
  2020-03-29 13:38   ` Derek Dresser
  1 sibling, 0 replies; 6+ messages in thread
From: Alejandro Hernandez @ 2020-03-28 22:12 UTC (permalink / raw)
  To: Konrad Weihmann; +Cc: Derek Dresser, yocto, jaewon

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

Hey Derek,

I would advise against this, inc files aren't supposed to be appended to,
priorities would work, adding TUNEVALID on your machine conf is also
possible, but I'd say those are both temporary solutions, you might also
just wait a little bit until they release their 2020.x releases already
compatible with Zeus.

Alejandro

On Sat, 28 Mar 2020 at 15:00, Konrad Weihmann <kweihmann@outlook.com> wrote:

> What you could do is to override the file in a layer with higher priority.
> Just create the same file under the same path (e.g.
> <your-layer>/conf/machine/include/microblaze/feature-microblaze-versions.inc)
> and apply the changes there - this should help for now.
>
> But be aware that this way could lead to trouble in case the overridden
> file does change on an update - so use with caution.
> Unfortunately you can't BBMASK the original inc file, you have to rely on
> layer prio.
> On 28.03.20 22:42, Derek Dresser wrote:
>
> Hello,
>
> I am trying to update a build for a custom board based on the Xilinx
> zcu102-zynqmp (using meta-xilinx)  to 'zeus' and am getting the following
> error message:
>
> Toolchain tunings invalid:
> Tuning 'microblaze' has the following errors:
> Feature 'v11.0' is not defined.
>
>
> I have tracked this down to the following file:
>
> poky/meta/conf/machine/include/microblaze/feature-microblaze-versions.inc
>
> Editing this file allows me to build without errors.  I'd like to apply a
> patch to this file (or override the file with an edited version.)
>
> diff --git
> meta/conf/machine/include/microblaze/feature-microblaze-versions.inc
> meta/conf/machine/include/microblaze/feature-microblaze-versions.inc
> index 955674fff9..3221e2aab7 100644
> --- meta/conf/machine/include/microblaze/feature-microblaze-versions.inc
> +++ meta/conf/machine/include/microblaze/feature-microblaze-versions.inc
> @@ -44,6 +44,7 @@ TUNEVALID[v9.4]  = "MicroBlaze version 9.4"
>  TUNEVALID[v9.5]  = "MicroBlaze version 9.5"
>  TUNEVALID[v9.6]  = "MicroBlaze version 9.6"
>  TUNEVALID[v10.0] = "MicroBlaze version 10.0"
> +TUNEVALID[v11.0] = "MicroBlaze version 11.0"
>
>  # Version conflict matrix
>  TUNECONFLICTS[v8.00] = ""
> @@ -60,6 +61,7 @@ TUNECONFLICTS[v9.4]  = "v8.00 v8.10 v8.20 v8.30 v8.40
> v8.50 v9.0 v9.1 v9.2 v9.3"
>  TUNECONFLICTS[v9.5]  = "v8.00 v8.10 v8.20 v8.30 v8.40 v8.50 v9.0 v9.1
> v9.2 v9.3 v9.4"
>  TUNECONFLICTS[v9.6]  = "v8.00 v8.10 v8.20 v8.30 v8.40 v8.50 v9.0 v9.1
> v9.2 v9.3 v9.4 v9.5"
>  TUNECONFLICTS[v10.0] = "v8.00 v8.10 v8.20 v8.30 v8.40 v8.50 v9.0 v9.1
> v9.2 v9.3 v9.4 v9.5 v9.6"
> +TUNECONFLICTS[v11.0] = "v8.00 v8.10 v8.20 v8.30 v8.40 v8.50 v9.0 v9.1
> v9.2 v9.3 v9.4 v9.5 v9.6 v10.0"
>
>  # Version flags
>  TUNE_CCARGS += "-mcpu=${@microblaze_current_version(d, True)}"
>
> I know how to apply a patch against a recipe source file, but not this
> toolchain tuning include file.   How can I accomplish this without editing
> the files in openembedded-core?   I'd like to override or patch this in my
> own layer.
>
> Thanks,
> Derek
>
> 
>

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

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

* Re: patching an .inc file?
  2020-03-28 21:59 ` [yocto] " Konrad Weihmann
  2020-03-28 22:12   ` Alejandro Hernandez
@ 2020-03-29 13:38   ` Derek Dresser
  2020-03-29 13:44     ` [yocto] " Konrad Weihmann
  1 sibling, 1 reply; 6+ messages in thread
From: Derek Dresser @ 2020-03-29 13:38 UTC (permalink / raw)
  To: yocto

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

Konrad,
Thanks for the reply.  I understand this is temporary until the overridden file is updated.  I appreciate you pointing out using layer priority as an option.  Unfortunately, I can't seem to get this to work using priority.  I'm afraid I might be missing something.  I will try to illustrate with an example.

Here are my layers, note "meta-acadia" is priority 16.  This is where the override file is.  My understanding is a higher priority takes precedence.  I did try setting my layer priority to 4, but had the same results.

pokyuser@9cf512f73142:/yocto-src/poky$ bitbake-layers show-layers
NOTE: Starting bitbake server...
layer                 path                                      priority
==========================================================================
meta                  /yocto-src/poky/meta                      5
meta-poky             /yocto-src/poky/meta-poky                 5
meta-yocto-bsp        /yocto-src/poky/meta-yocto-bsp            5
meta-oe               /yocto-src/poky/meta-openembedded/meta-oe  6
meta-perl             /yocto-src/poky/meta-openembedded/meta-perl  6
meta-python           /yocto-src/poky/meta-openembedded/meta-python  7
meta-networking       /yocto-src/poky/meta-openembedded/meta-networking  5
meta-filesystems      /yocto-src/poky/meta-openembedded/meta-filesystems  6
meta-security         /yocto-src/poky/meta-security             8
meta-xilinx-bsp       /yocto-src/poky/meta-xilinx/meta-xilinx-bsp  5
meta-xilinx-standalone  /yocto-src/poky/meta-xilinx/meta-xilinx-standalone  5
meta-acadia           /yocto-src/poky/meta-acadia               16
meta-idexx-distro     /yocto-src/poky/meta-company-distro         6
meta-neural-network   /yocto-src/poky/meta-neural-network       7
meta-selinux          /yocto-src/poky/meta-selinux              5
meta-cgl-common       /yocto-src/poky/meta-cgl/meta-cgl-common  7

and the override file diff (same path within my layer)

pokyuser@9cf512f73142:/yocto-src/poky$ diff meta/conf/machine/include/microblaze/feature-microblaze-versions.inc meta-acadia/conf/machine/include/microblaze/feature-microblaze-versions.inc
46a47
> TUNEVALID[v11.0] = "MicroBlaze version 11.0"
62a64
> TUNECONFLICTS[v11.0] = "v8.00 v8.10 v8.20 v8.30 v8.40 v8.50 v9.0 v9.1 v9.2 v9.3 v9.4 v9.5 v9.6 v10.0"

here's the error

Toolchain tunings invalid:
Tuning 'microblaze' has the following errors:
Feature 'v11.0' is not defined.

However, if I copy my override file into the "meta" layer, I can build without errors.

pokyuser@9cf512f73142:/yocto-src/poky$ cp meta-acadia/conf/machine/include/microblaze/feature-microblaze-versions.inc meta/conf/machine/include/microblaze/feature-microblaze-versions.inc

Is there something else I'm missing to make the priorty override work?

Thank you.

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

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

* Re: [yocto] patching an .inc file?
  2020-03-29 13:38   ` Derek Dresser
@ 2020-03-29 13:44     ` Konrad Weihmann
  2020-03-29 14:31       ` Derek Dresser
  0 siblings, 1 reply; 6+ messages in thread
From: Konrad Weihmann @ 2020-03-29 13:44 UTC (permalink / raw)
  To: yocto

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

Hi Derek,

or maybe I'm mistaken about the layer priority and it's the order within 
the bblayer.conf that does determine that (I tend to forget which one 
applies to what stage).

Maybe you could try to move your layer to the end of the bblayer.conf 
list (actually that was the case when I tested it yesterday) and see if 
that is working for you.

As pointed out in the other reply - only do this as a matter of last 
resort and if there is no other possibility left.

On 29.03.20 15:38, Derek Dresser wrote:
> Konrad,
> Thanks for the reply.  I understand this is temporary until the 
> overridden file is updated.  I appreciate you pointing out using layer 
> priority as an option.  Unfortunately, I can't seem to get this to 
> work using priority.  I'm afraid I might be missing something.  I will 
> try to illustrate with an example.
>
> Here are my layers, note "meta-acadia" is priority 16.  This is where 
> the override file is.  My understanding is a higher priority takes 
> precedence.  I did try setting my layer priority to 4, but had the 
> same results.
>
> pokyuser@9cf512f73142:/yocto-src/poky$ bitbake-layers show-layers
> NOTE: Starting bitbake server...
> layer                 path                               priority
> ==========================================================================
> meta /yocto-src/poky/meta                      5
> meta-poky  /yocto-src/poky/meta-poky                 5
> meta-yocto-bsp /yocto-src/poky/meta-yocto-bsp            5
> meta-oe  /yocto-src/poky/meta-openembedded/meta-oe  6
> meta-perl  /yocto-src/poky/meta-openembedded/meta-perl  6
> meta-python  /yocto-src/poky/meta-openembedded/meta-python  7
> meta-networking  /yocto-src/poky/meta-openembedded/meta-networking  5
> meta-filesystems /yocto-src/poky/meta-openembedded/meta-filesystems  6
> meta-security  /yocto-src/poky/meta-security             8
> meta-xilinx-bsp  /yocto-src/poky/meta-xilinx/meta-xilinx-bsp  5
> meta-xilinx-standalone 
> /yocto-src/poky/meta-xilinx/meta-xilinx-standalone  5
> meta-acadia  /yocto-src/poky/meta-acadia               16
> meta-idexx-distro  /yocto-src/poky/meta-company-distro         6
> meta-neural-network  /yocto-src/poky/meta-neural-network       7
> meta-selinux /yocto-src/poky/meta-selinux              5
> meta-cgl-common  /yocto-src/poky/meta-cgl/meta-cgl-common  7
>
> and the override file diff (same path within my layer)
>
> pokyuser@9cf512f73142:/yocto-src/poky$ diff 
> meta/conf/machine/include/microblaze/feature-microblaze-versions.inc 
> meta-acadia/conf/machine/include/microblaze/feature-microblaze-versions.inc
> 46a47
> > TUNEVALID[v11.0] = "MicroBlaze version 11.0"
> 62a64
> > TUNECONFLICTS[v11.0] = "v8.00 v8.10 v8.20 v8.30 v8.40 v8.50 v9.0 
> v9.1 v9.2 v9.3 v9.4 v9.5 v9.6 v10.0"
>
> here's the error
>
>     Toolchain tunings invalid:
> Tuning 'microblaze' has the following errors:
> Feature 'v11.0' is not defined.
>
> However, if I copy my override file into the "meta" layer, I can build 
> without errors.
>
> pokyuser@9cf512f73142:/yocto-src/poky$ cp 
> meta-acadia/conf/machine/include/microblaze/feature-microblaze-versions.inc 
> meta/conf/machine/include/microblaze/feature-microblaze-versions.inc
>
> Is there something else I'm missing to make the priorty override work?
>
> Thank you.
>
>
> 

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

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

* Re: patching an .inc file?
  2020-03-29 13:44     ` [yocto] " Konrad Weihmann
@ 2020-03-29 14:31       ` Derek Dresser
  0 siblings, 0 replies; 6+ messages in thread
From: Derek Dresser @ 2020-03-29 14:31 UTC (permalink / raw)
  To: yocto

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

Thanks again.

The ordering in the bblayers.conf file resolved the issue, but I needed to put my layer above the "meta" layer in the list.

I do understand that this is a temporary solution until the zeus branch of the meta later adds support for the new tools.  I'll be keeping an eye out for that.

Thanks for your help.

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

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

end of thread, other threads:[~2020-03-29 14:31 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-28 21:42 patching an .inc file? Derek Dresser
2020-03-28 21:59 ` [yocto] " Konrad Weihmann
2020-03-28 22:12   ` Alejandro Hernandez
2020-03-29 13:38   ` Derek Dresser
2020-03-29 13:44     ` [yocto] " Konrad Weihmann
2020-03-29 14:31       ` Derek Dresser

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.