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

Nathan Rossi nathan at nathanrossi.com
Thu Nov 30 01:00:05 PST 2017


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).

> +
>  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.

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