mirror of
https://git.yoctoproject.org/poky
synced 2026-06-03 01:40:07 +00:00
kernel-yocto: allow kernel-meta repositories to be patched
For testing purposes, it is often easier to patch a fragment in a kernel-meta repository versus needing to make a copy or modify the source repository. We can allow this sort of patching when a patchdir of kernel-meta is passed (to indicate the nested kernel-meta repository). Also note that we must patch the meta data before they are processed/gathered, since migrated copies to the kernel source directory will be used later. (From OE-Core rev: 324f9c8181150c23e3ce1ace4c45794cc8894167) Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
39685e2daf
commit
04bfce60c8
@@ -5,12 +5,21 @@ PATCH_GIT_USER_NAME ?= "OpenEmbedded"
|
|||||||
|
|
||||||
# returns local (absolute) path names for all valid patches in the
|
# returns local (absolute) path names for all valid patches in the
|
||||||
# src_uri
|
# src_uri
|
||||||
def find_patches(d):
|
def find_patches(d,subdir):
|
||||||
patches = src_patches(d)
|
patches = src_patches(d)
|
||||||
patch_list=[]
|
patch_list=[]
|
||||||
for p in patches:
|
for p in patches:
|
||||||
_, _, local, _, _, _ = bb.fetch.decodeurl(p)
|
_, _, local, _, _, parm = bb.fetch.decodeurl(p)
|
||||||
patch_list.append(local)
|
# if patchdir has been passed, we won't be able to apply it so skip
|
||||||
|
# the patch for now, and special processing happens later
|
||||||
|
patchdir = ''
|
||||||
|
if "patchdir" in parm:
|
||||||
|
patchdir = parm["patchdir"]
|
||||||
|
if patchdir:
|
||||||
|
if subdir == patchdir:
|
||||||
|
patch_list.append(local)
|
||||||
|
else:
|
||||||
|
patch_list.append(local)
|
||||||
|
|
||||||
return patch_list
|
return patch_list
|
||||||
|
|
||||||
@@ -119,8 +128,20 @@ do_kernel_metadata() {
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# was anyone trying to patch the kernel meta data ?, we need to do
|
||||||
|
# this here, since the scc commands migrate the .cfg fragments to the
|
||||||
|
# kernel source tree, where they'll be used later.
|
||||||
|
check_git_config
|
||||||
|
patches="${@" ".join(find_patches(d,'kernel-meta'))}"
|
||||||
|
for p in $patches; do
|
||||||
|
(
|
||||||
|
cd ${WORKDIR}/kernel-meta
|
||||||
|
git am -s $p
|
||||||
|
)
|
||||||
|
done
|
||||||
|
|
||||||
sccs_from_src_uri="${@" ".join(find_sccs(d))}"
|
sccs_from_src_uri="${@" ".join(find_sccs(d))}"
|
||||||
patches="${@" ".join(find_patches(d))}"
|
patches="${@" ".join(find_patches(d,''))}"
|
||||||
feat_dirs="${@" ".join(find_kernel_feature_dirs(d))}"
|
feat_dirs="${@" ".join(find_kernel_feature_dirs(d))}"
|
||||||
|
|
||||||
# a quick check to make sure we don't have duplicate defconfigs
|
# a quick check to make sure we don't have duplicate defconfigs
|
||||||
|
|||||||
Reference in New Issue
Block a user