summaryrefslogtreecommitdiffstats
path: root/scripts
AgeCommit message (Collapse)Author
2022-03-15wic: Use custom kernel path if providedBill Pittman
If the custom kernel path is provided in options, then use that path instead of the default path. Signed-off-by: Bill Pittman <bill.pittman@ni.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 1068102216a894c467f71f6046fdb37d5577545c) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
2022-02-25scripts/buildhistory-diff: drop use of distutilsTim Orling
The use of distutils.version.LooseVersion to check for GitPython > 0.3.1 is not really needed anymore since any supported distribution has at least 1.0.0 (centos-7 via epel7, debian-9, ubuntu-16.04) If we want to reinstate this check, alternatives would be to require python3-packaging on all hosts and use packaging.version.Version or use an imported LooseVersion in bb.version. [YOCTO #14610] Signed-off-by: Tim Orling <timothy.t.orling@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit bc90dcae9f53ddc246942f4d9b8ae8943e3b9754) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
2022-02-25devtool: deploy-target: Remove stripped binaries in pseudo contextFlorian Amstutz
deploy-target may fail the second time with "pseudo abort" because devtool-deploy-target-stripped is deleted outside of pseudo's fakeroot context. Signed-off-by: Florian Amstutz <florian.amstutz@scs.ch> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 2338a33b690b0bbe279cde3f73764911b239cb50) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
2022-02-15scripts/runqemu-ifdown: Don't treat the last iptables command as specialDaniel Müller
The runqemu-ifup script performs a bunch of setup steps that runqemu-ifdown attempts to undo later on. While a bunch of said setup operations are considered fatal should they fail, the iptables based NAT setup notably is not. The tear down procedure in runqemu-ifdown, however, has the iptables based tear down as the last operation, with the status of it determining the overall status of the script. Hence, if this step fails, the script is considered a failure overall. That is arguably inconsistent: If the NAT setup did not succeed, the tear down cannot succeed either. To ensure similarity of the two paths, let's not treat the last iptables tear down operation any special and allow it to fail the runqemu-ifdown script, but just ignore failures. Background: we have seen a NAT related setup problem on the ifup path (which didn't cause script failure), but then saw an issue bubbled up when this operation was meant to be undone on the ifdown path. Signed-off-by: Daniel Müller <muellerd@fb.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 0ebcfb034bcad81efef5f746f0aa0b69772901a0) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
2022-02-15recipetool: Fix circular reference in SRC_URISaul Wold
When creating a new recipe.bb file for a binary, don't use BP which includes the version information, instead use BPN which is just the name base Package Name. Since PB is not specified, it takes the default: PV = "1.0+git${SRCPV}" But SRCPV is defined in terms of the SRC_URI, which leads to infinite recursion (traceback below). Here are the pertinent variables which cause the recursion: SRC_URI = "git://github.com/lvc/abi-dumper;protocol=https;subdir=${BP}" BP = "${BPN}-${PV}" PV = "1.0+git${SRCPV}" SRCPV = "${@bb.fetch2.get_srcrev(d)}" def get_srcrev(d, method_name='sortable_revision'): # ... trimmed scms = [] fetcher = Fetch(d.getVar('SRC_URI').split(), d) # ... trimmed [YOCTO #14040] Signed-off-by: Saul Wold <saul.wold@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 3b8d43fc53ee13d39abc3b2a1f706a97fcf752aa) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
2022-02-07yocto-check-layer: add debug output for the layers that were foundRoss Burton
When debugging weird yocto-check-layer output it is useful to know what the tool found when looking for layers. Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 711e2d4d7baf36f8497741c14268d7f72d0db016) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> (cherry picked from commit 6ff05fe05a23d4355c3a33a03350dea025133689) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
2022-01-17scripts: Update to use exec_module() instead of load_module()Richard Purdie
This is deprecated in python 3.12 and Fedora 35 is throwing warnings so move to the new functions. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 655cd3f614d736416eab0d708b7c49674bf5c977) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
2021-12-10recipetool: Set master branch only as fallbackStefan Herbrechtsmeier
The commit 'meta/scripts: Manual git url branch additions (dc53fe75cc)' sets the branch= parameter too early to master and thereby breaks the -B/--srcbranch option. ERROR: branch= parameter and -B/--srcbranch option cannot both be specified - use one or the other Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 34ece8030e7a6a100b5e3e7b94e6c786c0e199a6) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
2021-12-10runqemu: check the qemu PID has been set before kill()ing itRoss Burton
If runqemu is killed, check that we have a valid PID for the qemu before sending a kill() to it. [ YOCTO #14651 ] Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 0f3afbd3a6a6bef668612f818517df7543c0a683) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
2021-12-10recipetool: extend curl detection when creating recipesRoss Burton
If a configure.ac uses LIBCURL_CHECK_CONFIG it wants curl. Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 16e830ca1352cee61e4ae4b98b1203f849bf71f3) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
2021-12-10recipetool: handle GitLab URLs like we do GitHubRoss Burton
GitHub URLs are automatically transformed to git: fetches, so handle GitLab URLs too. Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 651fb951819840fe122458ddbd852ee6c7ec0455) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
2021-12-10scripts/checklayer/common.py: Fixed a minor grammatical errorDhruva Gole
Signed-off-by: Dhruva Gole <goledhruva@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 8ea17456ae5318ed7a3b4c8f75c8441456d8b979) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
2021-12-10wic: support rootdev identified by partition labelSchmidt, Adriaan
We already support specifying the rootfs by PARTUUID. This adds general support for letting the kernel find the rootfs by PARTLABEL. Signed-off-by: Adriaan Schmidt <adriaan.schmidt@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 2fb247c5ecf057bb96649a3c0234794b4991c050) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
2021-11-29wic: use shutil.whichMingli Yu
Use shutil.which to find the executable instead to silence the below warning: $ cat tmp/work/intel_x86_64-poky-linux/core-image-base/1.0-r5/temp/log.do_image_wic [snip] DEBUG: Executing shell function do_image_wic /path/layers/oe-core/scripts/wic:27: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives from distutils import spawn INFO: Creating image(s)... [snip] [RP: Added conversion for missed function reference] Signed-off-by: Mingli Yu <mingli.yu@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 3966cbf5c8a2dbc3a4f0f3eefdbeeb83f522bf87) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
2021-11-22scripts/lib/wic/help.py: Update Fedora Kickstart URLsJon Mason
The URLs describing Kickstart are no longer valid and do not redirect to the correct location. Update them with the correct location. Signed-off-by: Jon Mason <jdmason@kudzu.us> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit e5ac75f93c8128b0761af5fee99e8603ddd1657d) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
2021-11-22scripts/oe-package-browser: Handle no packages being builtRichard Purdie
Give the user a proper error message if there aren't packages built, rather than a less friendly traceback. [YOCTO #14619] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit b14c176b7dd74b7d63ca0f72e6e00fbf209f5a0b) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
2021-11-22convert-srcuri.py: use regex to check space in SRC_URIKai Kang
There may be none, one or more spaces including tab before backslash in SRC_URI. Use regex to check and update. It helps to avoid malformed uri such as recipe open-iscsi-user in meta-openstack: SRC_URI = "git://github.com/open-iscsi/open-iscsi.git;protocol=https ;branch=master \ And help to check more recipes such as concurrent-ruby in the same layer: SRC_URI = "git://github.com/ruby-concurrency/concurrent-ruby.git;protocol=https;tag=v1.1.6\ Signed-off-by: Kai Kang <kai.kang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit a69a53573b1987ee5834a6fc27763f9bbf5fe5a4) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
2021-11-12meta/scripts: Manual git url branch additionsRichard Purdie
Following the scripted conversion adding branches to git:// SRC_URI entries, add the remaining references, mainly in the selftests and recipetool. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 5340c0d688036c1be6c938f05d8a8c1e3b49ec38) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
2021-11-10scripts/convert-srcuri: Backport SRC_URI conversion script from master branchRichard Purdie
This script handles two emerging issues: 1. 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. 2. Github are dropping support for git:// protocol fetching, so remap github urls as needed. For more details see: https://github.blog/2021-09-01-improving-git-protocol-security-github/ Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
2021-10-04scriptutils.py: Add check before deleting pathChandana kalluri
Add a check before deleting path when using recipetool commands to avoid the following type of errors: Traceback (most recent call last): File "<workdir>/sources/core/scripts/lib/scriptutils.py", line 218, in fetch_url shutil.rmtree(path) File "/usr/local/lib/python3.7/shutil.py", line 476, in rmtree onerror(os.lstat, path, sys.exc_info()) File "/usr/local/lib/python3.7/shutil.py", line 474, in rmtree orig_st = os.lstat(path) FileNotFoundError: [Errno 2] No such file or directory: '<workdir>/build/tmp/work/recipetool-usg7o81n/work/recipe-sysroot' ERROR: Command 'script -e -q -c "recipetool --color=always create --devtool -o /tmp/devtool5sq_op37 'file:///<SRCTREE>' -x <workdir>/build/workspace/sources/devtoolsrcxc1b9zjq -N test" /dev/null' failed Signed-off-by: Sai Hari Chandana Kalluri <chandana.kalluri@xilinx.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit b6aa8b47e023004ffd6958d1cec18c2d9c95d77b) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
2021-10-04wic: keep rootfs_size as integerAlexander Kanavin
The corrected line accidentally converted it to float, which causes problems later on with python 3.10: | File "/home/alex/development/poky/scripts/lib/wic/partition.py", line 278, in prepare_rootfs_ext | os.ftruncate(sparse.fileno(), rootfs_size * 1024) | TypeError: 'float' object cannot be interpreted as an integer Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit d1d260dd2d196d10379ed9e238bcb34f39f3a3b7) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
2021-09-29pybootchart: Avoid divide by zeroRichard Purdie
Avoid a rare divide by zero error if there isn't data point spread. [YOCTO #14547] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit d7e36d01e87ddf89f76f164a0b7d98f597a53fa5) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
2021-08-25wic: don't forcibly pass -T defaultRoss Burton
This reverts part of oe-core eecbe62555, which was a previous attempt to solve the Y2038 problem. This is now solved centrally in e2fsprogs, so doesn't need to be dealt with in wic. We don't revert the commit entirely, to retain the warning if a filesystem has small inodes. Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 7e8017208bed98b6c90735cb641fc9d7aedf9140) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
2021-08-09runqemu: Fix typo in error messageMatthias Klein
Signed-off-by: Matthias Klein <matthias@extraklein.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 5cc0051d50974e198313f9513b24fd7ae9a96dd4) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
2021-08-09devtool: print a warning on upgrades if PREFERRED_VERSION is setAlexander Kanavin
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 0b0f53eed0aadbf45d9eead96ebf7725cc7447e6) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
2021-07-31oe-setup-builddir: update YP docs and OE URLsMichael Opdenacker
This updates the link to the YP docs and proposes to access the OE website through https Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 87686233aeffc639c3f412fd5c4898b32b15013b) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
2021-07-31yocto-check-layer: ensure that all layer dependencies are tested tooNicolas Dechesne
In order to be compliant with the YP compatible status, a layer also needs to ensure that all its dependencies are compatible too. Currently yocto-check-layer only checks the requested layer, without testing any dependencies. With this change, all dependencies are also checked by default, so the summary printed at the end will give a clear picture whether all dependencies pass the script or not. Using --no-auto-dependency can be used to skip that. Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 45d59b774b95c91193a8376b83c05291d555e5c8) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
2021-07-31checklayer: rename _find_layer_dependsNicolas Dechesne
What this function does is really to find a layer, not a 'depends'. We are using this function to find a dependent layer, but the name is confusing. Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit e9b7690ab30d0e7c07471034f6cb89ccc3168a11) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
2021-07-31checklayer: new function get_layer_dependencies()Nicolas Dechesne
Split add_layer_dependencies() into 2 parts. First search for layer dependencies, and then add them to the config. That allows us to call get_layer_dependencies() independently. Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 08edf928aac3f2daaa0c256d4c21e56e2db72bff) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
2021-07-31yocto-check-layer: improve missed dependenciesNicolas Dechesne
The first 2 calls to add_layer_dependencies() are here to add all dependencies for the 'layer under test' and the additional layers provided by the users. In both cases, we use misssing_dependencies boolean to indicate if any dependency is missing. But we then never really use missing_dependencies. Instead the script is calling add_layer_dependencies() again (for both the layer under test, and the additional layers) to detect if there are any missing dependency. As a result, we are trying to add again all dependencies, and we can see that from the traces: INFO: Detected layers: INFO: meta-aws: LayerType.SOFTWARE, /work/oe/sources/meta-aws INFO: checklayer: Doesn't have conf/layer.conf file, so ignoring INFO: INFO: Setting up for meta-aws(LayerType.SOFTWARE), /work/oe/sources/meta-aws INFO: Adding layer meta-python INFO: Adding layer meta-oe INFO: Adding layer meta-networking --> INFO: Adding layer meta-python INFO: meta-python is already in /work/oe/poky/master/build-checklayer/conf/bblayers.conf INFO: Adding layer meta-oe INFO: meta-oe is already in /work/oe/poky/master/build-checklayer/conf/bblayers.conf INFO: Adding layer meta-networking INFO: meta-networking is already in /work/oe/poky/master/build-checklayer/conf/bblayers.conf <-- INFO: Getting initial bitbake variables ... The code appears more complex than it should, and we can simply replace the complex if statement by using missing_dependencies, and avoid duplicating the call to add_layer_dependencies(). Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit fceb84f7bc472731b8f96ee1ebf0f4485943226c) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
2021-07-31devtool: correctly handle non-standard source tree locations in upgradesAlexander Kanavin
When S is set to a sub-directory of upstream source, the license checks and the bbappend writing (specifically, setting EXTERNALSRC) need to operate on that sub-directory. 'devtool modify' already has similar logic, and it was copied from there and adjusted. Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit fd77e356d4507405fde352c8bba7d3842518bbdd) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
2021-07-13runqemu: Remove potential lock races around tap device handlingRichard Purdie
The qemu tap device handling is potentially race ridden. We pass the fd to the main qemu subprocess which is good as it means the lock is held as long as the qemu process exists. This means we shouldn't unlock it ourselves though, only close the file. We also can't delete the file as we have no idea if qemu is still using it. We could try and obtain an exclusive new lock, then the file would be safe to unlink but it doesn't seem worth it. Also fix the same issue in the port lock code. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 2a87bddabf816d09ec801e33972879e6983627eb) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
2021-07-13devtool: deploy-target: Fix preserving attributes when using --stripFlorian Amstutz
Commit a2db4fa127a3347fc6df31f895fb0b552669119e added ${WORKDIR}/deploy-* to PSEUDO_IGNORE_PATHS. This breaks the --strip mode since ${D} is copied to deploy-target-stripped. Use the directory devtool-deploy-target-stripped instead. [YOCTO #14451] Signed-off-by: Florian Amstutz <florian.amstutz@scs.ch> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 02661f20faf11d0fa2f1874bd423f5d9fa7a31c9) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
2021-06-30Use the label provided when formating a dos partitionjbouchard
Previously the bootimg-pcbios wic plugin was not respecting the --label option provided from the wks file. The plugin was setting the label to 'boot'. With this fix, the --label option is use. If no option are specified, then the default is 'boot'. Signed-off-by: jbouchard <jeanbouch418@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 0fd7a73c1bd2486b7a022f0f69bbcb2e0d9cb141) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
2021-06-30devtool upgrade: rebase override-only patches as wellAlexander Kanavin
There's a number of recipes (such as nettle or glib) which were upgraded incorrectly due to rebasing only the default set of patches in main SRC_URI. Native-only or musl-only patches were not handled, causing do_patch fails and overall misery. Unfortunately, this also necessitates aborting any incomplete rebases as devtool needs to be able to return to the original branch to complete the upgrade command. Also, do not add devtool-patched-%version tags, as they are not used anywhere, and it's unclear how to extend them to cover multiple override branches. (From OE-Core rev: 00131cbc969f6a73caffe068fcb983287cbe577f) Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> (cherry picked from commit 588d04748dd89b5371ca9144666e97ec82dd6204) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
2021-05-07oe-buildenv-internal: add BitBake's library to PYTHONPATHRoss Burton
There are many Python scripts in oe-core that want to use Tinfoil, and right now they have to know where they are to work out where BitBake is likely to be. This is suboptimal as BitBake could be somewhere else, so this approach doesn't scale to other layers at all. Solve this by adding BITBAKEDIR/lib to PYTHONPATH in oe-buildenv-internal, so that Python has BitBake on its search path once the build system is configured. Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit a48178f6d00e7f97a09f42d5a164204e9dcffa9f) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
2021-05-06pybootchart/draw: Avoid divide by zero errorRichard Purdie
When disk stats don't run frequenctly enough, we see divide by zero errors. The code already has a fallback path so ensure we use it for this case too. [YOCTO #14360] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit b71d30aef5dc2c360432c0dd4147859dd303ea48) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
2021-04-26yocto-check-layer: Avoid bug when iterating and autoadding dependenciesRichard Purdie
If iterating a layer with multiple components and auto-adding dependencies the tests can break since layers are never removed and order isn't guaranteed to account for that. Fix this by resetting the layer list back to the original list each time before auto-adding the dependencies in each case. This fixes scanning of meta-openembedded in particular where the sublayers may not be added in order of minimal dependency. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit bf1b467dacf345379cd5d84a1c9b3b0d844d5c91) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
2021-04-23runqemu: Ensure we cleanup snapshot files after image runRichard Purdie
We need to cleanup snapshot files if we make a copy of them to ensure the tmpfs doesn't run out of space. There is already NFS code needing this so make it a generic code path. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit a3e0eec5a4785a0c4859455eb10b43aa832e606d) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
2021-04-23oe-time-dd-test.sh: increase timeout to 15 secRandy MacLeod
With the previous timeout of 5 seconds, there would be builds such as: https://autobuilder.yocto.io/pub/non-release/20210417-13/ which produced 17 files with top output with top running 454 times and that's a bit too much data to analyze for each run. By increasing the timeout, we'll find the worse problems first, fix them and then we can decrease the timeout if needed. Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 92b29a09b4c442597d212337b785afb76129ac7c) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
2021-04-23scripts/oe-debuginfod: correct several issuesAlexander Kanavin
Particularly: - nesting subprocess.run() inside subprocess.check_output() does not work at all. How was this tested? - -R and -U options can be combined; no need to separate the invocations based on packaging format - both exception handlers are unnecessary; we can simply print the hint if invocation did not succeed - to run debuginfod from its own sysroot, '-c addto_recipe_sysroot' for elfutils-native must be executed Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 9e57bf636ec63e74d56f1ac48b5a27c5b80f1877) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
2021-04-16oe-time-dd-test.sh: provide more information from "top"Sakib Sajal
Improvements: - increase width to 512 - pass -c option to show full command-line Signed-off-by: Sakib Sajal <sakib.sajal@windriver.com> Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-04-16oe-time-dd-test.sh: make executableSakib Sajal
Signed-off-by: Sakib Sajal <sakib.sajal@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-04-06oeqa/runqemu: Support RUNQEMU_TMPFS_DIR as a location to copy snapshot images toRichard Purdie
We have a working theory that IO queues on the autobuilder are impacting runtime testing under qemu, particularly async writes which inice does not influence. We already pass the snapshot option to qemu which copies the image and runs out of the copy. Add in the ability to copy the image to a specificed location which can be a tmpfs. This means that writes to the image would no longer be blocked by other writes to disk in the system. Preliminary tests show that this does improve the qemu errors at the expense of sometimes showing qemu startup timeouts as on a loaded system with a large test image, it can take longer than 120s to copy the image to tmpfs. Having a most consistent failure mode for loaded tests is probably desireable though. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-04-05runqemu: do not stop processing graphical options after nographicAlexander Kanavin
Some options such as egl-headless are fully compatible with it, so there is no need to quit. Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-03-26documentation-audit.sh: Fix typo in specifying LICENSE_FLAGS_WHITELISTKhem Raj
Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-03-23scripts: add oe-time-dd-test.shSakib Sajal
oe-time-dd-test records how much time it takes to write <count> number of kilobytes to the filesystem. It also records the number of processes that are in running (R), uninterruptible sleep (D) and interruptible sleep (S) state from the output of "top" command. The purporse of this script is to find which part of the build system puts stress on the filesystem io and log all the processes. Signed-off-by: Sakib Sajal <sakib.sajal@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-03-20scripts/verify-bashisms: Update checkbashisms.pl URLPetr Vorel
anonscm.debian.org is not used any more, update the URL. Signed-off-by: Petr Vorel <petr.vorel@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-03-15scripts/contrib/list-packageconfig-flags: Upate for tinfoil API changesRichard Purdie
Update after tinfoil API changes in bitake for REQUIRED_VERSION. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-03-14bitbake-whatchanged: change ending quote to proper periodRobert P. J. Day
Pretty sure that trailing quote should be a period; it appears to work properly. Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>