1
0
mirror of https://git.yoctoproject.org/meta-arm synced 2026-01-12 03:10:15 +00:00

50 Commits

Author SHA1 Message Date
Jon Mason
5773030601 CI/machine-summary: remove binary toolchains and sort entries alphabetically
Signed-off-by: Jon Mason <jon.mason@arm.com>
2025-02-13 11:00:04 -05:00
Jon Mason
8d308aac02 arm: use UPSTREAM_CHECK_COMMITS for git versioned recipes
Signed-off-by: Jon Mason <jon.mason@arm.com>
2024-03-28 17:00:14 -04:00
Ross Burton
6fa5992471 scripts/runfvp: exit code should be the FVP exit code
The __main__ body used the return value of runfvp() as the exit code,
but this was never set.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2023-11-07 09:47:12 -05:00
Jon Mason
bc4d2e4124 CI: add sbsa-acs to recipe report
Signed-off-by: Jon Mason <jon.mason@arm.com>
2023-10-13 09:50:02 -04:00
Peter Hoyes
cf0baaee0b runfvp: Add missing conffile include
Using runfvp without explicitly specifying the fvpconf path currently
fails due to a missing fvp.conffile include.

Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2023-07-17 15:00:40 -04:00
Clément Péron
272359be5d runfvp: make fvp runner to hold the config
At the moment the config is load and pass to FVPRunner.

Change the ownership to FVPRunner.

Signed-off-by: Clément Péron <peron.clem@gmail.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2023-05-22 09:25:15 -04:00
Clément Péron
316e02c0f1 scripts/runfvp: Fix KeyError exception when there is no FVP_CONSOLE provided
We access the dictionnary element that doesn't exist.

Use the get() method instead that will default the element to None if it
doesn't exist.

Signed-off-by: Clément Péron <peron.clem@gmail.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2023-05-22 09:25:11 -04:00
Ross Burton
402cfcc4e8 CI/machine-summary: add missing recipes
Add missing recipes to the update report.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2023-02-16 12:51:33 -05:00
Ross Burton
132089830b meta-gem5: remove
The meta-gem5 layer is unmaintained and gem5 is incompatible with Python
3.11, so won't work with master without work that is still ongoing.

Signed-off-by: Ross Burton <ross.burton@arm.com>
2023-01-04 11:51:03 +00:00
Ross Burton
c7b85230a2 meta-atp: remove
The meta-atp layer is unmaintained and gem5 is incompatible with Python
3.11, so won't work with master without work that is still ongoing.

Signed-off-by: Ross Burton <ross.burton@arm.com>
2023-01-04 11:49:24 +00:00
Peter Hoyes
d5f132b199 runfvp: Fix verbose output when using --console
Start a new thread to simultaneously log the output of FVP and the
telnet output if the --verbose flag is passed to runfvp. So that
ConsolePortParser can read the same stream, use itertools.tee to
temporarily duplicate the stream.

Use a custom log format string with an escape character to ensure that
log output always starts at the beginning of a line when interleaved
with console output.

Issue-Id: SCM-5314
Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
Change-Id: I3e815d9d899425e0d2af619524f09f2eda87562c
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-11-15 11:00:13 -05:00
Peter Hoyes
2265bffdc7 arm/lib: Decouple console parsing from the FVPRunner
To simplify the FVPRunner class, create a separate ConsolePortParser
class to handle reading an iterator of lines and parsing port numbers
for FVP consoles. Use this in runfvp and the test targets.

This refactor also allows the stream being monitored to be changed more
easily, e.g. to a log file.

Issue-Id: SCM-5314
Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
Change-Id: Iade3a4c803fb355b04af7afa298d0a41fe707d94
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-11-15 11:00:13 -05:00
Peter Hoyes
81e0cf090b arm/lib: Factor out asyncio in FVPRunner
FVPRunner relies heavily on asyncio, despite there being very little
concurrent work happening. Additionally, while the runfvp entry point
starts an asyncio runner, it is not practical to have a single asyncio
runtime during testimage, which is fully synchronous.

