All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH] kernel-devicetree.bbclass: DTB make targets may contain path components
       [not found] <9a8e4137ac914b168091b71d755d54281530789529-12623-1-git-send-email-jonathan.haigh@arm.com>
@ 2018-07-06 10:28 ` Jonathan Haigh
  2018-07-06 21:25   ` Khem Raj
  0 siblings, 1 reply; 7+ messages in thread
From: Jonathan Haigh @ 2018-07-06 10:28 UTC (permalink / raw)
  To: openembedded-devel; +Cc: Jeremy Johnson

normalize_dtb() turns DTS and DTB paths into values that can be used as
make targets. These make targets sometimes contain some directory components
so 'basename' is not suitable for turning the paths into make targets -
we should only strip off leading directory components of the path up to
and including the 'dts' directory (if it exists). For example:
* 'overlays/at86rf233.dtbo' should not be changed.
* 'some/directory/path/dts/overlays/at86rf233.dtbo' should be changed to
  'overlays/at86rf233.dtbo' rather than just 'at86rf233.dtbo'

Signed-off-by: Jonathan Haigh <jonathan.haigh@arm.com>
---
 meta/classes/kernel-devicetree.bbclass | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/meta/classes/kernel-devicetree.bbclass b/meta/classes/kernel-devicetree.bbclass
index 9866d84..0ffa8e9 100644
--- a/meta/classes/kernel-devicetree.bbclass
+++ b/meta/classes/kernel-devicetree.bbclass
@@ -12,9 +12,10 @@ KERNEL_DEVICETREE_BUNDLE ?= "0"
 normalize_dtb () {
         DTB="$1"
         if echo ${DTB} | grep -q '/dts/'; then
-               bbwarn "${DTB} contains the full path to the the dts file, but only the dtb name should be used."
+               bbwarn "${DTB} contains the full path to the the dts file, but the path should be relative to the dts directory."
+               DTB=`echo "${DTB}" | sed 's,^.*/dts/,,'`
         fi
-       DTB=`basename ${DTB} | sed 's,\.dts$,.dtb,g'`
+       DTB=`echo "${DTB}" | sed 's,\.dts$,.dtb,g'`
         echo "${DTB}"
 }

--
2.7.4


IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.


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

* Re: [PATCH] kernel-devicetree.bbclass: DTB make targets may contain path components
  2018-07-06 10:28 ` [PATCH] kernel-devicetree.bbclass: DTB make targets may contain path components Jonathan Haigh
@ 2018-07-06 21:25   ` Khem Raj
  2018-07-07  1:13     ` akuster808
  0 siblings, 1 reply; 7+ messages in thread
From: Khem Raj @ 2018-07-06 21:25 UTC (permalink / raw)
  To: Jonathan Haigh; +Cc: Jeremy.Johnson, openembeded-devel

On Fri, Jul 6, 2018 at 12:02 PM Jonathan Haigh <Jonathan.Haigh@arm.com> wrote:
>
> normalize_dtb() turns DTS and DTB paths into values that can be used as
> make targets. These make targets sometimes contain some directory components
> so 'basename' is not suitable for turning the paths into make targets -
> we should only strip off leading directory components of the path up to
> and including the 'dts' directory (if it exists). For example:
> * 'overlays/at86rf233.dtbo' should not be changed.
> * 'some/directory/path/dts/overlays/at86rf233.dtbo' should be changed to
>   'overlays/at86rf233.dtbo' rather than just 'at86rf233.dtbo'
>
> Signed-off-by: Jonathan Haigh <jonathan.haigh@arm.com>
> ---
>  meta/classes/kernel-devicetree.bbclass | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/meta/classes/kernel-devicetree.bbclass b/meta/classes/kernel-devicetree.bbclass
> index 9866d84..0ffa8e9 100644
> --- a/meta/classes/kernel-devicetree.bbclass
> +++ b/meta/classes/kernel-devicetree.bbclass
> @@ -12,9 +12,10 @@ KERNEL_DEVICETREE_BUNDLE ?= "0"
>  normalize_dtb () {
>          DTB="$1"
>          if echo ${DTB} | grep -q '/dts/'; then
> -               bbwarn "${DTB} contains the full path to the the dts file, but only the dtb name should be used."
> +               bbwarn "${DTB} contains the full path to the the dts file, but the path should be relative to the dts directory."
> +               DTB=`echo "${DTB}" | sed 's,^.*/dts/,,'`
>          fi
> -       DTB=`basename ${DTB} | sed 's,\.dts$,.dtb,g'`
> +       DTB=`echo "${DTB}" | sed 's,\.dts$,.dtb,g'`

This patch is fine however, you should rebase it on top of master as of today.
secondly, this should be sent to oe-core mailing list since its
changing that layer

>          echo "${DTB}"
>  }
>
> --
> 2.7.4
>
>
> IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
> --
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-devel


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

* Re: [PATCH] kernel-devicetree.bbclass: DTB make targets may contain path components
  2018-07-06 21:25   ` Khem Raj
