1
0
mirror of https://git.yoctoproject.org/meta-arm synced 2026-07-17 16:17:09 +00:00

Compare commits

...

12 Commits

Author SHA1 Message Date
Abdellatif El Khlifi 2e2dbc2587 arm/trusted-firmware-m: setting the toolchain file path in PACKAGECONFIG
Toolchain files toolchain_GNUARM.cmake and toolchain_ARMCLANG.cmake are
located at trusted-firmware-m source directory.

This commit sets that.

Change-Id: If9c26f65b0c8111a6ff1f1a7d56610563efd501b
Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-10-20 14:07:18 -04:00
Abdellatif El Khlifi ab574b084e arm/trusted-firmware-m: enabling PACKAGECONFIG when using CMake
In case of CMake, PACKAGECONFIG configs take effect when passing
PACKAGECONFIG_CONFARGS to the configure task.

Change-Id: I126ba089c9a5db8e895b8a9545e96ef9fa98ce0d
Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-10-20 14:07:18 -04:00
Ross Burton b4f52f2642 arm/lib/oeqa: fix module lookup
As multiple paths can and do provide modules under oeqa.controllers, all
of these paths need to call pkgutil.extend_path() so the lookup works
correctly.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-10-20 14:07:18 -04:00
Ross Burton 2d22a1f7ae CI: enable testimage for fvp-base
Inherit fvpboot so that the FVP binary is fetched and configuration
generated.

Configure the FVP to forward host port 8022 to port 22 locally, and
tell testimage to SSH to localhost:8022. This has the limitation that
only one testimage can run per machine, but this will be removed shortly.

Disable the parselogs test case, as there are some harmless warnings in
the dmesg which cause it to fail.  Currently meta-arm can't extend the
whitelist of ignorable warnings.

The FVP binaries are x86-64 only, so tag the job appropriately.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-10-20 14:07:11 -04:00
Ross Burton ba86aeb31f CI: install telnet into the images
runfvp currently needs telnet to communicate with the guest, so install
telnet into the image.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-10-20 14:07:11 -04:00
Ross Burton 48524c32d5 arm-bsp/fvp-common: set TEST_TARGET to OEFVPTarget
Set TEST_TARGET so that all FVP machines use the new FVP target out of
the box, instead of attempting to use qemu.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-10-20 14:07:11 -04:00
Ross Burton 4b1a0c7484 arm-bsp/fvp: enable virtio drivers
All FVPs can use virtio networking devices, so enable virtio in all of
the FVP kernels.

Remove our fvp/fvp-virtio.cfg as there's cfg/virtio.scc we can use.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-10-20 14:07:11 -04:00
Ross Burton 2824f6a58b arm/oeqa: add FVP testimage controller target
Add a new oeqa.core.target.OETarget subclass for testimage which starts
a FVP using runfvp. This uses --console to connect to the console so
telnet is needed on the host.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-10-20 14:07:11 -04:00
Ross Burton 0a64644bc9 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-20 14:07:11 -04:00
Ross Burton 491cac17fe gem5/gem5-native: add missing m4-native DEPENDS
Latest oe-core has less implicit DEPENDS, so gem5 fails to configure:

Error: Can't find version of M4 macro processor.  Please install M4 and try again.

Explicitly add m4-native to DEPENDS.

Change-Id: I2e107ea6448eec399619e0d1922fd29930a95fd8
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-10-20 14:07:11 -04:00
Ross Burton 328d95e27d CI: use http: to access sstate mirror
The sstate mirrors are not available over HTTPS currently due to a
certificate problem, so use plain HTTP instead.

