summaryrefslogtreecommitdiffstats
path: root/scripts
Commit message (Collapse)AuthorAgeFilesLines
* runqemu: correct vga-virtio option to keep virgl enabledAlexander Kanavin2021-10-111-1/+1
| | | | | | | | | | qemu 6.1 has (perhaps unintentionally) disabled virgl in -vga virtio: https://gitlab.com/qemu-project/qemu/-/issues/586 (From OE-Core rev: 2c6c7f0ff24da7060cea35f8ff89f2cabd96f2fb) Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic/bootimg-efi: Add Unified Kernel Image optionKristian Klausen2021-10-041-10/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "A unified kernel image is a single EFI PE executable combining an EFI stub loader, a kernel image, an initramfs image, and the kernel command line. [...] Images of this type have the advantage that all metadata and payload that makes up the boot entry is monopolized in a single PE file that can be signed cryptographically as one for the purpose of EFI SecureBoot."[1] This commit adds a create-unified-kernel-image=true option to the bootimg-efi plugin for creating a Unified Kernel Image[1] and installing it into $BOOT/EFI/Linux/ with a .efi extension per the the Boot Loader Specification[1][2]. This is useful for implementing Secure Boot. systemd-boot is the only mainstream bootloader implementing the specification, but GRUB should be able to boot the EFI binary, this commit however doesn't implement the necessary changes to the GRUB config generation logic to boot the Unified Kernel Image. [1] https://systemd.io/BOOT_LOADER_SPECIFICATION/#type-2-efi-unified-kernel-images [2] https://systemd.io/BOOT_LOADER_SPECIFICATION/ (From OE-Core rev: b0573f240525df561ddef6e47cb285b217d38487) Signed-off-by: Kristian Klausen <kristian@klausen.dk> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scriptutils.py: Add check before deleting pathChandana kalluri2021-10-011-1/+2
| | | | | | | | | | | | | | | | | | | 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 (From OE-Core rev: b6aa8b47e023004ffd6958d1cec18c2d9c95d77b) Signed-off-by: Sai Hari Chandana Kalluri <chandana.kalluri@xilinx.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic:direct.py: ignore invalid mountpoints during fstab updateMarkus Volk2021-09-261-1/+1
| | | | | | | | | | | | | | | | | | | | | wic fstab-update creates invalid entries for partitons that are not supposed to be mounted from userspace eg u-boot partitions. The following lines were added to fstab on a rock-pi-4: /dev/mmcblk1p1 loader1 vfat defaults 0 0 /dev/mmcblk1p2 reserved1 vfat defaults 0 0 /dev/mmcblk1p3 reserved2 vfat defaults 0 0 /dev/mmcblk1p4 loader2 vfat defaults 0 0 /dev/mmcblk1p5 atf vfat defaults 0 0 /dev/mmcblk1p6 /boot vfat defaults 0 0 With this patch only valid entries should be added /dev/mmcblk1p6 /boot vfat defaults 0 0 (From OE-Core rev: 7aa678ce804c21dc1dc51b9be442671bc33c4041) Signed-off-by: MarkusVolk <f_l_k@t-online.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta: Drop useless classRichard Purdie2021-09-231-4/+0
| | | | | | | | | | | | | | | This class was added by me back in 2007 and has changed one for a whitespace issue since. It only has two lines and neither are particularly useful, one was replaced by the nopackages class, the other adding recursive dependencies also is now mainly problematic adding tons of unneeded dependencies. The name is hard to understand and the class doesn't have a clear purpose. Drop it. Remove the references in devtool (which may be the one reason to keep it around but in my view still not worth it). (From OE-Core rev: 6e2cbfc561dac89bf9183d24d90e52f7d9117826) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts/oe-publish-sdk: Disable git gc to avoid build errorsRichard Purdie2021-09-231-2/+2
| | | | | | | | | | I've puzzled over why I see local eSDK test failures. It is due to having a messy git tree locally, git then runs git gc in the background which races against the deletion code for the publish test. Disable git gc to avoid this. (From OE-Core rev: d938a74097202396beda2e3bb4f582342d6dfa1b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* pybootchart: Avoid divide by zeroRichard Purdie2021-09-211-1/+4
| | | | | | | | | | Avoid a rare divide by zero error if there isn't data point spread. [YOCTO #14547] (From OE-Core rev: d7e36d01e87ddf89f76f164a0b7d98f597a53fa5) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: keep rootfs_size as integerAlexander Kanavin2021-09-191-1/+1
| | | | | | | | | | | | | | 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 (From OE-Core rev: d1d260dd2d196d10379ed9e238bcb34f39f3a3b7) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta: correct collections vs collections.abc deprecationAlexander Kanavin2021-09-191-1/+2
| | | | | | | | | collections.abc is available since 3.3 and doesn't need special handling. (From OE-Core rev: 01152c9410ba00274c8415a5d914dc33dfd0cf46) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: Add extra-space argumentKristian Klausen2021-09-062-2/+7
| | | | | | | | | | | | | This allows extra space to be added after the last partition and is especially useful when free space is needed for ex: adding partitions on first boot with ex: systemd-repart[1] and the image is tested in QEMU. [1] https://www.freedesktop.org/software/systemd/man/systemd-repart.html (From OE-Core rev: f81b188bcf5aa18746fd622eb7b5c0dcb0b5c93d) Signed-off-by: Kristian Klausen <kristian@klausen.dk> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* recipetool/create_buildsys_python: treat BSD as BSD-3-ClauseRoss Burton2021-09-041-1/+1
| | | | | | | | | | | | | | | | The PyPI license classifiers include "OSI Approved: BSD", which does not specify which of the many variations of BSD license it actually means. The generic "BSD" license in the oe-core set is actually BSD-3-Clause. >From a random sample of ten PyPI modules that use "BSD", they are all BSD-3-Clause. As we expect the recipe maintainer to verify the license anyway, and this matches the previous license text, explicitly set the license to BSD-3-Clause. (From OE-Core rev: a879fff9af31e45b1acc3f19a3c2a7eaf6319ad4) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* buildhistory: Add output file listing package informationAndres Beltran2021-08-271-14/+23
| | | | | | | | | | | | | | | | Currently, buildhistory does not produce a single file combining relevant information of installed packages. Produce an output file "installed-package-info.txt" listing a package's runtime name, buildtime name, its recipe, version, and size to avoid having to look up each package externally. Leave the existing package list files as-is for backwards compatibility. In order to support this efficiently, extend oe-pkgdata-util to accept multiple keys for its read-value argument. (From OE-Core rev: 1e18b514bf1f960d324a21db608c8e8e5af007ef) Signed-off-by: Andres Beltran <abeltran@linux.microsoft.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* buildhistory-collect-srcrevs: Adapt to the new variable override syntaxPeter Kjellerstedt2021-08-261-2/+2
| | | | | | | (From OE-Core rev: bcce0e7cef5768d5cfe58c356f6196af8ce03537) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* qemu: add a hint on how to enable CPU render nodes when a suitable GPU is absentAlexander Kanavin2021-08-231-0/+2
| | | | | | | | | | | | | | | | | | | This is particularly useful for llvm-accelerated GL rendering from qemu guest to an offscreen buffer (accessible over vnc or spice) using llvmpipe on the host, rather than using unaccelerated swrast renderer in the guest. This is the best that can be done in the absence of a host GPU with render node support (such as old Matrox cards common in servers, or fully virtualized cloud environments with no GPU at all). Note: even though NVidia blob drivers do support render nodes, they do not support gbm (yet?), and so rendering will fall back to llvmpipe as well even when the system has a 3000 euro NVidia GPU. Cue Linus picture. (From OE-Core rev: 9b1daa173481f7f560e00e0dc22b4010ff1dc0ec) Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: Add --no-fstab-update part optionDaniel Gomez2021-08-204-3/+8
| | | | | | | | | | | | | | | | | | | | | | | When embedding a rootfs image (e.g. 'rootfs-dir') as a partition we might want to keep the stock fstab for that image. In such a case, use this option to not update the fstab and use the stock one instead. This option allows you to specify which partitions get the fstab updated and which get the stock fstab. The option matches the argument you can pass to wic itself where the same action is performed but for all the partitions. Example: part /export --source rootfs --rootfs-dir=hockeycam-image --fstype=ext4 --label export --align 1024 --no-fstab-update part / --source rootfs --fstype=ext4 --label rootfs --align 1024 (From OE-Core rev: ab4c95af8ecd15dc136194ab761afae756db5803) Signed-off-by: Daniel Gomez <daniel@qtec.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package/scripts: Fix FILES_INFO handlingRichard Purdie2021-08-175-11/+12
| | | | | | | | | | | | | | | There is a long standing bug where FILES_INFO isn't written into pkgdata with a package suffix. This means if the files are read into the datastore as intended, the last one "wins". Fix this to work as intended. Most of the call sites using the data need to be updated to handle this and the overrides change correctly. Also fix some other problematic references noticed along the way. (From OE-Core rev: a1190903e0a61a12c9854c96af918ae8d12c6327) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts/lib/wic/help/py: "Redhat" -> "Red Hat"Robert P. J. Day2021-08-171-1/+1
| | | | | | | | | Company name is properly spelled as "Red Hat". (From OE-Core rev: cd60f20fe40bba5b80ab604ee34fbf4ec2b0b4a2) Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: don't forcibly pass -T defaultRoss Burton2021-08-123-3/+3
| | | | | | | | | | | | | | 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. (From OE-Core rev: 7e8017208bed98b6c90735cb641fc9d7aedf9140) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* convert-overrides.py: also convert comments without a leading whitespaceChen Qi2021-08-121-3/+3
| | | | | | | | | | | | | | | | | Currently lines like below are converted. e.g. # IMAGE_INSTALL_append = " A" But lines without a leading whitespace are not converted. e.g. #IMAGE_INSTALL_append = " A" We should be converting both. (From OE-Core rev: 1994e3844c1aa6b595c0c18040e4f8240fa04438) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* convert-overrides.py: allow dots before override in vars_re and shortvars_reMartin Jansa2021-08-051-3/+3
| | | | | | | | | | | | e.g. VIRTUAL-RUNTIME_com.webos.service.flowmanager_armv4 weren't replaced with VIRTUAL-RUNTIME_com.webos.service.flowmanager:armv4 or when package name contains a dot like in: RDEPENDS:gstreamer1.0-meta-base:remove (From OE-Core rev: 41bff44bd26c09573eb3139bb6735e5ecfda18b7) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image/image_types: Convert CONVERSION_CMD/COMPRESS_CMD to new override syntaxRichard Purdie2021-08-041-1/+1
| | | | | | | | | | For consistency, use override syntax for these variables as well since it is more consistent with the rest of the image code. We may be able to use these as proper overrides in due course. (From OE-Core rev: 52674c4b1fdf79829095031b2e342d44fb0dc181) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta: Convert IMAGE_TYPEDEP to use override syntaxRichard Purdie2021-08-041-1/+1
| | | | | | | | | The IMAGE_TYPEDEP variable would make more sense to match the form of the other image override variables, convert it to use the overrides format. (From OE-Core rev: 8573f6b2a7af9867da0b21936ffd2cd2a417de1d) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* convert-overrides.py: handle few more cases of overridesDenys Dmytriyenko2021-08-041-2/+3
| | | | | | | | | Add task-configure and few more supported values of TARGET_OS override. (From OE-Core rev: 1172f9593902f28ddd8da47de6bd51cda9a0f86a) Signed-off-by: Denys Dmytriyenko <denis@denix.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* runqemu: decouple bios and kernel optionsMatthias Klein2021-08-041-2/+4
| | | | | | | | | | This will allow the use of a bios (e.g. U-Boot) in combination with a WIC file (from which U-Boot loads the kernel). (From OE-Core rev: 5fc65c9d18679b62b13fead7b91126c665525884) Signed-off-by: Matthias Klein <matthias@extraklein.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* runqemu: Fix typo in error messageMatthias Klein2021-08-041-1/+1
| | | | | | | (From OE-Core rev: 5cc0051d50974e198313f9513b24fd7ae9a96dd4) Signed-off-by: Matthias Klein <matthias@extraklein.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* convert-overrides: Allow script to handle patch/diffsRichard Purdie2021-08-021-3/+7
| | | | | | | | | It is handy to be able to have the script convert a single patch file and it turns out to be straightforward to make it do this. (From OE-Core rev: 21df7acc969f47d615d1701ee71f19571de94949) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: print a warning on upgrades if PREFERRED_VERSION is setAlexander Kanavin2021-08-021-0/+3
| | | | | | | (From OE-Core rev: 0b0f53eed0aadbf45d9eead96ebf7725cc7447e6) Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta: Manual override fixesRichard Purdie2021-08-022-5/+5
| | | | | | | | | | The automated conversion of OE-Core to use the new override sytax isn't perfect. This patches some mis-converted lines and some lines which were missed by the automation. (From OE-Core rev: 4e9a06b64b43131b731fb59a0305f78a98e27fbd) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Convert to new override syntaxRichard Purdie2021-08-0214-31/+31
| | | | | | | | | | | | This is the result of automated script conversion: scripts/contrib/convert-overrides.py <oe-core directory> converting the metadata to use ":" as the override character instead of "_". (From OE-Core rev: 42344347be29f0997cc2f7636d9603b1fe1875ae) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* convert-overrides.py: allow specifying multiple target dirsMartin Jansa2021-07-301-13/+13
| | | | | | | (From OE-Core rev: e6aa4b1f6f4f174cba027ee096db174541815ff0) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* convert-overrides.py: 0.9.1 include '(' as delimiter for shortvarsMartin Jansa2021-07-301-2/+2
| | | | | | | (From OE-Core rev: ffe91649fafa84f814e32c9979e6a2de40a1bb25) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* convert-overrides.py: remove base_dep_prepend and autotools_dep_prepend ↵Martin Jansa2021-07-301-6/+0
| | | | | | | | | | | | exception * the functions were renamed in: https://git.openembedded.org/openembedded-core/commit/?id=9d002acae720b0a8e96a6734424a142b86880461 (From OE-Core rev: 43b7cbfb46701a130c248842426370372c88553b) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* convert-overrides.py: show processed file and version of this scriptMartin Jansa2021-07-301-0/+4
| | | | | | | | | | | * on bigger layer this script takes couple minutes without showing any progress * add a version to reference it in the conversion commit (to easily figure out if it's worth re-converting the layer). (From OE-Core rev: 39edf868deafe79ffd2ea57620af70840ec4c208) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts/contrib: Add override conversion scriptRichard Purdie2021-07-301-0/+141
| | | | | | | | | | | | | | | | | | | This adds a script I've developed to migrate metadata to use the new override syntax. It is a bit rough but since its for a single use with validation, it doesn't need to be perfect. It is run simply as: scripts/contrib/convert-overrides.py <directory> It is setup and has been tested to work with OE-Core, Bitbake, yocto-docs, meta-yocto, meta-gplv2 and meta-mingw. For OE-Core, it converts around 10,100 lines with about 34 manual fixes needed. For other layers it would need updating for override names and exclusions for functions/variable names with "append", "prepend" or "remove" in them. (From OE-Core rev: e8fc67f6f6baf54ccdf548b947c35dea926842c3) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* yocto-check-layer: ensure that all layer dependencies are tested tooNicolas Dechesne2021-07-281-1/+18
| | | | | | | | | | | | | | | | | | | 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. (From OE-Core rev: 45d59b774b95c91193a8376b83c05291d555e5c8) 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>
* checklayer: rename _find_layer_dependsNicolas Dechesne2021-07-281-2/+2
| | | | | | | | | | | | 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. (From OE-Core rev: e9b7690ab30d0e7c07471034f6cb89ccc3168a11) 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>
* checklayer: new function get_layer_dependencies()Nicolas Dechesne2021-07-281-1/+6
| | | | | | | | | | | | 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. (From OE-Core rev: 08edf928aac3f2daaa0c256d4c21e56e2db72bff) 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>
* yocto-check-layer: improve missed dependenciesNicolas Dechesne2021-07-281-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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(). (From OE-Core rev: fceb84f7bc472731b8f96ee1ebf0f4485943226c) 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>
* oe-setup-builddir: update YP docs and OE URLsMichael Opdenacker2021-07-251-2/+2
| | | | | | | | | | This updates the link to the YP docs and proposes to access the OE website through https (From OE-Core rev: 87686233aeffc639c3f412fd5c4898b32b15013b) Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* yocto-check-layer: Remove duplicated codeRichard Purdie2021-07-241-2/+0
| | | | | | | | | | | | Nicolas Dechesne spotted there was duplicate code I had introduced with a previous fix. Remove the second statement since the earlier one is correct all that is needed. (From OE-Core rev: f3e8d9f0e53e73de5498fccce81d049a88f6473b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts/oe-time-dd-test.sh: run "uptime" on each iterationSakib Sajal2021-07-221-1/+2
| | | | | | | | (From OE-Core rev: 45c334b3cfdfc9584b80cbc3ede1a60f61ecc8bb) Signed-off-by: Sakib Sajal <sakib.sajal@windriver.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: correctly handle non-standard source tree locations in upgradesAlexander Kanavin2021-07-161-3/+12
| | | | | | | | | | | | | | | 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. (From OE-Core rev: fd77e356d4507405fde352c8bba7d3842518bbdd) 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>
* oe-time-dd-test.sh: add options and refactorSakib Sajal2021-07-101-15/+80
| | | | | | | | | | | | | | | Options: -c | --count <amount> dd (transfer) <amount> KiB of data within specified timeout to detect latency. Must enable -t option. -t | --timeout <time> timeout in seconds for the <count> amount of data to be transferred. -l | --log-only run the commands without performing the data transfer. -h | --help show help (From OE-Core rev: 302bc6c99226a4d050e4e454afc461a25e127632) Signed-off-by: Sakib Sajal <sakib.sajal@windriver.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* runqemu: Remove potential lock races around tap device handlingRichard Purdie2021-07-081-9/+18
| | | | | | | | | | | | | | | | 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. (From OE-Core rev: 2a87bddabf816d09ec801e33972879e6983627eb) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: deploy-target: Fix preserving attributes when using --stripFlorian Amstutz2021-07-021-1/+1
| | | | | | | | | | | | | | 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] (From OE-Core rev: 02661f20faf11d0fa2f1874bd423f5d9fa7a31c9) Signed-off-by: Florian Amstutz <florian.amstutz@scs.ch> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Use the label provided when formating a dos partitionjbouchard2021-06-291-2/+4
| | | | | | | | | | | | | | 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'. (From OE-Core rev: 0fd7a73c1bd2486b7a022f0f69bbcb2e0d9cb141) 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>
* devtool upgrade: rebase override-only patches as wellAlexander Kanavin2021-06-261-15/+14
| | | | | | | | | | | | | | | | | | | | | | 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) (From OE-Core rev: 588d04748dd89b5371ca9144666e97ec82dd6204) 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>
* oe-time-dd-test.sh: add iostat commandSakib Sajal2021-06-211-1/+5
| | | | | | | (From OE-Core rev: 615f0492d224a4855e3f0d7a53b39767d5b4095a) Signed-off-by: Sakib Sajal <sakib.sajal@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oe-time-dd-test.sh: improve output formattingSakib Sajal2021-06-171-0/+3
| | | | | | | (From OE-Core rev: 3ca3a64d6a2a7160b04a7b0876fe0f744250bdfa) Signed-off-by: Sakib Sajal <sakib.sajal@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* runqemu: time the copy to tmpfsAlexandre Belloni2021-06-061-1/+4
| | | | | | | | | | | Measure and display the time it takes to copy the rootfs to its new location (usually in tmpfs) to try to understand whether it sometimes takes a lot of time on the autobuilders. (From OE-Core rev: be213114c1349e02ca48fd617a6c3badae8aa101) Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>