[meta-xilinx] [meta-xilinx-tools][RFC] device-tree.bbappend: Changes needed to use upstream devicetree class

Manjukumar Harthikote Matha MANJUKUM at xilinx.com
Thu Mar 7 12:52:29 PST 2019


Hi Luca,

> -----Original Message-----
> From: Luca Ceresoli [mailto:luca at lucaceresoli.net]
> Sent: Wednesday, February 27, 2019 12:04 AM
> To: Manjukumar Harthikote Matha <MANJUKUM at xilinx.com>; meta-
> xilinx at yoctoproject.org; Jaewon Lee <JAEWON at xilinx.com>
> Subject: Re: [meta-xilinx] [meta-xilinx-tools][RFC] device-tree.bbappend: Changes
> needed to use upstream devicetree class
> 
> Hi Manjukumar, Jaewon,
> 
> On 26/02/19 04:07, Manjukumar Matha wrote:
> > From: Jaewon Lee <jaewon.lee at xilinx.com>
> >
> > These are some changes needed to use upstream devicetree class. There
> > are some variable name changes as well as switching some script to
> > python from bash.
> >
> > Signed-off-by: Jaewon Lee <jaewon.lee at xilinx.com>
> > Signed-off-by: Manjukumar Matha <manjukumar.harthikote-matha at xilinx.com>
> > ---
> >  recipes-bsp/device-tree/device-tree.bbappend | 23 +++++++++++------------
> >  1 file changed, 11 insertions(+), 12 deletions(-)
> >
> > diff --git a/recipes-bsp/device-tree/device-tree.bbappend b/recipes-bsp/device-
> tree/device-tree.bbappend
> > index e077955..118688c 100644
> > --- a/recipes-bsp/device-tree/device-tree.bbappend
> > +++ b/recipes-bsp/device-tree/device-tree.bbappend
> > @@ -44,10 +44,10 @@ YAML_DT_BOARD_FLAGS_zcu104-zynqmp ?= "{BOARD
> zcu104-revc}"
> >  YAML_DT_BOARD_FLAGS_zcu111-zynqmp ?= "{BOARD zcu111-reva}"
> >  YAML_DT_BOARD_FLAGS_zc1275-zynqmp ?= "{BOARD zc1275-revb}"
> >
> > -DTS_FILES_PATH = "${XSCTH_WS}/${XSCTH_PROJ}"
> > -DTS_INCLUDE_append = " ${WORKDIR}"
> > +DT_FILES_PATH = "${XSCTH_WS}/${XSCTH_PROJ}"
> > +DT_INCLUDE_append = " ${WORKDIR}"
> >  DT_PADDING_SIZE = "0x1000"
> > -KERNEL_DTS_INCLUDE_append = " ${STAGING_KERNEL_DIR}/include"
> > +KERNEL_INCLUDE_append = " ${STAGING_KERNEL_DIR}/include"
> >
> >  COMPATIBLE_MACHINE_zynq = ".*"
> >  COMPATIBLE_MACHINE_zynqmp = ".*"
> > @@ -57,21 +57,20 @@ SRC_URI_append_ultra96-zynqmp =
> "${@bb.utils.contains('MACHINE_FEATURES', 'mipi'
> >
> >  do_configure_append_ultra96-zynqmp() {
> >          if [ -e ${WORKDIR}/mipi-support-ultra96.dtsi ]; then
> > -               cp ${WORKDIR}/mipi-support-ultra96.dtsi ${DTS_FILES_PATH}/mipi-
> support-ultra96.dtsi
> > -               echo '/include/ "mipi-support-ultra96.dtsi"' >>
> ${DTS_FILES_PATH}/system-top.dts
> > +               cp ${WORKDIR}/mipi-support-ultra96.dtsi ${DT_FILES_PATH}/mipi-
> support-ultra96.dtsi
> > +               echo '/include/ "mipi-support-ultra96.dtsi"' >>
> ${DT_FILES_PATH}/system-top.dts
> >          fi
> >  }
> >
> > -
> > -do_compile_prepend_kc705-microblazeel() {
> > -	cp ${WORKDIR}/system-conf.dtsi ${DTS_FILES_PATH}
> > -	cp ${WORKDIR}/kc705-microblazeel.dts ${DTS_FILES_PATH}
> > -}
> 
> The log message does not explain why this change it is needed. It also
> looks unrelated to the rest of the changes so it might be worth a
> separate commit.
> 

The upstream class moved to python based from bash functions. We cannot move it to a different patch, we can explain better in the commit message

> >  do_compile_prepend() {
> > -	[ -e ${DTS_FILES_PATH}/system.dts ] && rm ${DTS_FILES_PATH}/system.dts
> > +    listpath = d.getVar("DT_FILES_PATH")
> > +    try:
> > +        os.remove(os.path.join(listpath, "system.dts"))
> > +    except OSError:
> > +        pass
> 
> Oh dear, Python is usually very concise but there are clearly
> exceptions. Any python expert knows a more concise way to do 'rm -f
> $FILE' in python? Otherwise of course this code is OK.
> 

I think there is a better way than this one, we are looking into it

Thanks for feedback.

Thanks,
Manju


More information about the meta-xilinx mailing list