[OE-core] [PATCH] linux-dtb.inc: Run dts through the preprocessor
Franklin S. Cooper Jr
fcooper at ti.com
Wed Aug 14 15:32:18 UTC 2013
* In the 3.11 kernel some dts files now include C code that must first run
through the preprocessor.
* Update building the dtb by first running the dts file through the user's
compiler before building using the device tree compiler.
* The logic used is based on mainline u-boot dts/Makefile.
Signed-off-by: Franklin S. Cooper Jr <fcooper at ti.com>
---
meta/recipes-kernel/linux/linux-dtb.inc | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/meta/recipes-kernel/linux/linux-dtb.inc b/meta/recipes-kernel/linux/linux-dtb.inc
index 41dd599..f1aafa2 100644
--- a/meta/recipes-kernel/linux/linux-dtb.inc
+++ b/meta/recipes-kernel/linux/linux-dtb.inc
@@ -21,7 +21,10 @@ do_install_append() {
DTS_BASE_NAME=`basename ${DTS_FILE} | awk -F "." '{print $1}'`
DTB_NAME=`echo ${KERNEL_IMAGE_BASE_NAME} | sed "s/${MACHINE}/${DTS_BASE_NAME}/g"`
DTB_SYMLINK_NAME=`echo ${KERNEL_IMAGE_SYMLINK_NAME} | sed "s/${MACHINE}/${DTS_BASE_NAME}/g"`
- dtc -I dts -O dtb ${KERNEL_DEVICETREE_FLAGS} -o ${DTS_BASE_NAME} ${DTS_FILE}
+
+ cat ${DTS_FILE} | \
+ ${CPP} -x assembler-with-cpp -I ./include/ -I ./arch/${ARCH}/boot/dts - | \
+ dtc ${KERNEL_DEVICETREE_FLAGS} -O dtb -o ${DTS_BASE_NAME} -i arch/${ARCH}/boot/dts/ -
install -m 0644 ${DTS_BASE_NAME} ${D}/${KERNEL_IMAGEDEST}/devicetree-${DTB_SYMLINK_NAME}.dtb
done
fi
--
1.7.0.4
More information about the Openembedded-core
mailing list