@ 2018-07-07  1:13     ` akuster808
  2018-07-07  2:38       ` Khem Raj
  0 siblings, 1 reply; 7+ messages in thread
From: akuster808 @ 2018-07-07  1:13 UTC (permalink / raw)
  To: Khem Raj, Jonathan Haigh; +Cc: Jeremy.Johnson, openembeded-devel



On 07/06/2018 02:25 PM, Khem Raj wrote:
> On Fri, Jul 6, 2018 at 12:02 PM Jonathan Haigh <Jonathan.Haigh@arm.com> wrote:
>> normalize_dtb() turns DTS and DTB paths into values that can be used as
>> make targets. These make targets sometimes contain some directory components
>> so 'basename' is not suitable for turning the paths into make targets -
>> we should only strip off leading directory components of the path up to
>> and including the 'dts' directory (if it exists). For example:
>> * 'overlays/at86rf233.dtbo' should not be changed.
>> * 'some/directory/path/dts/overlays/at86rf233.dtbo' should be changed to
>>   'overlays/at86rf233.dtbo' rather than just 'at86rf233.dtbo'
>>
>> Signed-off-by: Jonathan Haigh <jonathan.haigh@arm.com>
>> ---
>>  meta/classes/kernel-devicetree.bbclass | 5 +++--
>>  1 file changed, 3 insertions(+), 2 deletions(-)
>>
>> diff --git a/meta/classes/kernel-devicetree.bbclass b/meta/classes/kernel-devicetree.bbclass
>> index 9866d84..0ffa8e9 100644
>> --- a/meta/classes/kernel-devicetree.bbclass
>> +++ b/meta/classes/kernel-devicetree.bbclass
>> @@ -12,9 +12,10 @@ KERNEL_DEVICETREE_BUNDLE ?= "0"
>>  normalize_dtb () {
>>          DTB="$1"
>>          if echo ${DTB} | grep -q '/dts/'; then
>> -               bbwarn "${DTB} contains the full path to the the dts file, but only the dtb name should be used."
>> +               bbwarn "${DTB} contains the full path to the the dts file, but the path should be relative to the dts directory."
>> +               DTB=`echo "${DTB}" | sed 's,^.*/dts/,,'`
>>          fi
>> -       DTB=`basename ${DTB} | sed 's,\.dts$,.dtb,g'`
>> +       DTB=`echo "${DTB}" | sed 's,\.dts$,.dtb,g'`
> This patch is fine however, you should rebase it on top of master as of today.
> secondly, this should be sent to oe-core mailing list since its
> changing that layer

this landed in master already. patch was posted earlier this week.

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=8b9264824689e99fb257901be3c0f91f79f920ef
>
>>          echo "${DTB}"
>>  }
>>
>> --
>> 2.7.4
>>
>>
>> IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
>> --
>> _______________________________________________
>> Openembedded-devel mailing list
>> Openembedded-devel@lists.openembedded.org
>> http://lists.openembedded.org/mailman/listinfo/openembedded-devel



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

