summaryrefslogtreecommitdiffstats
path: root/meta/recipes-kernel/kern-tools
AgeCommit message (Collapse)Author
2022-02-20meta/meta-selftest/meta-skeleton: Update LICENSE variable to use SPDX ↵Richard Purdie
license identifiers An automated conversion using scripts/contrib/convert-spdx-licenses.py to convert to use the standard SPDX license identifiers. Two recipes in meta-selftest were not converted as they're that way specifically for testing. A change in linux-firmware was also skipped and may need a more manual tweak. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-12-09kern-tools-native: check tags, not commits for new versionsAlexander Kanavin
Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-12-09kern-tools: bug fixes and kgit-gconfigBruce Ashfield
Bumping yocto-kernel-tools to version v0.3, which comprises the following commits: 90598a5 tools: Makefile: add missing install file 330f9fa kgit-config: fix file mode 22b55cd kgit-config: cleanup error message 1e2a233 kgit-config: fix the "not found" message e7fcb9a kgit-config: trim trailing whitespace 3cd14ce kgit-config: BSP template and auto meta-data creation e56620c tools: introduce kgit-config 969b888 buckets: update to v5.14+ d220b06 Kconfiglib: add support for bare 'modules' keyword Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-10-30meta: Add explict branch to git SRC_URIsRichard Purdie
There is uncertainty about the default branch name in git going forward. To try and cover the different possible outcomes, add branch names to all git:// and gitsm:// SRC_URI entries. This update was made with the script added to contrib in this patch which aims to help others convert other layers. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-05-13kern-tools: Kconfiglib: add support for bare 'modules' keywordBruce Ashfield
Bumping the SRCREV to pickup the following for the kern-tools: commit 6dd85ff178cd76851e2184b13e545f5a88d1be30 [kconfig: change "modules" from sub-option to first-level attribute] broke parsing in 5.13+ trees. We add the new location to the parser so we can support both types of module specifications. Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Without this, the kernel configuration audit for 5.13+ errors immediately. The older "option modules" parsing has been left in the code, so that older kernels continue to work as well. Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-04-20kern-tools: add dropped options to audit outputBruce Ashfield
The rewrite of the configuration audit code dropped the ability to generate warnings for configuration options that didn't make it into the final .config. We integrated the following commit to restore those warnings: symbol_why: classify based on config.queue hints The config.queue has typing hints inline with each fragment, we should be using them to further classify the options, and not only relying on the special hardware.cfg, etc, files that are part of the meta data We also should be checking for options that were set to a non 'no' value, and that don't make it into the final .config, since without that check it means we are missing some warnings. Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-03-11kern-tools: symbol-why fix and README updateBruce Ashfield
There was a bad indent in symbol_why, which we fix with a submitted patch. As part of getting that patch, it was pointed out that there's no README telling people where to send changes. So we add a basic README to avoid that in the future: 8f6aaab docs: add README for patch submission 9f1a6cb symbol_why: fix incorrect indentation of sys.exit(1) Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-03-02recipes-kernel: Add missing HOMEPAGE and DESCRIPTION for recipes.Meh Mbeh Ida Delphine
Fixes: [YOCTO #13471] Signed-off-by: Ida Delphine <idadelm@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-12-24kern-tools: non-gcc config support and option re-classificationBruce Ashfield
Integrating the following commits: 1aa9046 merge_config.sh: Translate some env variables to make variables 6fdcd64 symbol_why: allow re-classification from non-hardare to hardware With these, a non-gcc compiler can be used, since the invocation of the kernel configuration explicitly passes the variables as command line vars, versus environment variables. This means the kernel Makefile assignments are overriden and the desired compiler used. With option re-classification, we can inhibit warnings when an option has incorrectly been classified has 'hardware', and hence triggers a visible warning. [merge_config.sh: Translate some env variables to make variables] Signed-off-by: Tyler Hicks <tyhicks@linux.microsoft.com> [symbol_why: allow re-classification from non-hardare to hardware] Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-08-13kernel-yocto: make # is not set matching more preciseBruce Ashfield
Integrating the following commit: symbol_why: tighten 'is not set' matching Commented lines that contained CONFIG_FOO ... were being picked up as option lines and reported as invalid. We make the regex more explicit and only match on spaces before CONFIG_ to declare if a 'is not set' line is invalid. Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-08-08kernel-yocto: enhance configuration queue analysis capabilitiesBruce Ashfield
Enable the kernel-yocto bbclass to use enhanced capabilities from the kern-tools symbol_why.pl. We bump the kern-tools SRCREV to pickup the reworking of symbol_why, which uses Kconfiglib to provide analysis on configuration values. This is useful for debugging why a symbol specified in a fragment did not end up in the final .config. We introduce two ways to interact with the new symbol_why: 1) a replacement of the existing kconf_check script 2) a dedicated task that is explicitly invoked to dump details on the configuration. The kconf_check replacement is transparent to the user, and is run in exactly the same way as it was previously. But we get better output and more detailed diagnostics if there are symbols that don't make it into the final .config The second way to interact with symbol why is via the new task do_config_analysis. This is invoked like any other task, and by default will provide a full configuration analysis and point the user at files to look at for details. If a more targetted analysis is desired, then specific symbols can be set in the CONFIG_ANALYSIS variable. When this variable is set, the task will only run for the given symbols and provide per-variable links to the user. This variable can be set like any other, including specification in the local.conf: CONFIG_ANALYSIS_pn-linux-yocto-dev = 'NF_CONNTRACK LOCALVERSION' Which produces output as follows: WARNING: linux-yocto-dev-5.8-rc++gitAUTOINC+d22beb8f8a_8fc484ed37-r0 do_config_analysis: Configuration analysis executed, see: tmp/work/qemuarm64-poky-linux/linux-yocto-dev/5.8-rc++gitAUTOINC+d22beb8f8a_8fc484ed37-r0/NF_CONNTRACK-config-analysis.txt for details WARNING: linux-yocto-dev-5.8-rc++gitAUTOINC+d22beb8f8a_8fc484ed37-r0 do_config_analysis: Configuration audit executed, see: tmp/work/qemuarm64-poky-linux/linux-yocto-dev/5.8-rc++gitAUTOINC+d22beb8f8a_8fc484ed37-r0/NF_CONNTRACK-config-audit.txt for details WARNING: linux-yocto-dev-5.8-rc++gitAUTOINC+d22beb8f8a_8fc484ed37-r0 do_config_analysis: Configuration analysis executed, see: tmp/work/qemuarm64-poky-linux/linux-yocto-dev/5.8-rc++gitAUTOINC+d22beb8f8a_8fc484ed37-r0/LOCALVERSION-config-analysis.txt for details WARNING: linux-yocto-dev-5.8-rc++gitAUTOINC+d22beb8f8a_8fc484ed37-r0 do_config_analysis: Configuration audit executed, see: work/qemuarm64-poky-linux/linux-yocto-dev/5.8-rc++gitAUTOINC+d22beb8f8a_8fc484ed37-r0/LOCALVERSION-config-audit.txt for details Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-02-08kern-tools: fix merge_config when LD contains parametersBruce Ashfield
To ensure that the kernel linker is used when allno/mod/yes config merge_config steps were executed, the call to make was tweaked to explicitly pass LD. But since the variable wasn't quoted, any parameters to LD (like the sysroot) were mistakenly passed to make, and hence could trigger an error on some architectures. We also tweak the logging to hightlight errors like this in the future and avoid losing it in the noise of merge configs sometimes overly verbose output. Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-02-08kern-tools-native: use more common S value and oe_runmakeMartin Jansa
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-02-08kern-tools: integrate merge_config fix for gold linkerBruce Ashfield
Bumping the SRCREV to pickup the following fix: Author: Martin Jansa <Martin.Jansa@gmail.com> Date: Wed Feb 5 03:26:57 2020 +0100 merge_config.sh: pass LD variable from shell environment to make * since 5.4 kernel Kconfig will fail immediately when it detects that LD points to gold linker: scripts/Kconfig.include:39: gold linker 'i686-oe-linux-ld' not supported * in OE we already pass bfd linker in KERNEL_LD variable to merge_config.sh but we need to pass it also into the make call here Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-02-08kern-tools: tweak symbol_why to be python safeBruce Ashfield
Updating the SRCREV to pickup tweaks to symbol_why.py to be python3 safe: - we explicitly call /usr/bin/env python3 - we full specifiy our symbols - do not assume that 'None' can be converted to a string Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-02-03kern-tools: update Kconfiglib to latest (for 5.4+ kernel)Bruce Ashfield
When a symbol doesn't make it into the final analysis is run using Kconfiglib to show dependencies. v5.4 has introduced Kconfig elements that Kconfiglib can't parse (hence we get no analysis). Updating the Kconfiglib snapshot solves our problem. Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-08-14kconf_check: tweak CONFIG_ regexBruce Ashfield
As reported in https://bugzilla.yoctoproject.org/show_bug.cgi?id=12563, the regex that matches valid CONFIG_ options was missing some of the ones in net/netfilter/ipvs/Kconfig, and hence triggering invalid option warnings. By dropping the trailing space on the regex, we'll cover all the cases for valid option. Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-08-14kern-tools: Add SPDX license headers to source filesBruce Ashfield
Integrating the following commit: Add SPDX license headers to source files Kconfiglib/* were under ISC license before they were imported here from https://github.com/ulfalizer/Kconfiglib Adjusting SPDX header to reflect that fact. tools/* all have some sort of GPLv2 headers; adding SPDX header to make it obvious. This address bug #13334 : https://bugzilla.yoctoproject.org/show_bug.cgi?id=13334 Change-Id: I243f2dd266a398f982798b771e74a67be70ecb52 Signed-off-by: William Bourque <wbourque@gmail.com> Signed-off-by: William Bourque <wbourque@gmail.com> Signen-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-18kern-tools: tools/kconf_check: modify grep patternBruce Ashfield
Integrating the following kern tools patch: The cmd line, <grep '^[ ]*\(menu\)*config '>, can't match all expect config options. This is because that it is not always a single space after 'config' in kernel-source/*/.../Kconfig. e.g. "config IP_VS_IPV6" in net/netfilter/ipvs/Kconfig So we should change the cmd to grep '^[ ]*\(menu\)*config\s'. Signed-off-by: Hongzhi.Song <hongzhi.song@windriver.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-09-07kern-tools: improve kernel config audit outputBruce Ashfield
Recent kernels broke the ability of kconfiglib to parse the Kconfig files and offer reasons why a symbol may not be set. To address this issue, we update to Kconfiglib2 and adjust the symbol_why script to work with the new API. We also tweak the kconf_check script to allow the specification of a list of option as "non-hardware". This allows a BSP to inhibit warnings on options that it knows are mismatched for a valid reason (i.e. -tiny kernels using common fragments with known missing dependencies). Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-28classes/kernel-yocto: Cleanup getstatusoutput usageJoshua Watt
Replace usage of os.utils.getstatusoutput() with direct subprocess calls. Pass a modified environment and working directory where necessary to bypass the need to execute in a shell. Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-06-08kern-tools: avoid merge_config concatenation issuesBruce Ashfield
Integrating the following kern-tools commit: tools/merge_config.sh: add CR after each fragment If a fragment file doesn't contain a CR at the end, two config options may be merged on the same line in the result file, leading to misconfiguration. This patch adds a CR after each fragment to ensure that config options are well separated in the result file. Bug-AGL: SPEC-1475 Signed-off-by: Stephane Desneux <stephane.desneux@iot.bzh> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> Signed-off-by: Stephane Desneux <stephane.desneux@iot.bzh> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-12-02kern-tools-native: fix upstream version checkAlexander Kanavin
Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-11-03kern-tools: make fuzzy matching optionalBruce Ashfield
It was reported that BSPs that only matched the machine were being returned as the configuration entry point. This could lead to warnings, or unexpected runtime results. Integrating the following commit to ensure that only strict matches are returned by default, with a flag to do fuzzy matching spp: make fuzzy matching optional Add a flag that can be used to toggle wether or not a partial match is an error. --fuzz When passed, partial patching will be used. If not passed the default is to return nothing (which can be interpreted as an error by the calling routines) if both the kernel type and machine do not match. Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-08-23kernel-yocto: ensure that only valid BSPs are builtBruce Ashfield
There was a bug in the search routines responsible for locating BSP definitions which returned a valid match if only the ktype matched. This meant that someone looking for "qemux86foo" (which is an invalid definition) would potentially end up building "qemuarm" and be none the wiser (until it didn't boot). With this fix to the tools search routine, and improved return code testing, we will now stop the build and report and error to the user. [YOCTO: #11878] Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-12kern-tools: avoid syntax errors when inheriting meta dataBruce Ashfield
It is possible to inherit meta data for either patches + config or for just config. It is possible that the patch queue contains invalid (when sourced) shell characters in the patch names, which throws a syntax error and aborts processing. The patch + config case was fixed some time ago, but we recently stumbled onto the config-only case which was still not properly quoted and hence safe. This commit brings the config-only inherit in line with the patch + config processing and we won't abort processing if characters like () are in patch names. Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-04-28kernel-yocto/kern-tools: fix do_validate_branches clean stageBruce Ashfield
It was reported that do_validate_branches was failing with the following error: Log data follows: | DEBUG: Executing shell function do_validate_branches | HEAD is now at fe0fb8d Merge tag 'v4.10.9' into standard/base | mkdir: cannot create directory .: File exists | | [ERROR] Can't find patch dir at ./patches/standard/base | usage: kgit s2q | WARNING: exit code 1 from a shell command. | ERROR: Function failed: do_validate_branches This was triggered by the execution of 'kgit-s2q --clean' after forcing the SRCREV to something other than the tip of the branch. --clean is being run to remove any sentinel files from previous kernel builds to ensure that the tree is in a consistent state. There were two bugs, --clean was being executed and not exiting the script as it was supposed to. Hence validation for applying patches was done, and threw the error that eventually makes it to the console. And the second bug is that since do_validate_branches actually calls kgit-s2q --clean, the dependency on kern-tools-native needs to be on that function (versus do_kernel_metadata which runs later). With the tweaked kern-tool + the dependency fix, we no longer see this error. Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-02-19kernel-yocto.bbclass: ensure repatching when HEAD is checked outAwais Belal
In some cases it is seen that kernel_checkout and validate_branches are run again in simultaneous builds. During do_patch the kgit-s2q mechanism looks for a sentinel file inside the .git directory, finds a fence post and starts picking up patches after that. This can create trouble as validate_branches checks out the HEAD of the branch and so the patches should be reapplied rather than skipped due to finding of the fence post. We can call kgit-s2q --clean to remove the sentinel file when the branches are checked out. Signed-off-by: Awais Belal <awais_belal@mentor.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-02-05kern-tools: re-enable scc merge commandBruce Ashfield
The ability to merge two branches directly from a .scc file was dropped during the streamlining of the tools. As was pointed out by David Vincent <freesilicon@gmail.com>, there is once again a valid use case for this functionality, so we restore the capability. Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-01-23kern-tools: kconf_check: flag CONFIG options with invalid spacesBruce Ashfield
Options with spacs around = signs will be droped/ignored by the kernel. The audit phase can detect this and warn the user: % kconf_check --report -o .kernel-meta/cfg/ \ linux-qemux86-standard-build/.config `pwd` $cfgs [errors (3): .kernel-meta/cfg/fragment_errors.txt There are errors withing the config fragments. % cat .kernel-meta/cfg/fragment_errors.txt Warning: Ignoring "CONFIG_PARAVIRTT_CLOCK =y" -- spaces around equals are invalid Warning: Ignoring "CONFIG_PARAVIRTTT_CLOCK = y" -- spaces around equals are invalid Warning: Ignoring "CONFIG_PARAVIRTTTT_CLOCK= y" -- spaces around equals are invalid Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-01-23kern-tools: scc: Fix process_file error checkBruce Ashfield
Commit 626ceac135fa66277c2fa53197be33cc9d4d7614 broke the error check in process_file by adding in three lines that stomp on $? which print the output file when verbose is set. Move output file on verbose print to an elif after the error check. Signed-off-by: George McCollister <george.mccollister@gmail.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-12-09kern-tools: ensure that no shared directories are usedBruce Ashfield
We need to avoid using shared/common directories for any files that are part of specific build, since permissions issues in multi user environments will cause issues. Integrating the following commit to solve the issue: scc: move unused patch queue under output dir Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-12-07kern-tools: fix processing for no branch meta-dataBruce Ashfield
Lernel meta-data that has patches, but no branches, can trigger an error due to no branch specific patch queue. This error then cascades to more issues since the tools are using a named file in /tmp to store and display error messages to the user. We fix both issues though the following kern tools tweaks: commit bd9e1d6c9b0a34ff3e19a06999aaf57ffadfd04c Author: Bruce Ashfield <bruce.ashfield@windriver.com> Date: Fri Dec 2 13:09:40 2016 -0500 scc: use mktemp for consolidated output capture To provide useful error messages the tools dump pre-processed files and messages to a temporary file. If multiple users are doing builds, this means they either race, or can have permissions issues. By creating the temporary file via mktemp, we avoid both issues. (We also make sure to clean these up on exit, or /tmp will get polluted quickly). commit a287da4bfe0b4acb8f2b0627bd8e7abd1a1dde26 Author: Bruce Ashfield <bruce.ashfield@windriver.com> Date: Fri Dec 2 13:08:08 2016 -0500 patch: do not assume a branch specific patch queue is needed When processing input files per-branch and global patch queues are generated. If the meta-data has not created any branches in the repo, no branch specific queue is required. The tools assumed that one is always valid, and hence would throw a non-zero exit code and stop processing. By testing for a named per-branch queue, we avoid this issue. Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-11-30kern-tools: error checking and tree generation fixesBruce Ashfield
During processing of the kernel meta data the kern tools were not properly exiting on syntax errors or invalid commands. Noticing and debugging these issues wasn't trivial. To make this easier, we now trap the error and dump the offending meta-data for the user to see. There was also an issue with creating branches during tree generation, which is resolved by always switching to the active branch. The following are the commit logs of the changes themselves: [ commit b36f6f9a5695f2084b83823393e13ca42284bed9 Author: Paul Gortmaker <paul.gortmaker@windriver.com> Date: Sat Oct 22 17:23:25 2016 -0400 kgit-scc: dont mention meta-repo in help ; it doesnt exist Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> commit 08463d684c1952e74c25344cddace4c3f24c739d Author: Bruce Ashfield <bruce.ashfield@windriver.com> Date: Mon Oct 31 14:30:12 2016 -0400 scc: exit on error If there is an error in the processing of the input files, scc should exit and inform the user. scc is executed on a combined/preprocessed file and as a result it doesn't have the granularity to see each input file individually. Rather than moving preprocessing into scc (from spp), we can trap the line number of the error and dump context around the line. This gives the user a pointer to the input file and the specific line that caused the problem. Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> commit bf99953e8ac14cee653e559f2d4a6022c847a182 Author: Bruce Ashfield <bruce.ashfield@windriver.com> Date: Fri Oct 28 21:23:27 2016 -0400 kgit-meta: always checkout branches on branch commands During a tree generation we must always make the branch active when we see any kind of branch command. This ensures that any subsequent patches are applied in the proper context. Previously, only branch creation was changing the active branch, and this mean that tree generation was not determinstic and relied on the order of processing to generate a correct tree. Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> ] Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-10-19kern-tools: make patches with shell-unsafe characters validBruce Ashfield
If a patch contains characters like ; or (), it can cause processing errors in the patch queue. We had previously fixed this issue by renaming the patches to not include invalid characters, but with this change to the kern tools that ensures patch names are wrapped in quotes, we avoid shell processing and hence they are valid. Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-08-18kernel-yocto: streamline patch, configuration and audit phasesBruce Ashfield
We've been running with a set of kern-tools that were designed to work with build systems that knew nothing about git, trees, commits, etc. As such, there's been a set of shims/wrappers in place to work with within bitbake/oe-core. These were the *me scripts: createme, updateme, patchme and configme. With this commit, we strip that legacy code and use the tools directly. This means less complexity, fewer corner cases .. and no surprises when the tools are arunning. As another benefit, the tools consume much less time during a typical build and have no noticeable impact on the overall build time. Existing .scc files, features, and processing are not impacted as these tools are compatible with existing feature descriptions and kerne configuration fragments. The audit of kernel configuration fragments is now detached from the linux-yocto build structure and process. This means that they can eventually be tweaked to offer kernel audit to any type of kernel build and configuration process. Additionally, the kernel symbol audit phase can now resolve symbol dependencies and offer guidance when a symbol is missing: WARNING: linux-yocto-4.4.15+gitAUTOINC+b030d96c7b_f5e2c49d58-r0 do_kernel_configcheck: [kernel config]: specified values did not make it into the kernel's final configuration: ---------- CONFIG_BT_6LOWPAN ----------------- Config: CONFIG_BT_6LOWPAN From: /home/bruce/poky/build/tmp/work-shared/qemux86-64/kernel-source/.kernel-meta/configs/standard/features/bluetooth/bluetooth.cfg Requested value: CONFIG_BT_6LOWPAN=y Actual value: Config 'BT_6LOWPAN' has the following conditionals: BT_LE && 6LOWPAN (value: "n") Dependency values are: BT_LE [y] 6LOWPAN [n] Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-05-09kern-tools: handle directories with, or without, trailing /Bruce Ashfield
Robert P. J. Day reported that configuration fragments and kernel features were not being found when organized in a particular manner: linux - $BOARD - mm.patch - mm.scc - ssd_sil.cfg - ssd_sil.patch - ssd_sil.scc - uio.cfg .. etc There was a bug in the tools that did not handle the mix of subdirs properly and ended up leaving a trailing / on the elements *not* in the $BOARD subdir. As a result, the configuration fragments were not properly found when searching the include paths, and a configuration failure was triggered (due to missing files). This change tweaks the tools to always check a path with and without a trailing / when processing config fragments so they can be later found when processing the configuration of the kernel. Reported-by: "Robert P. J. Day" <rpjday@crashcourse.ca> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-10-24kern-tools: avoid duplicate .scc file processingBruce Ashfield
With the recent changes to improve patch processing times, the ability to skip already applied patches is not active by default. The automatic detection and resume was hiding issues with the include files generated by scripts like yocto-bsp. If a .scc file that contains a patch is included twice, the patch is applied twice, and the second appliation fails for obvious reasons. We can partially fix this by ensuring that already included configuration fragments are not forced into the meta-series. .scc files that are explicitly listed twice will continue to fail, and recipes must be modified to avoid this. [YOCTO: #8486] Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-10-01kern-tools: fix multi-layer patch applicationBruce Ashfield
Updating the kern-tools SRCREV to import the following fix: kgit-meta: resume after last applied patch When the auto-resume (resume point detection) was removed from the processing of a meta-series, it ignored the fact that a single patch series may in fact be processed a number of times. Two layers patching a kernel will generate two different runs on the same branch, which always start at patch one. This will obviously break with duplicate patches. To avoid this, we simply track the last patch applied, and explicitly tell the patch scripts where to start. This gets us resume functionality, without the overhead of resume point detection. Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-19kern-tools: optimize patching peformanceBruce Ashfield
Updating the kern-tools SRCREV to integrat the following commit: patching: only validate user supplied patches by default Previously the patching tools would consider both system and user supplied patches in the same manner .. they are simply a series of patches to be applied to a branch, and that the scripts should determine where in the series to start (based on what is already on the branch). This detection was causing a few problems: - time consuming - starting in the middle of a series when intermediate patches were merged to a branch. To solve both the performance and start detection, we instead simply note the transition from system (i.e. already defined features and series) and user/recipe supplied patches. When the transition is noted, the system will start pushing ALL patches without doing autoresume detection. Control in keeping the series up to date is passed to the user, and consistent behaviour/performance is achieved. Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-25kern-tools: standalone tree configurationBruce Ashfield
Updating the kern-tools SRCREV to import the following changes: cbd4b7102668 patchme/updateme: unify meta directory handling b65075997152 configme: standalone operation The change of note is [configme: standalone operation], which makes the kernel configuration script free from dependencies on other parts of the kern-tools. With this change, we set the stage to extend kernel configuration fragments and auditing to arbitrary trees. Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-04-28kern-tools: unify meta directory detectionBruce Ashfield
It is possible that recipe specific tasks, or build processes drop files into the kernel source directory. These files can cause problems with the meta data detection in the kern-tools. With this change, we have a single unified meta data detection routine, that logs the result in a new file ".metadir", which subsequent scripts can find, and use, thereby avoid repeating the same check many times. We also enhance the check to look for a sentinel file in a proper meta directory, to avoid false positives when an unexpected kernel process leaves an uncommitted directory in the kernel dir. [YOCTO: #7441] Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-03-20kern-tools: fix iterative configuration runsBruce Ashfield
When fixing a kernel configuration warning, it is often necessary to modify the kernel's meta-data and re-run the tools to update and re-audit the config. This implies that the patch, config and audit steps are run multiple times. The tools had a bug that would incorrectly restore old meta-data versus using updated configuration. Updating the kern-tools SRCREV to fix the issue. Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2015-03-02kern-tools: improve patch application performanceBruce Ashfield
Update the SRCREV for the following incremental improvement in patch processing time: kgit-meta: skip patches on non-leaf nodes In a similar way as commit 0768d697 [kgit-meta: dont run kgit-s2q for non-leaf nodes], we can save even more processing time by not even analysing and linking patches if we aren't on the leaf node of the tree. This early exit can save nearly 95% of the time required to "patch" a tree when no changes are actually applied. Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-20linux-yocto: make kernel configuration audit user visibleBruce Ashfield
After a linux-yocto style kernel is configured, a kernel configuration audit is executed to detect common errors or issues with the config. This output used to be visible, but was made less obvious to not alarm users unnecessarily (since some configuration issues are acceptable). There are some classes of configuration issue that are worth being visible, and that is specified configuration values that do not make the final .config. These dropped options can result in any number of runtime failures, so flagging them at build time makes sense. The visibility of auditing is controlled by KCONF_AUDIT_LEVEL: 0: no reporting 1: report options that are specified, but not in the final config 2: report options that are not hardware related, but set by a BSP The default level is 1, with level 2 and above being for BSP development only. If these conditions are detected, warnings will be generated as follows: WARNING: [kernel config]: specified values did not make it into the kernel's final configuration: Value requested for CONFIG_SND_PCSP not in final ".config" Requested value: "CONFIG_SND_PCSP=y" Actual value set: "" or WARNING: [kernel config]: BSP specified non-hw configuration: CONFIG_BLOCK CONFIG_CFG80211_WEXT CONFIG_CORDIC CONFIG_CRC8 CONFIG_EFIVAR_FS CONFIG_EFI_PARTITION CONFIG_NET CONFIG_NETDEVICES CONFIG_PARTITION_ADVANCED CONFIG_WEXT_CORE CONFIG_WEXT_PROC CONFIG_WIRELESS At this point thse are only a warnings, since there needs to be time for layers and configuration fragments to be validated against this new check. [YOCTO: #6943] Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2015-02-14kern-tools: fix patch application error (preempt-rt)Bruce Ashfield
Updating the SRCREV to import the following kern-tools patch: kgit-meta: always clear series file on branch transitions This was triggered by the patch optimization changes, that no longer run do_patch if a leaf/final branch is not being processed. Without this change, invalid patches, or already applied patches in an existig series file will be re-used which leads to missing files, or patch errors. Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-02-08kern-tools: import patch performance improvementsBruce Ashfield
Updating the SRCREV for the following commits: 4822d22b65c2 kgit-meta: dont run kgit-s2q for non-leaf nodes 3e3de1b9cdec createme: remove meta branch checks With these, we save 10 seconds on the average patch phase, and significantly more if very long patch queues are used. Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2014-10-01kern-tools: fix overly greedy path relocationsBruce Ashfield
During patch processing a consolidated set of configs, patches and directives is created under the kernel source tree being modified. During that processing, absolutely paths are converted to relative. It has been found that if directories are sufficiently similar, like so: /path/to/my-linux /path/to/my-linux-3.16 The processing will chop to much of some paths, resulting in invalid relative directories (like -3.16 in the above example). Importing the following two kern tools fixes for the issue: 23345b8846fe kgit: retain trailing / in directory processing a8cf93a3bc94 kgit-s2q: move subject and diffstat mismatch to 'fuzzy' matching [YOCTO: #6753] Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-01kern-tools: allow meta branch and meta data directory to differBruce Ashfield
From the kern-tools commit: tools: allow meta directories that are not the same as the branch name With this change it is now possible to have a meta branch with meta data in a directory that is not the same name as the branch. The changes to three parts of the build are required to discover the name of the meta directory by relying on the fact that in a clean/proper build the meta directory is the only untracked, top level directory in the build. As such, we can restore a checkpoint and then examine the build directory to determine the meta directory name .. avoiding any new variables to indicate this to the scripts and build system. Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2014-07-25kern-tools: adjust to full history meta-dataBruce Ashfield
In order to generate and support kernel trees with full history, we need to modify the kernel tools e914d570232a kgit-checkpoint: ensure that full meta-data artifacts are maintained 192be836d318 kgit-scc: allow meta-data history to be maintained Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>