diff options
Diffstat (limited to 'meta')
-rw-r--r-- | meta/classes/kernel-yocto.bbclass | 74 | ||||
-rw-r--r-- | meta/recipes-kernel/kern-tools/kern-tools-native_git.bb | 2 |
2 files changed, 8 insertions, 68 deletions
diff --git a/meta/classes/kernel-yocto.bbclass b/meta/classes/kernel-yocto.bbclass index b7e8b3243f..0caf6a67f0 100644 --- a/meta/classes/kernel-yocto.bbclass +++ b/meta/classes/kernel-yocto.bbclass | |||
@@ -20,7 +20,9 @@ def find_sccs(d): | |||
20 | sources_list=[] | 20 | sources_list=[] |
21 | for s in sources: | 21 | for s in sources: |
22 | base, ext = os.path.splitext(os.path.basename(s)) | 22 | base, ext = os.path.splitext(os.path.basename(s)) |
23 | if ext and ext in ('.scc'): | 23 | if ext and ext in ('.scc' '.cfg' '.patch'): |
24 | sources_list.append(s) | ||
25 | elif base and base in 'defconfig': | ||
24 | sources_list.append(s) | 26 | sources_list.append(s) |
25 | 27 | ||
26 | return sources_list | 28 | return sources_list |
@@ -73,72 +75,9 @@ do_patch() { | |||
73 | fi | 75 | fi |
74 | 76 | ||
75 | sccs="${@" ".join(find_sccs(d))}" | 77 | sccs="${@" ".join(find_sccs(d))}" |
76 | patches_and_dirs="${@" ".join(find_urls(d))}" | 78 | patches="${@" ".join(find_patches(d))}" |
77 | |||
78 | # This loops through all patches, and looks for directories that do | ||
79 | # not already have feature descriptions. If a directory doesn't have | ||
80 | # a feature description, we switch to the ${WORKDIR} variant of the | ||
81 | # feature (so we can write to it) and generate a feature for those | ||
82 | # patches. The generated feature will respect the patch order. | ||
83 | # | ||
84 | # By leaving source patch directories that already have .scc files | ||
85 | # as-is it means that a SRC_URI can only contain a .scc file, and all | ||
86 | # patches that the .scc references will be picked up, without having | ||
87 | # to be repeated on the SRC_URI line .. which is more intutive | ||
88 | set +e | ||
89 | patch_dirs= | ||
90 | for pp in ${patches_and_dirs}; do | ||
91 | p=`echo $pp | cut -f1 -d:` | ||
92 | wp=`echo $pp | cut -f2 -d:` | ||
93 | pdir=`dirname ${p}` | ||
94 | pname=`basename ${p}` | ||
95 | scc=`find ${pdir} -maxdepth 1 -name '*.scc'` | ||
96 | if [ -z "${scc}" ]; then | ||
97 | # there is no scc file. We need to switch to someplace that we know | ||
98 | # we can create content (the workdir) | ||
99 | workdir_subdir=`dirname ${wp}` | ||
100 | suggested_dir="${WORKDIR}/${workdir_subdir}" | ||
101 | echo ${gen_feature_dirs} | grep -q ${suggested_dir} | ||
102 | if [ $? -ne 0 ]; then | ||
103 | gen_feature_dirs="${gen_feature_dirs} ${suggested_dir}" | ||
104 | fi | ||
105 | # we call the file *.scc_tmp, so the test above will continue to find | ||
106 | # that patches from a common subdirectory don't have a scc file and | ||
107 | # they'll be placed in order, into this file. We'll rename it later. | ||
108 | gen_feature_name="gen_`echo ${workdir_subdir} | sed 's%/%%g'`_desc.scc_tmp" | ||
109 | echo "patch ${pname}" >> ${WORKDIR}/${workdir_subdir}/${gen_feature_name} | ||
110 | else | ||
111 | suggested_dir="${pdir}" | ||
112 | fi | ||
113 | echo ${patch_dirs} | grep -q ${suggested_dir} | ||
114 | if [ $? -ne 0 ]; then | ||
115 | patch_dirs="${patch_dirs} ${suggested_dir}" | ||
116 | fi | ||
117 | done | ||
118 | |||
119 | # look for any found scc files, and ensure they are added to the list | ||
120 | # of directories passsed to updateme | ||
121 | for s in ${sccs}; do | ||
122 | sdir=`dirname ${s}` | ||
123 | echo ${patch_dirs} | grep -q ${sdir} | ||
124 | if [ $? -ne 0 ]; then | ||
125 | patch_dirs="${patch_dirs} ${sdir}" | ||
126 | fi | ||
127 | done | ||
128 | |||
129 | # go through the patch directories and look for any scc feature files | ||
130 | # that were constructed above. If one is found, rename it to ".scc" so | ||
131 | # the kernel patching can see it. | ||
132 | for pdir in ${patch_dirs}; do | ||
133 | scc=`find ${pdir} -maxdepth 1 -name '*.scc_tmp'` | ||
134 | if [ -n "${scc}" ]; then | ||
135 | new_scc=`echo ${scc} | sed 's/_tmp//'` | ||
136 | mv -f ${scc} ${new_scc} | ||
137 | fi | ||
138 | done | ||
139 | |||
140 | patch_dirs="${patch_dirs} ${WORKDIR}" | ||
141 | 79 | ||
80 | set +e | ||
142 | # add any explicitly referenced features onto the end of the feature | 81 | # add any explicitly referenced features onto the end of the feature |
143 | # list that is passed to the kernel build scripts. | 82 | # list that is passed to the kernel build scripts. |
144 | if [ -n "${KERNEL_FEATURES}" ]; then | 83 | if [ -n "${KERNEL_FEATURES}" ]; then |
@@ -146,9 +85,10 @@ do_patch() { | |||
146 | addon_features="$addon_features --feature $feat" | 85 | addon_features="$addon_features --feature $feat" |
147 | done | 86 | done |
148 | fi | 87 | fi |
88 | |||
149 | # updates or generates the target description | 89 | # updates or generates the target description |
150 | updateme --branch ${kbranch} -DKDESC=${KMACHINE}:${LINUX_KERNEL_TYPE} \ | 90 | updateme --branch ${kbranch} -DKDESC=${KMACHINE}:${LINUX_KERNEL_TYPE} \ |
151 | ${addon_features} ${ARCH} ${KMACHINE} ${patch_dirs} | 91 | ${addon_features} ${ARCH} ${KMACHINE} ${sccs} ${patches} |
152 | if [ $? -ne 0 ]; then | 92 | if [ $? -ne 0 ]; then |
153 | echo "ERROR. Could not update ${kbranch}" | 93 | echo "ERROR. Could not update ${kbranch}" |
154 | exit 1 | 94 | 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 b28402acfe..d1c2ee476c 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=e2bf4415f3d8 | |||
4 | 4 | ||
5 | DEPENDS = "git-native guilt-native" | 5 | DEPENDS = "git-native guilt-native" |
6 | 6 | ||
7 | SRCREV = "91c2b184be90d6654996887203efdd7f1727a19a" | 7 | SRCREV = "67bcedda582b2b191f26ec47dd1d4eac37f1305c" |
8 | PR = "r12" | 8 | PR = "r12" |
9 | PV = "0.1+git${SRCPV}" | 9 | PV = "0.1+git${SRCPV}" |
10 | 10 | ||