From 582f901da315fa29d694bd89f659f7ca6f5aecd6 Mon Sep 17 00:00:00 2001 From: Manjukumar Matha Date: Wed, 29 Nov 2017 22:53:43 -0800 Subject: device-tree.bb: Provide override device tree directory Provide a way to override device tree work directory and include file 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 Reviewed-by: Nathan Rossi Signed-off-by: Manjukumar Matha --- recipes-bsp/device-tree/device-tree.bb | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/recipes-bsp/device-tree/device-tree.bb b/recipes-bsp/device-tree/device-tree.bb index 27e1017f..5ecad6bc 100644 --- a/recipes-bsp/device-tree/device-tree.bb +++ b/recipes-bsp/device-tree/device-tree.bb @@ -34,14 +34,17 @@ KERNEL_DTS_INCLUDE_append_zynqmp = " \ ${STAGING_KERNEL_DIR}/arch/${ARCH}/boot/dts/xilinx \ " +DTS_FILES_PATH ?= "${S}" +DTS_INCLUDE ?= "${DTS_FILES_PATH} ${KERNEL_DTS_INCLUDE}" + 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 ${DT_PADDING_SIZE} -b 0 \ + ${@' '.join(['-i %s' % i for i in d.getVar('DTS_INCLUDE', True).split()])} \ + " DEVICETREE_OFLAGS ?= "-@ -H epapr" DEVICETREE_PP_FLAGS ?= " \ - -nostdinc -Ulinux -x assembler-with-cpp -I${S} \ - ${@' '.join(['-I%s' % i for i in d.getVar('KERNEL_DTS_INCLUDE', True).split()])} \ + -nostdinc -Ulinux -x assembler-with-cpp \ + ${@' '.join(['-I%s' % i for i in d.getVar('DTS_INCLUDE', True).split()])} \ " python () { @@ -51,7 +54,7 @@ python () { } do_compile() { - for DTS_FILE in ${S}/*.dts; do + for DTS_FILE in ${DTS_FILES_PATH}/*.dts; do DTS_NAME=`basename -s .dts ${DTS_FILE}` ${BUILD_CPP} ${DEVICETREE_PP_FLAGS} -o `basename ${DTS_FILE}`.pp ${DTS_FILE} -- cgit v1.2.3-54-g00ecf