Message ID | b89ab2b5128e4d5da985606e1b81213b1531133101-27576-1-git-send-email-jonathan.haigh@arm.com |
---|---|
State | New |
Headers | show |
Series | kernel-devicetree.bbclass: DTB make targets may contain path components | expand |
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 > <div dir="ltr">Please rebase on top of current master-next.</div><br><div class="gmail_quote"><div dir="ltr">On Mon, Jul 9, 2018 at 6:20 PM Jonathan Haigh <<a href="mailto:Jonathan.Haigh@arm.com">Jonathan.Haigh@arm.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">normalize_dtb() turns DTS and DTB paths into values that can be used as<br> make targets. These make targets sometimes contain some directory<br> components so 'basename' is not suitable for turning the paths into make<br> targets - we should only strip off leading directory components of the<br> path up to and including the 'dts' directory (if it exists). For<br> example:<br> * 'overlays/at86rf233.dtbo' should not be changed.<br> * 'some/directory/path/dts/overlays/at86rf233.dtbo' should be changed to<br> 'overlays/at86rf233.dtbo' rather than just 'at86rf233.dtbo'<br> <br> Signed-off-by: Jonathan Haigh <<a href="mailto:jonathan.haigh@arm.com" target="_blank">jonathan.haigh@arm.com</a>><br> ---<br> meta/classes/kernel-devicetree.bbclass | 6 +++---<br> 1 file changed, 3 insertions(+), 3 deletions(-)<br> <br> diff --git a/meta/classes/kernel-devicetree.bbclass b/meta/classes/kernel-devicetree.bbclass<br> index 4f80cc6..e42b664 100644<br> --- a/meta/classes/kernel-devicetree.bbclass<br> +++ b/meta/classes/kernel-devicetree.bbclass<br> @@ -12,10 +12,10 @@ KERNEL_DEVICETREE_BUNDLE ?= "0"<br> normalize_dtb () {<br> DTB="$1"<br> if echo ${DTB} | grep -q '/dts/'; then<br> -bbwarn "${DTB} contains the full path to the the dts file, but only the dtb name should be used."<br> -DTB=`basename ${DTB} | sed 's,\.dts$,.dtb,g'`<br> +bbwarn "${DTB} contains the full path to the the dts file, but the path should be relative to the dts directory."<br> +DTB=`echo "${DTB}" | sed 's,^.*/dts/,,'`<br> fi<br> -echo "${DTB}"<br> +echo "${DTB}" | sed 's,\.dts$,.dtb,g'<br> }<br> <br> get_real_dtb_path_in_kernel () {<br> --<br> 2.7.4<br> <br> 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.<br> -- <br> _______________________________________________<br> Openembedded-core mailing list<br> <a href="mailto:Openembedded-core@lists.openembedded.org" target="_blank">Openembedded-core@lists.openembedded.org</a><br> <a href="http://lists.openembedded.org/mailman/listinfo/openembedded-core" rel="noreferrer" target="_blank">http://lists.openembedded.org/mailman/listinfo/openembedded-core</a><br> </blockquote></div> -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
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 () {
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(-) -- 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