[meta-xilinx] [PATCH 2/3] device-tree.bb: Provide override device tree directory
Manjukumar Matha
manjukumar.harthikote-matha at xilinx.com
Thu Nov 30 00:18:00 PST 2017
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}"
+
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} \
${@' '.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
More information about the meta-xilinx
mailing list