Commit Graph

3619 Commits

Author SHA1 Message Date
Eilís 'pidge' Ní Fhlannagáin
b5dbdfe904 nativesdk-intercept: Fix bad intercept chgrp/chown logic
Running either of these ends up corrupting the os.execv args.

If we run:
./scripts/nativesdk-intercept/chown -R foo:foo bar

The loop here ends up missing the conversion of foo:foo to root:root because
it sees sys.argv[0] and assumes that it's the user:group argument and that we
should convert that. We end up a os.execv(path, args) that have the following
args:

['root:root', '-R', 'foo:foo', 'bar']

As os.execv ignores args[0], we can just populate it with sys.argv[0] and then
loop through sys.argv[1:]. As both chgrp and chown would have either flags and
USER[:GROUP] next, this fixes the issue.

(From OE-Core rev: 2a75f647ec7696d353f4b09099d777ba53f34d36)

Signed-off-by: Eilís 'pidge' Ní Fhlannagáin <pidge@baylibre.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-09-08 22:59:47 +01:00
Ross Burton
056a8bbe1e scripts/oe-find-native-sysroot: use bitbake-getvar
Instead of bitbake and grep, just use bitbake-getvar.

(From OE-Core rev: b5011a2fc248d88b5491cf6af1fc15e5974f6e45)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-09-07 07:53:51 +01:00
Chen Qi
597c42f3df oe-depends-dot: improve '-w' behavior
The '-w' option is not giving very helpful information. For example,
if we add 'spice' to IMAGE_INSTALL, bitbake -g core-image-minimal,
and then run `oe-depends-dot -k nspr -w task-depends.dot', the result is:

  $ oe-depends-dot -k nspr -w task-depends.dot
  Because: core-image-minimal nss
  core-image-minimal -> nss -> nspr

The result is not showing the full dependency chain which brings in nspr.
With this patch, the result is:

  $ oe-depends-dot -k nspr -w task-depends.dot
  Because: core-image-minimal nss libcacard spice
  core-image-minimal -> spice -> libcacard -> nss -> nspr

This patch also fixes a typo in help message: recipe-depends.dot -> task-depends.dot.

(From OE-Core rev: 222302810c472c8eb2efceaa757a253dcac5618f)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-09-02 18:23:05 +01:00
Joshua Watt
93388921ab wic: Add gpt-hybrid partition layout
Add support for formatting a disk with a hybrid MBR & GPT partition
scheme. In this scheme, the primary partitioning method is GPT, but a
valid MBR header is also written than can point to a subset of the GPT
partitions on the disk (any partitions marked with the `--mbr` flag will
be included in this MBR). The primary purpose of this method is to allow
for SoCs that can only find a bootloader in an MBR partition to use GPT
once the bootloader is running. As an example, older versions of the
Raspberry Pi firmware can only parse MBR partitions to find a kernel (or
other bootloader like u-boot), but once those have booted GPT partitions
can be used.

In addition to the partitions annotated with the `--mbr`, a "protective"
GPT partition of type 0xEE is added, as the existence of such a
partition is the indication to tooling that this a hybrid MBR and that
the GPT partition table should be parsed instead.

(From OE-Core rev: e50e4c2a5ada6947b3503ca4d8e9c30d359e8a5d)

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-09-02 11:47:50 +01:00
Richard Purdie
65318019cd recipes/classes/scripts: Drop SRCPV usage in OE-Core
Now that SRCPV isn't needed we can simplify things in a few places...

(From OE-Core rev: 843f82a246a535c353e08072f252d1dc78217872)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-08-24 16:50:24 +01:00
Trevor Gamblin
cc488967ad oe-buildenv-internal: update required Python version
The system requirements in the current version of the reference manual
state that Python 3.8.0 is the minimum version, but oe-buildenv-internal
still only checks for 3.5.0 or newer. Update the script to match.

(From OE-Core rev: 3e655a07f2de64dbf39189c3ece56803f6bc334e)

Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-08-21 16:15:35 +01:00
Markus Niebel
c5013075f2 wic: fix wrong attempt to create file system in upartitioned regions
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.

(From OE-Core rev: db771a4cd36bf291a8b68edfd905e03243f2c8b3)

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>
2023-08-21 11:34:12 +01:00
Richard Purdie
8a9cbf62d3 resulttool/report: Avoid divide by zero
Avoid a divide by zero traceback if unfortunate test counts are encountered.

(From OE-Core rev: c5aeea53dfacb53dedb8445cb3523dc3a8cb6dca)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-08-15 08:15:25 +01:00
Michael Opdenacker
2b86db9c51 scripts/create-pull-request: update URLs to git repositories
Also remove the git.pokylinux.org URL, no longer used.

(From OE-Core rev: 47b88d143c2fc61ce0e03b7eb3a9dbcffadbf5b1)

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>
2023-08-14 12:51:21 +01:00
Alexandre Belloni
6c03509349 wic: bootimg-efi: Stop hardcoding VMA offsets
Section VMA's are currently hardcoded. This doesn't work anymore starting
with systemd-boot v254.

Follow the actually solution to this which is documented here:
https://wiki.archlinux.org/title/Unified_kernel_image#Manually

This is also used by dracut. Later on, we may want to switch to ukify
instead but this is not ready yet.

(From OE-Core rev: 3abf99a6c6bde2fb8770f54dba609b35f6c6ee5a)

Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-08-09 21:43:33 +01:00
Richard Purdie
afcd4b9cbc qemuboot/runqemu: Fix 6.2 and later kernel network device naming
With kernel 6.2 and later network devices are renamed by systemd. This does not
match with the current network device naming assumed in our configuration.

We may or may not change that naming but for now, pass the right kernel commandline
so things work as expected with newer kernels and removing a blocker on upgrading
to the 6.4 kernel by default.

(From OE-Core rev: 9e9c33d51e401fe2b4a632db74ccb3449e4b23ee)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-08-09 13:22:00 +01:00
Alexis Lothoré
572d820da9 scripts/resulttool: define custom string for "not found" test results
Whenever a test result is present in base test result but absent from
target test results, we have an entry in regression report looking like the
following one:

    ptestresult.apr.testfile: PASSED -> None

The "None" status may be a bit confusing, so replace it with a custom
string which really states what "None" means in this context:

    ptestresult.apr.testfile: PASSED -> No matching test result

(From OE-Core rev: b5f6da6e13f3484f51dfa07f6b3500aea7a21825)

Signed-off-by: Alexis Lothoré <alexis.lothore@bootlin.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-08-04 11:44:28 +01:00
Alexis Lothoré
6de3817c62 scripts/resulttool: allow to replace test raw status with custom string
Add a STATUS_STRINGS dictionnary matching raw statuses to custom strings.
Whenever a regression must be reported, raw status is searched in the
custom statuses dict (key search is case insensitive). If no custom string
is found, raw status is kept and used in regression report

(From OE-Core rev: 9d22bfc9d0c4092dba1af0ee11a4c51b7b270786)

Signed-off-by: Alexis Lothoré <alexis.lothore@bootlin.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-08-04 11:44:28 +01:00
Alexander Kanavin
1666605fe5 scripts/lib/scriptutils.py: add recipe_qa artifacts to exclusion list in filter_src_subdirs()
With newly added recipe_qa task, the function needs to filter out its output as well.

The issue wouldn't appear in selftest because it's triggered by buildhistory and
selftest disables that.

(From OE-Core rev: da1284c990957827ee89685921c53b64490a32b2)

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>
2023-08-04 11:44:28 +01:00
Alexander Kanavin
5fa764fff8 devtool/upgrade: raise an error if extracting source produces more than one directory
This can happen if running unpack task produces unrelated files and directories
(e.g. if recipe_qa or other tasks run); in this case it's better to stop, rather
than allow devtool to continue and error out much later with a message that has
nothing to do with where the problem originated.

The idea here was to handle tarballs that don't contain a top level directory and thus
the source tree is one level up; this basically never happens, and if it does we
should find a less brittle way to handle such tarballs.

(From OE-Core rev: b25e922b271794906b22450c7e6cc18fcab51ff8)

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>
2023-08-04 11:44:28 +01:00
Alexander Kanavin
2c7a4a8021 devtool: do not run recipe_qa task when extracting source
The immediate reason is that the task is sstate enabled, and due
to the way devtool sets up source extraction this causes bogus
values to appear in tmp/sstate-control/index-* files.

Also, recipe_qa may contain hard failures in the future, and it
would be counterproductive for the failures to prevent devtool
workflows (which may perhaps be about fixing the failure).

An alternative would have been to not insert recipe_qa task before
fetch task, but that would greatly delay the checks in larger
bitbake builds, and it's better to run them as early as possible.

(From OE-Core rev: 6f9db3f8de3dca9b0c87382561c70857d5b39e0f)

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>
2023-07-30 09:16:52 +01:00
Alexis Lothoré
ae1d378693 scripts/resulttool: add mention about new detected tests
Some regression reports show a lot of "PASSED->None" transitions. When such
big lot of identical transitions are observed, it could be that tests are
now failing, but it could also be that some tests has been renamed.

To detect such case, add a log in regression report to report the number of
new tests (i.e: tests that are present in target results but not in base
result). This new log also allows to know about newly added tests bases

(From OE-Core rev: 01b5cefd07e01c7407bc663842b8a8d502358a6d)

Signed-off-by: Alexis Lothoré <alexis.lothore@bootlin.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-07-25 15:27:33 +01:00
Michael Halstead
312a2a68fd resulttool/resultutils: allow index generation despite corrupt json
non-release indexes will continue to generate when test output is
corrupted.

(From OE-Core rev: 1a9157684a6bff8406c9bb470cb2e16ee006bbe9)

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>
2023-07-19 19:37:38 +01:00
Jose Quaresma
257a5e4649 pybootchartgui: fix width max usage in draw_label_in_box
The function draw_label_in_box chooses the correct side based on
the maximum width length argument 'maxx'.
Currently the labels are always drawn on the left side and this
is because we are inadvertently passing the 'maxx' argument wrong.

(From OE-Core rev: b1cea47c52899a85428e0bddf82ba6a07689673b)

Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-07-14 17:31:05 +01:00
Jose Quaresma
c40b069213 pybootchartgui: fix overlapping argument in render_processes_chart
There is another variable named 'w' on the function which is redefined.
The full width is needed in the function so rename it as this must be unique.

(From OE-Core rev: 81389ccdf22d3ea845ae8d894a0e4e0cdf589f2a)

Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-07-14 17:31:05 +01:00
Jose Quaresma
d1dc34bac4 pybootchartgui: concatenate the elapsed time with the process
The function draw_label_in_box have logic to chose the rigth side
to call the draw_text, so use it instaed of forcing the cordinates
of the right side.

(From OE-Core rev: b369e9bb0136fecc65f49e0965e5506aa50f489e)

Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-07-14 17:31:05 +01:00
Jose Quaresma
174e1790b7 pybootchartgui: calcule elapsed_time when starting the loop
Instaed of calculate the elapsed time over the loop when needed
do it on the loop startup.

(From OE-Core rev: 63a19626f10873cd7a4aabee7c9777fdede83bcb)

Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-07-14 17:31:05 +01:00
Stéphane Veyret
23c6c87f55 scripts/oe-setup-builddir: copy conf-notes.txt to build dir
Since commit 569d4cd325, if one is using a custom template directory
containing a conf-notes.txt, this file is only displayed when creating
a new environment. When entering an already existing environment, only
the default poky conf-notes.txt is displayed.

This patch copies the conf-notes.txt to display to the build directory,
so that the good file is shown, even when templateconf.cfg is not used.

(From OE-Core rev: 845e8292f218d740ee653fa68bc3110aec1af3c5)

Signed-off-by: Stéphane Veyret <sveyret@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-07-10 11:36:34 +01:00
BELOUARGA Mohamed
2dacac93bc recipetool: create: npm: Add support to handle peer dependencies
NPM changed its manner to handle peer dependencies over its versions.
Before NPM 3: NPM installs automatically peer dependencies
between NPM 3 and 7: NPM shows a warning about peer dependencies
After NPM 3: NPM reworked its manner how to handle peer dependencies

The shrinkwrap doesn't have the parameters of the peer dependencies, so we cannot
fetch them. in the same time peer dependencies are not direct dependencies, they should
be installed as run time dependencies.

(From OE-Core rev: f36021a749974ef3d4a6abe4d5429544a815071a)

Signed-off-by: BELOUARGA Mohamed <m.belouarga@technologyandstrategy.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-06-29 11:10:39 +01:00
BELOUARGA Mohamed
dbc1da2fb8 recipetool: create: npm: Add support for the new format of the shrinkwrap file
The shrinkwrap file changed its format, but npm does not version this file. So we can use it properly.
The actual changes make the script check if the npm package has dependencies in the actual shrinkwrap format.

(From OE-Core rev: 488d17c2af0c927ec66f0eee124bf6fc5b7f7c95)

Signed-off-by: BELOUARGA Mohamed <m.belouarga@technologyandstrategy.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-06-29 11:10:39 +01:00
BELOUARGA Mohamed
2a3888069f recipetool: create: npm: Remove duplicate function to not have future conflicts
Npm packages do not have yocto friendly names. fore instance we can have names like
"@example/npmPackage"

npm fetcher has a function that convert these names to yocto friendly names.
But in recipe tool we have an other function (duplicate).

(From OE-Core rev: 18e5438de5389b58c8b6a548d4474128d510a28d)

Signed-off-by: BELOUARGA Mohamed <m.belouarga@technologyandstrategy.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-06-29 11:10:39 +01:00
Yoann Congal
356d2369c7 recipetool: Fix inherit in created -native* recipes
native and nativesdk classes are special and must be inherited last :
put them at the end of the gathered classes to inherit.

(From OE-Core rev: a6614fd800cbe791264aeb102d379ba79bd145c2)

Signed-off-by: Yoann Congal <yoann.congal@smile.fr>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-06-28 23:02:50 +01:00
Adrian Freihofer
ec8899f3ab runqemu: drop uid parameter for ifdown
(From OE-Core rev: 5f6f8f399b146615eeea8c2590f1588a8c150d13)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-06-28 07:56:34 +01:00
Adrian Freihofer
95c785baeb runqemu-ifdown: catch up with ifup
- Drop the native-sysroot-basedir parameter
  still allow it to keep backward compatibility
  write a warning to stderr
- Add a space after ! in the if as suggested by shellcheck
- Support the new OE_TAP_NAME variable as well

(From OE-Core rev: be72e5e32da5a251db14b42d3e9c0951178e216d)

Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-06-28 07:56:34 +01:00
Alejandro Hernandez Samaniego
abeb4f1a7c runqemu: Fix automated call to runqemu-ifup
When runqemu tries to call runqemu-ifup to create tap devices, it checks the
output of runqemu-ifup to get the newly created tap device.

The behavior of runqemu-ifup was recently modified along with its output, it
no longer expects the uid parameter to be passed and it prints out a warning
if it was, since this warning was now part of the output runqemu tries to parse
it and convert it to an int() which proved impossible.

Pass the correct arguments to the runqemu-ifup call and echo the warning
to stderr instead to make sure its not being parsed and used by runqemu in any
case.

(From OE-Core rev: ce3a2f4cec28290c8e530989f17243f1ada4e3bd)

Signed-off-by: Alejandro Enedino Hernandez Samaniego <alejandro@enedino.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-06-28 07:56:34 +01:00
Alejandro Hernandez Samaniego
d56c8e4c8a runqemu: Stop using warn() since its been deprecated
logger.warn() has been deprecated, logger.warning() should be used instead.

(From OE-Core rev: 9263497880b3154d65ed713498749f906534a055)

Signed-off-by: Alejandro Enedino Hernandez Samaniego <alejandro@enedino.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-06-28 07:56:34 +01:00
Adrian Freihofer
fe0ef2c6bb runqemu: configurable tap names
Support the new environment variable OE_TAP_NAME.

(From OE-Core rev: 6795dddb4074274279b7ff7b9639d15786f06a40)

Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-06-24 12:21:48 +01:00
Adrian Freihofer
9e1e717bf7 runqemu-gen-tapdevs: remove only our taps
Ignore itnerfaces with other names than what the runqemu scripts created.

(From OE-Core rev: e99ec79a423d09b9308e3d42f0832ee583b1456d)

Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-06-24 12:21:48 +01:00
Adrian Freihofer
03566537a5 runqemu-gen-tapdevs: configurable tap names
Feature: Hard-coding the interface names to tap* is not always a good
idea.

(From OE-Core rev: 739f20481d14a66b23d6195c3837f83d7370434a)

Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-06-24 12:21:48 +01:00
Adrian Freihofer
6321e1fe7a runqemu-gen-tapdevs: remove uid parameter
The uid parameter is no longer needed since ip tuntap is used
internally. Remove it. Backward compatibility to 3 or 4 parameters is
still supported.

(From OE-Core rev: a11c87b0a13f81beea8a9f33ef8379c9d2593e59)

Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-06-24 12:21:48 +01:00
Adrian Freihofer
14dcde95ec runqemu-gen-tapdevs: remove staging dir parameter
The parameter staging_bindir_native is no longer used. Remove it.
For now the script is backward compatible. With 4 parameters it logs an
error message but still works.

(From OE-Core rev: c47322297fcd0408c5e290e74eee4344754e03e4)

Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-06-24 12:21:48 +01:00
Adrian Freihofer
292ca0207d runqemu-ifup: remove only our taps
If there are other tap interfaces than the interfaces created by the
runqemu-* scripts, these interfaces are not ignored. This is now fixed
by filtering the interfaces for a specific prefix in the interface name.

(From OE-Core rev: f65fb5fce45d13c2881acd8295d417635449c52d)

Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-06-24 12:21:48 +01:00
Adrian Freihofer
b97fe9d3e7 runqemu-ifup: fix tap index
Recent patches changed the index of the tap interfaces. They start now
with tap1 instead of tap0. Also the IP address starts with 192.168.7.3
instead of 192.168.7.1. This gets reverted to the previous behavior.

(From OE-Core rev: eaf9d2dfd8f0270f543b612fbd2df775adc7a394)

Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-06-24 12:21:48 +01:00
Adrian Freihofer
2401847d73 runqemu-ifup: configurable tap names
Feature: Hard-coding the interface names to tap* is not always a good
idea. Introduce an environment variable which allows to change this:
OE_TAP_NAME.

(From OE-Core rev: c9ea17c13935e805a5b7497b14e1f049b0548779)

Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-06-24 12:21:48 +01:00
Adrian Freihofer
2d0913ff6f runqemu-ifup: remove uid parameter
ip tuntap does not need the uid, it was an unused variable/parameter.
Backward compatibility should be fine.

(From OE-Core rev: 9ccbabc06d02addd429a21dbe15a1a42738c58d6)

Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-06-24 12:21:48 +01:00
Alberto Planas
cc2c3b1b62 rpm2cpio.sh: update to the last 4.x version
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.

(From OE-Core rev: 3aba44a75dd565b192f7328f2a0150a313de3cc1)

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>
2023-06-21 18:38:25 +01:00
Alejandro Hernandez Samaniego
f9d22f2634 runqemu: Stop passing bindir to the runqemu-ifup call
Since https://git.yoctoproject.org/poky/commit/?id=51063c1e6ac
we need to pass exactly 2 arguments to runqemu-ifup, otherwise
the script will return an error since bindir is no longer being
used.

However the call to runqemu-ifup from runqemu is still passing
bindir as an argument resulting in the error mentioned above,
remove the bindir argument to fix this issue.

[YOCTO #15150]

(From OE-Core rev: b9ef82727e719389b6d8ca2e9f642bfb328219b7)

Signed-off-by: Alejandro Enedino Hernandez Samaniego <alejandro@enedino.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-06-21 09:05:26 +01:00
Richard Purdie
18df7280ce scripts/runqemu-ifup: Fix 10 or more tap devices
The use of sort means that tap10 and tap1 don't sort correctly. Tweak
the shell expression to correctly handle numbers of tap devices of 10
or more.

(From OE-Core rev: 4c6d0f3ddbb76bde7f35edeb280fe56a9a00f91b)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-06-19 15:50:29 +01:00
Richard Purdie
51063c1e6a scripts/runqemu-ifup: Fix extra parameter issue
The third parameter was dropped in a previous commit but changes were not made
to the argument checks. Fix this.

(From OE-Core rev: 5d4818e836747a83f55bad8a00a9d3cd6e80c5dc)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-06-19 15:50:29 +01:00
Trevor Gamblin
7a6620b5eb runqemu-gen-tapdevs: fix missing variable quote
Commit d43c41fcaf refactors the script but
there's a missing '"' in one line, leading to the following message:

poky/scripts/runqemu-gen-tapdevs: command substitution: line 62: unexpected EOF while looking for matching `"'

