All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] dtc: Provide libfdt
@ 2019-08-05  3:12 Andrew Jeffery
  2019-08-05  5:04 ` Adrian Bunk
  2019-08-05 16:37 ` Ross Burton
  0 siblings, 2 replies; 7+ messages in thread
From: Andrew Jeffery @ 2019-08-05  3:12 UTC (permalink / raw)
  To: openembedded-core

Applications are appearing that depend on parsing flattened devicetree
in userspace on target devices, e.g. pdbg[1]. Mark dtc as providing
libfdt so application recipes can depend on it.

[1] https://github.com/open-power/pdbg

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
---
 meta/recipes-kernel/dtc/dtc.inc | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/meta/recipes-kernel/dtc/dtc.inc b/meta/recipes-kernel/dtc/dtc.inc
index 0650e3c82e6d..d55c8af90660 100644
--- a/meta/recipes-kernel/dtc/dtc.inc
+++ b/meta/recipes-kernel/dtc/dtc.inc
@@ -5,6 +5,8 @@ SECTION = "bootloader"
 LICENSE = "GPLv2 | BSD"
 DEPENDS = "flex-native bison-native"
 
+PROVIDES += "libfdt"
+
 SRC_URI = "git://git.kernel.org/pub/scm/utils/dtc/dtc.git \
            file://make_install.patch \
            "
-- 
2.20.1



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

* Re: [PATCH] dtc: Provide libfdt
  2019-08-05  3:12 [PATCH] dtc: Provide libfdt Andrew Jeffery
@ 2019-08-05  5:04 ` Adrian Bunk
  2019-08-05  6:31   ` Andrew Jeffery
  2019-08-05 16:37 ` Ross Burton
  1 sibling, 1 reply; 7+ messages in thread
From: Adrian Bunk @ 2019-08-05  5:04 UTC (permalink / raw)
  To: Andrew Jeffery; +Cc: openembedded-core

On Mon, Aug 05, 2019 at 12:42:11PM +0930, Andrew Jeffery wrote:
> Applications are appearing that depend on parsing flattened devicetree
> in userspace on target devices, e.g. pdbg[1]. Mark dtc as providing
> libfdt so application recipes can depend on it.
> 
> [1] https://github.com/open-power/pdbg

Shouldn't runtime dependencies on dtc already be autogenerated in this 
case when you have dtc in DEPENDS?

> Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
> ---
>  meta/recipes-kernel/dtc/dtc.inc | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/meta/recipes-kernel/dtc/dtc.inc b/meta/recipes-kernel/dtc/dtc.inc
> index 0650e3c82e6d..d55c8af90660 100644
> --- a/meta/recipes-kernel/dtc/dtc.inc
> +++ b/meta/recipes-kernel/dtc/dtc.inc
> @@ -5,6 +5,8 @@ SECTION = "bootloader"
>  LICENSE = "GPLv2 | BSD"
>  DEPENDS = "flex-native bison-native"
>  
> +PROVIDES += "libfdt"
>...

This should be a proper separate library package, so that applications 
depending on it stop pulling in the command line tools.

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed



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

* Re: [PATCH] dtc: Provide libfdt
  2019-08-05  5:04 ` Adrian Bunk
@ 2019-08-05  6:31   ` Andrew Jeffery
  2019-08-05  6:43     ` Adrian Bunk
  0 siblings, 1 reply; 7+ messages in thread
From: Andrew Jeffery @ 2019-08-05  6:31 UTC (permalink / raw)
  To: Adrian Bunk; +Cc: openembedded-core



On Mon, 5 Aug 2019, at 14:35, Adrian Bunk wrote:
> On Mon, Aug 05, 2019 at 12:42:11PM +0930, Andrew Jeffery wrote:
> > Applications are appearing that depend on parsing flattened devicetree
> > in userspace on target devices, e.g. pdbg[1]. Mark dtc as providing
> > libfdt so application recipes can depend on it.
> > 
> > [1] https://github.com/open-power/pdbg
> 
> Shouldn't runtime dependencies on dtc already be autogenerated in this 
> case when you have dtc in DEPENDS?

"dtc" doesn't need to appear in depends for pdbg: "dtc-native" does for the
purpose of building the devicetrees shipped with the application, but "dtc"
doesn't and dtc(1) itself isn't required at runtime, rather we just need libfdt,
which brings up your point below.

> 
> > Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
> > ---
> >  meta/recipes-kernel/dtc/dtc.inc | 2 ++
> >  1 file changed, 2 insertions(+)
> > 
> > diff --git a/meta/recipes-kernel/dtc/dtc.inc b/meta/recipes-kernel/dtc/dtc.inc
> > index 0650e3c82e6d..d55c8af90660 100644
> > --- a/meta/recipes-kernel/dtc/dtc.inc
> > +++ b/meta/recipes-kernel/dtc/dtc.inc
> > @@ -5,6 +5,8 @@ SECTION = "bootloader"
> >  LICENSE = "GPLv2 | BSD"
> >  DEPENDS = "flex-native bison-native"
> >  
> > +PROVIDES += "libfdt"
> >...
> 
> This should be a proper separate library package, so that applications 
> depending on it stop pulling in the command line tools.

Yeah, you're right, on reflection this was a bit of a hack.

Thanks for the feedback.

Andrew


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

