summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorMarek Vasut <marex@denx.de>2015-05-14 14:31:11 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-05-26 10:57:51 +0100
commitd2e26ef348664791ede44884679282301bd10e11 (patch)
tree537a8e48bf7c2ca3adb6342f7db1a9aa51ac8a99 /meta
parentbb68c7c9f05a6c2f0a8e724caefb843870d4100c (diff)
downloadpoky-d2e26ef348664791ede44884679282301bd10e11.tar.gz
kernel: Build DTBs early
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. (From OE-Core rev: 86b3f29f93e3f87903668ea317c6bd97be4cdf62) 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>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-kernel/linux/linux-dtb.inc14
1 files changed, 12 insertions, 2 deletions
diff --git a/meta/recipes-kernel/linux/linux-dtb.inc b/meta/recipes-kernel/linux/linux-dtb.inc
index 6b8f1a54b8..ee3a5e1b98 100644
--- a/meta/recipes-kernel/linux/linux-dtb.inc
+++ b/meta/recipes-kernel/linux/linux-dtb.inc
@@ -5,6 +5,18 @@ python __anonymous () {
5 d.appendVar("PACKAGES", " kernel-devicetree") 5 d.appendVar("PACKAGES", " kernel-devicetree")
6} 6}
7 7
8do_compile_append() {
9 if test -n "${KERNEL_DEVICETREE}"; then
10 for DTB in ${KERNEL_DEVICETREE}; do
11 if echo ${DTB} | grep -q '/dts/'; then
12 bbwarn "${DTB} contains the full path to the the dts file, but only the dtb name should be used."
13 DTB=`basename ${DTB} | sed 's,\.dts$,.dtb,g'`
14 fi
15 oe_runmake ${DTB}
16 done
17 fi
18}
19
8do_install_append() { 20do_install_append() {
9 if test -n "${KERNEL_DEVICETREE}"; then 21 if test -n "${KERNEL_DEVICETREE}"; then
10 for DTB in ${KERNEL_DEVICETREE}; do 22 for DTB in ${KERNEL_DEVICETREE}; do
@@ -13,10 +25,8 @@ do_install_append() {
13 DTB=`basename ${DTB} | sed 's,\.dts$,.dtb,g'` 25 DTB=`basename ${DTB} | sed 's,\.dts$,.dtb,g'`
14 fi 26 fi
15 DTB_BASE_NAME=`basename ${DTB} .dtb` 27 DTB_BASE_NAME=`basename ${DTB} .dtb`
16 DTB_NAME=`echo ${KERNEL_IMAGE_BASE_NAME} | sed "s/${MACHINE}/${DTB_BASE_NAME}/g"`
17 DTB_SYMLINK_NAME=`echo ${KERNEL_IMAGE_SYMLINK_NAME} | sed "s/${MACHINE}/${DTB_BASE_NAME}/g"` 28 DTB_SYMLINK_NAME=`echo ${KERNEL_IMAGE_SYMLINK_NAME} | sed "s/${MACHINE}/${DTB_BASE_NAME}/g"`
18 DTB_PATH="${B}/arch/${ARCH}/boot/dts/${DTB}" 29 DTB_PATH="${B}/arch/${ARCH}/boot/dts/${DTB}"
19 oe_runmake ${DTB}
20 if [ ! -e "${DTB_PATH}" ]; then 30 if [ ! -e "${DTB_PATH}" ]; then
21 DTB_PATH="${B}/arch/${ARCH}/boot/${DTB}" 31 DTB_PATH="${B}/arch/${ARCH}/boot/${DTB}"
22 fi 32 fi