summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
authorBruce Ashfield <bruce.ashfield@gmail.com>2020-08-27 20:04:47 (GMT)
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-09-10 18:07:40 (GMT)
commit4ffc34f49c126fecd1b88537756c7dfae6bc26fb (patch)
tree8753d22455a24aedd70a5fcb93a1034b50ea0972 /meta/classes
parentfb739bf0160f7ff55e943a40bd247095c4c479f7 (diff)
downloadpoky-4ffc34f49c126fecd1b88537756c7dfae6bc26fb.tar.gz
kernel-yocto: checksum all modifications to available kernel fragments directories
This is based on the patch from Zhaolong Zhang <zhangzl2013@126.com> [kernel-yocto: checksum indirect cfg and scc files] While the recommended manner to share/reuse feature fragments is to maintain them in a kernel-meta repository and track the changes via the standard SRCREV fetcher mechanism, that method is not always practical for small sets of features or for quick testing of changes. These other flows use .scc files on the SRC_URI. It has been noted that config fragments or other features indirectly included by those .scc files will not trigger the kernel meta-data to be re-run and hence a build can continue with stale data (or not be triggered at all). To solve this issue, we can collect the directories that are searchable via FILESEXTRAPATHS and add them to the do_kernel_metadata task checksum. This allows modifications, additions and removals from the potential kernel feature directories to trigger a re-execution of the meta data task. (From OE-Core rev: e397859ceac42d926134d5cb7828526d8d649c95) Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 09f4db415fb6a1398e9e9b359630043c833f6118) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/kernel-yocto.bbclass16
1 files changed, 16 insertions, 0 deletions
diff --git a/meta/classes/kernel-yocto.bbclass b/meta/classes/kernel-yocto.bbclass
index 3311f6e..cc8bcb9 100644
--- a/meta/classes/kernel-yocto.bbclass
+++ b/meta/classes/kernel-yocto.bbclass
@@ -85,6 +85,21 @@ def get_machine_branch(d, default):
85 85
86 return default 86 return default
87 87
88# returns a list of all directories that are on FILESEXTRAPATHS (and
89# hence available to the build) that contain .scc or .cfg files
90def get_dirs_with_fragments(d):
91 extrapaths = []
92 extrafiles = []
93 extrapathsvalue = (d.getVar("FILESEXTRAPATHS") or "")
94 # Remove default flag which was used for checking
95 extrapathsvalue = extrapathsvalue.replace("__default:", "")
96 extrapaths = extrapathsvalue.split(":")
97 for path in extrapaths:
98 if path + ":True" not in extrafiles:
99 extrafiles.append(path + ":" + str(os.path.exists(path)))
100
101 return " ".join(extrafiles)
102
88do_kernel_metadata() { 103do_kernel_metadata() {
89 set +e 104 set +e
90 cd ${S} 105 cd ${S}
@@ -330,6 +345,7 @@ do_kernel_checkout[dirs] = "${S}"
330addtask kernel_checkout before do_kernel_metadata after do_symlink_kernsrc 345addtask kernel_checkout before do_kernel_metadata after do_symlink_kernsrc
331addtask kernel_metadata after do_validate_branches do_unpack before do_patch 346addtask kernel_metadata after do_validate_branches do_unpack before do_patch
332do_kernel_metadata[depends] = "kern-tools-native:do_populate_sysroot" 347do_kernel_metadata[depends] = "kern-tools-native:do_populate_sysroot"
348do_kernel_metadata[file-checksums] = " ${@get_dirs_with_fragments(d)}"
333do_validate_branches[depends] = "kern-tools-native:do_populate_sysroot" 349do_validate_branches[depends] = "kern-tools-native:do_populate_sysroot"
334 350
335do_kernel_configme[depends] += "virtual/${TARGET_PREFIX}binutils:do_populate_sysroot" 351do_kernel_configme[depends] += "virtual/${TARGET_PREFIX}binutils:do_populate_sysroot"