[meta-xilinx] [PATCH 2/3] device-tree.bb: Provide override device tree directory

Manjukumar Harthikote Matha MANJUKUM at xilinx.com
Thu Nov 30 09:44:37 PST 2017



> -----Original Message-----
> From: Nathan Rossi [mailto:nathan at nathanrossi.com]
> Sent: Thursday, November 30, 2017 1:00 AM
> To: Manjukumar Harthikote Matha <MANJUKUM at xilinx.com>
> Cc: meta-xilinx at yoctoproject.org
> Subject: Re: [meta-xilinx] [PATCH 2/3] device-tree.bb: Provide override device tree
> directory
> 
> On 30 November 2017 at 18:18, Manjukumar Matha <manjukumar.harthikote-
> matha at xilinx.com> wrote:
> > Provide a way to override device tree work directory, this might be
> > particalarly helpful while using this recipes in other layers, for
> > example in meta-xilinx-tools to override workdir and point it to dtg
> > based build directory
> >
> > Signed-off-by: Manjukumar Matha
> > <manjukumar.harthikote-matha at xilinx.com>
> > ---
> >  recipes-bsp/device-tree/device-tree.bb | 12 +++++++-----
> >  1 file changed, 7 insertions(+), 5 deletions(-)
> >
> > diff --git a/recipes-bsp/device-tree/device-tree.bb
> > b/recipes-bsp/device-tree/device-tree.bb
> > index 27e1017..bb2e968 100644
> > --- a/recipes-bsp/device-tree/device-tree.bb
> > +++ b/recipes-bsp/device-tree/device-tree.bb
> > @@ -34,13 +34,15 @@ KERNEL_DTS_INCLUDE_append_zynqmp = " \
> >                 ${STAGING_KERNEL_DIR}/arch/${ARCH}/boot/dts/xilinx \
> >                 "
> >
> > +DEVICETREE_WORKDIR ?= "${S}"
> 
> You should already be able to override S (and B too).

Agreed, the problem arises when using DTG, we need clone the git repository and build it in a different directory other than S. The dts and dtsi will be present in a xsct workdir which is different from S.

> 
> > +
> >  DEVICETREE_FLAGS ?= " \
> > -               -R 8 -p 0x3000 -b 0 -i ${S} \
> > -               ${@' '.join(['-i %s' % i for i in d.getVar('KERNEL_DTS_INCLUDE',
> True).split()])} \
> > -               "
> > +               -R 8 -p 0x3000 -b 0 -i ${DEVICETREE_WORKDIR} \
> > +               ${@' '.join(['-i %s' % i for i in d.getVar('KERNEL_DTS_INCLUDE',
> True).split()])} \
> > +               "
> >  DEVICETREE_OFLAGS ?= "-@ -H epapr"
> >  DEVICETREE_PP_FLAGS ?= " \
> > -               -nostdinc -Ulinux -x assembler-with-cpp -I${S} \
> > +               -nostdinc -Ulinux -x assembler-with-cpp
> > + -I${DEVICETREE_WORKDIR} \
> 
> Instead of setting the -I manually here it would be worth changing this to setup a
> variable ('DTS_INCLUDE' maybe?) with space separated include directories which
> includes KERNEL_DTS_INCLUDE. And have that expanded with the inline python
> below/above in the flags.
> 

Yes we could that, I will send a v2

Thanks,
Manju

> Regards,
> Nathan
> 
> >                 ${@' '.join(['-I%s' % i for i in d.getVar('KERNEL_DTS_INCLUDE',
> True).split()])} \
> >                 "
> >
> > @@ -51,7 +53,7 @@ python () {
> >  }
> >
> >  do_compile() {
> > -       for DTS_FILE in ${S}/*.dts; do
> > +       for DTS_FILE in ${DEVICETREE_WORKDIR}/*.dts; do
> >                 DTS_NAME=`basename -s .dts ${DTS_FILE}`
> >                 ${BUILD_CPP} ${DEVICETREE_PP_FLAGS} -o `basename
> > ${DTS_FILE}`.pp ${DTS_FILE}
> >
> > --
> > 2.7.4
> >
> > --
> > _______________________________________________
> > meta-xilinx mailing list
> > meta-xilinx at yoctoproject.org
> > https://lists.yoctoproject.org/listinfo/meta-xilinx


More information about the meta-xilinx mailing list