[OE-core] [PATCH] dtc: Provide libfdt

Andrew Jeffery andrew at aj.id.au
Mon Aug 5 06:31:57 UTC 2019



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 at 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


More information about the Openembedded-core mailing list