[PATCH openbmc 1/4] Copy device tree into unpacked kernel source

OpenBMC Patches patches at stwcx.xyz
Tue Nov 3 00:11:58 AEDT 2015


From: Brad Bishop <bradleyb at us.ibm.com>

This bit of logic enables out of (kernel) tree device trees but still
use the kernel build and oe support for device tree to compile it.
---
 meta-phosphor/common/recipes-kernel/linux/linux-obmc_4.2.bb | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/meta-phosphor/common/recipes-kernel/linux/linux-obmc_4.2.bb b/meta-phosphor/common/recipes-kernel/linux/linux-obmc_4.2.bb
index f49b3fc..247f64c 100644
--- a/meta-phosphor/common/recipes-kernel/linux/linux-obmc_4.2.bb
+++ b/meta-phosphor/common/recipes-kernel/linux/linux-obmc_4.2.bb
@@ -18,3 +18,13 @@ COMPATIBLE_MACHINE_${MACHINE} = "openbmc"
 
 inherit kernel
 require recipes-kernel/linux/linux-yocto.inc
+
+do_patch_append() {
+        for DTB in "${KERNEL_DEVICETREE}"; do
+		DT=`basename ${DTB} .dtb`
+                if [ -r "${WORKDIR}/${DT}.dts" ]; then
+                        cp ${WORKDIR}/${DT}.dts \
+                                ${STAGING_KERNEL_DIR}/arch/${ARCH}/boot/dts
+		fi
+	done
+}
-- 
2.6.0




More information about the openbmc mailing list