summaryrefslogtreecommitdiffstats
path: root/scripts
AgeCommit message (Collapse)Author
2024-02-26scripts: python 3.12 regexAdrian Freihofer
All the regexes throw a warning like this: WARNING: scripts/lib/recipetool/create_buildsys.py:140: SyntaxWarning: invalid escape sequence '\s' proj_re = re.compile('project\s*\(([^)]*)\)', re.IGNORECASE) Python 3 interprets string literals as Unicode strings, and therefore \s is treated as an escaped Unicode character which is not correct. Declaring the RegEx pattern as a raw string instead of unicode is required for Python 3. Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Backported from master: 24b0ba00d4f0b4d9834f7693ecb6032dfc534a80 Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-02-26runqemu: add qmp socket supportRoss Burton
Add support for qmp sockets and defaults to unix:qmp.sock if unspecified Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Eilís 'pidge' Ní Fhlannagáin <pidge@baylibre.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Backported from master: 380631797f0d63124a8c21efa93ab672dbd79283 Qemu throws many warnings without qmp and many runtime tests fail without this patch also on kirkstone. Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-02-26scripts/runqemu: fix regex escape sequencesTrevor Gamblin
When invoking runqemu with Python 3.12, the following warning is encountered: |SyntaxWarning: invalid escape sequence '\.' This is because the interpreter scans the string before it is processed by the regex module, and it interprets the backslash as part of an escape sequence, but not a standard one. This will be registered as an error rather than a warning in future Python versions. To avoid the it, simply add an extra backslash so that Python doesn't misinterpret the string, while the regex parser still sees an escaped '.' character. Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Backported from master: 0e8a4142bb90a92d175df6b2537d24a372356f98 Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-02-26recipetool/create_buildsys_python: use importlib instead of impChris Laplante
'imp' was deprecated in Python 3.4 and removed in 3.12. The piece of importlib we use has been around since 3.3. Signed-off-by: Chris Laplante <chris.laplante@agilent.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Cherry-picked from master: 457f0dad87b4e45a53865b5ad2c150215bd74019 Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-02-25runqemu: direct mesa to use its own drivers, rather than ones provided by ↵Alexander Kanavin
host distro With mesa 23.0, it is not longer possible to use the host drivers, as mesa upstream has added strict checks for matching builds between drivers and libraries that load them. Add a check and a hint to runqemu so that there is a helpful error when there is no native/nativesdk opengl/virgl support. Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> (cherry picked from commit f0946844df7270fe368858d8929e6b380675b78b) Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-01-16pybootchartgui: fix 2 SyntaxWarningsMartin Jansa
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: Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> (cherry picked from commit 8d996616f0ca57220d939a41ca9ba6d696ea2a4f) Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io> Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-09-19wic: fix wrong attempt to create file system in upartitioned regionsMarkus Niebel
The kickstart parser defaults fstype to "vfat". This leads to an attempt to create an empty file system even for regions configured with "--no-table" if used without fstype when no --sourceparams given. The fix tests for fstype "none" or no_table in Partition prepare method. This will omit the file system creation an the potential error for small region with --no-table option. Signed-off-by: Markus Niebel <Markus.Niebel@ew.tq-group.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit db771a4cd36bf291a8b68edfd905e03243f2c8b3) Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-09-19resulttool/report: Avoid divide by zeroRichard Purdie
Avoid a divide by zero traceback if unfortunate test counts are encountered. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit c5aeea53dfacb53dedb8445cb3523dc3a8cb6dca) Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-09-19scripts/create-pull-request: update URLs to git repositoriesMichael Opdenacker
Also remove the git.pokylinux.org URL, no longer used. Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 47b88d143c2fc61ce0e03b7eb3a9dbcffadbf5b1) Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-08-22resulttool/resultutils: allow index generation despite corrupt jsonMichael Halstead
non-release indexes will continue to generate when test output is corrupted. Signed-off-by: Michael Halstead <mhalstead@linuxfoundation.org> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 1a9157684a6bff8406c9bb470cb2e16ee006bbe9) Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-08-16rpm2cpio.sh: update to the last 4.x versionAlberto Planas
openSUSE RPMs are compressing the RPM payload using zstd, that correspond to the magic ID 0x28, 0xb5, 0x2f. This patch update the script to the last version from the rpm project, and add support to this compression format, and extract the cpio payload using the "unzstd" binary. Signed-off-by: Alberto Planas <aplanas@suse.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 3aba44a75dd565b192f7328f2a0150a313de3cc1) Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-08-16scripts/rpm2cpio.sh: Use bzip2 instead of bunzip2Pavel Zhukov
bzip2 is in HOSTTOOLS already and used in few other places already. This fixes bin_package class for RPM packages without adding bunzip2 to HOSTTOOLS. Signed-off-by: Pavel Zhukov <pavel@zhukoff.net> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> (cherry picked from commit eb3ec7469fff857c819332371ad1d586f43c79c3) Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-07-31recipetool: Fix inherit in created -native* recipesYoann Congal
native and nativesdk classes are special and must be inherited last : put them at the end of the gathered classes to inherit. Signed-off-by: Yoann Congal <yoann.congal@smile.fr> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit a6614fd800cbe791264aeb102d379ba79bd145c2) Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-07-17wic: Add dependencies for erofs-utilsHeiko Thole
In order to build erofs filesystems, wic must have the erofs-utils package installed into its sysroot. Signed-off-by: Heiko Thole <heiko.thole@entwicklung.eq-3.de> Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-07-17pybootchartgui: show elapsed time for each taskMauro Queiros
Currently, finding the elapsed time of each task in buildtimes.svg is a manual effort of checking the top axis and finding and subtracting the end and start time of the task. This change adds the elapsed time for each task, so that manual effort of comparing start/end time is avoided. Signed-off-by: Mauro Queiros <Mauro.Queiros@criticaltechworks.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 3efebd3404de548f0757863da237f2d18ce60013) Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io> Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-07-05devtool: Fix the wrong variable in srcuri_entryCharlie Wu
devtool crashes when running "update-recipe" and append changes on the recipe. "$ devtool update-recipe -a <layer> <recipe>" Traceback (most recent call last): ... File "/ovss/ovss_quanta/poky/scripts/lib/devtool/standard.py", line 1636, in srcuri_entry return 'file://%s%s' % (basepath, paramstr) ^^^^^^^^ NameError: cannot access free variable 'basepath' where it is not associated with a value in enclosing scope The input variable 'fname' should have the same meaning as the variable 'basepath'. Modify the 'fname' to 'basepath' and solve the issue. Signed-off-by: Charlie Wu <chiachiwu@google.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> (cherry picked from commit c3231756bbc2cb5641204414ad3670d7f8607ed3) Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-07-05scripts/runqemu: allocate unfsd ports in a way that doesn't race or clash ↵Alexander Kanavin
with unrelated processes There is already a neat check_free_port() function for finding an available port atomically, so use that and make two additional tweaks: - no need to allocate two separate ports; per unfsd documentation they can be the same - move lockfile release until after unfsd has been shut down and the port(s) used has been freed [YOCTO #15077] Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit dee96e82fb04ea99ecd6c25513c7bd368df3bd37) Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-07-05scripts/runqemu: split lock dir creation into a reusable functionAlexander Kanavin
Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 004d6bcb067ecf1d796801fa43a98820c4efd3c7) Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-07-05image_types: Fix reproducible builds for initramfs and UKI imgFrieder Paape
I've encountered issues reproducing initramfs and UKI image builds, which will be fixed with this patch. 1. initramfs There's a symbolic link to /sbin/init, which is appended to the cpio archive after creation. The links timestamp needs to be static and the cpio append command needs the '--reproducible' flag to produce deterministic outcomes. 2. Unified Kernel Image '--preserve-dates' is required for a static 'Time/Date' entry. I've added '--enable-deterministic-archives' although in my case this didn't change anything. Signed-off-by: Frieder Paape <frieder@konvera.io> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit fd027729bafb4e085ba0949e38e724f3a8cad102) Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-07-04oe-depends-dot: Handle new format for task-depends.dotRusty Howell
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. 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> Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-05-05wic/bootimg-efi: if fixed-size is set then use that for mkdosfsRandolph Sapp
This is a bit of a compatibility issue more than anything. Some devices get upset if the FAT file system contains less blocks than the partition. The fixed-size argument is currently respected by the partition creation step but not by the file system creation step. Let's make it so the file system respects this value as well. Signed-off-by: Randolph Sapp <rs@ti.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-03-30scripts/lib/buildstats: handle top-level build_stats not being completeRoss Burton
If we try to parse a buildstats directory which was either aborted or is still being built then the top-level build_stats file doesn't contain an elapsed value which causes an exception: UnboundLocalError: local variable 'elapsed' referenced before assignment Default both start and elapsed to 0 so that the parse succeeds. Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> (cherry picked from commit 701d985aa8f2e9c2b9c0736fa25b424f3701889e) Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-03-23pybootchartui: Fix python syntax issueRichard Purdie
Fix: scripts/pybootchartgui/pybootchartgui/parsing.py:134: SyntaxWarning: "is" with a literal. Did you mean "=="? if pid is 0: Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit c9a6511ae618035b8efad01646e37ba28ce1e3f8) Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-03-23lib/resulttool: fix typo breaking resulttool log --ptestRoss Burton
ptestresult_get_log() looked for a key called 'ptestresuls.sections', which should be 'ptestresult.sections' Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 7c8c9f7283e54bf8b1521fbaad7dceb66a8fcdbb) Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-03-23devtool/upgrade: do not delete the workspace/recipes directoryAlexander Kanavin
If it exists, there is no need to delete it, and if it does not, devtool prints an ugly traceback. 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> (cherry picked from commit af82e59e8f08369aabd5fa6eb43022982d4e59a7) Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-03-06runqemu: kill qemu if it hangsMikko Rapeli
qemu doesn't always behave well and can hang too. kill it with force if it was still alive. Move clean up commands into cleanup() function. Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> (cherry picked from commit 079c2935d2f585ce49e1c7daab2155fcf0094c48) Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-03-06lib/buildstats: handle tasks that never finishedRoss Burton
If a task is aborted the buildstats file isn't complete, so calculate when the build finished and use that as a end time. Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 23ebaec476dc46aebe5997f025661137f3e341bd) Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-03-06wic: Fix usage of fstype=none in wicPavel Zhukov
This allows to specify partition with fstype=none in the wks file to have partition created but without following mkfs. The none fstype is in the list already but the usage is not documented. Example; part /data --ondisk mmcblk0 --fstype=none --align 4096 --fixed-size 512 will create a partition, filesystem may be created manualy on the host or target and data will be preserved if the device is reflashed using same wks. Works with bmaptool and probably does not work with dd. Use case is persistent filesystem/data between reflashing of the image. Signed-off-by: Pavel Zhukov <pavel@zhukoff.net> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 351cb64da37aa43113e5192605d04436652aa3b8) Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-02-11meta: remove True option to getVar and getVarFlag calls (again)Martin Jansa
* True is default since 2016 and most layers were already updated not to pass this parameter where not necessary, e.g. oe-core was updated couple times, first in: https://git.openembedded.org/openembedded-core/commit/?id=7c552996597faaee2fbee185b250c0ee30ea3b5f Updated with the same regexp as later oe-core update: https://git.openembedded.org/openembedded-core/commit/?id=9f551d588693328e4d99d33be94f26684eafcaba with small modification to replace not only d.getVar, but also data.getVar as in e.g.: e.data.getVar('ERR_REPORT_USERNAME', True) and for getVarFlag: sed -e 's|\(d\.getVarFlag \?\)( \?\([^,()]*, \?[^,()]*\), \?True)|\1(\2)|g' \ -i $(git grep -E 'getVarFlag ?\( ?([^,()]*), ?([^,()]*), ?True\)' \ | cut -d':' -f1 \ | sort -u) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 26c74fd10614582e177437608908eb43688ab510) Signed-off-by: Steve Sakoman <steve@sakoman.com> (cherry picked from commit 24a86d0c55ee89ae0dc77975e1d0ee02898d2289) Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-01-12devtool: process local files only for the main branchAlexander Kanavin
devtool modify/upgrade are not currently equipped to handle conditional local files in SRC_URI, and provide only the main no-override set in a workspace under source/component/oe-local-files/ (this is done via meta/classes/devtool-source.bbclass). On the other hand, updating the changes from workspace into a recipe is run iteratively against all overrides; this works for patches (as they all are directed into their own override branches in the workspace git source tree), but breaks down when trying to match local files in a workspace against local files in overridden SRC_URI lists, resulting in bad recipe breakage. (there's an additional twist here: existing code has a guard against this but the guard relies on metadata in workspace .bbappend that is only there in modify operations, but not upgrades. This commit replaces the guard with a general check that will work everywhere). Implementing multiple sets of local files is significant work; let's for now simply not touch local files in recipes except when on the no-override variant. Also, adjust the selftest cases to include conditional local files in sample recipes, so the situation is covered by the tests. Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 3a8654b860fa98f94e80c3c3fff359ffed14bbe7) Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-01-06devtool/upgrade: correctly handle recipes where S is a subdir of upstream treeAlexander Kanavin
'devtool modify' writes additional settings to workspace .bbappend so that this can be handled correctly, but 'devtool upgrade' does not. This adds the missing settings. In particular, local files should not anymore mysteriously disappear from SRC_URIs on upgrades. Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> (cherry picked from commit 0817aa5537a8d7cc9591c53dfaa1d225f4c327f7) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-12-17yocto-check-layer: Allow OE-Core to be testedRichard Purdie
For unknown reasons we've never seemingly run the check layer script against OE-Core itself. This isn't entirely straightforward as the core layer is a bit of a special case, we can't for example compare signatures against ourselve and we can't remove core from bblayers.conf. Core does have distro, machine and software components too, in the case of distro, our fallback default settings. Whilst the qemu machines could be split into a seperate layer directory, core wouldn't then parse at all standalone due to the lack of any machine so it seems a bit pointless to do that. These changes tweak the script to handle core's special cases, specifically to allow distro and machine directories and to account for the README placed a directory level higher than other layers. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
2022-12-17combo-layer: add sync-revs commandRoss Burton
When starting to use combo-layer, or if someone else is using it too, the local last_revision may be incorrect. This command will forcibly update the last_revision config values to the latest SHA on the remote branch that is tracked. Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 2bb5d12ecd1b0273983f7c05699f34dd64b11c25) Signed-off-by: Steve Sakoman <steve@sakoman.com>
2022-12-17combo-layer: dont use bb.utils.renameRoss Burton
Bitbake may not be configured, and bb isn't imported anyway. Instead just use os.rename(), and take the filename from the file object instead of duplicating logic. Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 528f4fb3683d048537604e4562ea758968060d62) Signed-off-by: Steve Sakoman <steve@sakoman.com>
2022-12-17combo-layer: remove unused importRoss Burton
Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit ebfab6c3034d41252d19c6e1a0ba79072aa51146) Signed-off-by: Steve Sakoman <steve@sakoman.com>
2022-12-17lib/buildstats: fix parsing of trees with reduced_proc_pressure directoriesRoss Burton
The /proc/pressure support in buildstats is creating directories in the buildstats tree called reduced_proc_pressure, which confuses the parsing logic as that cannot be parsed as a name-epoc-version-revision tuple. Explicitly skip this directory to solve the problem. Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> (cherry picked from commit 24f0331f0b7e51161b1fa43d4592b491d2037fe9) Signed-off-by: Steve Sakoman <steve@sakoman.com>
2022-12-09scripts: convert-overrides: Allow command-line customizationsJoshua Watt
Adds argument parsing to the conversion script so that the fields that the script uses to do conversions can be customized on the command line. The intention is to allows easier customization without having to fork the script, and allow automated checking on 3rd party layers via CI without false positives Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> (cherry picked from commit b9551f9180bf9f13fb1c480b5b7892fdc831ffcd) Signed-off-by: Steve Sakoman <steve@sakoman.com>
2022-11-17wic: make ext2/3/4 images reproducibleSergei Zhmylev
Ext2/3/4 FS contains not only mtime, but also ctime, atime and crtime. Currently, all the files are being added into the rootfs image using mkfs -d functionality which affects all the timestamps excluding mtime. This patch ensures these timestamps inside the FS image equal to the SOURCE_DATE_EPOCH if it is set. Signed-off-by: Sergei Zhmylev <s.zhmylev@yadro.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> (cherry picked from commit 75d2dd0ea7790db2e8ee921784ca373abff2df65) Signed-off-by: Steve Sakoman <steve@sakoman.com>
2022-11-10wic: swap partitions are not added to fstabciarancourtney
- Regression in 7aa678ce804c21dc1dc51b9be442671bc33c4041 Signed-off-by: Ciaran Courtney <ciaran.courtney@activeenergy.ie> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> (cherry picked from commit f1243572ad6b6303fe562e4eb7a9826fd51ea3c3) Signed-off-by: Steve Sakoman <steve@sakoman.com>
2022-11-04wic: honor the SOURCE_DATE_EPOCH in case of updated fstabSergei Zhmylev
In case user requested to build a binary repeatable package, it's required to honor the SOURCE_DATE_EPOCH environment variable. So forcefully set mtime inside all the routines which modify fstab in case it is updated. Signed-off-by: Sergei Zhmylev <s.zhmylev@yadro.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> (cherry picked from commit 99719a3712a88dce8450994d995803e126e49115) Signed-off-by: Steve Sakoman <steve@sakoman.com>
2022-11-04runqemu: Fix gl-es argument from causing other arguments to be ignoredJoshua Watt
The code to parse arguments was inadvertently skipping all arguments in the elif block after gl-es if it was specified on the command line. Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> (cherry picked from commit 718bb8d56f6a24c86e67830a7d13af54df2ebb4e) Signed-off-by: Steve Sakoman <steve@sakoman.com> (cherry picked from commit dd1dcfada1fa46ecb8227c2852769b35026875d3) Signed-off-by: Steve Sakoman <steve@sakoman.com>
2022-11-04runqemu: Do not perturb script environmentJoshua Watt
Instead of changing the script environment to affect the child processes, make a copy of the environment with modifications and pass that to subprocess. Specifically, when dri rendering is enabled, LD_PRELOAD was being passed to all processes created by the script which resulted in other commands (e.g. stty) exiting with a failure like: /bin/sh: symbol lookup error: sysroots-uninative/x86_64-linux/lib/librt.so.1: undefined symbol: __libc_unwind_link_get, version GLIBC_PRIVATE Making a copy of the environment fixes this because the LD_PRELOAD is now only passed to qemu itself. Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> (cherry picked from commit 2232599d330bd5f2a9e206b490196569ad855de8) Signed-off-by: Steve Sakoman <steve@sakoman.com>
2022-11-04scripts/oe-check-sstate: force build to run for all targets, specifically ↵Ross Burton
populate_sysroot Since the commit "populate_sdk_base/images: Drop use of 'meta' class and hence do_build dependencies"[1], builds of images or SDKs don't recursively depend on the top-level do_build target. This is typically a good thing: images just depend on the packages themselves and those dependencies already exist, but they don't need each recipes sysroot to be populated. However, eSDK generation is partly done via the script oe-check-sstate, which does a 'dry-run' build of the target and collates all of the sstate that is used. With this commit the sstate that is used is a fraction of what would be needed in the SDK, specifically there are no sysroots populated during the build, so there are no sysroots in the SDK. This is obviously a problem, as the entire point of an eSDK is to contain a sysroot. Resolve this problem by forcing bitbake to run the build task for all targets, so that all potentially needed sstate is collated. [YOCTO #14626] [1] https://github.com/openembedded/openembedded-core/commit/41d7f1aa2cc9ef5dba4db38435402d4c9c0a63e1 Tested-by: Andrej Valek <andrej.valek@siemens.com> Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 1b62344f919b5122f048b6409d09386d7d6dd3cd) Signed-off-by: Steve Sakoman <steve@sakoman.com>
2022-11-04scripts/oe-check-sstate: cleanupRoss Burton
The scriptutils import isn't used, there's no need to run bitbake in a shell environment, and invoke bitbake as a list instead of a string. Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 663aa284adf312eb5c8a471e5dbff2634e87897d) Signed-off-by: Steve Sakoman <steve@sakoman.com>
2022-09-30create-pull-request: don't switch the git remote protocol to git://Martin Jansa
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 Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 64c466920b808c35d1ac87b47cf438bc79becea7) Signed-off-by: Steve Sakoman <steve@sakoman.com>
2022-09-12runqemu: display host uptime when startingAlexandre Belloni
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. Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 2d96499823f7de6e16a461426491e015ba63c1ec) Signed-off-by: Steve Sakoman <steve@sakoman.com>
2022-09-06scripts/runqemu.README: fix typos and trailing whitespacesUlrich Ölmann
Signed-off-by: Ulrich Ölmann <u.oelmann@pengutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 217b00d378f359689613ca4c0666bb2eed040f69) Signed-off-by: Steve Sakoman <steve@sakoman.com>
2022-08-31wic/bootimg-efi: use cross objcopy when building unified kernel imageRoss Burton
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> Signed-off-by: Steve Sakoman <steve@sakoman.com>
2022-08-31wic: add target tools to PATH when executing native commandsRoss Burton
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> Signed-off-by: Steve Sakoman <steve@sakoman.com>
2022-08-17relocate_sdk.py: ensure interpreter size error causes relocation to failPaul Eggleton
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. Signed-off-by: Paul Eggleton <paul.eggleton@microsoft.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit c5a9a448e462d3e5457e8403c5a1a54148ecd224) Signed-off-by: Steve Sakoman <steve@sakoman.com>