* Re: [PATCH] kernel-devicetree.bbclass: DTB make targets may contain path components
  2018-07-07  1:13     ` akuster808
@ 2018-07-07  2:38       ` Khem Raj
  2018-07-09  9:47         ` Jonathan Haigh
  0 siblings, 1 reply; 7+ messages in thread
From: Khem Raj @ 2018-07-07  2:38 UTC (permalink / raw)
  To: akuster808; +Cc: Jeremy.Johnson, openembeded-devel

On Fri, Jul 6, 2018 at 6:13 PM akuster808 <akuster808@gmail.com> wrote:

>
>
> On 07/06/2018 02:25 PM, Khem Raj wrote:
> > On Fri, Jul 6, 2018 at 12:02 PM Jonathan Haigh <Jonathan.Haigh@arm.com>
> wrote:
> >> normalize_dtb() turns DTS and DTB paths into values that can be used as
> >> make targets. These make targets sometimes contain some directory
> components
> >> so 'basename' is not suitable for turning the paths into make targets -
> >> we should only strip off leading directory components of the path up to
> >> and including the 'dts' directory (if it exists). For example:
> >> * 'overlays/at86rf233.dtbo' should not be changed.
> >> * 'some/directory/path/dts/overlays/at86rf233.dtbo' should be changed to
> >>   'overlays/at86rf233.dtbo' rather than just 'at86rf233.dtbo'
> >>
> >> Signed-off-by: Jonathan Haigh <jonathan.haigh@arm.com>
> >> ---
> >>  meta/classes/kernel-devicetree.bbclass | 5 +++--
> >>  1 file changed, 3 insertions(+), 2 deletions(-)
> >>
> >> diff --git a/meta/classes/kernel-devicetree.bbclass
> b/meta/classes/kernel-devicetree.bbclass
> >> index 9866d84..0ffa8e9 100644
> >> --- a/meta/classes/kernel-devicetree.bbclass
> >> +++ b/meta/classes/kernel-devicetree.bbclass
> >> @@ -12,9 +12,10 @@ KERNEL_DEVICETREE_BUNDLE ?= "0"
> >>  normalize_dtb () {
> >>          DTB="$1"
> >>          if echo ${DTB} | grep -q '/dts/'; then
> >> -               bbwarn "${DTB} contains the full path to the the dts
> file, but only the dtb name should be used."
> >> +               bbwarn "${DTB} contains the full path to the the dts
> file, but the path should be relative to the dts directory."
> >> +               DTB=`echo "${DTB}" | sed 's,^.*/dts/,,'`
> >>          fi
> >> -       DTB=`basename ${DTB} | sed 's,\.dts$,.dtb,g'`
> >> +       DTB=`echo "${DTB}" | sed 's,\.dts$,.dtb,g'`
> > This patch is fine however, you should rebase it on top of master as of
> today.
> > secondly, this should be sent to oe-core mailing list since its
> > changing that layer
>
> this landed in master already. patch was posted earlier this week.
>
>
> http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=8b9264824689e99fb257901be3c0f91f79f920ef
> >


They are different patches

>
> >>          echo "${DTB}"
> >>  }
> >>
> >> --
> >> 2.7.4
> >>
> >>
> >> IMPORTANT NOTICE: The contents of this email and any attachments are
> confidential and may also be privileged. If you are not the intended
> recipient, please notify the sender immediately and do not disclose the
> contents to any other person, use it for any purpose, or store or copy the
> information in any medium. Thank you.
> >> --
> >> _______________________________________________
> >> Openembedded-devel mailing list
> >> Openembedded-devel@lists.openembedded.org
> >> http://lists.openembedded.org/mailman/listinfo/openembedded-devel
>
>


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

* Re: [PATCH] kernel-devicetree.bbclass: DTB make targets may contain path components
  2018-07-07  2:38       ` Khem Raj