Refactor to use subprocess.Popen and related functionality. The process
object has a similar interface to its async equivalent.

Cascade the API changes to runfvp and the test target classes.

Issue-Id: SCM-5314
Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
Change-Id: I3e7517e8bcbb3b93c41405d43dbd8bd24a9e7eb8
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-11-15 11:00:13 -05:00
Peter Hoyes
20a629180c runfvp: Stop the FVP when telnet shuts down cleanly
At the moment, when using the --console flag, if telnet is shut down
cleanly (i.e. by typing "quit" at the prompt instead of Ctrl+C), runfvp
still waits on the FVP to exit of its own accord, so hangs.

Move the fvp.run() call so that when telnet quits, it immediately
proceeds to shut down the FVP.

Issue-Id: SCM-4954
Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
Change-Id: I2169c99586a1eebc2c6ab4b2e15fb0c769fc81a8
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-08-03 09:34:16 -04:00
Peter Hoyes
ff90c8ad54 arm/classes: Change FVP_CONSOLE to FVP_CONSOLES in fvpconf
So that the test target can connect to the desired console(s) as soon
as they appear in the FVP stdout, add the variable FVP_CONSOLES to the
fvpconf as a replcaement for FVP_CONSOLE. The varflags of this variable
define a mapping between FVP console names (e.g. terminal_0) and console
names in the tests (e.g. 'zephyr'). The console defined in
FVP_CONSOLE is automatically mapped as 'default' for backwards
compatibility.

This also enables greater reuse of test cases, as the "default" console
name can be remapped on a per-machine basis.

Issue-Id: SCM-4957
Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
Change-Id: I9d88b172bfc5a5459b9f5132f287c70816d7fb55
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-07-12 07:00:13 -04:00
Peter Hoyes
306639bbd5 scripts,arm/lib: Refactor runfvp into FVPRunner
Refactor runfvp into a "fvp" library inside meta-arm. Split into
terminal, conffile and runner.

Issue-Id: SCM-4957
Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
Change-Id: I797f9a4eab810f3cc331b7db140f59c9911231fd
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-07-12 07:00:13 -04:00
Bertrand Marquis
a25192f51d runfvp: ignore setpgid errors when spawned
When runfvp is spawned from an other process (for example except), it is
throwing a permission error.
To solve the problem, surround the call to setpgid with a try/except and
ignore the permission errors.

Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-07-07 05:00:08 -04:00
Ross Burton
1a41710d51 CI: remove armcompiler references
Arm Compiler has been removed, so remove it from the CI.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-06-08 06:00:13 -04:00
Ross Burton
58f3251598 runfvp: check for telnet
Check for telnet on startup to avoid mysterious failures later when
telnet isn't available.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-03-31 15:00:09 -04:00
Ross Burton
1a7c48e5f6 runfvp: propagate the exit code correctly
runfvp could encounter an error but the exit code remained as 0.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-03-31 15:00:09 -04:00
Ross Burton
57f03491be scripts/machine-summary: link patches to cgit
Add links from the patch names to the patches in cgit for ease of
inspection.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-01-26 11:00:08 -05:00
Ross Burton
b1e4cff75d scripts/machine-summary: improve layer_path
As this can get called lots but the data doesn't change, cache
the responses.  Also return a pathlib.Path, as this is 2022.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-01-26 11:00:08 -05:00
Ross Burton
72bb1adf3f scripts/machine-summary: show patch count in the overview
Instead of simply adding a tag saying "Patched", include the patch count
and make a judgement call on whether the patches are "safe" or not. For
example, patches which are entirely backports or inappropriate are
"safe", pending and denied patches are not.

Signed-off-by: Ross Burton <ross.burton@arm.com>
2022-01-25 16:31:57 +00:00
Ross Burton
38cd9b6f59 scripts/machine-summary: remove default Format.render()
There's no shared code anymore, so move the code to TextOverview.

