summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/classes/kernel-yocto.bbclass33
-rw-r--r--meta/recipes-kernel/kern-tools/kern-tools-native_git.bb2
2 files changed, 33 insertions, 2 deletions
diff --git a/meta/classes/kernel-yocto.bbclass b/meta/classes/kernel-yocto.bbclass
index 962b4936b9..92ede6a3aa 100644
--- a/meta/classes/kernel-yocto.bbclass
+++ b/meta/classes/kernel-yocto.bbclass
@@ -42,6 +42,23 @@ def find_urls(d):
42 42
43 return patch_list 43 return patch_list
44 44
45# check the SRC_URI for "kmeta" type'd git repositories. Return the name of
46# the repository as it will be found in WORKDIR
47def find_kernel_feature_dirs(d):
48 feature_dirs=[]
49 fetch = bb.fetch2.Fetch([], d)
50 for url in fetch.urls:
51 urldata = fetch.ud[url]
52 parm = urldata.parm
53 if "type" in parm:
54 type = parm["type"]
55 if "destsuffix" in parm:
56 destdir = parm["destsuffix"]
57 if type == "kmeta":
58 feature_dirs.append(destdir)
59
60 return feature_dirs
61
45 62
46do_patch() { 63do_patch() {
47 cd ${S} 64 cd ${S}
@@ -72,6 +89,7 @@ do_patch() {
72 89
73 sccs="${@" ".join(find_sccs(d))}" 90 sccs="${@" ".join(find_sccs(d))}"
74 patches="${@" ".join(find_patches(d))}" 91 patches="${@" ".join(find_patches(d))}"
92 feat_dirs="${@" ".join(find_kernel_feature_dirs(d))}"
75 93
76 set +e 94 set +e
77 # add any explicitly referenced features onto the end of the feature 95 # add any explicitly referenced features onto the end of the feature
@@ -82,13 +100,26 @@ do_patch() {
82 done 100 done
83 fi 101 fi
84 102
103 # check for feature directories/repos/branches that were part of the
104 # SRC_URI. If they were supplied, we convert them into include directives
105 # for the update part of the process
106 if [ -n "${feat_dirs}" ]; then
107 for f in ${feat_dirs}; do
108 if [ -d "${WORKDIR}/$f/meta" ]; then
109 includes="$includes -I${WORKDIR}/$f/meta"
110 elif [ -d "${WORKDIR}/$f" ]; then
111 includes="$includes -I${WORKDIR}/$f"
112 fi
113 done
114 fi
115
85 if [ "${kbranch}" != "${KBRANCH_DEFAULT}" ]; then 116 if [ "${kbranch}" != "${KBRANCH_DEFAULT}" ]; then
86 updateme_flags="--branch ${kbranch}" 117 updateme_flags="--branch ${kbranch}"
87 fi 118 fi
88 119
89 # updates or generates the target description 120 # updates or generates the target description
90 updateme ${updateme_flags} -DKDESC=${KMACHINE}:${LINUX_KERNEL_TYPE} \ 121 updateme ${updateme_flags} -DKDESC=${KMACHINE}:${LINUX_KERNEL_TYPE} \
91 ${addon_features} ${ARCH} ${KMACHINE} ${sccs} ${patches} 122 ${includes} ${addon_features} ${ARCH} ${KMACHINE} ${sccs} ${patches}
92 if [ $? -ne 0 ]; then 123 if [ $? -ne 0 ]; then
93 echo "ERROR. Could not update ${kbranch}" 124 echo "ERROR. Could not update ${kbranch}"
94 exit 1 125 exit 1
diff --git a/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb b/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb
index 635dfe6add..98cd8b9e85 100644
--- a/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb
+++ b/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb
@@ -4,7 +4,7 @@ LIC_FILES_CHKSUM = "file://git/tools/kgit;beginline=5;endline=9;md5=d8d1d729a70c
4 4
5DEPENDS = "git-native guilt-native" 5DEPENDS = "git-native guilt-native"
6 6
7SRCREV = "62c8807825ea923a18b1519375b0df67ad9daf2b" 7SRCREV = "9284af9b968d40e441b10f5c09961cbe329ccb9b"
8PR = "r12" 8PR = "r12"
9PV = "0.1+git${SRCPV}" 9PV = "0.1+git${SRCPV}"
10 10