(From OE-Core rev: 94b9b1333a5f779316b9698bb3e4fa7246bae78e)

Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-06-19 14:25:36 +01:00
Richard Purdie
7b87f203c2 runqemu-if*: Rename confusing variable name
The IFCONFIG variable is really the path to ip and hasn't been
ifconfig for a long time. Rename the variable to something less
confusing.

(From OE-Core rev: eb1c947a056f3e2c80e46e5e606423e85da46caa)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-06-16 15:40:11 +01:00
Richard Purdie
609fc15718 runqemu/qemu-helper: Drop tunctl
ip tuntap provides the functionality that we obtained from tunctl. We only
needed tunctl when ifconfig was more available than ip. That isn't the case
now so we can drop tunctl and all the hoops we need to jump through to build
and provide it.

(From OE-Core rev: 2abfbca690ff00cb58ce08a65cde006578ee3de9)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-06-16 15:40:11 +01:00
Charlie Wu
3c73bbf966 devtool: Fix the wrong variable in srcuri_entry
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.

(From OE-Core rev: c3231756bbc2cb5641204414ad3670d7f8607ed3)

Signed-off-by: Charlie Wu <chiachiwu@google.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-06-15 09:53:38 +01:00
Alexander Kanavin
66b7727577 scripts/runqemu: allocate unfsd ports in a way that doesn't race or clash 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]

(From OE-Core rev: dee96e82fb04ea99ecd6c25513c7bd368df3bd37)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-06-15 08:00:41 +01:00
Alexander Kanavin
5776d07bdd scripts/runqemu: split lock dir creation into a reusable function
(From OE-Core rev: 004d6bcb067ecf1d796801fa43a98820c4efd3c7)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-06-15 08:00:41 +01:00