diff options
author | Bruce Ashfield <bruce.ashfield@windriver.com> | 2012-02-01 09:25:03 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-02-08 00:50:26 +0000 |
commit | 568bdc78f9977e73aa8f5bb0ee904fdd40bcbd7c (patch) | |
tree | 22dbca38e7c36cfd0f65e38140bafb30f3dfdc0d /meta/classes/kernel-yocto.bbclass | |
parent | 44f0a2cfc57677fe9eb971f6d75c2f66c1ec80b1 (diff) | |
download | poky-568bdc78f9977e73aa8f5bb0ee904fdd40bcbd7c.tar.gz |
linux-yocto: locate and use out of tree features specified on the SRC_URI
In a similar manner to calling the patch.bbclass to locate patches that
were listed on the SRC_URI, it is also useful to query about 'other' items
that are on the SRC_URI. In the case of linux-yocto, it allows us to
know about kernel features that were specific on the URI and then apply
them to the current tree.
(From OE-Core rev: 3e2ce87566124db8c78472f9a4f00ab26410f213)
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/kernel-yocto.bbclass')
-rw-r--r-- | meta/classes/kernel-yocto.bbclass | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/meta/classes/kernel-yocto.bbclass b/meta/classes/kernel-yocto.bbclass index 7fdefcf221..3130bf4512 100644 --- a/meta/classes/kernel-yocto.bbclass +++ b/meta/classes/kernel-yocto.bbclass | |||
@@ -10,6 +10,16 @@ def find_patches(d): | |||
10 | 10 | ||
11 | return patch_list | 11 | return patch_list |
12 | 12 | ||
13 | def find_sccs(d): | ||
14 | sources=src_patches(d, True) | ||
15 | sources_list=[] | ||
16 | for s in sources: | ||
17 | base, ext = os.path.splitext(os.path.basename(s)) | ||
18 | if ext and ext in ('.scc'): | ||
19 | sources_list.append(s) | ||
20 | |||
21 | return sources_list | ||
22 | |||
13 | do_patch() { | 23 | do_patch() { |
14 | cd ${S} | 24 | cd ${S} |
15 | if [ -f ${WORKDIR}/defconfig ]; then | 25 | if [ -f ${WORKDIR}/defconfig ]; then |
@@ -42,6 +52,7 @@ do_patch() { | |||
42 | fi | 52 | fi |
43 | 53 | ||
44 | patches="${@" ".join(find_patches(d))}" | 54 | patches="${@" ".join(find_patches(d))}" |
55 | sccs="${@" ".join(find_sccs(d))}" | ||
45 | 56 | ||
46 | # This loops through all patches, and looks for directories that do | 57 | # This loops through all patches, and looks for directories that do |
47 | # not already have feature descriptions. If a directory doesn't have | 58 | # not already have feature descriptions. If a directory doesn't have |
@@ -81,6 +92,16 @@ do_patch() { | |||
81 | fi | 92 | fi |
82 | done | 93 | done |
83 | 94 | ||
95 | # look for any found scc files, and ensure they are added to the list | ||
96 | # of directories passsed to updateme | ||
97 | for s in ${sccs}; do | ||
98 | sdir=`dirname ${s}` | ||
99 | echo ${patch_dirs} | grep -q ${sdir} | ||
100 | if [ $? -ne 0 ]; then | ||
101 | patch_dirs="${patch_dirs} ${sdir}" | ||
102 | fi | ||
103 | done | ||
104 | |||
84 | # go through the patch directories and look for any scc feature files | 105 | # go through the patch directories and look for any scc feature files |
85 | # that were constructed above. If one is found, rename it to ".scc" so | 106 | # that were constructed above. If one is found, rename it to ".scc" so |
86 | # the kernel patching can see it. | 107 | # the kernel patching can see it. |