Signed-off-by: Ross Burton <ross.burton@arm.com>
2022-01-25 16:31:57 +00:00
Ross Burton
de23f25be5 scripts/machine-summary: don't mark denied patches as good
A patch in denied state isn't good, it's bad.

Signed-off-by: Ross Burton <ross.burton@arm.com>
2022-01-25 16:31:57 +00:00
Ross Burton
bc3d654504 scripts/machine-summary: remove obsolete is_old test
This test isn't used any more, so remove it.

Signed-off-by: Ross Burton <ross.burton@arm.com>
2022-01-25 16:21:01 +00:00
Ross Burton
254482284d runfvp: fix undefined variable in terminal selection login
Since 10e60cc the terminal_map doesn't exist, this piece of code wasn't
updated.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-01-21 12:00:06 -05:00
Ross Burton
c4b34740cf scripts/machine-summary: write per-machine reports with more details
Rename the updates.html format to just 'report'.

This report has the existing overview as the index.html, and then
per-machine files are written with the patch breakdown.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-01-19 17:09:58 -05:00
Ross Burton
b1b0f37da7 scripts/machine-summary: put more version information into the context
As well as storing the truncated PV, also store the original PV and
whether the recipe needs updating, to avoid the templates needing to
do that logic.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-01-19 17:09:58 -05:00
Ross Burton
0d2d0fd691 scripts/machine-summary: refactor output to classes
To prepare for future expansion, refactor the output code to be delegated
to Format subclasses.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-01-19 17:09:58 -05:00
Ross Burton
cb29175ab4 scripts/machine-summary: harvest more patch data
Instead of just putting whether there are patches or not into the
context, store the list of patches, the layer they came from, and the
upstream status.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-01-19 17:09:58 -05:00
Ross Burton
0235036957 scripts/layer-overview: improve layer detection
Refactor the script somewhat, and detect whether the starting directory
is a single layer, or a collection of layers.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-01-19 17:09:58 -05:00
Ross Burton
10e60cc8ef runfvp: refactor terminal selection
Rewrite the terminal code to have a priority list of terminals when
selecting a default, allow the user to pick a default with a
configuration file, and add gnome-terminal to the list.

Signed-off-by: Ross Burton <ross.burton@arm.com>
2021-12-20 17:52:22 -05:00
Ross Burton
7780374500 runfvp: don't use f-string when there's no expressions
Signed-off-by: Ross Burton <ross.burton@arm.com>
2021-12-20 17:52:22 -05:00
Ross Burton
1ccccbf603 runfvp: don't hide output when using terminals
Only pass a console_cb if we're hooking up a console, so that the output
from the FVP is visible on the terminal.

Signed-off-by: Ross Burton <ross.burton@arm.com>
2021-12-20 17:52:22 -05:00
Ross Burton
1512bf2aef runfvp: handle the fvp quitting before we kill it
Don't raise an exception if the FVP has quit before we get around to
killing it.

Signed-off-by: Ross Burton <ross.burton@arm.com>
2021-12-20 17:52:22 -05:00
Ross Burton
12501b717f runfvp: add an asyncio TODO
Signed-off-by: Ross Burton <ross.burton@arm.com>
2021-12-20 17:52:22 -05:00
Peter Hoyes
36e43a3a21 runfvp: Ensure new process group is in the foreground
When a new process group is created, it is launched in the background
and any attempt to access the session terminal triggers a SIGTTIN (for
stdin) or SIGTTOU (for stdout) signal. These are ignored in an
interactive shell, but the default signal behavior in a new job is to
send a SIGTSTP to the whole process group. This causes runfvp to hang
when executed via a subprocess when stdin is accessed.

After creating a new process group, use tcsetpgrp to make the new group
the foreground process for the terminal associated with stdin/stdout,
but only if stdin is a tty.

