All of lore.kernel.org
 help / color / mirror / Atom feed
* [oe-core] kernel-devicetree.bbclass: DTBs with path components
@ 2018-07-05 11:04 Jonathan Haigh
  2018-07-05 22:41 ` Khem Raj
  0 siblings, 1 reply; 4+ messages in thread
From: Jonathan Haigh @ 2018-07-05 11:04 UTC (permalink / raw)
  To: openembedded-devel, ptsneves, richard.purdie

Hi,


The recent oe-core commit https://github.com/openembedded/openembedded-core/commit/2e7f3b2b9318d1e5395ad58131eafb873f614326 altered the normalize_dtb() function to always apply basename to the DTB (or DTS) passed in to convert a potentially full path to a DTB/DTS into a make target.


If I understand correctly, that's not the correct thing to do because the make targets can contain directory components - and some of the DTBs in meta-raspberrypi's KERNEL_DEVICETREE do contain directory components even though they're not full paths to the DTBs (e.g. overlays/at86rf233.dtbo from meta-raspberrypi:conf/machine/include/rpi-base.inc).


I think the normalize_dtb() function should just strip leading parts of DTB/DTSs to make them relative to the 'dts' directory. I have a patch to make this change that I will post shortly.


Regards,


Jonathan

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] 4+ messages in thread

* Re: [oe-core] kernel-devicetree.bbclass: DTBs with path components
  2018-07-05 11:04 [oe-core] kernel-devicetree.bbclass: DTBs with path components Jonathan Haigh
@ 2018-07-05 22:41 ` Khem Raj
  2018-07-06  9:18   ` Jonathan Haigh
  0 siblings, 1 reply; 4+ messages in thread
From: Khem Raj @ 2018-07-05 22:41 UTC (permalink / raw)
  To: Jonathan Haigh, openembedded-devel, ptsneves, richard.purdie


[-- Attachment #1.1: Type: text/plain, Size: 1464 bytes --]

On 7/5/18 4:04 AM, Jonathan Haigh wrote:
> Hi,
> 
> 
> The recent oe-core commit https://github.com/openembedded/openembedded-core/commit/2e7f3b2b9318d1e5395ad58131eafb873f614326 altered the normalize_dtb() function to always apply basename to the DTB (or DTS) passed in to convert a potentially full path to a DTB/DTS into a make target.
> 
> 
> If I understand correctly, that's not the correct thing to do because the make targets can contain directory components - and some of the DTBs in meta-raspberrypi's KERNEL_DEVICETREE do contain directory components even though they're not full paths to the DTBs (e.g. overlays/at86rf233.dtbo from meta-raspberrypi:conf/machine/include/rpi-base.inc).
> 
> 
> I think the normalize_dtb() function should just strip leading parts of DTB/DTSs to make them relative to the 'dts' directory. I have a patch to make this change that I will post shortly.
> 


it has already been reverted today.
see
http://git.openembedded.org/openembedded-core/commit/?id=0d725c76c113dec441a7319a6ee997e4ae8c4c88

please update to latest master.

> 
> Regards,
> 
> 
> Jonathan
> 
> 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.
> 



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 201 bytes --]

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

* Re: [oe-core] kernel-devicetree.bbclass: DTBs with path components
  2018-07-05 22:41 ` Khem Raj
@ 2018-07-06  9:18   ` Jonathan Haigh
  2018-07-06 10:03     ` Jonathan Haigh
  0 siblings, 1 reply; 4+ messages in thread
From: Jonathan Haigh @ 2018-07-06  9:18 UTC (permalink / raw)
  To: Khem Raj, openembedded-devel, ptsneves, richard.purdie; +Cc: Jeremy Johnson

Hi Khem,

Thanks for the response.

