Pull out the compilation of the DTB blobs right after the kernel's
own do_compile function finishes. This makes them available just in
time for the kernel image construction functions.

Signed-off-by: Marek Vasut <ma...@denx.de>
Cc: Richard Purdie <richard.pur...@linuxfoundation.org>
Cc: Koen Kooi <k...@dominion.thruhere.net>
Cc: Paul Eggleton <paul.eggle...@linux.intel.com>
Cc: Ross Burton <ross.bur...@intel.com>
Cc: Bruce Ashfield <bruce.ashfi...@windriver.com>
---
 meta/recipes-kernel/linux/linux-dtb.inc | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-kernel/linux/linux-dtb.inc 
b/meta/recipes-kernel/linux/linux-dtb.inc
index 6b8f1a5..ee3a5e1 100644
--- a/meta/recipes-kernel/linux/linux-dtb.inc
+++ b/meta/recipes-kernel/linux/linux-dtb.inc
@@ -5,6 +5,18 @@ python __anonymous () {
     d.appendVar("PACKAGES", " kernel-devicetree")
 }
 
+do_compile_append() {
+       if test -n "${KERNEL_DEVICETREE}"; then
+               for DTB in ${KERNEL_DEVICETREE}; do
+                       if echo ${DTB} | grep -q '/dts/'; then
+                               bbwarn "${DTB} contains the full path to the 
the dts file, but only the dtb name should be used."
+                               DTB=`basename ${DTB} | sed 's,\.dts$,.dtb,g'`
+                       fi
+                       oe_runmake ${DTB}
+               done
+       fi
+}
+
 do_install_append() {
        if test -n "${KERNEL_DEVICETREE}"; then
                for DTB in ${KERNEL_DEVICETREE}; do
@@ -13,10 +25,8 @@ do_install_append() {
                                DTB=`basename ${DTB} | sed 's,\.dts$,.dtb,g'`
                        fi
                        DTB_BASE_NAME=`basename ${DTB} .dtb`
-                       DTB_NAME=`echo ${KERNEL_IMAGE_BASE_NAME} | sed 
"s/${MACHINE}/${DTB_BASE_NAME}/g"`
                        DTB_SYMLINK_NAME=`echo ${KERNEL_IMAGE_SYMLINK_NAME} | 
sed "s/${MACHINE}/${DTB_BASE_NAME}/g"`
                        DTB_PATH="${B}/arch/${ARCH}/boot/dts/${DTB}"
-                       oe_runmake ${DTB}
                        if [ ! -e "${DTB_PATH}" ]; then
                                DTB_PATH="${B}/arch/${ARCH}/boot/${DTB}"
                        fi
-- 
2.1.4

-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Reply via email to