[OE-core] [PATCH] kernel-devicetree.bbclass: DTB make targets may contain path components

Martin Jansa martin.jansa at gmail.com
Tue Jul 10 07:28:38 UTC 2018


Please rebase on top of current master-next.

On Mon, Jul 9, 2018 at 6:20 PM Jonathan Haigh <Jonathan.Haigh at 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 at 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 at lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20180710/51714520/attachment-0002.html>


More information about the Openembedded-core mailing list