Reverting 2e7f3b2b9318d1e5395ad58131eafb873f614326 works for me (my KERNEL_DEVICETREEs don't actually contain any full paths to DTBs or DTSs).

In the case where the warning is emitted  (a full path to the DTB/DTS) the current code still may not handle some cases properly - when a DTB/DTS is given as a full path but that full path is to a subdirectory of dts/. In that case the current code will use basename to strip off all but the filename, but if I understand correctly, any path components after the dts/ directory shouldn't be stripped. That case comes with a BitBake warning though, so I guess maybe it's not supported and isn't important.


Paulo,

The scenario you've described is a bit different to what I was thinking about. Each element in KERNEL_DEVICETREE is translated by normalize_dtb() and then passed straight to oe_runmake in do_compile_append() in kernel-devicetree.bbclass. I'd guess that you need to do a bit more work to get your (translated) dtb path to be a valid make target than putting the DTS in ${WORKDIR} (maybe putting your DTS in the kernel source's dts directory would do it).

The cases I was thinking about were where KERNEL_DEVICETREE has paths to DTS or DTB files that are already in the kernel's dts directory.

Thanks,

Jonathan

From: Khem Raj <raj.khem@gmail.com>
Sent: 05 July 2018 23:41
To: Jonathan Haigh; openembedded-devel@lists.openembedded.org; ptsneves@gmail.com; richard.purdie@linuxfoundation.org
Subject: Re: [oe] [oe-core] kernel-devicetree.bbclass: DTBs with path components


On 7/5/18 4:04 AM, Jonathan Haigh wrote:
> Hi,
>
>
> The recent oe-core commit  https://github.com/openembedded/openembedded-core/commit/2e7f3b2b9318d1e5395ad58131eafb873f614326 altered the normalize_dtb() function to always apply basename to the DTB (or DTS) passed in to convert a potentially full path to a DTB/DTS into a make target.
>
>
> If I understand correctly, that's not the correct thing to do because the make targets can contain directory components - and some of the DTBs in meta-raspberrypi's KERNEL_DEVICETREE do contain directory components even though they're not full paths to the  DTBs (e.g. overlays/at86rf233.dtbo from meta-raspberrypi:conf/machine/include/rpi-base.inc).
>
>
> I think the normalize_dtb() function should just strip leading parts of DTB/DTSs to make them relative to the 'dts' directory. I have a patch to make this change that I will post shortly.
>


it has already been reverted today.
see
http://git.openembedded.org/openembedded-core/commit/?id=0d725c76c113dec441a7319a6ee997e4ae8c4c88

please update to latest master.

>
> Regards,
>
>
> Jonathan
>
> 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.
>



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] 4+ messages in thread

* Re: [oe-core] kernel-devicetree.bbclass: DTBs with path components
  2018-07-06  9:18   ` Jonathan Haigh
@ 2018-07-06 10:03     ` Jonathan Haigh
  0 siblings, 0 replies; 4+ messages in thread
From: Jonathan Haigh @ 2018-07-06 10:03 UTC (permalink / raw)
  To: Khem Raj, openembedded-devel, ptsneves, richard.purdie; +Cc: Jeremy Johnson

I've just noticed that my patch never actually made it to the mailing list. I'll try to send it again.

________________________________
From: Jonathan Haigh
Sent: 06 July 2018 10:18:04
To: Khem Raj; openembedded-devel@lists.openembedded.org; ptsneves@gmail.com; richard.purdie@linuxfoundation.org
Cc: Jeremy Johnson
Subject: Re: [oe] [oe-core] kernel-devicetree.bbclass: DTBs with path components

Hi Khem,

Thanks for the response.

Reverting 2e7f3b2b9318d1e5395ad58131eafb873f614326 works for me (my KERNEL_DEVICETREEs don't actually contain any full paths to DTBs or DTSs).

In the case where the warning is emitted  (a full path to the DTB/DTS) the current code still may not handle some cases properly - when a DTB/DTS is given as a full path but that full path is to a subdirectory of dts/. In that case the current code will use basename to strip off all but the filename, but if I understand correctly, any path components after the dts/ directory shouldn't be stripped. That case comes with a BitBake warning though, so I guess maybe it's not supported and isn't important.


Paulo,

The scenario you've described is a bit different to what I was thinking about. Each element in KERNEL_DEVICETREE is translated by normalize_dtb() and then passed straight to oe_runmake in do_compile_append() in kernel-devicetree.bbclass. I'd guess that you need to do a bit more work to get your (translated) dtb path to be a valid make target than putting the DTS in ${WORKDIR} (maybe putting your DTS in the kernel source's dts directory would do it).

The cases I was thinking about were where KERNEL_DEVICETREE has paths to DTS or DTB files that are already in the kernel's dts directory.

Thanks,

Jonathan

From: Khem Raj <raj.khem@gmail.com>
Sent: 05 July 2018 23:41
To: Jonathan Haigh; openembedded-devel@lists.openembedded.org; ptsneves@gmail.com; richard.purdie@linuxfoundation.org
Subject: Re: [oe] [oe-core] kernel-devicetree.bbclass: DTBs with path components


On 7/5/18 4:04 AM, Jonathan Haigh wrote:
> Hi,
>
>
> The recent oe-core commit  https://github.com/openembedded/openembedded-core/commit/2e7f3b2b9318d1e5395ad58131eafb873f614326 altered the normalize_dtb() function to always apply basename to the DTB (or DTS) passed in to convert a potentially full path to a DTB/DTS into a make target.
>
>
> If I understand correctly, that's not the correct thing to do because the make targets can contain directory components - and some of the DTBs in meta-raspberrypi's KERNEL_DEVICETREE do contain directory components even though they're not full paths to the  DTBs (e.g. overlays/at86rf233.dtbo from meta-raspberrypi:conf/machine/include/rpi-base.inc).
>
>
> I think the normalize_dtb() function should just strip leading parts of DTB/DTSs to make them relative to the 'dts' directory. I have a patch to make this change that I will post shortly.
>


it has already been reverted today.
see
http://git.openembedded.org/openembedded-core/commit/?id=0d725c76c113dec441a7319a6ee997e4ae8c4c88

please update to latest master.

>
> Regards,
>
>
> Jonathan
>
> 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.
>



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] 4+ messages in thread

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

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-05 11:04 [oe-core] kernel-devicetree.bbclass: DTBs with path components Jonathan Haigh
2018-07-05 22:41 ` Khem Raj
2018-07-06  9:18   ` Jonathan Haigh
2018-07-06 10:03     ` Jonathan Haigh

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.