diff options
| author | Bruce Ashfield <bruce.ashfield@gmail.com> | 2019-03-06 11:37:09 -0500 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-03-06 16:44:37 +0000 |
| commit | 04bfce60c8c8e4d0ba17460e89d7a6d3d071c147 (patch) | |
| tree | 6da04c112844a1a0fdcd881aa28bde11bbd7c1bd | |
| parent | 39685e2daf720b408861cd82e1c47bf88c0523af (diff) | |
| download | poky-04bfce60c8c8e4d0ba17460e89d7a6d3d071c147.tar.gz | |
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>
| -rw-r--r-- | meta/classes/kernel-yocto.bbclass | 29 |
1 files changed, 25 insertions, 4 deletions
diff --git a/meta/classes/kernel-yocto.bbclass b/meta/classes/kernel-yocto.bbclass index 2f556ca03b..bd7a957583 100644 --- a/meta/classes/kernel-yocto.bbclass +++ b/meta/classes/kernel-yocto.bbclass | |||
| @@ -5,12 +5,21 @@ PATCH_GIT_USER_NAME ?= "OpenEmbedded" | |||
| 5 | 5 | ||
| 6 | # returns local (absolute) path names for all valid patches in the | 6 | # returns local (absolute) path names for all valid patches in the |
| 7 | # src_uri | 7 | # src_uri |
| 8 | def find_patches(d): | 8 | def find_patches(d,subdir): |
| 9 | patches = src_patches(d) | 9 | patches = src_patches(d) |
| 10 | patch_list=[] | 10 | patch_list=[] |
| 11 | for p in patches: | 11 | for p in patches: |
| 12 | _, _, local, _, _, _ = bb.fetch.decodeurl(p) | 12 | _, _, local, _, _, parm = bb.fetch.decodeurl(p) |
| 13 | patch_list.append(local) | 13 | # if patchdir has been passed, we won't be able to apply it so skip |
| 14 | # the patch for now, and special processing happens later | ||
| 15 | patchdir = '' | ||
| 16 | if "patchdir" in parm: | ||
| 17 | patchdir = parm["patchdir"] | ||
| 18 | if patchdir: | ||
| 19 | if subdir == patchdir: | ||
| 20 | patch_list.append(local) | ||
| 21 | else: | ||
| 22 | patch_list.append(local) | ||
| 14 | 23 | ||
| 15 | return patch_list | 24 | return patch_list |
| 16 | 25 | ||
| @@ -119,8 +128,20 @@ do_kernel_metadata() { | |||
| 119 | fi | 128 | fi |
| 120 | fi | 129 | fi |
| 121 | 130 | ||
| 131 | # was anyone trying to patch the kernel meta data ?, we need to do | ||
| 132 | # this here, since the scc commands migrate the .cfg fragments to the | ||
| 133 | # kernel source tree, where they'll be used later. | ||
| 134 | check_git_config | ||
| 135 | patches="${@" ".join(find_patches(d,'kernel-meta'))}" | ||
| 136 | for p in $patches; do | ||
| 137 | ( | ||
| 138 | cd ${WORKDIR}/kernel-meta | ||
| 139 | git am -s $p | ||
| 140 | ) | ||
| 141 | done | ||
| 142 | |||
| 122 | sccs_from_src_uri="${@" ".join(find_sccs(d))}" | 143 | sccs_from_src_uri="${@" ".join(find_sccs(d))}" |
| 123 | patches="${@" ".join(find_patches(d))}" | 144 | patches="${@" ".join(find_patches(d,''))}" |
| 124 | feat_dirs="${@" ".join(find_kernel_feature_dirs(d))}" | 145 | feat_dirs="${@" ".join(find_kernel_feature_dirs(d))}" |
| 125 | 146 | ||
| 126 | # a quick check to make sure we don't have duplicate defconfigs | 147 | # a quick check to make sure we don't have duplicate defconfigs |
