Corstone1000 needs a kernel driver to control the
external system (turn on/off, reset). This commit
adds the external system driver binding to the
u-boot device tree for corstone1000.
Signed-off-by: Emekcan Aras <emekcan.aras@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
It is sometimes useful to be able to configure the behavior of FVPs
using environment variables, e.g. for licensing or plugins.
Add a new FVP option: FVP_ENV_PASSTHROUGH, which allows the Bitbake
variables to be passed to the environment to be specified explicitly (in
a similar way to BB_ENV_PASSTHROUGH). This ensures that:
* FVPs launched via runfvp have a reproducable environment
* FVPs launched via testimage (which run from an isolated Bitbake task)
can receive environment variables
Change the self-tests to use cwd instead of PATH to find the mock FVPs,
as the PATH environment variable is no longer passed through.
Issue-Id: SCM-4964
Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
Change-Id: Idf6ac6d41fda4cd5f950bc383c2fc1fa1acdf4e3
Signed-off-by: Jon Mason <jon.mason@arm.com>
Historically external-arm-toolchain recipe packaged all gcc headers from
${libdir}/gcc/${TARGET_SYS}/${BINV}/include - some would be picked up by
packages like gcc-sanitizers, libssp-dev. libquadmath-dev or libgomp-dev.
The rest would fall into catch-all libgcc-dev package.
Unfortunately, that could result in a conflict with a target gcc, which
also packages some of those files, like unwind.h or stddef.h, among others.
The conflict could be seen with this config:
EXTRA_IMAGE_FEATURES += "dev-pkgs tools-sdk"
TCMODE = "external-arm"
EXTERNAL_TOOLCHAIN = "/OE/toolchains/gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu"
And the error message is:
Error: Transaction test error:
file /usr/lib/gcc/aarch64-poky-linux/11.2.1/include/stddef.h conflicts between attempted installs of libgcc-s-dev-11.2.1-r0.1.cortexa57 and gcc-arm+11.2-r2022.02.1.cortexa57
file /usr/lib/gcc/aarch64-poky-linux/11.2.1/include/unwind.h conflicts between attempted installs of libgcc-s-dev-11.2.1-r0.1.cortexa57 and gcc-arm+11.2-r2022.02.1.cortexa57
Modify external-arm-toolchain recipe according to how libgcc in OE-Core
handles those header files by removing and not packaging them:
https://git.openembedded.org/openembedded-core/tree/meta/recipes-devtools/gcc/libgcc-common.inc#n40
Also need to adjust gcc recipe to pick up unwind.h from EXTERNAL_TOOLCHAIN
location now, since libgcc-dev no longer carries it, and install it into
STAGING_LIBDIR_NATIVE, where OE-Core gcc-target.inc expects it from
gcc-cross:
https://git.openembedded.org/openembedded-core/tree/meta/recipes-devtools/gcc/gcc-target.inc#n164
Signed-off-by: Denys Dmytriyenko <denys@konsulko.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
This change is to enable build and installing external-system firmware
for corstone1000 platform.
Signed-off-by: Vishnu Banavath <vishnu.banavath@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
The corstone1000 optee files have an underbar when it should have a
hyphen in the naming scheme. Change this to match other files.
Signed-off-by: Jon Mason <jon.mason@arm.com>
A optee-os v3.10 recipe is necessary for corstone100, as it is actually
using 3.10 SHA and then trying to apply patches for 3.14 (which is
causing fuzz errors). Create this and use it to avoid these issues.
Signed-off-by: Jon Mason <jon.mason@arm.com>
With the latest gcc, there were some unresolved symbols on
opemamp linkage, add the implementation of that symbol for the
outline of atomics.
Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org>
Signed-off-by: Jon Mason <jon.mason@arm.com>
Upgrade to the latest 5.4 release (.205), and backport two patches to
fix buildpath errors:
File /usr/src/debug/linux-yocto/5.4.205+gitAUTOINC+e8c675c7e1_8a59dfded8-r0/lib/oid_registry_data.c in package linux-yocto-src contains reference to TMPDIR
File /usr/src/debug/linux-yocto/5.4.205+gitAUTOINC+e8c675c7e1_8a59dfded8-r0/drivers/tty/vt/consolemap_deftbl.c in package linux-yocto-src contains reference to TMPDIR [buildpaths]
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
In complex stacks, e.g. with many cores or many init scripts, the time
to Linux shell may be more than 10 minutes. Make the boot timeout
configurable using TEST_FVP_LINUX_BOOT_TIMEOUT, leaving the default
value at 10 minutes.
Issue-Id: SCM-4958
Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
Change-Id: Ie074acd4b4509d0230d1f77a2a527d497bb295ce
Signed-off-by: Jon Mason <jon.mason@arm.com>
qemuarm64-secureboot-ts pipeline is based on qemuarm64-secureboot machine
and additionaly includes:
- TS Crypto, Storage, ITS, Attestation and SMM-Gateway SPs into optee-os image
- TS demo/test tools
- TS psa-arch-tests
This commit also includes Trusted Services OEQA tests
Signed-off-by: Anton Antonov <Anton.Antonov@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
We define dedicated recipes for all supported TS SPs.
The recipes produce stripped.elf and DTB files for SPs.
These files are automatically included into optee-os image.
See meta-arm/recipes-security/trusted-services/optee-os-ts.inc
This approach allows us to:
- include only required SPs into an optee-os image using MACHINE_FEATURES
- use Yocto cmake bbclass
- fetch and build only required dependencies
- use simple SP specific bbapend files if required
Signed-off-by: Anton Antonov <Anton.Antonov@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
These recipes produce only -dev and -staticdev packages
which are used for building other TS recipes.
Nothing from these recipes is included into the final image.
Using dedicated recipes for dependencies allows us:
- fetch sources and build dependencies only once and only the required ones.
- simplify the dependencies recipes and use Yocto cmake bbclass
- troubleshoot/fix/update dependencies builds separately
Signed-off-by: Anton Antonov <Anton.Antonov@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
To fit the kernel image into the allotted space, a compressed kernel
image is now needed. Use the Image.gz from the kernel build process
and change the relevant places to use the new image name. This also
necessitates adding an unzip command to u-boot to uncompress it to
memory (and the loadm is still needed to setup the efi mem boot device).
Also, the unzipped image is larger than before. So, increase the size
that loadm is copying.
This change shrinks the kernel image size from 7.8MB to 3.2MB
Signed-off-by: Jon Mason <jon.mason@arm.com>
When building for arm32 with GNU binutils 2.39, the linker outputs
warnings when generating some TEE core binaries.
arm-poky-linux-gnueabi-ld.bfd: warning: atomic_a32.o: missing .note.GNU-stack section implies executable stack
arm-poky-linux-gnueabi-ld.bfd: NOTE: This behaviour is deprecated and will be removed in a future version of the linker
NOTE: recipe optee-os-tadevkit-3.18.0-r0: task do_compile: Failed
These patches are backport from upstream [1]
There are two versions of patches: for optee-os 3.14 and 3.18 to avoid patch fuzz warnings.
[1] https://github.com/OP-TEE/optee_os/pull/5499
Signed-off-by: Anton Antonov <Anton.Antonov@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
Add yocto kernel cache bluetooth entries for platforms that have that
machine feature enabled. This is necessary, as kernel warnings about it
not being enabled are now occurring.
Signed-off-by: Jon Mason <jon.mason@arm.com>
These were integrated into the 2.7.0 release, but were not removed when
the recipe was upgraded.
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
These changes are to add support to build optee-os for N1SDP target.
Signed-off-by: Vishnu Banavath <vishnu.banavath@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
This change is to bump the TF-A hash which has changes required
for optee-os to boot. Also, drop patch related to bl size as the
changes are already merged to upstream TF-A.
Signed-off-by: Vishnu Banavath <vishnu.banavath@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
Update all of the 3.17 recipes to 3.18 and remove the already upstreamed
patch. optee-os was already at 3.18. So, we only need to remove the
3.17 recipe.
Signed-off-by: Jon Mason <jon.mason@arm.com>
package is always inheritted by the base classes so the recipe does not
need to do this. This became an error with recent bitbake changes, fix
things by removing it.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Jon Mason <jon.mason@arm.com>
The newly added vmalloc entry in qemuarm is causing issues with graphics
on qemuarm-secureboot. Remove that by setting +QB_KERNEL_CMDLINE_APPEND
to empty.
Signed-off-by: Jon Mason <jon.mason@arm.com>
SCMI support was added to the latest kernel (kernel commit
96bb0954860a4c8b8c77d59fc53cd4cafac914f5). So, remove this patch, as it
is no longer necessary
Signed-off-by: Jon Mason <jon.mason@arm.com>
This kernel config variable has been removed from newer kernels (v5.19)
and is logging a warning of:
[INFO]: the following symbols were not found in the active configuration:
- CONFIG_OPTEE_SHM_NUM_PRIV_PAGES
Remove the entry, as it is no longer needed
Signed-off-by: Jon Mason <jon.mason@arm.com>
In newer kernels, vexpress has been rolled under the versatile umbrella.
Update the patch to refer to the new location
Signed-off-by: Jon Mason <jon.mason@arm.com>
Rebase the u-boot patches on top of current u-boot supported
version in poky, needed some adjustments at efi loader.
Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org>
Signed-off-by: Jon Mason <jon.mason@arm.com>
Add documentation for how to use the OEQA framework to test targets in
meta-arm. Include instructions on using OEFVPTarget as well as the
OEFVPSerialTarget introduced by the recent refactor of runfvp.
Issue-Id: SCM-4954
Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
Change-Id: I146ec1c82214471fe9d18a999fd92efb38f652f9
Signed-off-by: Jon Mason <jon.mason@arm.com>
The runfvp refactor to enable OEFVPSerialTarget created FVP_CONSOLES
which maps the names used for serial ports in test cases to the names
used for serial ports in the FVP stdout.
Refactor the FVP_CONSOLE section -> FVP_CONSOLES, noting the the
'default' console is still used for the --console runfvp flag.
Issue-Id: SCM-4954
Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
Change-Id: Ieb13d74cfd425900f44b4b2e6d125393e7b456ad
Signed-off-by: Jon Mason <jon.mason@arm.com>
The dropped u-boot patches are not required as the bug is
from the SMM Gateway SP. A patch for the secure partitions
has been added to fix the SMM Gateway behaviour. Patch
0048-Fix-UEFI-get_variable-with-small-buffer.patch has been
added in commit "arm-bsp/secure-partitions: fix SMM gateway
bug for EFI GetVariable()".
Signed-off-by: Gowtham Suresh Kumar <gowtham.sureshkumar@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
The efiGetVariable() function when called from uboot with data size
set to 0 should return only the data size and not the actual data in
the end of the buffer based on the EFI 2.9 spec. This patch fixes
the bug.
Signed-off-by: Gowtham Suresh Kumar <gowtham.sureshkumar@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
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>