- The autoboot message in the firmware has changed; detect both the old
and the new messages.
- Depending on where exactly the boot was interrupted, either a "reboot"
or a "reset" may be required; so send both.
In recent builds, it seems doing "ip addr list eth0" returns "no such
device" when running as a regular user. Doing so as root, will give the
information on the device.
The stderr of a command is not propagated as part of the command
output. However, some workloads/commands write vital output to
stderr. For this reason, we add an option to invoke which redirects
stderr to stdout (redirect_stderr). This is disabled by default.
The tasks() function allows to get the tasks that are in a cgroup.
Filters for the tasks TID, name and cmdline have been added to the
parameters of the function such that it is possible to select the tasks
that match these patterns.
Signed-off-by: Elieva Pignat <Elieva.Pignat@arm.com>
Previously, when the gem5 simulation crashed, one would get errors
relating to pexpect reaching EOF, rather than an informative message
stating the gem5 itself had crashed. With this change, we catch some
of the common cases where this can happen, and inform the user if gem5
itself has crashed. In the event that the gem5 simulation itself has
not reported an error, we instead re-throw the original pexpect error.
Add new energy instrument that is based on arm-probe tool to manage AEP
Main advantages of this tool are:
- uses a config file for describing channels and shunt resistors value
- manages power topology description in the config file. This topology
is then used when computing power figures
- can create virtual power channel and aggregate channels
- support multiple AEP
- support auto-zero of AEP's channel
Signed-off-by: Vincent Guittot <vincent.guittot@linaro.org>
Some targets don't seem to set system.user_rotation, resulting in "null"
being returned. This exploded on integer conversion. Handle this case by
returning the Python equivalent, None.
Adds initial support for ChromeOs Targets.
If the device does not support running android apps the target will
behave like a `LinuxTarget` however if android is supported, the chromeos
target opens 2 connections, one via shh to the linux target, as normal,
and one via adb to the android container. By default all calls will be
made to the linux target and if not present, will attempt to use the
android container instead. The android container is also exposed via a
`android_container` attribute so can be accessed directly.
In order to detect whether the target supports running android apps the
existance of '/opt/google/containers/android/' will be queried upon
connection to the linux target.
Since:
cafc0a4 target: do not create shutil in package directory
we generate 'shutils' in /tmp, which is also the executables_path
used by default by a LocalLinuxTarget.
This ultimately results into a:
self.install(shutils_ofile)
...
shutil.copy(source, dest)
raising an exception since source == dest.
Let's fix this by setting /tmp/devlib-target as a default base path for
all devlib deployed stuff into a localhost target.
Signed-off-by: Patrick Bellasi <patrick.bellasi@arm.com>
Do not attempt to create shutil from shutil.in inside
PACKAGE_BIN_DIRECTORY as that may not be writable. Instead, create it in
the temporary directory and remove it right after installing.
Since 1e34390b990f1d85b083d31693d71fad5c9f28a6, AndroidTarget and
LinuxTarget share the same code for `push` and `pull`. However,
these methods expect a `_file_transfer_cache` field to be present.
It is currently populated in `_resolve_paths` for AndroidTarget
and LinuxTarget, but not for LocalLinuxTarget.
Since LocalLinuxTarget inherits its `push` & `pull` from LinuxTarget,
this causes an exception. This commit fixes it by adding an assignment
to `_file_transfer_cache` in `LocalLinuxTarget:_resolves_paths`.
This is a simple fix, and the actual push/pull behaviour of that local
target class could be improved in regards to that transfer cache, but
it should be good enough for now.
Previously the root directory was used when checking for device
connection, on some devices this requires elevated permissions so now
use '/data/local/tmp' which should not have permission restrictions.
pexpect.spawn object expects the logger to have write() and flush()
methods, neither of which are present in logging.Logger. Create a
subclass that adds these missing methods to enable correct logging for
pexpect.spawn.
- Make sure commands are updated after installing readenergy binary
during setup.
- Add the missing channels argument to reset().
- Set the sample rate for the MeasurementCsv inside get_data().
Ensure that source and destination are quoted and all space characters
are also escaped which is required for scp to work for file paths
containing spaces.
active_sites is used instead of sites_to_match and that
results in "KeyError: 'timestamp'" when parsing the
statistics file. 'sim_seconds' should be used instead
of 'timestamp'.
Signed-off-by: Ionela Voinescu <ionela.voinescu@arm.com>
Changes the default working directory from
`/data/local/tmp/` to be on the devices external storage
(discovered from $EXTERNAL_STORAGE) which is usually `/sdcard`.
This is due to permission errors on some devices, to be readable
by android applications and will usually have a larger capacity.
m5 binaries are not properly versioned, so it is not possible to be sure
that the one that is already present on the image has all the features
needed by devlib. Thus always deploy and use our version.
Only attempt to remove echoed commands from the shell during parsing
if gem5 is actually echoing commands otherwise this can cause incorrect
filtering.
In an effort to reduce thrashing, "implicit" broadcasts are no longer
allowed in Android O. See:
https://issuetracker.google.com/issues/36496703#comment7
This impacts MEDIA_MOUNTED broadcasts. To get around this issue,
explicitly specify the component the broadcast is targeted at.
The target platform can have different hierarchies with different cgroup
controllers mounted. If we have a cgroup that uses different controllers
belonging to different hierarchies, that cgroup will be present under the
different hierarchies. Therefore, in such cases we need to take into all those
paths having that cgroup and move the task into all of them.
When running a command into a cgroup we want to make sure that the command is
only run inside the intended cgroup. If there is a hierarchy of cgroups named
with a common prefix, the script will move it to all matching cgroup and as a
result the task will end up running always at lowest level. For example, if we
have the following hierarchy of cgroups:
"/"
|__ "/tg1"
|__ "/tg1/tg1_1"
and we want to run something in cgroup "/tg1/", the lowest levels will match the
regexp and the task will ultimately be moved to "/tg1/tg1_1".
This patch fixes the issue by requiring the absolute path of the specified
cgroup to match exactly.