]> code.ossystems Code Review - openembedded-core.git/commitdiff
kernel: Build DTBs early
authorMarek Vasut <marex@denx.de>
Thu, 14 May 2015 12:31:11 +0000 (14:31 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 26 May 2015 09:57:41 +0000 (10:57 +0100)
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 <marex@denx.de>
Cc: Richard Purdie <richard.purdie@linuxfoundation.org>
Cc: Koen Kooi <koen@dominion.thruhere.net>
Cc: Paul Eggleton <paul.eggleton@linux.intel.com>
Cc: Ross Burton <ross.burton@intel.com>
Cc: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-kernel/linux/linux-dtb.inc

index 6b8f1a54b898d523eed92cafd0b5a3fbec723421..ee3a5e1b980cf66b1b5961eed1f5093562a6fa8a 100644 (file)
@@ -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