@ 2018-07-09  9:47         ` Jonathan Haigh
  0 siblings, 0 replies; 7+ messages in thread
From: Jonathan Haigh @ 2018-07-09  9:47 UTC (permalink / raw)
  To: Khem Raj, akuster808; +Cc: Jeremy Johnson, openembeded-devel

> This patch is fine however, you should rebase it on top of master as of today.
> secondly, this should be sent to oe-core mailing list since its
> changing that layer


Ah, okay, I'll do that. Thanks Khem.

________________________________
From: Khem Raj <raj.khem@gmail.com>
Sent: 07 July 2018 03:38:48
To: akuster808
Cc: Jeremy Johnson; Jonathan Haigh; openembeded-devel
Subject: Re: [oe] [PATCH] kernel-devicetree.bbclass: DTB make targets may contain path components



On Fri, Jul 6, 2018 at 6:13 PM akuster808 <akuster808@gmail.com<mailto:akuster808@gmail.com>> wrote:


On 07/06/2018 02:25 PM, Khem Raj wrote:
> On Fri, Jul 6, 2018 at 12:02 PM Jonathan Haigh <Jonathan.Haigh@arm.com<mailto:Jonathan.Haigh@arm.com>> wrote:
>> normalize_dtb() turns DTS and DTB paths into values that can be used as
>> make targets. These make targets sometimes contain some directory components
>> so 'basename' is not suitable for turning the paths into make targets -
>> we should only strip off leading directory components of the path up to
>> and including the 'dts' directory (if it exists). For example:
>> * 'overlays/at86rf233.dtbo' should not be changed.
>> * 'some/directory/path/dts/overlays/at86rf233.dtbo' should be changed to
>>   'overlays/at86rf233.dtbo' rather than just 'at86rf233.dtbo'
>>
>> Signed-off-by: Jonathan Haigh <jonathan.haigh@arm.com<mailto:jonathan.haigh@arm.com>>
>> ---
>>  meta/classes/kernel-devicetree.bbclass | 5 +++--
>>  1 file changed, 3 insertions(+), 2 deletions(-)
>>
>> diff --git a/meta/classes/kernel-devicetree.bbclass b/meta/classes/kernel-devicetree.bbclass
>> index 9866d84..0ffa8e9 100644
>> --- a/meta/classes/kernel-devicetree.bbclass
>> +++ b/meta/classes/kernel-devicetree.bbclass
>> @@ -12,9 +12,10 @@ KERNEL_DEVICETREE_BUNDLE ?= "0"
>>  normalize_dtb () {
>>          DTB="$1"
>>          if echo ${DTB} | grep -q '/dts/'; then
>> -               bbwarn "${DTB} contains the full path to the the dts file, but only the dtb name should be used."
>> +               bbwarn "${DTB} contains the full path to the the dts file, but the path should be relative to the dts directory."
>> +               DTB=`echo "${DTB}" | sed 's,^.*/dts/,,'`
>>          fi
>> -       DTB=`basename ${DTB} | sed 's,\.dts$,.dtb,g'`
>> +       DTB=`echo "${DTB}" | sed 's,\.dts$,.dtb,g'`
> This patch is fine however, you should rebase it on top of master as of today.
> secondly, this should be sent to oe-core mailing list since its
> changing that layer

this landed in master already. patch was posted earlier this week.

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=8b9264824689e99fb257901be3c0f91f79f920ef
>

They are different patches

>>          echo "${DTB}"
>>  }
>>
>> --
>> 2.7.4
>>
>>
>> IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
>> --
>> _______________________________________________
>> Openembedded-devel mailing list
>> Openembedded-devel@lists.openembedded.org<mailto:Openembedded-devel@lists.openembedded.org>
>> http://lists.openembedded.org/mailman/listinfo/openembedded-devel

IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.


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

* Re: [PATCH] kernel-devicetree.bbclass: DTB make targets may contain path components
  2018-07-09 10:46 Jonathan Haigh
@ 2018-07-10  7:28 ` Martin Jansa
  0 siblings, 0 replies; 7+ messages in thread
From: Martin Jansa @ 2018-07-10  7:28 UTC (permalink / raw)
  To: Jonathan.Haigh; +Cc: Patches and discussions about the oe-core layer

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

Please rebase on top of current master-next.

On Mon, Jul 9, 2018 at 6:20 PM Jonathan Haigh <Jonathan.Haigh@arm.com>
wrote:

