summaryrefslogtreecommitdiffstats
path: root/scripts
Commit message (Collapse)AuthorAgeFilesLines
* scripts/oe-setup-builddir: do not read TEMPLATECONF from templateconf.cfgAlexander Kanavin2022-09-291-11/+3
| | | | | | | | | | | | | | | | | | | Also, write to it only if it does not already exist. As discussed here[1], reading from templateconf.cfg serves no purpose: it exists only if the build directory has already been initialized, and so the scripts will not change anything in the build directory anyway. My adjustment is to keep the file however; it is useful as a pointer to the original template, which can be utilized by config management tools in the future. [1] https://lists.openembedded.org/g/openembedded-architecture/topic/template_handling_in_oe_core/93968540 (From OE-Core rev: bcfaeb8ed503ce1a5add3ec882f0e0c3bccfd3d2) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Revert "wic/plugins/images/direct: Allow changes in fstab on rootfs"Ross Burton2022-09-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Commit 20d43a2 allows changes in fstab for the / mount. However, if the fstab contains / already then this results in two entries for / in the fstab, which is confusing and results in systemd producing errors on boot: systemd-fstab-generator[11101]: Failed to create unit file /run/systemd/generator/-.mount, as it already exists. Duplicate entry in /etc/fstab? Wic should be extended to support merging mount points in fstab, but as we're about to release revert the patch that introduced this change as it hasn't been in a release yet, and the issue which prompted the patch in the first place can be revisited post-release. [ YOCTO #14865 ] (From OE-Core rev: 4a7b3ef0a69b7e08030519b712a6fe4dd199c571) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* create-pull-request: don't switch the git remote protocol to git://Martin Jansa2022-09-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | Many git repos prefer https:// nowadays and many removed support for git://. This breaks the script when using github.com even when selected remote is ssh (git@github.com:openembedded/...), it will re-write it to git:// before calling git pull-request causing: openembedded-core $ scripts/create-pull-request -u github -b jansa/artifacts -o pull-kernel NOTE: Assuming local branch HEAD, use -l to override. fatal: unable to connect to github.com: github.com[0: 140.82.121.3]: errno=Connection timed out warn: No match for commit ea003bd026aa24bb4c8b7562f44ed6512e921259 found at git://github.com/shr-distribution/oe-core warn: Are you sure you pushed 'jansa/artifacts' there? ERROR: git request-pull reported an error (From OE-Core rev: 64c466920b808c35d1ac87b47cf438bc79becea7) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* runqemu: display host uptime when startingAlexandre Belloni2022-09-121-0/+6
| | | | | | | | | | | In order to be able to debug issues on the host that have an impact on the guest, it is useful to get the uptime of the host while starting so we can match with the events in dmesg. Also include the uptime when cleaning up. (From OE-Core rev: 2d96499823f7de6e16a461426491e015ba63c1ec) Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oe-setup-builddir: do not suggest local.conf as a source of examplesAlexander Kanavin2022-09-091-2/+1
| | | | | | | | | | | | This holds true for the default core/poky template, but not anything else. Eventually there will be fragments and associated tooling. (From OE-Core rev: 3e4015d54e91ce4d312964b036784576a4b22566) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oe-setup-builddir: Always update templateconf.cfgPeter Kjellerstedt2022-09-081-3/+1
| | | | | | | | | | | | | | | | | | | | | The intent of the templateconf.cfg file is to cache the value of $TEMPLATECONF. To do this, it needs to be updated in case TEMPLATECONF is manually specified. Before, the following commands: TEMPLATECONF=foo . oe-init-build-env TEMPLATECONF=bar . oe-init-build-env . oe-init-build-env would cause the templates in foo to be used for the last source of oe-init-build-env, while afterwards, bar is used as expected. (From OE-Core rev: 37c122dfdac03a98bf2bf8c8f7676ec25136d402) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oe-setup-builddir: Keep templateconf.cfg relative if $TEMPLATECONF isPeter Kjellerstedt2022-09-081-2/+5
| | | | | | | | | | | | | | | | Before commit 7b96dc80 (scripts/oe-setup-builddir: write to conf/templateconf.cfg after the build is set up), the path written to templateconf.cfg was relative if $TEMPLATECONF was relative, but afterwards it became absolute. Restore the original behavior of saving the relative path to templateconf.cfg. (From OE-Core rev: 49e75009780a09873dc3987ae1c40f2ac95bc667) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oe-setup-builddir: Avoid shellcheck warningsPeter Kjellerstedt2022-09-081-9/+9
| | | | | | | | | | | | | | | This avoid the following warnings: * SC2086: Double quote to prevent globbing and word splitting. * SC2164: Use 'cd ... || exit' or 'cd ... || return' in case cd fails. * SC2166: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined. * SC2236: Use -n instead of ! -z. (From OE-Core rev: a5aa5065d5ebe9f320cb1415c6ff4d5d5772f630) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oe-setup-builddir: Simplify error handlingPeter Kjellerstedt2022-09-081-18/+11
| | | | | | | | (From OE-Core rev: 670f255bf639ca19a396ee67ec7d78094da2f576) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oe-setup-builddir: Correct when validation of the templates dir is runPeter Kjellerstedt2022-09-081-5/+5
| | | | | | | | | | | | The validation of the templates directory is supposed to be run as long as $TEMPLATECONF is defined, but it was only done if the directory did not exist. (From OE-Core rev: dcca9ee6f06e9eacd6507f57bd0a5012ea343aa9) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts/oe-setup-builddir: make environment variable the highest priority ↵Alexander Kanavin2022-09-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | source for TEMPLATECONF This sets the following order: 1. TEMPLATECONF set in the unix environment (for example as a prefix to '. oe-init-build-env'). 2. If empty then $BUILDDIR/conf/templateconf.cfg 3. If absent then $OEROOT/.templateconf (oe-init-build-env sets OEROOT to where it is, which is poky or oe-core). I believe this is more logical and consistent with common practice; it also avoids situations where the user is stuck with cryptic errors because templateconf.cfg contains something invalid and that something cannot be overridden from command line. (From OE-Core rev: 7296c42b8c58e6e08f4210eb7b51d852b1ee950e) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts/oe-setup-builddir: write to conf/templateconf.cfg after the build is ↵Alexander Kanavin2022-09-031-4/+4
| | | | | | | | | | | | | set up This was done before any of the sanity checks or actual setup, which resulted in templateconf.cfg always getting written out, whether it would be valid or not, and the user becoming stuck with it. (From OE-Core rev: 7b96dc80298af6f669c885056a80a48bdd50e547) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta/files/layers.schema.json: drop the layers propertyAlexander Kanavin2022-09-021-10/+0
| | | | | | | | | | | | | | | | | This is a leftover from one of the RFC iterations, where the property contained available machines, distros and templates. As all of those were dropped from the final version, there is no reason to list the layers either anymore. Normally this would be a backwards incompatible change, but as the layer setup itself was just merged, I think we can do a quick fixup :-) (From OE-Core rev: 64a774de0e154ef81f20853fec903b17d9985a72) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts/oe-setup-builddir: migrate build/conf/templateconf.cfg to new ↵Alexander Kanavin2022-09-021-0/+6
| | | | | | | | | | | | | | template locations This is done only for default oe-core/poky templates; for anything else the locations themselves need to be migrated first, and there is no way to tell where they would be. (From OE-Core rev: 9da0dd350a451676e3d4a1f09f90ec0234047ab7) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts/oe-setup-layers: add a script that restores the layer configuration ↵Alexander Kanavin2022-09-011-0/+88
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | from a json file This script can be used directly from poky or oe-core, or can be copied directly into alayer or any other repository - it is self-suffucient and requires only python3 and git on the host where it will run. It is also copied by the bitbake-layers layers-setup plugin together with the json, unless requested otherwise. 1. How to restore the layers from the saved configuration: a) Clone the bootstrap layer or some other repository to obtain the json config and the setup script that can use it. (use 'bitbake-layers create-layer-setup' from the previous commit to create them) b) Running with default options: (note: this will work to update an existing checkout as well) alex@Zen2:/srv/work/alex/my-build$ meta-alex/setup-layers Note: not checking out source meta-alex, use --force-bootstraplayer-checkout to override. Setting up source meta-intel, revision 15.0-hardknott-3.3-310-g0a96edae, branch master Running 'git init -q /srv/work/alex/my-build/meta-intel' Running 'git remote remove origin > /dev/null 2>&1; git remote add origin git://git.yoctoproject.org/meta-intel' in /srv/work/alex/my-build/meta-intel Running 'git fetch -q origin || true' in /srv/work/alex/my-build/meta-intel Running 'git checkout -q 0a96edae609a3f48befac36af82cf1eed6786b4a' in /srv/work/alex/my-build/meta-intel Setting up source poky, revision 4.1_M1-372-g55483d28f2, branch akanavin/setup-layers Running 'git init -q /srv/work/alex/my-build/poky' Running 'git remote remove origin > /dev/null 2>&1; git remote add origin git://git.yoctoproject.org/poky' in /srv/work/alex/my-build/poky Running 'git fetch -q origin || true' in /srv/work/alex/my-build/poky Running 'git remote remove poky-contrib > /dev/null 2>&1; git remote add poky-contrib ssh://git@push.yoctoproject.org/poky-contrib' in /srv/work/alex/my-build/poky Running 'git fetch -q poky-contrib || true' in /srv/work/alex/my-build/poky Running 'git checkout -q 11db0390b02acac1324e0f827beb0e2e3d0d1d63' in /srv/work/alex/my-build/poky 2. Command line options: alex@Zen2:/srv/work/alex/my-build$ meta-alex/setup-layers -h usage: setup-layers [-h] [--force-bootstraplayer-checkout] [--destdir DESTDIR] [--jsondata JSONDATA] A self contained python script that fetches all the needed layers and sets them to correct revisions optional arguments: -h, --help show this help message and exit --force-bootstraplayer-checkout Force the checkout of the layer containing this file (by default it is presumed that as this script is in it, the layer is already in place). --destdir DESTDIR Where to check out the layers (default is /srv/work/alex/my-build). --jsondata JSONDATA File containing the layer data in json format (default is /srv/work/alex/my-build/meta-alex/setup-layers.json). (From OE-Core rev: 58f94471675aef9ac6d15637ac5d8e69cc304c7a) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts/oe-setup-builddir: add a check that TEMPLATECONF is validAlexander Kanavin2022-09-011-0/+5
| | | | | | | | | | | | | | specifically that ../../layer.conf exists, and that second-from-last component in the path is 'templates'. This requires tweaking template.conf creation in eSDK bbclass, as we need to ensure that the path in it is valid, and exists (which may not be the case if the SDK is poky-based). (From OE-Core rev: c6f2b57be8893ee58f20cc29d8ec3a5a6edf7c07) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts/runqemu.README: fix typos and trailing whitespacesUlrich Ölmann2022-08-311-8/+8
| | | | | | | (From OE-Core rev: 217b00d378f359689613ca4c0666bb2eed040f69) Signed-off-by: Ulrich Ölmann <u.oelmann@pengutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: do not leave behind source trees in workspace/sourcesAlexander Kanavin2022-08-211-3/+13
| | | | | | | | | | | | | | | | | | | | These are typically auto-extracted with modify/upgrade from recipes and can be easily recreated. On the rare occasions where they need to be reused, they are still available under workspace/attic (which is already used for old recipes and appends), so nothing gets lost. This avoids the annoyance of devtool refusing to proceed because there is a previous source tree in workspace/sources. For independent source trees behave as before: do nothing. Adjust the test that previously deleted those trees by hand. (From OE-Core rev: 9bfb95d070d68d5ab5adfe0ea096f5fbf9cad8b0) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: add 'none' fstype for custom imageJeongBong Seo2022-08-122-1/+5
| | | | | | | | | | | | | | | | | It's not possible to set the label (of gpt entry) normally when I want to use non-listed fstype as a rawcopy. Example) part ? --source rawcopy --ondisk mmcblk0 --label mypart --sourceparams file=mypart.raw To resolve this problem, this patch addes a 'none' fstype and ignore do_image_label on rawcopy (that actually set the partition label.) (From OE-Core rev: 949cf797eb54f3d22a093910087e937633ce9b23) Signed-off-by: JeongBong Seo <jb.seo@lge.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* recipetool: Update for class changesRichard Purdie2022-08-121-1/+1
| | | | | | (From OE-Core rev: 0ea8afd4f9599469d1a23824c451c62eabb76660) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts: Add copyright statements to files without oneRichard Purdie2022-08-1232-3/+71
| | | | | | | | | | Where there isn't a copyright statement, add one to make it explicit. Also drop editor config lines where they were present and add license identifiers as MIT if there isn't one. (From OE-Core rev: deb3ccec53e0bd63bc4235cf2b0d3fc781687361) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* relocate_sdk.py: ensure interpreter size error causes relocation to failPaul Eggleton2022-08-081-2/+8
| | | | | | | | | | | | | | If there is insufficent space to change the interpreter, we were printing an error here but the overall script did not return an error code, and thus the SDK installation appeared to succeed - but some of the binaries will not be in a working state. Allow the relocation to proceed (so we still get a full list of the failures) but error out at the end so that the installation is halted. (From OE-Core rev: c5a9a448e462d3e5457e8403c5a1a54148ecd224) Signed-off-by: Paul Eggleton <paul.eggleton@microsoft.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* pybootchartgui: write the max values in the graph legendMartin Jansa2022-08-041-15/+18
| | | | | | | | | | * easier to find than searching for the highest value in the graph, when the graph is really wide (From OE-Core rev: 615e04554aa8442d89ea186b30f23adeb1e64762) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* pybootchartgui: fix 2 SyntaxWarningsMartin Jansa2022-08-041-2/+2
| | | | | | | | | | | | | scripts/pybootchartgui/pybootchartgui/draw.py:820: SyntaxWarning: "is not" with a literal. Did you mean "!="? if (OPTIONS.show_pid or OPTIONS.show_all) and ipid is not 0: scripts/pybootchartgui/pybootchartgui/draw.py:918: SyntaxWarning: "is not" with a literal. Did you mean "!="? if i is not 0: (From OE-Core rev: 8d996616f0ca57220d939a41ca9ba6d696ea2a4f) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* pybootchartgui: render memory pressure as wellMartin Jansa2022-08-043-3/+54
| | | | | | | | | | * memory pressure is already collected in buildstats, render it as well when available (From OE-Core rev: 42010d0812246a418f30b4f1d9fbd3f374a3bbe9) Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool/upgrade: catch bb.fetch2.decodeurl errorsAlexander Kanavin2022-08-041-1/+4
| | | | | | | | | | | Otherwise, workspace cleanup (removing bogus recipe and source tree) will not happen, leaving breakage behind. (From OE-Core rev: 74774f9b67580a8c56f605dfd4cc7b856bbeeae8) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool/upgrade: correctly clean up when recipe filename isn't yet knownAlexander Kanavin2022-08-041-15/+13
| | | | | | | | | | | | | | | There is a coding error in the second invocation of _upgrade_error: rf is passed into it before it is initialized in the try: block. And so bogus recipes are left behind in the workspace, causing breakage. Instead, rewrite the functions to take the recipe directory name in the workspace layer, which can be calculated in advance. (From OE-Core rev: e653996369c1d2b5ac8367ad85f4816d679b6c98) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic/bootimg-efi: Add support for loading devicetree filesJan Kiszka2022-08-021-7/+31
| | | | | | | | | | | | | | | | | | | | For device tree using systems, add support to set a custom devices tree during UEFI boot. This requires to copy the DTB file to the boot partition and to add the respective loader entries to the configuration files. Both grub and systemd-boot support only loading a specific device tree. Therefore refuse to work if the 'dtb' parameter contains more than one entry. Out of scope for now are overlays (only supported by systemd-boot). (From OE-Core rev: c5a14f39a6717a99b510cb97aa2fb403d4b98d99) Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> [Luca: rebased on commit 98e9d435b278 ("wic/bootimg-efi: use cross objcopy when building unified kernel image")] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic/bootimg-efi: Factor out some common bitsJan Kiszka2022-08-021-25/+21
| | | | | | | | | | | | | | | | The paths for configuring grub and systemd-boot have some common bits around copying the initrd files. This will even grow when adding dtb support. Factor this out into a class function. Along this, avoid evaluating 'create-unified-kernel-image' multiple times in do_configure_systemdboot and suppress a bogus warning about "Ignoring missing initrd" when it is turned on. (From OE-Core rev: c700cfd88473b9ed4e12a6620fb089f41bd95a9e) Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts/oe-setup-builddir: make it known where configurations come fromAlexander Kanavin2022-08-021-5/+7
| | | | | | | | | | | | | "with some default values" isn't clear; if the user wants to change or inspect the default values and their history, we should help them find where they are. This becomes especially important when using template configs other than poky's. (From OE-Core rev: ec34783ffc34eb9e9697f1b192c5a0043f1ca2c6) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic/bootimg-efi: use cross objcopy when building unified kernel imageRoss Burton2022-08-021-13/+12
| | | | | | | | | | | | | | We can't rely on the host objcopy knowing how to process target binaries, so use the cross objcopy in the sysroot instead. Also construct the command argument-by-argument as the format expression was getting unwieldy. (From OE-Core rev: 0264aeedbf21e9e7a104243c11b3b57f00e38bda) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: add target tools to PATH when executing native commandsRoss Burton2022-08-021-3/+4
| | | | | | | | | | | | We might want to run a cross tool, such as objcopy, in wic. These are in a TARGET_SYS/ subdirectory under /usr/bin, so add that directory to the search path too. (From OE-Core rev: c523549141e5c31edc75281f581d97867b7d251d) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* runqemu: Add missing space on default display optionMark Hatle2022-07-281-1/+1
| | | | | | | | | (From OE-Core rev: ee9428611fc38bc711b5b3e12cf0d3257b1b5680) Signed-off-by: Mark Hatle <mark.hatle@kernel.crashing.org> Signed-off-by: Mark Hatle <mark.hatle@amd.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: error out when workspace is using old override syntaxRoland Hieber2022-07-281-3/+7
| | | | | | | | | | | | | | When the workspace bbappends are still using the old override syntax with EXTERNALSRC_pn-*, externalsrc_re will not match, and pn will never be assigned, leading to a nondescript UnboundLocalError being raised on the user's terminal. Try to detect that situation and give the user a hint how to solve it. (From OE-Core rev: d42ea8e849cf2df3708406418b961168268b316a) Signed-off-by: Roland Hieber <rhi@pengutronix.de> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic/plugins/rootfs: Fix NameError for 'orig_path'Mihai Lindner2022-07-231-1/+1
| | | | | | | | | | | Fix "NameError: name 'orig_path' is not defined". It's a typo from when this error was handled outside this function. (From OE-Core rev: 2124ec0d9f9de2da476f0024a0ccf70da987420f) Signed-off-by: Mihai Lindner <mihai.lindner@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: finish: handle patching when S points to subdir of a git repoPaul Eggleton2022-07-141-6/+19
| | | | | | | | | | | | If devtool finish needs to create a patch and have it applied to the sources for a recipe where S points to a subdirectory of the sources, then the patch needs to be applied at the root of the repo i.e. we need to add a patchdir= parameter to the SRC_URI entry. (From OE-Core rev: ad3736d9ca14cac14a7da22c1cfdeda219665e6f) Signed-off-by: Paul Eggleton <paul.eggleton@microsoft.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: ignore pn- overrides when determining SRC_URI overridesPaul Eggleton2022-07-121-1/+3
| | | | | | | | | | | | | | | | | | | | If (perhaps foolishly) at your configuration level you have e.g. SRC_URI_append_pn-recipename = " file://patchname.patch" and then run devtool modify on a different recipe, an error occurs: INFO: SRC_URI contains some conditional appends/prepends - will create branches to represent these ... ERROR: [Errno 2] No such file or directory: '/path/to/downloads/patchname.patch' pn- overrides would not constitute an alternative configuration that we should handle in this context, so just ignore them to avoid the issue. (From OE-Core rev: 3f2a812ade42ece0bb59b2d303125a91b29936dd) Signed-off-by: Paul Eggleton <paul.eggleton@microsoft.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scriptutils: fix style to be more PEP8 compliantMarius Kriegerowski2022-07-011-7/+5
| | | | | | | (From OE-Core rev: 61b346d6c309ebfef50c88260bf5a0650c74db16) Signed-off-by: Marius Kriegerowski <marius.kriegerowski@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* recipetool/devtool: Fix python egg whitespace issues in PACKAGECONFIGThomas Roos2022-07-011-0/+13
| | | | | | | | | | | | | | | | | | | Substitute expressions or whitespace from python egg requires.txt when generating PACKAGECONFIG Pysetuptools sees the uvicorn.egg-info/requires.txt as extra requirements. Recipetool parses this information to generate the PACKAGECONFIG. These extra requirements contain expressions and whitespace, which are not allowed in PACKGAGECONFIG. This patch substitute them by hyphens to make PACKAGECONFIG parsable and readable. Also adding an oe-selftest for this. [YOCTO #14446] (From OE-Core rev: a854d95a79e64f3f82abfa4cc1daec750abf4249) Signed-off-by: Thomas Roos <throos@amazon.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* pybootchartgui: render cpu and io pressureAryaman Gupta2022-06-293-0/+122
| | | | | | | | | | | | | | | | | | | | | | | | Add two new, separate charts showing the avg10 and delta total pressure over time for the CPU and IO resources. The height of the avg10 data in each chart represents the percentage of time "some" task was delayed over the specific resource during the last 10 seconds of the build. The height of the delta total data in each chart represents the total time "some" task was delayed since the last sample was collected. If the reduced_proc_pressure data is not present in the buildstats log, then the new charts are not shown at all rather than being present but unpopulated. Note that the delta total graphs may appear "spikey", oscillating from high values to low. This behaviour is fixed in a subsequent commit. (From OE-Core rev: fb9ff46dc3059cb3f4c8df8e4654184c3eab1571) Signed-off-by: Aryaman Gupta <aryaman.gupta@windriver.com> Signed-off-by: Randy MacLeod <randy.macleod@windriver.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: fix WicError messageMartin Jansa2022-06-221-1/+1
| | | | | | | | | | | | | | | | * add missing % to print the values instead of: | INFO: Build artifacts not found, exiting. | INFO: (Please check that the build artifacts for the machine | INFO: selected in local.conf actually exist and that they | INFO: are the correct artifacts for the image (.wks file)). | | ERROR: ("The artifact that couldn't be found was %s:\n %s", 'kernel-dir', '/OE/build/deploy/images/qemux86-64') (From OE-Core rev: e104c2b1273d8c5bd97893f318bf2a2699ef7f2d) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* runqemu: add QB_KERNEL_CMDLINERaju Kumar Pothuraju2022-06-171-1/+6
| | | | | | | | | | | | | | | | runqemu auto generating the KERNEL_CMDLINE values and specifying using -append option to qemu boot command which will lead to override the kernel_cmdline/bootargs which are specified in DTB when using -dtb option. Add new macro QB_KERNEL_CMDLINE to specify not to add the runqemu generated KERNEL_CMDLINE values instead use which are in the DTB if value defined as 'none'. Add provision to override bootargs using # runqemu bootparams="root=/dev/ram0" (From OE-Core rev: 98f4bf980c378cc541b220d79ee006bf2fae9ae8) Signed-off-by: Raju Kumar Pothuraju <raju.kumar-pothuraju@xilinx.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: Fix _copy_file() TypeErrorXiaobing Luo2022-06-111-1/+1
| | | | | | | | | | | | | | | | when devtool finish, the _copy_file() failed. -------------------------------------------- TypeError: _copy_file() got an unexpected keyword argument 'base_outdir' -------------------------------------------- Fixes: 05f2d5d2ce00 ("devtool: finish: add dry-run option") (From OE-Core rev: a45d9dc089fb2719ca69b92870917f8c0925f632) Signed-off-by: Xiaobing Luo <luoxiaobing0926@gmail.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic/plugins/images/direct: Allow changes in fstab on rootfsTobias Schmidl2022-05-271-1/+1
| | | | | | | | | | | | | | Allow wic to also manipulate the rootfs entry in fstab, which it currently refuses to write. Reasons one might want to do that include using systemd-growfs via --fsoptions on / With this change / is now handled exactly the same as other mountpoints, the former exception seemingly was not even documented. (From OE-Core rev: 20d43a2599d7622b96e2fb0da87a886da1a3794a) Signed-off-by: Tobias Schmidl <tobiasschmidl@siemens.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oe-depends-dot: Handle new format for task-depends.dotRusty Howell2022-05-271-1/+20
| | | | | | | | | | | | | The .dot file created by `bitbake -g` changed formats a while ago, which broke oe-depends-dot. Also add some useful examples to the --help output. (From OE-Core rev: 7751bc4909f3834e43db020ebb91665a5d7960a9) Signed-off-by: Rusty Howell <rustyhowell@gmail.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts/patchreview: Make json output human parsableRichard Purdie2022-05-231-1/+1
| | | | | | | | | | Sort dict keys in the json output and use tab spacing. This means when commited into git, the diffs are human readable but it is more compact filesize than space indentation. (From OE-Core rev: bde2ecb203d8a1a29715c70ca3ded382982390cf) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts/patchreview: Add commit to stored json dataRichard Purdie2022-05-231-0/+1
| | | | | | | | | Save commit data when writing to the json file so the results can be copared/extended later. (From OE-Core rev: da761ac1984ee2a06ded905fc4ad878ef7d613e4) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: added fspassno parameter to partitionClaudius Heine2022-05-164-1/+10
| | | | | | | | | | | | | The `fspassno` parameter allows to overwrite the value of the last column (`fs_passno`) in the /etc/fstab of the target root file system. This allows to have periodic file system checks. (From OE-Core rev: b9b9f71e6f37bfbf954ade518391b242669481e3) Signed-off-by: Claudius Heine <ch@denx.de> Signed-off-by: Vijai Kumar K <Vijaikumar_Kanagarajan@mentor.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image_types/runqemu-addptable2image: Fix a minor typoLeon Anavi2022-05-151-1/+1
| | | | | | | | | Fix a minor typo and replace "partion" with "partition". (From OE-Core rev: 186df231f95096c0ee0f29f1080deb351701374f) Signed-off-by: Leon Anavi <leon.anavi@konsulko.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts/autobuilder-worker-prereq-tests: add additional limit testingMichael Halstead2022-05-111-0/+15
| | | | | | | | | | Check that open file and user process limits are greater than or equal to what the autobuilder uses. (From OE-Core rev: 6149bd4d4e23f69371b645d4c5fc6706e2413130) Signed-off-by: Michael Halstead <mhalstead@linuxfoundation.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>