summaryrefslogtreecommitdiffstats
path: root/meta/recipes-kernel/linux/linux-dtb.inc
diff options
context:
space:
mode:
authorStefan Christ <s.christ@phytec.de>2015-10-26 09:20:36 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-11-16 11:39:31 +0000
commitaf9c7a4c577c9638f25919ed4fe7dd3323826bd7 (patch)
treef72c431c88d9f21c7ceeff50579238420c04efe3 /meta/recipes-kernel/linux/linux-dtb.inc
parent7eecb81b6d788fe630e2378b0136cd46dadae7dd (diff)
downloadpoky-af9c7a4c577c9638f25919ed4fe7dd3323826bd7.tar.gz
linux-dtb.inc: refactor common code to function normalize_dtb
(From OE-Core rev: 5dfa10978ef540a7a8cd89766c40625ccfeffda2) Signed-off-by: Stefan Christ <s.christ@phytec.de> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-kernel/linux/linux-dtb.inc')
-rw-r--r--meta/recipes-kernel/linux/linux-dtb.inc24
1 files changed, 12 insertions, 12 deletions
diff --git a/meta/recipes-kernel/linux/linux-dtb.inc b/meta/recipes-kernel/linux/linux-dtb.inc
index 2b8b11f084..22801b72b8 100644
--- a/meta/recipes-kernel/linux/linux-dtb.inc
+++ b/meta/recipes-kernel/linux/linux-dtb.inc
@@ -5,22 +5,25 @@ python __anonymous () {
5 d.appendVar("PACKAGES", " kernel-devicetree") 5 d.appendVar("PACKAGES", " kernel-devicetree")
6} 6}
7 7
8normalize_dtb () {
9 DTB="$1"
10 if echo ${DTB} | grep -q '/dts/'; then
11 bbwarn "${DTB} contains the full path to the the dts file, but only the dtb name should be used."
12 DTB=`basename ${DTB} | sed 's,\.dts$,.dtb,g'`
13 fi
14 echo "${DTB}"
15}
16
8do_compile_append() { 17do_compile_append() {
9 for DTB in ${KERNEL_DEVICETREE}; do 18 for DTB in ${KERNEL_DEVICETREE}; do
10 if echo ${DTB} | grep -q '/dts/'; then 19 DTB=`normalize_dtb "${DTB}"`
11 bbwarn "${DTB} contains the full path to the the dts file, but only the dtb name should be used."
12 DTB=`basename ${DTB} | sed 's,\.dts$,.dtb,g'`
13 fi
14 oe_runmake ${DTB} 20 oe_runmake ${DTB}
15 done 21 done
16} 22}
17 23
18do_install_append() { 24do_install_append() {
19 for DTB in ${KERNEL_DEVICETREE}; do 25 for DTB in ${KERNEL_DEVICETREE}; do
20 if echo ${DTB} | grep -q '/dts/'; then 26 DTB=`normalize_dtb "${DTB}"`
21 bbwarn "${DTB} contains the full path to the the dts file, but only the dtb name should be used."
22 DTB=`basename ${DTB} | sed 's,\.dts$,.dtb,g'`
23 fi
24 DTB_BASE_NAME=`basename ${DTB} .dtb` 27 DTB_BASE_NAME=`basename ${DTB} .dtb`
25 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"`
26 DTB_PATH="${B}/arch/${ARCH}/boot/dts/${DTB}" 29 DTB_PATH="${B}/arch/${ARCH}/boot/dts/${DTB}"
@@ -33,10 +36,7 @@ do_install_append() {
33 36
34do_deploy_append() { 37do_deploy_append() {
35 for DTB in ${KERNEL_DEVICETREE}; do 38 for DTB in ${KERNEL_DEVICETREE}; do
36 if echo ${DTB} | grep -q '/dts/'; then 39 DTB=`normalize_dtb "${DTB}"`
37 bbwarn "${DTB} contains the full path to the the dts file, but only the dtb name should be used."
38 DTB=`basename ${DTB} | sed 's,\.dts$,.dtb,g'`
39 fi
40 DTB_BASE_NAME=`basename ${DTB} .dtb` 40 DTB_BASE_NAME=`basename ${DTB} .dtb`
41 DTB_NAME=`echo ${KERNEL_IMAGE_BASE_NAME} | sed "s/${MACHINE}/${DTB_BASE_NAME}/g"` 41 DTB_NAME=`echo ${KERNEL_IMAGE_BASE_NAME} | sed "s/${MACHINE}/${DTB_BASE_NAME}/g"`
42 DTB_SYMLINK_NAME=`echo ${KERNEL_IMAGE_SYMLINK_NAME} | sed "s/${MACHINE}/${DTB_BASE_NAME}/g"` 42 DTB_SYMLINK_NAME=`echo ${KERNEL_IMAGE_SYMLINK_NAME} | sed "s/${MACHINE}/${DTB_BASE_NAME}/g"`