summaryrefslogtreecommitdiffstats
path: root/meta-ti-bsp/recipes-kernel
diff options
context:
space:
mode:
Diffstat (limited to 'meta-ti-bsp/recipes-kernel')
-rw-r--r--meta-ti-bsp/recipes-kernel/linux/ti-kernel-devicetree-prefix.inc22
1 files changed, 21 insertions, 1 deletions
diff --git a/meta-ti-bsp/recipes-kernel/linux/ti-kernel-devicetree-prefix.inc b/meta-ti-bsp/recipes-kernel/linux/ti-kernel-devicetree-prefix.inc
index 1496a749..04c91004 100644
--- a/meta-ti-bsp/recipes-kernel/linux/ti-kernel-devicetree-prefix.inc
+++ b/meta-ti-bsp/recipes-kernel/linux/ti-kernel-devicetree-prefix.inc
@@ -18,5 +18,25 @@ def get_dtbs_from_kernel(dts_dir, dts_prefix):
18 matches.append(filename) 18 matches.append(filename)
19 return ' '.join(matches) 19 return ' '.join(matches)
20 20
21KERNEL_DEVICETREE = "${@get_dtbs_from_kernel('${S}/arch/${ARCH}/boot/dts/', '${KERNEL_DEVICETREE_PREFIX}')} ${KERNEL_DEVICETREE_DTBMERGE}" 21def get_merge_dtbs_from_kernel(dts_dir, dts_pattern):
22 import os
23 matches = []
24 if dts_dir == "":
25 return ' '
26 for pattern in dts_pattern.split():
27 pattern_dir = os.path.split(pattern)[0]
28 pattern_target = os.path.split(pattern)[1].replace(".","-") + "s"
29 makefile = dts_dir + "/" + pattern_dir + "/Makefile"
30 if os.path.exists(makefile):
31 with open(makefile) as f:
32 if pattern_target in f.read():
33 matches.append(pattern)
34 return ' '.join(matches)
35
36KERNEL_DEVICETREE_DTBMERGE ?= ""
37
38KERNEL_DEVICETREE = " \
39 ${@get_dtbs_from_kernel('${S}/arch/${ARCH}/boot/dts/', '${KERNEL_DEVICETREE_PREFIX}')} \
40 ${@get_merge_dtbs_from_kernel('${S}/arch/${ARCH}/boot/dts/', '${KERNEL_DEVICETREE_DTBMERGE}')} \
41"
22 42