* Re: [PATCH] dtc: Provide libfdt
  2019-08-05  6:31   ` Andrew Jeffery
@ 2019-08-05  6:43     ` Adrian Bunk
  2019-08-05  6:46       ` Andrew Jeffery
  0 siblings, 1 reply; 7+ messages in thread
From: Adrian Bunk @ 2019-08-05  6:43 UTC (permalink / raw)
  To: Andrew Jeffery; +Cc: openembedded-core

On Mon, Aug 05, 2019 at 04:01:57PM +0930, Andrew Jeffery wrote:
> 
> 
> On Mon, 5 Aug 2019, at 14:35, Adrian Bunk wrote:
> > On Mon, Aug 05, 2019 at 12:42:11PM +0930, Andrew Jeffery wrote:
> > > Applications are appearing that depend on parsing flattened devicetree
> > > in userspace on target devices, e.g. pdbg[1]. Mark dtc as providing
> > > libfdt so application recipes can depend on it.
> > > 
> > > [1] https://github.com/open-power/pdbg
> > 
> > Shouldn't runtime dependencies on dtc already be autogenerated in this 
> > case when you have dtc in DEPENDS?
> 
> "dtc" doesn't need to appear in depends for pdbg: "dtc-native" does for the
> purpose of building the devicetrees shipped with the application, but "dtc"
> doesn't and dtc(1) itself isn't required at runtime, rather we just need libfdt,
>...

How do you link with libfdt without the non-native dtc in DEPENDS?

> Thanks for the feedback.
> 
> Andrew

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed



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

* Re: [PATCH] dtc: Provide libfdt
  2019-08-05  6:43     ` Adrian Bunk
@ 2019-08-05  6:46       ` Andrew Jeffery
  0 siblings, 0 replies; 7+ messages in thread
From: Andrew Jeffery @ 2019-08-05  6:46 UTC (permalink / raw)
  To: Adrian Bunk; +Cc: openembedded-core



On Mon, 5 Aug 2019, at 16:13, Adrian Bunk wrote:
> On Mon, Aug 05, 2019 at 04:01:57PM +0930, Andrew Jeffery wrote:
> > 
> > 
> > On Mon, 5 Aug 2019, at 14:35, Adrian Bunk wrote:
> > > On Mon, Aug 05, 2019 at 12:42:11PM +0930, Andrew Jeffery wrote:
> > > > Applications are appearing that depend on parsing flattened devicetree
> > > > in userspace on target devices, e.g. pdbg[1]. Mark dtc as providing
> > > > libfdt so application recipes can depend on it.
> > > > 
> > > > [1] https://github.com/open-power/pdbg
> > > 
> > > Shouldn't runtime dependencies on dtc already be autogenerated in this 
> > > case when you have dtc in DEPENDS?
> > 
> > "dtc" doesn't need to appear in depends for pdbg: "dtc-native" does for the
> > purpose of building the devicetrees shipped with the application, but "dtc"
> > doesn't and dtc(1) itself isn't required at runtime, rather we just need libfdt,
> >...
> 
> How do you link with libfdt without the non-native dtc in DEPENDS?

Currently pdbg includes a copy of libfdt. However, the build system tests for
the presence of a system copy and will prefer it over the included copy.

Andrew


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

* Re: [PATCH] dtc: Provide libfdt
  2019-08-05  3:12 [PATCH] dtc: Provide libfdt Andrew Jeffery
  2019-08-05  5:04 ` Adrian Bunk
@ 2019-08-05 16:37 ` Ross Burton
  2019-08-06  1:40   ` Andrew Jeffery
  1 sibling, 1 reply; 7+ messages in thread
From: Ross Burton @ 2019-08-05 16:37 UTC (permalink / raw)
  To: openembedded-core

On 05/08/2019 04:12, Andrew Jeffery wrote:
> Applications are appearing that depend on parsing flattened devicetree
> in userspace on target devices, e.g. pdbg[1]. Mark dtc as providing
> libfdt so application recipes can depend on it.

Other recipes can just depend on dtc to get libftd build.

Ross


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

* Re: [PATCH] dtc: Provide libfdt
  2019-08-05 16:37 ` Ross Burton
@ 2019-08-06  1:40   ` Andrew Jeffery
  0 siblings, 0 replies; 7+ messages in thread
From: Andrew Jeffery @ 2019-08-06  1:40 UTC (permalink / raw)
  To: Ross Burton, openembedded-core



On Tue, 6 Aug 2019, at 02:08, Ross Burton wrote:
> On 05/08/2019 04:12, Andrew Jeffery wrote:
> > Applications are appearing that depend on parsing flattened devicetree
> > in userspace on target devices, e.g. pdbg[1]. Mark dtc as providing
> > libfdt so application recipes can depend on it.
> 
> Other recipes can just depend on dtc to get libftd build.

Alright, lets leave it that way.

Andrew


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

end of thread, other threads:[~2019-08-06  1:40 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-08-05  3:12 [PATCH] dtc: Provide libfdt Andrew Jeffery
2019-08-05  5:04 ` Adrian Bunk
2019-08-05  6:31   ` Andrew Jeffery
2019-08-05  6:43     ` Adrian Bunk
2019-08-05  6:46       ` Andrew Jeffery
2019-08-05 16:37 ` Ross Burton
2019-08-06  1:40   ` Andrew Jeffery

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.