summaryrefslogtreecommitdiffstats
path: root/meta/classes-recipe
diff options
context:
space:
mode:
authorBruce Ashfield <bruce.ashfield@gmail.com>2023-11-08 09:16:26 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-11-09 16:57:26 +0000
commitd6b37f223015baa6ebb809b18420c62204c4d1b0 (patch)
tree8b4b24580caf606d7597ed0515e95aadda803e9f /meta/classes-recipe
parent798d954e8d44d7bb9ea71aecf6ad450a220e60cc (diff)
downloadpoky-d6b37f223015baa6ebb809b18420c62204c4d1b0.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: e867addd6c2f508f7a95e72222e750d37f3d19d8) Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes-recipe')
-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 cb9cd26b09..9a86616dad 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))}"