summaryrefslogtreecommitdiffstats
path: root/meta/classes/kernel-yocto.bbclass
diff options
context:
space:
mode:
authorBruce Ashfield <bruce.ashfield@gmail.com>2020-08-27 16:04:47 -0400
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-08-28 07:08:37 +0100
commitc9ed6a22ab5df112cec0795ef1bdde9187ce4d52 (patch)
treeda37ee562fe1fa4fd840b8261913a6f8dcf3c79e /meta/classes/kernel-yocto.bbclass
parentfc807c9de7288fa62edf85409b3d2f55f862ac08 (diff)
downloadpoky-c9ed6a22ab5df112cec0795ef1bdde9187ce4d52.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: 09f4db415fb6a1398e9e9b359630043c833f6118) Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/kernel-yocto.bbclass')
-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 cb7614d64a..092afe251d 100644
--- a/meta/classes/kernel-yocto.bbclass
+++ b/meta/classes/kernel-yocto.bbclass
@@ -86,6 +86,21 @@ def get_machine_branch(d, default):
86 86
87 return default 87 return default
88 88
89# returns a list of all directories that are on FILESEXTRAPATHS (and
90# hence available to the build) that contain .scc or .cfg files
91def get_dirs_with_fragments(d):
92 extrapaths = []
93 extrafiles = []
94 extrapathsvalue = (d.getVar("FILESEXTRAPATHS") or "")
95 # Remove default flag which was used for checking
96 extrapathsvalue = extrapathsvalue.replace("__default:", "")
97 extrapaths = extrapathsvalue.split(":")
98 for path in extrapaths:
99 if path + ":True" not in extrafiles:
100 extrafiles.append(path + ":" + str(os.path.exists(path)))
101
102 return " ".join(extrafiles)
103
89do_kernel_metadata() { 104do_kernel_metadata() {
90 set +e 105 set +e
91 106
@@ -368,6 +383,7 @@ do_kernel_checkout[dirs] = "${S}"
368addtask kernel_checkout before do_kernel_metadata after do_symlink_kernsrc 383addtask kernel_checkout before do_kernel_metadata after do_symlink_kernsrc
369addtask kernel_metadata after do_validate_branches do_unpack before do_patch 384addtask kernel_metadata after do_validate_branches do_unpack before do_patch
370do_kernel_metadata[depends] = "kern-tools-native:do_populate_sysroot" 385do_kernel_metadata[depends] = "kern-tools-native:do_populate_sysroot"
386do_kernel_metadata[file-checksums] = " ${@get_dirs_with_fragments(d)}"
371do_validate_branches[depends] = "kern-tools-native:do_populate_sysroot" 387do_validate_branches[depends] = "kern-tools-native:do_populate_sysroot"
372 388
373do_kernel_configme[depends] += "virtual/${TARGET_PREFIX}binutils:do_populate_sysroot" 389do_kernel_configme[depends] += "virtual/${TARGET_PREFIX}binutils:do_populate_sysroot"