summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorBruce Ashfield <bruce.ashfield@gmail.com>2023-11-08 09:16:26 -0500
committerSteve Sakoman <steve@sakoman.com>2023-12-15 03:54:00 -1000
commite96278affc93601cc385beeabc90c83df2a428bd (patch)
treee4d2e58b99a46f1ef5e122c6abd5383fd3501cd7 /meta
parent306e77e3a988844d0f4c172de4dc84145910a6d0 (diff)
downloadpoky-e96278affc93601cc385beeabc90c83df2a428bd.tar.gz
kernel-yocto: improve metadata patching
The ability to patch the kernel-yocto metadata was added to support debug and easier test cycles on kernel-cache provided fragments. As such, it was very simple and has limited functionality. That being said, it is an available feature and can be improved to handle patches that fail to apply. The main kernel patching is already handled by the kern-tools, so we extend the patching of the meta-data to same tools and inherit more functinality from the scripts. [YOCTO #15266] (From OE-Core rev: 98d981ba1bf903da441df22f298633bedbd718da) Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit e867addd6c2f508f7a95e72222e750d37f3d19d8) Signed-off-by: Steve Sakoman <steve@sakoman.com>
Diffstat (limited to 'meta')
-rw-r--r--meta/classes-recipe/kernel-yocto.bbclass30
1 files changed, 25 insertions, 5 deletions
diff --git a/meta/classes-recipe/kernel-yocto.bbclass b/meta/classes-recipe/kernel-yocto.bbclass
index 4ac977b122..4b7c0b829f 100644
--- a/meta/classes-recipe/kernel-yocto.bbclass
+++ b/meta/classes-recipe/kernel-yocto.bbclass
@@ -176,12 +176,32 @@ do_kernel_metadata() {
176 # kernel source tree, where they'll be used later. 176 # kernel source tree, where they'll be used later.
177 check_git_config 177 check_git_config
178 patches="${@" ".join(find_patches(d,'kernel-meta'))}" 178 patches="${@" ".join(find_patches(d,'kernel-meta'))}"
179 for p in $patches; do 179 if [ -n "$patches" ]; then
180 ( 180 (
181 cd ${WORKDIR}/kernel-meta 181 cd ${WORKDIR}/kernel-meta
182 git am -s $p 182
183 ) 183 # take the SRC_URI patches, and create a series file
184 done 184 # this is required to support some better processing
185 # of issues with the patches
186 rm -f series
187 for p in $patches; do
188 cp $p .
189 echo "$(basename $p)" >> series
190 done
191
192 # process the series with kgit-s2q, which is what is
193 # handling the rest of the kernel. This allows us
194 # more flexibility for handling failures or advanced
195 # mergeing functinoality
196 message=$(kgit-s2q --gen -v --patches ${WORKDIR}/kernel-meta 2>&1)
197 if [ $? -ne 0 ]; then
198 # setup to try the patch again
199 kgit-s2q --prev
200 bberror "Problem applying patches to: ${WORKDIR}/kernel-meta"
201 bbfatal_log "\n($message)"
202 fi
203 )
204 fi
185 fi 205 fi
186 206
187 sccs_from_src_uri="${@" ".join(find_sccs(d))}" 207 sccs_from_src_uri="${@" ".join(find_sccs(d))}"