> normalize_dtb() turns DTS and DTB paths into values that can be used as
> make targets. These make targets sometimes contain some directory
> components so 'basename' is not suitable for turning the paths into make
> targets - we should only strip off leading directory components of the
> path up to and including the 'dts' directory (if it exists). For
> example:
> * 'overlays/at86rf233.dtbo' should not be changed.
> * 'some/directory/path/dts/overlays/at86rf233.dtbo' should be changed to
>   'overlays/at86rf233.dtbo' rather than just 'at86rf233.dtbo'
>
> Signed-off-by: Jonathan Haigh <jonathan.haigh@arm.com>
> ---
>  meta/classes/kernel-devicetree.bbclass | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/meta/classes/kernel-devicetree.bbclass
> b/meta/classes/kernel-devicetree.bbclass
> index 4f80cc6..e42b664 100644
> --- a/meta/classes/kernel-devicetree.bbclass
> +++ b/meta/classes/kernel-devicetree.bbclass
> @@ -12,10 +12,10 @@ KERNEL_DEVICETREE_BUNDLE ?= "0"
>  normalize_dtb () {
>  DTB="$1"
>  if echo ${DTB} | grep -q '/dts/'; then
> -bbwarn "${DTB} contains the full path to the the dts file, but only the
> dtb name should be used."
> -DTB=`basename ${DTB} | sed 's,\.dts$,.dtb,g'`
> +bbwarn "${DTB} contains the full path to the the dts file, but the path
> should be relative to the dts directory."
> +DTB=`echo "${DTB}" | sed 's,^.*/dts/,,'`
>  fi
> -echo "${DTB}"
> +echo "${DTB}" | sed 's,\.dts$,.dtb,g'
>  }
>
>  get_real_dtb_path_in_kernel () {
> --
> 2.7.4
>
> IMPORTANT NOTICE: The contents of this email and any attachments are
> confidential and may also be privileged. If you are not the intended
> recipient, please notify the sender immediately and do not disclose the
> contents to any other person, use it for any purpose, or store or copy the
> information in any medium. Thank you.
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>

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

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

* [PATCH] kernel-devicetree.bbclass: DTB make targets may contain path components
@ 2018-07-09 10:46 Jonathan Haigh
  2018-07-10  7:28 ` Martin Jansa
  0 siblings, 1 reply; 7+ messages in thread
From: Jonathan Haigh @ 2018-07-09 10:46 UTC (permalink / raw)
  To: openembedded-core

normalize_dtb() turns DTS and DTB paths into values that can be used as
make targets. These make targets sometimes contain some directory
components so 'basename' is not suitable for turning the paths into make
targets - we should only strip off leading directory components of the
path up to and including the 'dts' directory (if it exists). For
example:
* 'overlays/at86rf233.dtbo' should not be changed.
* 'some/directory/path/dts/overlays/at86rf233.dtbo' should be changed to
  'overlays/at86rf233.dtbo' rather than just 'at86rf233.dtbo'

Signed-off-by: Jonathan Haigh <jonathan.haigh@arm.com>
---
 meta/classes/kernel-devicetree.bbclass | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/meta/classes/kernel-devicetree.bbclass b/meta/classes/kernel-devicetree.bbclass
index 4f80cc6..e42b664 100644
--- a/meta/classes/kernel-devicetree.bbclass
+++ b/meta/classes/kernel-devicetree.bbclass
@@ -12,10 +12,10 @@ KERNEL_DEVICETREE_BUNDLE ?= "0"
 normalize_dtb () {
 DTB="$1"
 if echo ${DTB} | grep -q '/dts/'; then
-bbwarn "${DTB} contains the full path to the the dts file, but only the dtb name should be used."
-DTB=`basename ${DTB} | sed 's,\.dts$,.dtb,g'`
+bbwarn "${DTB} contains the full path to the the dts file, but the path should be relative to the dts directory."
+DTB=`echo "${DTB}" | sed 's,^.*/dts/,,'`
 fi
-echo "${DTB}"
+echo "${DTB}" | sed 's,\.dts$,.dtb,g'
 }

 get_real_dtb_path_in_kernel () {
--
2.7.4

IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.


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

end of thread, other threads:[~2018-07-10  8:16 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <9a8e4137ac914b168091b71d755d54281530789529-12623-1-git-send-email-jonathan.haigh@arm.com>
2018-07-06 10:28 ` [PATCH] kernel-devicetree.bbclass: DTB make targets may contain path components Jonathan Haigh
2018-07-06 21:25   ` Khem Raj
2018-07-07  1:13     ` akuster808
2018-07-07  2:38       ` Khem Raj
2018-07-09  9:47         ` Jonathan Haigh
2018-07-09 10:46 Jonathan Haigh
2018-07-10  7:28 ` Martin Jansa

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.