Change-Id: I5b974d67bc13f7c7234927c6bc62a8c733e454c3
Signed-off-by: Ross Burton <ross.burton@arm.com>
2021-10-19 16:39:48 +01:00
Hugo L'Hostis 99b9ee4470 kas/fvp-baser-aemv8r64: use honister as default branch
Issue-Id: SCM-3532
Signed-off-by: Hugo L'Hostis <hugo.lhostis@arm.com>
Change-Id: I05b529da0f5bbdcee038476d07c42f1b6ac0526f
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-10-15 10:16:14 -04:00
14 changed files with 117 additions and 15 deletions
+1
View File
@@ -0,0 +1 @@
__pycache__
+4 -1
View File
@@ -27,6 +27,7 @@ stages:
- mkdir --verbose --parents $KAS_WORK_DIR $KAS_REPO_REF_DIR $SSTATE_DIR $DL_DIR $TOOLCHAIN_DIR $TOOLCHAIN_LINK_DIR
# Must do this here, as it's the only way to make sure the toolchain is installed on the same builder
- ./ci/get-binary-toolchains $DL_DIR $TOOLCHAIN_DIR $TOOLCHAIN_LINK_DIR
- sudo apt update && sudo apt install telnet -y
# Generalised fragment to do a Kas build
.build:
@@ -108,8 +109,10 @@ corstone700-fvp:
corstone700-mps3:
extends: .build
fvp-base:
fvp-base/testimage:
extends: .build
tags:
- x86_64
fvp-base-arm32:
extends: .build
+1 -1
View File
@@ -41,7 +41,7 @@ local_conf_header:
BB_HASHSERVE_UPSTREAM = "typhoon.yocto.io:8687"
BB_HASHSERVE = "auto"
BB_SIGNATURE_HANDLER = "OEEquivHash"
SSTATE_MIRRORS = "file://.* https://sstate.yoctoproject.org/dev/PATH;downloadfilename=PATH"
SSTATE_MIRRORS = "file://.* http://sstate.yoctoproject.org/dev/PATH;downloadfilename=PATH"
machine: unset
+9
View File
@@ -5,3 +5,12 @@ header:
machine: fvp-base
local_conf_header:
testimagefvp: |
INHERIT = "fvpboot"
# This fails but we can't add to the ignorelist from meta-arm yet
# https://bugzilla.yoctoproject.org/show_bug.cgi?id=14604
TEST_SUITES:remove = "parselogs"
# Tell testimage to connect to localhost:8022, and forward that to SSH in the FVP.
TEST_TARGET_IP = "localhost:8022"
FVP_CONFIG[bp.virtio_net.hostbridge.userNetPorts] ?= "8022=22"
+1 -1
View File
@@ -6,7 +6,7 @@ machine: fvp-baser-aemv8r64
defaults:
repos:
refspec: master
refspec: honister
repos:
meta-arm:
+2
View File
@@ -25,3 +25,5 @@ EXTRA_IMAGEDEPENDS += "virtual/trusted-firmware-a u-boot"
# initialise) and install the pre-generated keys.
PACKAGECONFIG:remove:pn-openssh = "rng-tools"
MACHINE_EXTRA_RRECOMMENDS += "ssh-pregen-hostkeys"
TEST_TARGET = "OEFVPTarget"
@@ -1,14 +1,13 @@
include features/input/input.scc
include cfg/timer/no_hz.scc
include cfg/virtio.scc
kconf hardware fvp-arm32/fvp-board.cfg
kconf hardware fvp-arm32/fvp-features.cfg
kconf hardware fvp/fvp-net.cfg
kconf hardware fvp/fvp-rtc.cfg
kconf hardware fvp/fvp-serial.cfg
kconf hardware fvp/fvp-virtio.cfg
kconf hardware fvp/fvp-cfi.cfg
kconf hardware fvp/fvp-drm.cfg
kconf hardware fvp/fvp-timer.cfg
kconf hardware fvp/fvp-virtio.cfg
kconf hardware fvp/fvp-watchdog.cfg
@@ -1,14 +1,13 @@
include features/input/input.scc
include features/net/net.scc
include cfg/timer/no_hz.scc
include cfg/virtio.scc
kconf hardware fvp/fvp-board.cfg
kconf hardware fvp/fvp-net.cfg
kconf hardware fvp/fvp-rtc.cfg
kconf hardware fvp/fvp-serial.cfg
kconf hardware fvp/fvp-virtio.cfg
kconf hardware fvp/fvp-cfi.cfg
kconf hardware fvp/fvp-drm.cfg
kconf hardware fvp/fvp-timer.cfg
kconf hardware fvp/fvp-virtio.cfg
kconf hardware fvp/fvp-watchdog.cfg
@@ -1,4 +0,0 @@
CONFIG_VIRTIO=y
CONFIG_VIRTIO_MMIO=y
CONFIG_BLOCK=y
CONFIG_VIRTIO_BLK=y
@@ -0,0 +1,3 @@
# This is needed so that multiple locations can provide the same package
from pkgutil import extend_path
__path__ = extend_path(__path__, __name__)
+87
View File
@@ -0,0 +1,87 @@
import asyncio
import os
import pathlib
import signal
import subprocess
import oeqa.core.target.ssh
class OEFVPTarget(oeqa.core.target.ssh.OESSHTarget):
# meta-arm/scripts isn't on PATH, so work out where it is
metaarm = pathlib.Path(__file__).parents[4]
def __init__(self, logger, target_ip, server_ip, timeout=300, user='root',
port=None, server_port=0, dir_image=None, rootfs=None, bootlog=None,
**kwargs):
super().__init__(logger, target_ip, server_ip, timeout, user, port)
image_dir = pathlib.Path(dir_image)
basename = pathlib.Path(rootfs).stem
self.fvpconf = image_dir / (basename + ".fvpconf")
if not self.fvpconf.exists():
raise FileNotFoundError(f"Cannot find {self.fvpconf}")
# FVPs boot slowly, so allow ten minutes
self.boot_timeout = 10 * 60
self.logfile = bootlog and open(bootlog, "wb") or None
async def boot_fvp(self):
cmd = [OEFVPTarget.metaarm / "scripts" / "runfvp", "--console", "--verbose", self.fvpconf]
# Python 3.7 needs the command items to be str
cmd = [str(c) for c in cmd]
self.logger.debug(f"Starting {cmd}")
# TODO: refactor runfvp so this can import it and directly hook to the
# console callback, then use telnetlib directly to access the console.
# As we're using --console, telnet expects stdin to be readable too.
self.fvp = await asyncio.create_subprocess_exec(*cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, stdin=subprocess.PIPE)
self.logger.debug(f"Started runfvp PID {self.fvp.pid}")
async def wait_for_login():
bootlog = bytearray()
while True:
line = await self.fvp.stdout.read(1024)
if not line:
self.logger.debug("runfvp terminated")
return False, bootlog
self.logger.debug(f"Read line [{line}]")
bootlog += line
if self.logfile:
self.logfile.write(line)
if b" login:" in bootlog:
self.logger.debug("Found login prompt")
return True, bootlog
return False, bootlog
try:
found, bootlog = await asyncio.wait_for(wait_for_login(), self.boot_timeout)
if found:
return
except asyncio.TimeoutError:
self.logger.info("Timed out waiting for login prompt.")
self.logger.info(b"".join(bootlog.splitlines()[-20:]).decode("utf-8", errors="replace"))
raise RuntimeError("Failed to start FVP.")
def start(self, **kwargs):
# When we can assume Py3.7+, this can simply be asyncio.run()
loop = asyncio.get_event_loop()
loop.run_until_complete(asyncio.gather(self.boot_fvp()))
def stop(self, **kwargs):
loop = asyncio.get_event_loop()
# Kill the process group so that the telnet and FVP die too
gid = os.getpgid(self.fvp.pid)
try:
self.logger.debug(f"Sending SIGTERM to {gid}")
os.killpg(gid, signal.SIGTERM)
loop.run_until_complete(asyncio.wait_for(self.fvp.wait(), 10))
except TimeoutError:
self.logger.debug(f"Timed out, sending SIGKILL to {gid}")
os.killpg(gid, signal.SIGKILL)
@@ -69,8 +69,8 @@ python() {
PACKAGECONFIG ??= "cc-gnuarm"
# What compiler to use
PACKAGECONFIG[cc-gnuarm] = "-DTFM_TOOLCHAIN_FILE=toolchain_GNUARM.cmake,,gcc-arm-none-eabi-native"
PACKAGECONFIG[cc-armclang] = "-DTFM_TOOLCHAIN_FILE=toolchain_ARMCLANG.cmake,,armcompiler-native"
PACKAGECONFIG[cc-gnuarm] = "-DTFM_TOOLCHAIN_FILE=${S}/toolchain_GNUARM.cmake,,gcc-arm-none-eabi-native"
PACKAGECONFIG[cc-armclang] = "-DTFM_TOOLCHAIN_FILE=${S}/toolchain_ARMCLANG.cmake,,armcompiler-native"
# Whether to integrate the test suite
PACKAGECONFIG[test-secure] = "-DTEST_S=ON,-DTEST_S=OFF"
PACKAGECONFIG[test-nonsecure] = "-DTEST_NS=ON,-DTEST_NS=OFF"
@@ -101,7 +101,7 @@ do_patch[postfuncs] += "apply_local_patches"
do_configure[cleandirs] = "${B}"
do_configure() {
cmake -G"Unix Makefiles" -S ${S} -B ${B} ${EXTRA_OECMAKE}
cmake -G"Unix Makefiles" -S ${S} -B ${B} ${EXTRA_OECMAKE} ${PACKAGECONFIG_CONFARGS}
}
# Invoke install here as there's no point in splitting compile from install: the
@@ -28,7 +28,7 @@ inherit scons native
# google protobuf
# pkgconfig
# hdf5
DEPENDS += "python3-six-native protobuf-native hdf5-native pkgconfig-native \
DEPENDS += "m4-native python3-six-native protobuf-native hdf5-native pkgconfig-native \
boost-native libpng-native"
EXTRA_OESCONS = "${GEM5_SCONS_ARGS}"
+3
View File
@@ -217,6 +217,9 @@ def runfvp(cli_args):
if __name__ == "__main__":
try:
# Set the process group so that it's possible to kill runfvp and
# everything it spawns easily.
os.setpgid(0, 0)
runfvp(sys.argv[1:])
except KeyboardInterrupt:
pass