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:35 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-11-16 11:39:31 +0000
commit7eecb81b6d788fe630e2378b0136cd46dadae7dd (patch)
tree147fe8a409810157d0281a794f8d3dd99368345b /meta/recipes-kernel/linux/linux-dtb.inc
parent54df9117488f793b634edd3d2662df62e7491e1d (diff)
downloadpoky-7eecb81b6d788fe630e2378b0136cd46dadae7dd.tar.gz
linux-dtb.inc: explicit test for empty string not needed
The for loop already handles the case when KERNEL_DEVICETREE is empty. (From OE-Core rev: 49010f4a1ae9570e96691c9faeb17808174488fe) 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.inc78
1 files changed, 36 insertions, 42 deletions
diff --git a/meta/recipes-kernel/linux/linux-dtb.inc b/meta/recipes-kernel/linux/linux-dtb.inc
index 173e945ef6..2b8b11f084 100644
--- a/meta/recipes-kernel/linux/linux-dtb.inc
+++ b/meta/recipes-kernel/linux/linux-dtb.inc
@@ -6,54 +6,48 @@ python __anonymous () {
6} 6}
7 7
8do_compile_append() { 8do_compile_append() {
9 if test -n "${KERNEL_DEVICETREE}"; then 9 for DTB in ${KERNEL_DEVICETREE}; do
10 for DTB in ${KERNEL_DEVICETREE}; do 10 if echo ${DTB} | grep -q '/dts/'; then
11 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 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 DTB=`basename ${DTB} | sed 's,\.dts$,.dtb,g'` 13 fi
14 fi 14 oe_runmake ${DTB}
15 oe_runmake ${DTB} 15 done
16 done
17 fi
18} 16}
19 17
20do_install_append() { 18do_install_append() {
21 if test -n "${KERNEL_DEVICETREE}"; then 19 for DTB in ${KERNEL_DEVICETREE}; do
22 for DTB in ${KERNEL_DEVICETREE}; do 20 if echo ${DTB} | grep -q '/dts/'; then
23 if echo ${DTB} | grep -q '/dts/'; then 21 bbwarn "${DTB} contains the full path to the the dts file, but only the dtb name should be used."
24 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'`
25 DTB=`basename ${DTB} | sed 's,\.dts$,.dtb,g'` 23 fi
26 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}" 27 if [ ! -e "${DTB_PATH}" ]; then
30 if [ ! -e "${DTB_PATH}" ]; then 28 DTB_PATH="${B}/arch/${ARCH}/boot/${DTB}"
31 DTB_PATH="${B}/arch/${ARCH}/boot/${DTB}" 29 fi
32 fi 30 install -m 0644 ${DTB_PATH} ${D}/${KERNEL_IMAGEDEST}/devicetree-${DTB_SYMLINK_NAME}.dtb
33 install -m 0644 ${DTB_PATH} ${D}/${KERNEL_IMAGEDEST}/devicetree-${DTB_SYMLINK_NAME}.dtb 31 done
34 done
35 fi
36} 32}
37 33
38do_deploy_append() { 34do_deploy_append() {
39 if test -n "${KERNEL_DEVICETREE}"; then 35 for DTB in ${KERNEL_DEVICETREE}; do
40 for DTB in ${KERNEL_DEVICETREE}; do 36 if echo ${DTB} | grep -q '/dts/'; then
41 if echo ${DTB} | grep -q '/dts/'; then 37 bbwarn "${DTB} contains the full path to the the dts file, but only the dtb name should be used."
42 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'`
43 DTB=`basename ${DTB} | sed 's,\.dts$,.dtb,g'` 39 fi
44 fi 40 DTB_BASE_NAME=`basename ${DTB} .dtb`
45 DTB_BASE_NAME=`basename ${DTB} .dtb` 41 DTB_NAME=`echo ${KERNEL_IMAGE_BASE_NAME} | sed "s/${MACHINE}/${DTB_BASE_NAME}/g"`
46 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"`
47 DTB_SYMLINK_NAME=`echo ${KERNEL_IMAGE_SYMLINK_NAME} | sed "s/${MACHINE}/${DTB_BASE_NAME}/g"` 43 DTB_PATH="${B}/arch/${ARCH}/boot/dts/${DTB}"
48 DTB_PATH="${B}/arch/${ARCH}/boot/dts/${DTB}" 44 if [ ! -e "${DTB_PATH}" ]; then
49 if [ ! -e "${DTB_PATH}" ]; then 45 DTB_PATH="${B}/arch/${ARCH}/boot/${DTB}"
50 DTB_PATH="${B}/arch/${ARCH}/boot/${DTB}" 46 fi
51 fi 47 install -d ${DEPLOYDIR}
52 install -d ${DEPLOYDIR} 48 install -m 0644 ${DTB_PATH} ${DEPLOYDIR}/${DTB_NAME}.dtb
53 install -m 0644 ${DTB_PATH} ${DEPLOYDIR}/${DTB_NAME}.dtb 49 ln -sf ${DTB_NAME}.dtb ${DEPLOYDIR}/${DTB_SYMLINK_NAME}.dtb
54 ln -sf ${DTB_NAME}.dtb ${DEPLOYDIR}/${DTB_SYMLINK_NAME}.dtb 50 done
55 done
56 fi
57} 51}
58 52
59pkg_postinst_kernel-devicetree () { 53pkg_postinst_kernel-devicetree () {