The documentation for tcsetgrp states that tcsetpgrp itself raises a
SIGTTOU signal, so set this signal to SIG_IGN.

Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
Change-Id: I349a825df7fcb8a3cedb81762b901c6f50fa53b5
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-10-21 09:09:23 -04:00
Ross Burton
a12a605281 runfvp: reset the process group on startup
So that it is easy to kill runfvp and everything it starts (such as
telnet or the FVP itself), reset the process group on startup.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-10-18 13:45:29 -04:00
Ross Burton
b4bcb3d986 runfvp: use asyncio instead of selector
Using asyncio makes the code easier to understand.  Also start to expose
a callback for when consoles are opened.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-10-15 10:16:01 -04:00
Ross Burton
2ead4e6caa runfvp: exit cleanly if tinfoil cannot be imported
If bb.tinfoil cannot be imported, display a nice error instead of a
backtrace.

Change-Id: I20dab9dfdbd57c8e90c8321072bab4f70b8ace47
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-09-27 09:38:53 -04:00
Ross Burton
cdc91df4fc runfvp: ensure the default terminal is usable
Pick a default terminal which will actually work, instead of defaulting
to xterm even if xterm isn't installed.

Also show the default in the --help output.

Change-Id: Ib3e7c32917725f404a171248549b6f9c0afe8158
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-09-27 09:38:53 -04:00
Ross Burton
7cb1866728 runfvp: refactor argument parsing
No behavioural changes, just cleanup.

Change-Id: I04d82512493a2f90e810198e520f672284cd3eb2
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-09-27 09:38:53 -04:00
Ross Burton
c5465209c1 runfvp: handle control-c cleanly
If the script receives control-c, don't display the stack trace.

Change-Id: Id0ebf9476ecd685302723fde6a36c2e899d0f3eb
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-09-27 09:38:53 -04:00
Ross Burton
b1d667c396 scripts: add machine summary report tool
machine-summary.py is a tool to generate a report of what recipes and
versions are used for what machines, and what the latest upstream release
is.

Change-Id: Iecf21a14057df0fd1cb05be9b54c621dfbaddd94
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-08-12 09:49:19 -04:00
Ross Burton
31458a1046 runfvp: drop --parameter, users can use -- --parameter
Now that arbitrary parameters can be passed to the FVP binary, runfvp
doesn't need to handle --parameter itself.

Anyone using runfvp --parameter should simply use runfvp -- --parameter.

Change-Id: I8a79200fe927c253308731e7e0cb228e53cd989a
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-06-13 14:17:55 -04:00
Ross Burton
56b0a992e1 runfvp: pass arbitrary options after -- to the FVP binary
To allow passing arbitrary options to the FVP binary, split the passed
options on --.  Anything before the separator is handled by runfvp,
anything afterwards is passed as-is to the FVP binary.

Change-Id: I686b2fb79d217e26988753be7bd067c638d69eac
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-06-13 14:17:55 -04:00
Ross Burton
be0e4ca455 runfvp: exit with the return code of the FVP binary
Change-Id: If79e31e61110161c9a13dd512b0146d1d515d77a
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-06-13 14:17:55 -04:00
Ross Burton
0da1865ac8 scripts: add runfvp
runfvp is a script that reads existing .fvpconf files (as written by
fvpboot.bbclass) and executes the FVP binary appropriately.

By default the behaviour is the same as running a FVP by hand, but by
passing --console the first serial port is connected to stdin/stdout.

Change-Id: Ibd26867c09e8692be4c02a7ea13571dcfe36db9b
Signed-off-by: Ross Burton <ross.burton@arm.com>
2021-05-28 17:15:01 +01:00
Ross Burton
01a60a10db scripts: add tool to generate a layer overview
Change-Id: Icb4e29d80f1db9791ce801910563695c9fdc76b3
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-05-01 07:50:12 -04:00