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

Compare commits

...

721 Commits

Author SHA1 Message Date
Vishnu Banavath ff9b6f29bf arm-bsp/documentation: corstone1000: 2022.11.10 RC: update the change log
Aligning the change log with the latest Corstone1000 SW updates.

Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-11-10 11:07:20 -05:00
Vishnu Banavath 00ceaafc72 arm-bsp/documentation: corstone1000: 2022.11.10 RC: update the release notes
Aligning the release notes with the latest Corstone1000 SW updates.

Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-11-10 11:07:20 -05:00
Abdellatif El Khlifi 8185ca9c20 arm-bsp/documentation: corstone1000: 2022.11.10 RC: update the user guide
Aligning the user guide with the latest Corstone1000 SW updates.

Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-11-10 11:07:20 -05:00
Luca Fancellu 387f32242e arm,arm-bsp/recipes-kernel: don't use PN in arm-ffa-transport.inc
There are some cases where PN is not expanded into linux-yocto in the
arm-ffa-transport.inc file required from linux-yocto_%.bbappend,
because of the := usage, in those cases PN gets "defaultpkgname".

To fix the issue, rename "linux-yocto" folder into "files" and adjust
ARMFILESPATHS to point to that in linux-yocto_%.bbappend, prepend
ARMFILESPATHS to FILESEXTRAPATHS in arm-ffa-transport.inc.

Remove ARMFILESPATHS prepend from FILESEXTRAPATHS for corstone1000 in
meta-arm-bsp, because the platform has always the "arm-ffa" in
MACHINE_FEATURES, which causes ARMFILESPATHS to be prepended.

While there, remove the FILESEXTRAPATHS prepend of ARMFILESPATHS for
the n1sdp that will be added by arm-ffa-transport.inc only when
needed.

Signed-off-by: Luca Fancellu <luca.fancellu@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-11-08 08:18:55 -05:00
Ross Burton dd5a968d3d arm/linux-arm64-ack: fix buildpaths in the perf Python module
Use --prefix instead of --root when installing the Python modules to
ensure that build paths are not embedded in the compiled .pyc files.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-11-07 14:05:39 -05:00
Anton Antonov 99e1bf8229 arm-bsp/fvp-base: Enable virtio-rng support and unset preferred 5.15 kernel
Without virtio-rng enabled kernel 5.19 takes ages to finish
random number generator initialisation which causes
issues with ssh and other crypto related services.

Signed-off-by: Anton Antonov <Anton.Antonov@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-11-07 11:00:12 -05:00
Emekcan a41572a032 arm-bsp/trusted-services: Fix GetNextVariable max_name_len in smm gateway
GetNextVariableName() should return EFI_BUFFER_TOO_SMALL
when NameSize is smaller than the actual NameSize. It
currently returns EFI_BUFFER_OUT_OF_RESOURCES due to setting
max_name_len incorrectly. This fixes max_name_len error by
replacing it with actual NameSize request by u-boot.

Signed-off-by: Emekcan Aras <emekcan.aras@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-11-07 07:45:38 -05:00
Emekcan 5fd87e47f6 arm-bsp/trusted-services: add checks for null attributes in smm gateway
As in EDK-2 and EDK-2 test code, setVariable() with 0
attributes means a delete variable requiest. Currently,
smm gateway doesn't handle this scenario. This commit
adds that support

Signed-off-by: Emekcan Aras <emekcan.aras@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-11-07 07:45:38 -05:00
Rui Miguel Silva 8d35c5b539 arm-bsp/trusted-firmware-m: adjust ps assets for corstone1000
Enabling ESRT in trusted services increased the need for more
assets at protected storage level, since we now save FMP data
, capsule update, like Image Info as non volatile EFI
variables.

So, just change the default configuration for the corstone1000
to handle this.

Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-11-07 07:45:34 -05:00
Rui Miguel Silva 9e2de7dacc arm-bsp/trusted-services: psa test setup corstone1000
Reorder patch list headers, move psa api test patch that
should be applied to all psa api test from a crypto specific
directory to a more generic "psa-apitest" directory.

Create a inc file for the psa api test to make sure all out of
tree patches from trusted services are applied to all test
source directories, and move mm communicator buffer details to
each SP, and finally set it up differently as it
should/is expected to be at libts.

With this setup all psa-api test for crypto and attestation
passed.

Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-11-07 07:45:34 -05:00
Rui Miguel Silva 3651527f57 arm/trusted-services: check before applying patches
At the apply ts patch stage, first check if they are patches
to be applied. Because if not, this would break the apply
patch stage with an error.

Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-11-07 07:45:34 -05:00
Ross Burton 4ee457693e CI: track meta-openembedded's langdale branch
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-10-28 12:00:11 -04:00
Abdellatif El Khlifi 46e8092b6b kas: corstone1000: set branches to langdale
point poky/meta-openembedded to langdale

Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-10-28 12:00:08 -04:00
Mohamed Omar Asaker f312adf47b arm-bsp/corstone1000: add msd configs for fvp
Signed-off-by: Mohamed Omar Asaker <mohamed.omarasaker@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-10-27 07:00:09 -04:00
Jon Mason d3541b1e29 CI: Remove host bitbake variables
Bitbake variables were being set in KAS for the unique Gitlab CI
configuration being used internally.  While this should not have been
significantly detrimental for other setups, this shouldn't be necessary
with proper runner setup.  Removing them here to all for a more generic
CI experience.

Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-10-24 13:33:55 -04:00
Satish Kumar 952dee0de9 arm-bsp/trusted-service: corstone1000: esrt support
Signed-off-by: Satish Kumar <satish.kumar01@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-10-24 13:33:55 -04:00
Mohamed Omar Asaker 9e17830b84 arm-bsp/trusted-firmware-m: corstone1000 support FMP image info
Apply tfm patches to support FMP image info

Signed-off-by: Mohamed Omar Asaker <mohamed.omarasaker@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-10-24 13:33:55 -04:00
Mohamed Omar Asaker bb02720fd7 Revert "arm-bsp/trusted-firmware-m: corstone1000: bump tfm SHA"
This reverts commit 81181ed898.

Signed-off-by: Mohamed Omar Asaker <mohamed.omarasaker@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-10-24 13:33:55 -04:00
Mohamed Omar Asaker b4dfea8e28 Revert "arm-bsp/trusted-firmware-m: corstone1000: secure debug code checkout from yocto"
This reverts commit 37ba0b162a.

Signed-off-by: Mohamed Omar Asaker <mohamed.omarasaker@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-10-24 13:33:55 -04:00
Rui Miguel Silva e4a5809373 arm-bsp/corstone1000: apply ts patch to psa crypto api test
Apply shared patch to trusted services that is used to compile
psa crypto api tests to include change in packed-c request
message in the eaed update structure to be in sync with the
serialize/deserialize in TS side.

As at it, move the other corstone1000 specific patch file to
meta-arm-bsp where it should be.

Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-10-24 13:33:55 -04:00
Ross Burton 72f0580f70 CI: add documentation job
This job builds all of the Sphinx documentation it can find with fatal
warnings enabled.

Signed-off-by: Ross Burton <ross.burton@arm.com>
2022-10-24 12:02:01 -04:00
Vishnu Banavath 950372e99d meta-arm-bsp/doc: add readthedocs for corstone1000
These changes are to add support for readthedocs for
corstone1000 platform. readthedocs server traces
any changes to to corstone1000 documents and will trigger
a build which will generate html file which can will be
rendered by corstone1000.docs.arm.com server

Signed-off-by: Vishnu Banavath <vishnu.banavath@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-10-24 12:02:01 -04:00
Vishnu Banavath 0a7c6ae7e1 runfvp: corstone1000: add mmc card configuration
These changes are to pass appropriate MMC card configuration to
corstone1000 FVP.

Signed-off-by: Vishnu Banavath <vishnu.banavath@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-10-24 12:02:01 -04:00
Ross Burton bd01053121 arm-bsp/linux-arm64-ack: fix malformed Upstream-Status tag
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-10-24 12:02:01 -04:00
Ross Burton 062aef06c7 arm-bsp/hafnium: add missing Upstream-Status
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-10-24 12:02:01 -04:00
Ross Burton 0245e6609c arm/hafnium: add missing Upstream-Status
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-10-24 12:02:01 -04:00
Rui Miguel Silva a42ee82eda arm/trusted-services: port crypto config
Port crypto config to psa arch test api suite.This
needs to move to arm-bsp since is corstone1000 specific
configuration

Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-10-24 12:02:01 -04:00
Mohamed Omar Asaker be90d2e4b0 arm-bsp/u-boot: corstone1000: support 32bit ffa direct messaging
Signed-off-by: Mohamed Omar Asaker <mohamed.omarasaker@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-10-24 12:02:01 -04:00
Jon Mason 1935f51d0f CI: fix to langdale
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-10-19 14:30:01 -04:00
Ross Burton 75b883c363 arm/fvp-tc0: remove Total Compute 2020 FVP
This FVP doesn't support TC1, so remove it now that we don't support TC0.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-10-19 10:00:08 -04:00
Ross Burton c9874bebc7 arm-bsp/scp-firmware: remove TC0 patches
These patches are specific to TC0, and are not needed for TC1.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-10-19 10:00:08 -04:00
Ross Burton 75a8c07a63 arm-bsp: remove TC0
The Total Compute 2020 BSP is obsolete and unsupported, so remove it
from meta-arm.  The Total Compute team would like TC1 to be available in
langdale, but removed in mickledore.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-10-19 10:00:08 -04:00
Vishnu Banavath c7660b3548 arm-bsp/linux: add kernel file search path for N1SDP
This change is to add ARMFILESPATHS into serach path
for linux for N1SDP target.

Signed-off-by: Vishnu Banavath <vishnu.banavath@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-10-17 21:01:04 -04:00
Rui Miguel Silva 63cf57290b arm-bsp/trusted-services: support for libmetal and openamp
Add support for libmetal and openamp as backend for se-proxy
and smm-gateway SP. For that also introduce a change to newlib
in memcpy optimization to avoid unaligned data-aborts in
__packed structures handling.

Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-10-17 21:01:04 -04:00
Rui Miguel Silva c3ada285de arm-bsp/optee: add log handler
Add log handler for SP sending logs over ffa to spmc.

Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-10-17 21:00:59 -04:00
Emekcan 13199c55c0 arm-bsp/kernel: Fix TEE driver bug for corstone1000
Fixes the Tee driver bug in corstone1000. It adds a
delay to fix a possible race-condition occurs during
FF-A calls. This is a temporary fix for the upcoming
release.

Signed-off-by: Emekcan Aras <emekcan.aras@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-10-14 10:01:33 -04:00
Satish Kumar 37ba0b162a arm-bsp/trusted-firmware-m: corstone1000: secure debug code checkout from yocto
Instead of checking out code through internal cmake,
the patch explicitly checkout the psa-adac code.

Signed-off-by: Satish Kumar <satish.kumar01@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-10-14 08:00:09 -04:00
Satish Kumar 0f49cad85f arm-bsp/trusted-firmware-m: corstone1000: fix sournce dir of libmetal and openamp
The patch corrects the source dir for libmetal and openamp.

Devtool modify on tf-m will work after this fix.

Signed-off-by: Satish Kumar <satish.kumar01@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-10-14 08:00:09 -04:00
Satish Kumar 81181ed898 arm-bsp/trusted-firmware-m: corstone1000: bump tfm SHA
The patch bumps the tfm SHA to
b065a6b28cc6c692b99e4f7e9387d96f51bf4d07

Signed-off-by: Satish Kumar <satish.kumar01@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-10-14 08:00:09 -04:00
Satish Kumar 60af2fc053 arm-bsp/u-boot: corstone1000: esrt support
Signed-off-by: Satish Kumar <satish.kumar01@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-10-14 08:00:09 -04:00
Peter Hoyes d87c445b24 arm/lib: Do not log FVP return codes < 0
If a process is terminated using a signal, in Python its return code is
-N, where N is the signal number (e.g. -15 for SIGTERM). Currently, all
non-zero return codes are printed using logger.info, which gives the
impression of an abnormal termination even when the process was
explicitly terminated by FVPRunner.

Instead, only log return codes greater than zero.

Issue-Id: SCM-5314
Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
Change-Id: I1a1e9d8aa3f26c14b48be718498bcb14707950b7
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-10-14 06:00:08 -04:00
Anton Antonov 90f9e1241b arm/trusted-services: include documentation
Signed-off-by: Anton Antonov <Anton.Antonov@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-10-13 12:00:08 -04:00
Anton Antonov f8aba2d5f3 arm/trusted-services: Remove remaining patches merged upstream
Signed-off-by: Anton Antonov <Anton.Antonov@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-10-12 16:00:09 -04:00
Ross Burton cbcb1bf39d CI: restrict compression threading
On large systems, using all of the CPUs and 50% of the RAM when xz
compressing packages is actively harmful because it will happily use up
to that limit.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-10-11 09:20:18 -04:00
Anton Antonov dc4c85ccbb arm/trusted-services: Remove patches merged upstream
Signed-off-by: Anton Antonov <Anton.Antonov@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-10-11 08:00:07 -04:00
Jon Mason 545ba524b8 arm-bsp: zephyr removal
Since meta-zephyr is doing CI, there is no need to replicate that here.
Remove all of the zephyr references.

Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-10-10 10:00:10 -04:00
Davidson K b9073fdc99 arm-bsp/linux-arm64-ack: make it compatible with gcc-12 for TC
Signed-off-by: Davidson K <davidson.kumaresan@arm.com>
Change-Id: I924064547f4e1d2d506b58bf5aa84d5a4d2f9f8e
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-10-06 07:00:11 -04:00
Rupinderjit Singh 3921257e9b arm: update Android common kernel
Update ACK to 5.15 and remove the 5.10 recipe

Signed-off-by: Rupinderjit Singh <rupinderjit.singh@arm.com>
Change-Id: I7d86367533248312bb7a54ba39166ddee5a025ef
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-10-06 07:00:11 -04:00
Jon Mason 1bc064e020 CI: cleanups for targets and removed tests
Some of the removed tests are now working and some of the systems are
not testing against sato (as being done in base.yml).  Update these and
add some comments.

Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-10-05 10:00:09 -04:00
Jon Mason 09a3e899dc CI: trusted services as a feature instead of a machine
Trusted services is a feature, not a unique machine.  Modify the setup
to reflect this.

Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-10-05 10:00:09 -04:00
Emekcan 987966a587 arm-bsp/linux-yocto: update RPMSG_CTRL config for corstone1000
The rpmsg_chrdev driver has been replaced
by the rpmsg_ctrl driver. This commit
updates the defconfig to align with the
change.

Signed-off-by: Emekcan Aras <emekcan.aras@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-10-05 09:07:19 -04:00
Vishnu Banavath 797e43e09b arm-bsp/corstone500: upgrade kernel to v5.19
This change is to upgrade kernel to 5.19 for corstone500 target

Signed-off-by: Vishnu Banavath <vishnu.banavath@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-10-05 09:05:57 -04:00
Adam Johnston bb1a229176 arm-bsp/linux-yocto: Upgrade kernel to v5.19 for N1SDP
This change is to upgrade the Linux kernel version to 5.19 for N1SDP
target to align with post N1SDP-2022.06.22 refresh

Signed-off-by: Vishnu Banavath <vishnu.banavath@arm.com>
Signed-off-by: Adam Johnston <adam.johnston@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-10-05 08:00:08 -04:00
Ross Burton 932db44b20 arm/optee-spdevkit: remove
The "secure parition development kit" is obsolete, newlib is used instead.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-10-04 13:18:48 -04:00
Anton Antonov 00bd768ab7 meta-arm/trusted-services: Use GCC toolchain for specific TS recipes only.
This commit also enables clang CI pipelines for TS.

Signed-off-by: Anton Antonov <Anton.Antonov@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-10-04 13:18:37 -04:00
Rui Miguel Silva 38a3facd90 arm-bsp/corstone1000: bump kernel version to 5.19
Bump the kernel version to 5.19.9, remove backported ffa
related patch to previous version and fix issues in the arm
rpmsg driver.

Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-10-04 08:00:07 -04:00
Sumit Garg 6001998caa external-arm-toolchain: Enable 11.3.rel1 support
Enable support for 11.3.rel1 binary toolchain release. Also, update CI
to use it.

Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-10-03 23:33:48 -04:00
Sumit Garg df99894eaa arm-toolchain: update Arm GCC to 11.3
Along with that add a new variable ARM_GCC_SUB_VERSION as newer clubbed
Arm GNU toolchain releases includes a sub-version like the current
release being 11.3.rel1 where ARM_GCC_SUB_VERSION=rel1.

Also, update CI to this release.

Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-10-03 23:33:48 -04:00
Jon Mason 0164b4ca7a Revert "CI: apply a patch so that meta-zephyr is compatible with langdale"
This reverts commit b64ea83aef.
2022-10-03 23:33:19 -04:00
Jon Mason b64ea83aef CI: apply a patch so that meta-zephyr is compatible with langdale
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-10-03 15:16:18 -04:00
Jon Mason 6983e2a2a9 ci: move features only needed by testimage from base
Move the features uniquely needed for system images to the testimage
file.  This should reduce the image size and amount of things needing to
be built for machines that do not run testimage.

Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-10-03 14:41:17 -04:00
Jon Mason 6655928c81 arm-bsp/fvp: move the fvp include file to the include directory
Move the FVP include file to the include directory, matching what is
done for corstone1000 and other machines in meta-arm-bsp.

Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-10-03 14:41:17 -04:00
Abdellatif El Khlifi 04a7ba3c77 arm/ffa-debugfs: drop use of the kernel module
ffa-debugfs kernel module is replaced with arm-ffa-user module

Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
2022-10-01 10:37:46 -04:00
Abdellatif El Khlifi 7a42f5c642 arm/secure-partitions: drop use of the recipe
secure-partitions recipe is replaced with the new design of
 trusted services recipes.

Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
2022-10-01 10:37:46 -04:00
Abdellatif El Khlifi 126eebcabd arm-bsp/linux: corstone1000: use arm-ffa machine feature
add arm-ffa machine feature which applies FF-A config fragment and kernel patch

Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
2022-10-01 10:37:46 -04:00
Abdellatif El Khlifi ddbf0addf1 arm-bsp/corstone1000-initramfs-image: add TS PSA API tests packages
Trusted Services PSA API tests commands allow testing the following
SE Proxy services: crypto, its, ps and iat

Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
2022-10-01 10:37:46 -04:00
Abdellatif El Khlifi 37a9dbc5b7 arm-bsp/trusted-services: corstone1000: add MHU-driver
Add an out of tree patch enabling MHU-driver

Signed-off-by: Vishnu Banavath <vishnu.banavath@arm.com>
Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
2022-10-01 10:37:46 -04:00
Abdellatif El Khlifi 068c2f37c0 arm-bsp/machine: corstone1000: disable pulling the kernel into the initramfs
exclude kernel-image-* packages from the rootfs

Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
2022-10-01 10:37:46 -04:00
Abdellatif El Khlifi 36536b6055 arm-bsp/trusted-services: corstone1000: add secure partitions support
support for ts-smm-gateway and ts-se-proxy secure partitions

Signed-off-by: Vishnu Banavath <vishnu.banavath@arm.com>
Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
2022-10-01 10:37:46 -04:00
Abdellatif El Khlifi 56d53d4393 arm-bsp/corstone1000-initramfs-image: remove obsolete packages
removing the following packages:

ffa-debugfs-mod
secure-partitions-psa-api-tests

Signed-off-by: Vishnu Banavath <vishnu.banavath@arm.com>
Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
2022-10-01 10:37:46 -04:00
Abdellatif El Khlifi f483fcfc68 arm-bsp/optee-spdevkit: corstone1000: drop the support
optee-spdevkit no longer used. It has been replaced with newlib

Signed-off-by: Vishnu Banavath <vishnu.banavath@arm.com>
Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
2022-10-01 10:37:46 -04:00
Abdellatif El Khlifi 8817e91e5d arm-bsp/optee-os: corstone1000: upgrade to v3.18
Upgrading optee-os uses the new Trusted Services support

Signed-off-by: Vishnu Banavath <vishnu.banavath@arm.com>
Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
2022-10-01 10:37:46 -04:00
Abdellatif El Khlifi 607166e3bd arm-bsp/u-boot: corstone1000: upgrade FF-A support
update the FF-A patchset with the one sent to the u-boot mailing list

cover letter: https://lore.kernel.org/all/20220926101723.9965-1-abdellatif.elkhlifi@arm.com/

Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
2022-10-01 10:37:46 -04:00
Abdellatif El Khlifi 63c7e60c1e arm-bsp/u-boot: corstone1000: update initramfs bundle size
increase the size of the initramfs bundle used in the boot command

The new trusted services support increases the rootfs size.
When decompressed the initramfs bundle size is around 15M.

u-boot boot command needs to be updated with this size to be able to load
all the initramfs bundle.

When compressed the initramfs bundle size is around 5.4M
(Image.gz-initramfs--5.15.59)

Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
2022-10-01 10:37:46 -04:00
Peter Hoyes fc26f65b1c arm-bsp/corstone1000: Refactor image signing to use new bbclass
The prevoius commit refactored trusted-firmware-m-sign-host-images.inc
into tfm_sign_image.bbclass.

Move the image signing logic from the TF-M bbappend to
corstone1000-image.bb, using the new bbclass.

Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
Change-Id: Ib76dce2ba9102e343d0611d929250d1d8aee518b
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-10-03 10:33:43 -04:00
Peter Hoyes 97c7e9f08e arm/classes: Migrate TF-M image signing to bbclass
Introduce a new recipe for the TF-M signing scripts.

To make the functionality easier to reuse, move the logic that is
currently in trusted-firmware-m-sign-host-images.inc to
tfm_sign_image.bbclass. This bbclass DEPENDS on
trusted-firmware-m-scrpits-native.

tfm_sign_image.bbclass can be inherited in image recipes to sign
artifacts.

Issue-Id: SCM-4964
Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
Change-Id: I74aaab5db1a43fedf13ea2564c2f31af207ae924
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-10-03 10:33:43 -04:00
Peter Hoyes ff4a322c83 arm-bsp/trusted-firmware-m: Make branch names configurable
In order to support overriding the branch names in other layers, extract
the branch name for each repository and set using default assignment.

Issue-Id: SCM-4964
Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
Change-Id: I09d0c1f1d012c1abb84648ad974883bbdaa1db7a
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-10-03 10:33:43 -04:00
Emekcan 6ef4d3ef18 arm-bsp/external-system: Changing the RTX repo
Migrating RTX repo to a new namespace under
arm reference solution. The new repo also adds
corstone1000 as a product so this commits
also changes the PRODUCT variable.

Signed-off-by: Emekcan Aras <emekcan.aras@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-10-03 10:33:43 -04:00
Emekcan f25935371d arm-bsp/test: Changing the test app repository
Migrating the test repo to a new namespace under
arm reference solution.

Signed-off-by: Emekcan Aras <emekcan.aras@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-10-03 10:33:43 -04:00
Jon Mason 8d0410782e CI: Remove uniquely zephyr machines
Remove microbit-v1, qemu-cortex-a53, qemu-cortex-m3, and qemu-cortex-r5
from CI (and the tree in general).  These machines are part of the
meta-zephyr CI now and keeping them here is redundant.  However, keeping
zephyr builds for machines that also have TF-M.

Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-09-30 15:20:03 -04:00
Adam Johnston 7f05bd6431 arm-bsp/trusted-firmware-a: Update TF-A version for N1SDP
Update TF-A version to align with post-N1SDP-2022.06.22 refresh

Signed-off-by: Adam Johnston <adam.johnston@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-09-30 15:20:03 -04:00
Adam Johnston 4f6a200997 arm-bsp/edk2-firmware: Add edk2-platforms patches for N1SDP
This is to align edk2/edk2-platforms with N1SDP-2022.06.22 release

Signed-off-by: Adam Johnston <adam.johnston@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-09-30 15:20:03 -04:00
Adam Johnston d7ef05a2fe arm-bsp/edk2-firmware: Update edk2/edk2-platforms versions for N1SDP
Update edk2/edk2-platforms versions to align with N1SDP-2022.06.22 release.

Signed-off-by: Adam Johnston <adam.johnston@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-09-30 15:20:03 -04:00
Jon Mason 2c9cf62622 layers: convert to langdale compatibility
Now that langdale is available, convert all kirkstone references to it.

Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-09-29 18:05:36 -04:00
Ross Burton aa89fe3f08 runfvp: pass-through environment variables need for GUI applications
Since 820a55d3 the environment that the FVPs run in is limited, however
this broke the use of GUI applications for the terminals.

Passthrough DISPLAY and WAYLAND_DISPLAY automatically so these continue
to work.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-09-29 11:22:54 -04:00
Davidson K 3f59a344e6 arm-bsp/hafnium: enable Virtual Host Extension for TC
Signed-off-by: Davidson K <davidson.kumaresan@arm.com>
Change-Id: I348b80ee8d31f6ac7c528bcd80490fe83ac5f97d
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-09-29 11:22:54 -04:00
Davidson K a816bcc8ab arm-bsp/trusted-firmware-a: add firmware update support for TC
Signed-off-by: Davidson K <davidson.kumaresan@arm.com>
Change-Id: Ice2396de4705ed7859c2334678170ef7f17e4709
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-09-29 11:22:54 -04:00
Davidson K 0c002d467e arm-bsp/u-boot: add gnutls-native as dependency
Since U-Boot 2022.04 the host tool mkeficapsule requires gnutls.
Thus adding it to the dependency.

Signed-off-by: Davidson K <davidson.kumaresan@arm.com>
Change-Id: I8eff2e9bb9752bea5b885fcf3a69bf79c4f0c215
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-09-29 11:22:54 -04:00
Ross Burton 40c0c47134 Revert "Temporary use qemu 7.0.0 for TS CI pipelines"
This reverts commit f513237500.
2022-09-29 10:48:29 +01:00
Jiacheng Tang 1dc0baf421 arm/fvp-base-r-aem: upgrade to version 11.19.14
Update version in documentation.

Issue-Id: SCM-5168
Signed-off-by: Jiacheng Tang <jiacheng.tang@arm.com>
Change-Id: Iea0815fb7e99997f45f7882c47138f0f9dfac0ac
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-09-28 09:40:32 -04:00
Khem Raj 4cd8d73788 hafnium: Exclude from world builds
This does not build with clang from meta-clang and also does not build
with gcc either

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-09-28 09:40:32 -04:00
Xueliang Zhong 680954d6e9 arm-bsp/n1sdp: upgrade scp-firmware version
Upgraded N1SDP scp-firmware to N1SDP-2022.06.22 version.

Signed-off-by: Xueliang Zhong <xueliang.zhong@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-09-26 15:44:29 -04:00
Anton Antonov f513237500 Temporary use qemu 7.0.0 for TS CI pipelines
Signed-off-by: Anton Antonov <Anton.Antonov@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-09-26 11:12:38 -04:00
Emekcan 4a190f18de arm-bsp/images: Adding external system test to initramfs image
Adds the external system test application and the relevant
recipe into the corstone1000 initramfs image.

Signed-off-by: Emekcan Aras <emekcan.aras@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-09-26 11:12:38 -04:00
Emekcan 037011da64 arm-bsp/test: Adding a test app for external system
Adds a linux userspace test application and a recipe
to build it to test external system in corstone1000
platform.

Signed-off-by: Emekcan Aras <emekcan.aras@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-09-26 11:12:38 -04:00
Jon Mason 4c3a7eec7e arm-bsp/tc: remove hafnium clang patch
The newly added clang patch does not apply cleanly to the tc version of
hafnium.  Since there are no plans to use clang on tc, remove it for
this platform.

Also, use devtool to clean-up the clang patch in question.

Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-09-25 13:54:21 -04:00
Khem Raj 04b78e80b0 hafnium: Add a fix for clang-15 errors
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-09-23 00:00:07 -04:00
Khem Raj 75ccc7847d linux-yocto: Add bbappend for 5.19
Enable tee and arm-ffa driver on qemuarm/qemuarm64 by default

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-09-22 23:39:36 -04:00
Emekcan be8890bb03 arm-bsp/kernel: Add rpmsg_arm_mailbox to corstone1000
Adds out-of-tree rpmsg_arm_mailbox driver patches into linux
kernel to communicate with external system using MHUs in
corstone1000 platform. The host can communicate with external
system using the driver under /dev/rpmsg0_ctrl0.

Signed-off-by: Emekcan Aras <emekcan.aras@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-09-22 23:39:36 -04:00
Emekcan b573b29b76 arm-bsp/u-boot: Add external system MHUs to u-boot device tree
The host uses MHUs to send/receive data from the external system
in corstone1000. This commit adds MHU mailbox bindings into the
u-boot device tree to enable data communication between the host
and external system.

Signed-off-by: Emekcan Aras <emekcan.aras@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-09-22 23:39:36 -04:00
Jon Mason 9f532a8cbd arm/edk2-firmware: Work around clang issue
A new update to clang is causing warnings (which are errors because edk2
was Werror by default).  The error is:
clang-15: error: '-x c' after last input file has no effect [-Werror,-Wunused-command-line-argument]

Work around it by disabling this specific error.  Also, use devtool to
update the patch.

Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-09-22 23:39:36 -04:00
Jon Mason cf5bccb0d6 arm-bsp/n1sdp: update linux-yocto patches
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-09-22 23:39:36 -04:00
Khem Raj a0658a6682 ffa-debugfs-mod: Exclude from world builds
It installs arm_ffa_user.h and so does arm-ffa-user recipe, lets not
build ffa-debugfs-mod in world builds since it does not appear as much
in other package dependencies as arm-ffa-user

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-09-22 23:39:36 -04:00
Khem Raj 2c2ed8f727 trusted-services: Pin to use gcc
These recipes are not buildable with clang in its current state

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-09-21 21:00:10 -04:00
Khem Raj 7d8b252405 optee-os: Extend clang pragma fixes to core_mmu_v7.c for 3.18
3.18 builds are failing since the section stuff is also done in
core_mmu_v7.c therefore extend the patch to include this file as well

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-09-21 21:00:10 -04:00
Jon Mason c6bf835cef arm/hafnium: update to 2.7
Update the version, update the patches, and drop the ones no longer
necessary.

Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-09-21 09:48:56 -04:00
Jon Mason abc8b4fe16 arm/optee-client: move the 3.14 recipe to meta-arm-bsp
Only corstone1000 is using the legacy version of optee-client.  Move it
there to keep corstone1000 working, while removing it from meta-arm to
discourage use of the non-latest version.

Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-09-21 09:00:08 -04:00
Jon Mason 606e7d4c4e arm/optee: remove old versions
Remove versions not being used anymore and update patches as necessary

Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-09-21 09:00:08 -04:00
Jon Mason dfd03ca1a3 arm/qemuarm-secureboot: remove optee-os version pin
The CPU issue that pinned qemuarm-secureboot is no longer present.
Remove the logic in the conf file that held it back to the older
version.

Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-09-21 09:00:08 -04:00
Jon Mason a3f22f90bb arm/optee-os: add ARMv7 changes to clang patch and update patches
ARMv7 does not have fixes for the clang issues already fixed for ARMv8.
Make the necessary changes in that patch for it to work.  Also, update
the patches (via devtool).

Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-09-21 09:00:08 -04:00
Andrei Gherzan fde0575aea edk2-firmware: Fix configure sed typo
The configure sed operation will not behave as expected because '*'
match misses a preceeding '.'.

Signed-off-by: Andrei Gherzan <andrei.gherzan@huawei.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-09-20 10:39:04 -04:00
Davidson K a9a53e258a arm-bsp/tc: upgrade version of optee
Signed-off-by: Davidson K <davidson.kumaresan@arm.com>
Change-Id: Iacd32d18d5d2804e4050e4d1f8075efe0dd545fe
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-09-19 14:50:46 -04:00
Davidson K 3b48207cc7 arm-bsp/tc: upgrade version of hafnium
Signed-off-by: Davidson K <davidson.kumaresan@arm.com>
Change-Id: I7ccc2ab23955291bcf7d87384ba1ac94c1568443
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-09-19 14:50:46 -04:00
Davidson K 18e68367e0 arm-bsp/tc: upgrade version of trusted-firmware-a
Signed-off-by: Davidson K <davidson.kumaresan@arm.com>
Change-Id: I2100b5f0f7af23f59611f4e591efb09d3bcd6942
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-09-19 14:50:46 -04:00
Emekcan b086301d46 arm-bsp/kernel: Add external device driver
Adds external system device driver into linux.
User applications can control the external system
using the driver under /dev/extsys_ctrl in
corstone1000 platform.

Signed-off-by: Emekcan Aras <emekcan.aras@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-09-13 20:52:57 -04:00
Emekcan 1182b0d2ea arm-bsp/u-boot: Add external system driver to u-boot device tree
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>
2022-09-13 20:52:57 -04:00
Peter Hoyes 820a55d348 arm/lib: Specify the FVP environment variables explicitly
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>
2022-09-13 20:52:57 -04:00
Joe Slater 7c3e597b4c arm/packagegroup-ts-tests: fix parse error
PACKAGE_ARCH must be set before inheriting packagegroup.

Signed-off-by: Joe Slater <joe.slater@windriver.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-09-13 20:52:57 -04:00
Denys Dmytriyenko 261263a670 arm-toolchain/gcc,external-arm-toolchain: resolve conflict with gcc headers
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>
2022-09-10 12:48:13 -04:00
Mohamed Omar Asaker 23266ea6fb arm-bsp/n1sdp-board-firmware: upgrade to N1SDP-2022.06.22
Signed-off-by: Mohamed Omar Asaker <mohamed.omarasaker@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-09-10 12:48:13 -04:00
Vishnu Banavath 7a13b2e3f9 arm-bsp/external-system:corstone1000: build and install external-system
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>
2022-09-09 15:54:01 -04:00
Jon Mason 9ce6539660 arm/optee-spdevkit: add version to file name
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-09-08 16:00:09 -04:00
Jon Mason 503bfcdc36 arm-bsp/optee: rename corstone1000 files
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>
2022-09-08 16:00:09 -04:00
Jon Mason 9418819358 arm-bsp/optee-os: add 3.10 recipe for corstone1000
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>
2022-09-08 16:00:09 -04:00
Vishnu Banavath c27462f2ae arm-bsp/ffa-debugfs: update git SHA for v2.1.0
git sha on
https://git.gitlab.arm.com/linux-arm/linux-trusted-services/-/tree/v2.1.0
has been changed recently for v2.1.0 tag. This change is to update
ffa-debugfs-mod_2.1.0.bb to fetch correct git SHA.

Signed-off-by: Vishnu Banavath <vishnu.banavath@arm.com>
2022-09-07 09:22:46 +01:00
Rui Miguel Silva c039d1601f arm-bsp: trusted-services: fix openamp build
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>
2022-09-06 13:00:10 -04:00
Ross Burton 1f7e8b6de9 gem5/linux-yocto: upgrade to 5.4.205 and fix buildpaths in binaries
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>
2022-09-06 12:00:08 -04:00
Peter Hoyes 52f07a4b0b arm/oeqa: Make linuxboot test case timeout configurable
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>
2022-09-01 06:00:07 -04:00
Anton Antonov a19249a385 Define qemuarm64-secureboot-ts CI pipeline and include it into meta-arm
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>
2022-08-31 14:53:49 -04:00
Anton Antonov 63b960c7c8 Include Trusted Services SPs into optee-os image
Required TS SPs can be included into optee-os image using MACHINE_FEATURES:

ts-its         - Internal Storage SP
ts-storage     - Storage SP
ts-crypto      - Crypto SP
ts-attestetion - Attestation SP
ts-se-proxy    - SE Proxy SP
ts-smm-gateway - SMM Gateway SP

Signed-off-by: Anton Antonov <Anton.Antonov@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-08-31 14:53:49 -04:00
Anton Antonov 3076df522a psa-api-tests for Trusted Services
Signed-off-by: Anton Antonov <Anton.Antonov@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-08-31 14:53:49 -04:00
Anton Antonov 441d6f4c3f Trusted Services test/demo NWd tools
Signed-off-by: Anton Antonov <Anton.Antonov@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-08-31 14:53:49 -04:00
Anton Antonov 32e3759b0a ARM-FFA kernel drivers and kernel configs for Trusted Services
This commit includes:
- arm-ffa-tee and arm-ffa-user kernel drivers
- ARM_FFA_TRANSPORT kernel option
- Backported pacthes for kernel 5.15

Signed-off-by: Anton Antonov <Anton.Antonov@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-08-31 14:53:49 -04:00
Anton Antonov 85494c88f3 Recipes for Trusted Services Secure Partitions
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>
2022-08-31 14:53:49 -04:00
Anton Antonov 805054c292 Recipes for Trusted Services dependencies.
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>
2022-08-31 14:53:49 -04:00
Jon Mason 8854f98d3c arm-bsp/corstone1000: use compressed kernel image
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>
2022-08-29 10:16:19 -04:00
Anton Antonov e16378f492 arm/tf-a-tests: work around RWX permission error on segment
Binutils 2.39 now warns when a segment has RXW permissions[1]:

- aarch64-poky-linux-musl-ld: tftf.elf has a LOAD segment with RWX permissions
- NOTE: recipe tf-a-tests-2.7.0-r0: task do_compile: Failed

There is a ticket filed upstream[2], so until that is resolved we can
disable this warning.

Also let's move a similar tf-a patch from trusted-firmware-a.inc to trusted-firmware-a_2.7.0.bb
as the patch is for tf-a version 2.7.0 only

[1] https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=ba951afb99912da01a6e8434126b8fac7aa75107
[2] https://developer.trustedfirmware.org/T996

Signed-off-by: Anton Antonov <Anton.Antonov@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-08-29 08:55:29 -04:00
Anton Antonov 38daf1ff8c arm/optee-os: backport linker warning patches
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>
2022-08-26 06:00:09 -04:00
Anton Antonov e57163cf06 work around for too few arguments to function init_disassemble_info() error
binutils 2.39 changed the signature of init_disassemble_info(),
which now causes perf and bpftool to fail to compile.

Relevant binutils commit: [1]

There is a proper fix in development upstream[2].
This is a work-around for older kernels.

[1] https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=60a3da00bd5407f07d64dff82a4dae98230dfaac
[2] https://patchwork.kernel.org/project/netdevbpf/cover/20220801013834.156015-1-andres@anarazel.de/

Signed-off-by: Anton Antonov <Anton.Antonov@arm.com>
2022-08-23 22:59:57 -04:00
Jon Mason 0027806b53 arm/arm-bsp: Add yocto-kernel-cache bluetooth support
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>
2022-08-23 15:26:18 -04:00
Anton Antonov ac4259011f arm/optee-os: backport RWX permission error patch
Signed-off-by: Anton Antonov <Anton.Antonov@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-08-22 13:00:08 -04:00
Ross Burton 977c5222d8 arm/trusted-firmware-a: work around RWX permission error on segment
Binutils 2.39 now warns when a segment has RXW permissions[1]:

  aarch64-none-elf-ld.bfd: warning: bl31.elf has a LOAD segment with RWX permissions

However, TF-A passes --fatal-warnings to LD, so this is a build failure.

There is a ticket filed upstream[2], so until that is resolved we can
disable this warning.

[1] https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=ba951afb99912da01a6e8434126b8fac7aa75107
[2] https://developer.trustedfirmware.org/T996

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-08-22 13:00:08 -04:00
Ross Burton 6ebafcc6d8 arm/trusted-firmware-a: remove redundant patches
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>
2022-08-22 13:00:08 -04:00
Jon Mason 53870ee43e arm-bsp/fvp-base: set preferred kernel to 5.15
SSH tests are failing on the 5.19 kernel.  Temporarily set the kernel to
5.15 while debugging the issue.

Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-08-19 14:15:13 -04:00
Vishnu Banavath f85bec2a19 arm/optee: update optee-client to v3.18
This change is to update optee-client to v3.18

Signed-off-by: Vishnu Banavath <vishnu.banavath@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-08-19 09:29:46 -04:00
Vishnu Banavath 5496260af7 arm-bsp/optee: add optee-os support for N1SDP target
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>
2022-08-16 10:00:08 -04:00
Vishnu Banavath 1badf7877f arm-bsp/trusted-firmware-a: Bump TF-A version for N1SDP
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>
2022-08-16 10:00:08 -04:00
Jon Mason ba502ba11e arm/optee: Update to 3.18
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>
2022-08-15 18:00:09 -04:00
Jon Mason 8058beeec1 atp/atp: drop package inherits
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-08-15 18:00:09 -04:00
Jon Mason 98c515f42e arm/fvp: use image-artifact-names as an image class
Per upstream commit, image-artifact-names must be used as an image
class

Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-08-15 18:00:09 -04:00
Richard Purdie 2327cb3033 gem5/gem5-m5ops: Drop uneeded package inherit
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>
2022-08-15 14:26:21 -04:00
Khem Raj 74cab68b96 optee-os: Add section attribute parameters when clang is used
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-08-15 14:26:05 -04:00
Khem Raj ee73c352cc gator-daemon: Define _GNU_SOURCE feature test macro
Needed for getting vasprintf API from libc

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-08-15 11:39:07 -04:00
Jon Mason 257c69f11f arm/qemuarm-secureboot: remove vmalloc from QB_KERNEL_CMDLINE_APPEND
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>
2022-08-12 09:25:08 -04:00
Jon Mason 038ca93bed arm-bsp/juno: drop scmi patch
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>
2022-08-12 09:25:08 -04:00
Jon Mason 769a09da7c arm/linux-yocto: remove optee num pages kernel config variable
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>
2022-08-11 10:00:09 -04:00
Jon Mason 2a92d6294d arm/qemuarm64-secureboot: remove tfa memory patch
The TF-A memory patch was upstreamed and is not needed for newer kernels
(like v5.19)

Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-08-11 10:00:09 -04:00
Jon Mason 7617120602 arm-bsp/fvp-base-arm32: Update kernel patch for v5.19
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>
2022-08-11 10:00:09 -04:00
Rui Miguel Silva dfe6d2f1eb arm-bsp/corstone1000: rebase u-boot patches on top v2022.07
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>
2022-08-09 15:00:08 -04:00
Rui Miguel Silva df1461b7d5 arm-bsp:corstone500: rebase u-boot patches on v2022.07
Rebase corstone500 on top of v2022.07, since the version is
the one used upstream.

Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org>
2022-08-09 09:32:25 -04:00
Peter Hoyes f83aad2ba9 docs: Introduce meta-arm OEQA documentation
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>
2022-08-05 11:00:12 -04:00
Peter Hoyes 74a36b024f docs: Update FVP_CONSOLES in runfvp documentation
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>
2022-08-05 11:00:12 -04:00
Gowtham Suresh Kumar 44c58b3e55 arm-bsp/u-boot: drop EFI GetVariable() workarounds patches
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>
2022-08-05 11:00:08 -04:00
Gowtham Suresh Kumar 268f98c128 arm-bsp/secure-partitions: fix SMM gateway bug for EFI GetVariable()
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>
2022-08-05 11:00:08 -04: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
Changqing Li 80d60e7b1c optee-os.inc: support multilib
Run command: bitbake optee-os && bitbake lib32-optee-os
bitbake lib32-optee-os will fail with following error since
bitbake optee-os already deploy same file under the path.
RROR: lib32-optee-os-3.12.0+gitAUTOINC+3d47a131bc-r0 do_deploy: The recipe lib32-optee-os is trying to install files into a shared area when those files already exist. Those files and their manifest location are:
  /build/tmp-glibc/deploy/images/qemuarm64/optee/tee.elf
    (matched in manifest-qemuarm64-optee-os.deploy)

Fix by deploy them to differernt dir

Signed-off-by: Changqing Li <changqing.li@windriver.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-08-02 03:00:18 -04:00
Jon Mason 10034c0b88 arm-bsp/corestone1000: update trusted-service patches for devtool
Current secure-partitions patches do not apply cleanly with devtool.
Update them with the necessary changes to address this issue, and
regenerate them via devtool.

Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-08-01 11:00:08 -04:00
Qi Feng bac180f7a8 arm-bsp/fvp-baser-aemv8r64: Rebase u-boot patches onto v2022.07
- 0001-vexpress64-Add-BASER_FVP-vexpress-board-variant.patch

  Change to 0002-vexpress64-add-MPU-memory-map-for-the-BASER_FVP.patch.
  Only MPU memory map is preserved, other parts have been upstreamed.

- 0007-vexpress64-Configure-memory-using-device-tree.patch

  Deleted. Upstreamed in commit 1a1143a45457161e90ea4cd5f3b0561d924ed8fe

Signed-off-by: Qi Feng <qi.feng@arm.com>
Issue-Id: SCM-5030
Change-Id: I4aab3bab545e64e3a4a3a3fd67bcef79acdc41be
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-08-01 05:00:08 -04:00
Khem Raj 31452ae4cf optee-test: Use system openssl on musl
bundled libcrypto.a in optee-test sources is built using glibc based
toolchain and expects foritied _chk version of the libc functions e.g. __sprintf_chk
which wont work for musl. Therefore rely on freshly built openssl by OE
instead

Fixes errors like

arm-yoe-linux-musleabi/gcc/arm-yoe-linux-musleabi/12.1.0/ld: ../openssl/lib/arm/libcrypto.a(dso_dlfcn.o): in function `dlfcn_name_converter':
dso_dlfcn.c:(.text+0x19e): undefined reference to `__sprintf_chk'

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-07-30 13:00:08 -04:00
Vishnu Banavath 1a14fe181d arm/optee: support optee-os v3.18.0
This change is to add yocot recipe to support optee-os
3.18.0 version.
Also, move the SRC_URI:append and DEPENDS to optee-os.inc
as these are common accross different optee versions.

Signed-off-by: Vishnu Banavath <vishnu.banavath@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-07-29 13:49:58 -04:00
Ross Burton 1eb9cd9416 arm/fvp: upgrade FVPs
Upgrade the FVPs to the latest releases, and do some cleanups for future
changes.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-07-29 13:49:58 -04:00
Jon Mason 6e4522e1c6 CI: remove zephyr specific testimage hacks
meta-zephyr recently was fixed to allow for autotest.  Remove all the
zephyr testing hacks and use that.

Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-07-27 13:00:08 -04:00
Peter Hoyes ef879b5fb8 arm/oeqa: Fix regex warning in linuxboot test case
The linuxboot test case prints the following in log.do_testimage, only
when executing testimage without a pycache:

  linuxboot.py:18: DeprecationWarning: invalid escape sequence \:
    self.target.expect(self.console, "login\:", timeout=10*60)

Fix the warning by escaping the ':' character correctly in the pexpect
regex.

Issue-Id: SCM-4957
Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
Change-Id: I8ad54c7df6b7d1d1ddeab31cf66daff1ab84e227
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-07-26 12:55:26 -04:00
Adam Johnston d11e253b11 arm-bsp/sdcard-image-n1sdp: Fix N1SDP dependencies
When enabling trusted boot, the UEFI binary was replaced with a FIP image (which
contains the UEFI binary), therefore the SD card image should depend on
trusted-firmware-a rather than edk2-firmware.

Signed-off-by: Adam Johnston <adam.johnston@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-07-26 11:08:08 -04:00
Jon Mason 0f831768d5 Revert "CI: add workaround for zephyr"
This reverts commit 0cdcb8eed4.
2022-07-26 10:54:36 -04:00
Jon Mason 64ddea9442 arm-bsp: add u-boot v2022.04 support
Upstream has updated u-boot to v2022.07, but the update is causing
problems with some machines.  Temporarily add a v2022.04 recipe until
the issues can be resolved.

Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-07-25 19:26:51 -04:00
Jon Mason 1590c21805 ci: do sato by default
Change to use sato by default.  Unfortunately, there are some bugs found
by this change.  For those systems, change it back to base until the
issues can be resolved.

Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-07-22 13:00:07 -04:00
Jon Mason da044c88cd CI: use uboot instead of none for juno
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-07-22 13:00:07 -04:00
Jon Mason 2ae5842553 ci/qemu-cortex-m3: remove common test
The common test has a timing issue, causing it to intermittently fail.
Since it is not unique to our environment, remove it to prevent false
positive regressions.

Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-07-22 13:00:07 -04:00
Ross Burton d9d1399b37 arm/trusted-services: ignore buildpath warnings
Latest oe-core has enabled the buildpaths QA check, which warns if the
build paths are present inside binaries. This is because build paths in
deployed binaries is both information leakage and non-reproducible.

Until this is fixed, skip this check.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-07-19 17:00:18 -04:00
Ross Burton eac1792393 arm/trusted-firmware-m: ignore buildpath warnings
Latest oe-core has enabled the buildpaths QA check, which warns if the
build paths are present inside binaries. This is because build paths in
deployed binaries is both information leakage and non-reproducible.

Until this is fixed, skip this check.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-07-19 17:00:18 -04:00
Ross Burton ee0a824a87 arm/trusted-firmware-a: ignore buildpath warnings
Latest oe-core has enabled the buildpaths QA check, which warns if the
build paths are present inside binaries. This is because build paths in
deployed binaries is both information leakage and non-reproducible.

Until this is fixed, skip this check.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-07-19 17:00:18 -04:00
Ross Burton 6c7399be0c arm/optee: ignore buildpath warnings
Latest oe-core has enabled the buildpaths QA check, which warns if the
build paths are present inside binaries. This is because build paths in
deployed binaries is both information leakage and non-reproducible.

Until this is fixed, skip this check.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-07-19 17:00:18 -04:00
Ross Burton 503d45e41a arm/linux-arm64-ack: fix buildpaths in the OID registry
Backport two patches from upstream to ensure the build doesn't contain
build paths.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-07-19 17:00:18 -04:00
Ross Burton 04aeb9e548 arm/hafnium: ignore buildpath warnings
Latest oe-core has enabled the buildpaths QA check, which warns if the
build paths are present inside binaries. This is because build paths in
deployed binaries is both information leakage and non-reproducible.

Until this is fixed, skip this check.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-07-19 17:00:18 -04:00
Ross Burton 411519915c arm/edk2-firmware: ignore buildpath warnings
Latest oe-core has enabled the buildpaths QA check, which warns if the
build paths are present inside binaries. This is because build paths in
deployed binaries is both information leakage and non-reproducible.

Until this is fixed in edk2-firmware, skip this check.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-07-19 17:00:18 -04:00
Ross Burton 53795134de CI: ignore buildpaths QA check in clang builds
If clang builds assembler code the debug symbols contain unmapped build
paths which trigger the buildpaths QA check. This bug has been filed
with upstream:

https://github.com/llvm/llvm-project/issues/56609

Until it is fixed, exclude buildpaths from clang builds so that CI can
pass.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-07-19 17:00:18 -04:00
Ross Burton 7d4ede3298 CI: use apt-get instead of apt wrapper
When used in a non-interactive context, apt prints a warning:

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

Use apt-get directly to avoid putting warnings in the logs.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-07-19 17:00:18 -04:00
Adam Johnston 1abc39e269 arm-bsp/edk2-firmware: Add NT_FW_CONFIG to N1SDP to fix aborts when accessing virtual memory
NT_FW_CONFIG DTB contains platform information passed by TF-A boot
stage. This information is used for Virtual memory map generation
during PEI phase and passed on to DXE phase as a HOB, where it is used
in ConfigurationManagerDxe.

Signed-off-by: Adam Johnston <adam.johnston@arm.com>
2022-07-19 11:52:18 +00:00
Peter Hoyes 6481a473d8 arm/lib: Improve FVPRunner shutdown logic
We have encountered intermittent hanging during FVP shutdown, so improve
the termination logic by first issuing a terminate(), waiting a bit
then, if necessary, issuing a kill().

Move returncode logic to after the telnet/pexpect cleanup so it
actually runs.

Move pexpect.EOF logic into FVPRunner.stop so that it executes before
closing the pexpect handle.

Issue-Id: SCM-4957
Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
Change-Id: Iebb3c3c89367256b1e116e66ffdb6b742358bce4
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-07-18 11:42:29 -04:00
Peter Hoyes 7f611a0d2e arm/oeqa: Use linuxboot and OEFVPSerialTarget instead of noop
Create a new "linuxboot" test that uses the pexpect methods on
OEFVPSerialTarget to wait for a Linux login shell.

Switch to this test method for fvp-baser-aemv8r64, corstone500 and
corstone1000.

Issue-Id: SCM-4957
Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
Change-Id: Idd749652ee72e244b7a3831dd2295e0bfaed3bfa
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-07-12 07:00:13 -04:00
Peter Hoyes 30b1452025 arm/oeqa: Create new OEFVPSerialTarget with pexpect interface
Refactor OEFVPTarget into new base class, OEFVPSSHTarget. OEFVPTarget
extends OEFVPSSHTarget and additionally waits for a Linux login prompt
for compatibility with tests in OE-core.

OEFVPSerialTarget also extends OEFVPSSHTarget. It also exposes the
entire API of pexpect, with the first argument being the
FVP_TEST_CONSOLE varflag key. It logs each console output to separate
files inside the core-image-minimal work directory.

Issue-Id: SCM-4957
Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
Change-Id: I1b93f94471c6311da9ee71a48239640ee37de0af
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-07-12 07:00:13 -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 b3ab04f813 arm/oeqa: Refactor OEFVPTarget to use FVPRunner and pexpect
Refactor OEFVPTarget to use the FVPRunner in meta-arm/lib instead of
calling runfvp in a new process.

Use pexpect to wait for the login prompt instead of parsing the FVP
output manually.

This patch introduces a dependency on pexpect for the meta-arm test
targets. It is already in the Yocto host dependency list and the Kas
container image, but may need to be installed on development machines.

Issue-Id: SCM-4957
Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
Change-Id: I7200e958c5701d82493287d021936afcf2f2bac9
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-07-12 07:00:13 -04:00
Peter Hoyes 5ec49f964b arm/oeqa: Add selftests for FVP library
Create basic tests for conffile and runner in meta-arm/lib/fvp

Issue-Id: SCM-4957
Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
Change-Id: I1684b0c99fb4fd5299df19f00abb30e8faab3495
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
Adam Johnston 8a0a9c3d32 arm-bsp/sdcard-image-n1sdp: N1SDP trusted boot
This commit configures N1SDP firmware for TBBR bootflow as follows:
* uefi.bin replaced with with fip.bin
* load address adjusted for FIP image

Signed-off-by: Adam Johnston <adam.johnston@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-06-30 06:00:08 -04:00
Adam Johnston eaf0fdbdbf arm-bsp/scp-firmware: N1SDP trusted boot
This commit configures scp-firmware for TBBR bootflow as follows:
* Updates SCP FW to master
* BL31 replaced in the SCP firmware image with BL1

Signed-off-by: Adam Johnston <adam.johnston@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-06-30 06:00:08 -04:00
Adam Johnston 996e82250e arm-bsp/trusted-firmware-a: N1SDP trusted boot
This commit configures trusted-firmware-a for TBBR bootflow on N1SDP as follows:
* Trusted boot is enabled.
* Generation of root-of-trust is enabled
* All TB images (BLx, DTBs) are built
* uefi.bin is specified as the BL33 image
* BL2, BL31, BL33 are signed and stored in the FIP
* N1SDP platform sources are patched to increase max size BL2 and reduce max size of BL1

Signed-off-by: Adam Johnston <adam.johnston@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-06-30 06:00:08 -04:00
Adam Johnston 893c884b06 arm-bsp/n1sdp: revert "fix boot due to TF-A 2.7 update"
This reverts commit ea3479c27c.

Signed-off-by: Adam Johnston <adam.johnston@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-06-30 06:00:08 -04:00
Jon Mason cab723f015 arm/edk2-firmware: devtool changes
Make the changes necessary to allow for devtool to be used on edk2
sources.

Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-06-29 08:59:13 -04:00
Jon Mason 47264aff0b ci: update edk2 yml file to work with qemuarm/qemuarm64
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-06-24 14:00:07 -04:00
Jon Mason 493690f0d1 arm/edk2: add support for qemuarm and qemuarm64
Add basic support for running edk2 on qemuarm and qemuarm64.  This
necessitated the need to add ACPI and EFI to the default kernel configs
for these machines.

Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-06-24 14:00:07 -04:00
Leo Yan 6ef5382ffe optee-ftpm: Update to "main" branch
Since the github repository doesn't contain a "master" branch but has the
"main" branch now, this patch updates to the "main" branch so can
download the repository successfully.

CC: Ilias Apalodimas <ilias.apalodimas@linaro.org>
CC: Jerome Forissier <jerome.forissier@linaro.org>
CC: Peter Griffin <peter.griffin@linaro.org>
Signed-off-by: Leo Yan <leo.yan@linaro.org>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-06-23 09:39:34 -04:00
Jiamei Xie 84a0813ae1 arm-bsp/fvp-baser-aemv8r64: Use secure hypervisor physical timer in EL2
Arm generic timer provides different timers for different exception
levels and different secure states. Because Armv8-R AArch64 has secure
state only, the valid timer for hypervisor in EL2 is secure hypervisor
physical timer. But for platform fvp-baser-aemv8r64, before FVP 11.18,
the secure hypervisor physical timer could not work well in EL2, so we
had been using Non-secure physical timer in EL2 for hypervisor as a
workaround.

Since secure hypervisor physical timer issue has been fixed from FVP
11.18, we can use this correct timer in EL2 for hypervisor now. So we
update the device tree timer node to use secure hypervisor physical
timer interrupt for hypervisor.

About the interrupt assignments of FVP, please refer to
https://developer.arm.com/documentation/100964/latest/Base-Platform/Base---interrupt-assignments

Issue-Id: SCM-4596
Signed-off-by: Jiamei Xie <jiamei.xie@arm.com>
Change-Id: I9d4b9f4e0ed14c6c1567269c83696ceb9ff84ac8
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-06-22 09:41:20 -04:00
Peter Hoyes a4e153dd7b arm-bsp/docs: Update fvp-baser-aemv8r64 U-Boot version to 2022.04
Issue-Id: SCM-4388
Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
Change-Id: Id75f5fd56c04039da3ff976c85776b5e1706939a
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-06-22 09:41:20 -04:00
Peter Hoyes cf2e519825 arm/fvp-base-r-aem: Upgrade to version 11.18.16
The new FVP includes the arch in the download filename, so refactor
FVP_ARCH in fvp-common.inc to make "Linux64" available in the recipe
file.

Update version and EULA URL in documentation.

Issue-Id: SCM-4388
Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
Change-Id: I3ddc29cd444b78634086f2aefe4f52799eb937b1
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-06-22 09:41:20 -04:00
Xueliang Zhong ea3479c27c arm-bsp/n1sdp: fix boot due to TF-A 2.7 update
N1SDP board cannot boot after recent TF-A 2.7 update in meta-arm.  This
is due to TF-A 2.7 not configured correctly for N1SDP board to support
trusted boot feature.

This patch temporarily brings back TF-A 2.6 recipes for fixing the N1SDP
boot.

A proper fix is in work progress to configure TF-A 2.7 correctly to
support trutsed boot on N1SDP.

Signed-off-by: Xueliang Zhong <xueliang.zhong@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-06-22 09:41:01 -04:00
Jon Mason 658de4e5e2 ci: work around zephyr test issues
zephyr uses icount to improve test accuracy on virtual hardware.  Do
the same here for the same reason for the platforms that actually test.
Also, the common test now appears to work for microbit-v1 and poll doe
snot work for qemu-cortex-m3

Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-06-22 09:40:23 -04:00
Rupinderjit Singh 5cb7b14e03 arm-bsp/scp-firmware: Migrate SCP firmware recipes from Makefile to Cmake
Signed-off-by: Rupinderjit Singh <rupinderjit.singh@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-06-20 13:12:37 -04:00
Ross Burton 391ba0be67 arm/trusted-firmware-a: rename to 2.7.0 to match upstream
The upstream version is 2.7.0, so use that name instead of just 2.7.

Also remove the unversioned bbappend which simply extended
FILESEXTRAPATHS, there's no need for this split now that we aim to have
~1 version of TF-A in the tree.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-06-16 11:36:25 -04:00
Ross Burton 60d9cb303d arm-bsp/trusted-firmware-a: remove SGI-575 workaround
The SGI-575 build is successful with branch protection enabled, so remove
this workaround.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-06-16 11:36:25 -04:00
Kamil Dziezyk eb0fa05262 arm/generic-arm64: Include generic-arm64-standard.scc into kernel config
To allow bitbake including the 'generic-arm64-standard.scc' into the kernel
configuration, it has to be included as a kmeta type source to the SRC_URI.

Issue-Id: SCM-4394
Signed-off-by: Kamil Dziezyk <kamil.dziezyk@arm.com>
Change-Id: Iaebd0c7758038843a1d0f37decbef057629bf0bb
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-06-16 09:38:35 -04:00
Ross Burton 7013204337 arm-toolchain/androidclang: move to libexecdir
Binaries shouldn't be in datadir, and now the RPATHs are being cleared
we can put them in libexecdir.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-06-16 08:00:07 -04:00
Ross Burton c4041b667d arm-toolchain/androidclang: strip meaningless RPATHS
As per [1], target builds of androidclang produce useless-rpath errors.

/usr/share/clang-r416183b/python3/lib/python3.9/lib-dynload/_posixsubprocess.cpython-39-x86_64-linux-gnu.so
contains probably-redundant RPATH /../lib [useless-rpaths]

Those RPATHs are of no use, so we can remove them entirely.

[1] https://errors.yoctoproject.org/Errors/Details/640604/

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-06-16 08:00:07 -04:00
Ross Burton 67b662a996 arm/edk2-firmware: upgrade to 2022.05
Add a patch to fix uninitialized varibles, detected by Clang when
building for Juno. However, whilst it now compiles it can't generate
firmware images correctly, so it has to remain forcing GCC.

Remove the workaround to force debug builds when using Clang, as this is
now fixed.

Drop upstreamed patches from sbsa-acs.

Signed-off-by: Ross Burton <ross.burton@arm.com>
2022-06-15 08:23:20 -04:00
Jon Mason 36b43bc327 arm/optee: update to v3.17
Update the recipes to v3.17 and remove v3.16

Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-06-14 17:00:09 -04:00
Jon Mason a355384290 arm/trusted-firmware-a: Update to 2.7.0
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-06-14 14:01:36 -04:00
Jon Mason 7aa3997684 arm-bsp: Remove old, unused u-boot recipes
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-06-14 14:01:14 -04:00
Jon Mason 9722278593 arm-bsp/fvp-base-arm32: rebase for u-boot 2022.04
This is not a clean rebase.  The patch had to be modified to apply and
work on v2022.04.  It is not very elegant, but it is functional.

Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-06-14 14:01:14 -04:00
Jon Mason 84f7dd6243 arm-bsp/fvp-base: get v2022.04 u-boot working
Recent modifications in u-boot moved the default location of the FDT.
Update the runfvp parameters to match this new location.

Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-06-14 14:01:14 -04:00
Jon Mason a2ff119a6c arm-bsp/corestone1000: Update to u-boot v2022.04
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-06-14 14:01:14 -04:00
Jon Mason 55feeb942e arm-bsp/tc: Update to u-boot v2022.04
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-06-14 14:01:14 -04:00
Jon Mason 170f0b43ba arm-bsp/juno: Update to u-boot v2022.04
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-06-14 14:01:14 -04:00
Xueliang Zhong ac2a323ab2 arm-bsp/n1sdp: upgrade board-firmware version
Upgraded N1SDP board-firmware to N1SDP-2021.10.12 version.

Signed-off-by: Xueliang Zhong <xueliang.zhong@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-06-14 14:01:14 -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 24c4cfa2aa arm-toolchain/armcompiler: remove recipe
As far as we know nobody is actually using the Arm Compiler recipe: 6.17
does a network operation on every call to check the license and this
fails with the network isolation that do_compile has in kirkstone, and
6.18 is behind a loginwall so we cannot download it in a recipe.

Unless we have actual users asking for a recipe, remove it from the layer
to avoid confusion.

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 5e67334060 arm/trusted-firmware-m: remove compiler options
The recipe supports the use of both Arm's binary GCC (aka GNU Arm
Embedded Compiler, or gnu-rm) and binary Clang (aka Arm Compiler).
However, armcompiler was never tested and doesn't work: 6.17 does a
network operation on every call to check the license which fails with
the network isolation in do_compile tasks, and 6.18 is behind a
loginwall so we can't automatically fetch it in a recipe.

Simplify the recipe to hardcode the use of gnu-rm, and remove the clang
support.

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 7007a9c0ea arm-toolchain/gcc-arm-none-eabi: upgrade to 11.2-2022.02
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-06-08 06:00:09 -04:00
Ross Burton 5c9017f7fd arm-toolchain/gcc-aarch64-none-elf: upgrade to 11.2
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-06-08 06:00:09 -04:00
Ross Burton ab7144ff19 CI: upgrade external GCC to 11.2
Our CI is now running on Broadwell+ cores, so the 11.2 release of GCC
should work.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-06-08 06:00:09 -04:00
Peter Hoyes d9abae2a57 arm-bsp/conf: fvp-baser-aemv8r64 model parameter update
Add parameters required to boot with cache_state_modelled enabled:
 * bp.virtio_net.secure_accesses=1
 * bp.virtio_rng.secure_accesses=1
 * bp.virtioblockdevice.secure_accesses=1
 * cci400.force_on_from_start=1

Add bp.ve_sysregs.exit_on_shutdown=1 to match fvp-base.

Remove parameters that are not required to boot or are setting the
default value.

Alphabetize list.

Issue-Id: SCM-4304
Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
Change-Id: I0a696eff5bb83206e5501f651c487f16f695aa4c
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-06-07 05:00:08 -04:00
Peter Hoyes 3a7247176c arm-bsp/u-boot: fvp-baser-aemv8r64 cache_state_modelled fixes
Running the FVP_Base_AEMv8R model with the cache_state_modelled
parameter enabled exposed some defects in the U-Boot BSP patches for the
fvp-baser-aemv8r64:
 * The MPU memory attributes are inconsistent with the existing MMU
   attributes, causing a model hang when sending packets using
   virtio-net in U-Boot.
 * The instruction cache was left disabled after booting an EFI payload
   at S-EL1, causing some EFI apps (e.g. Grub) to hang when attempting
   to use dynamically loaded modules.

The cache_state_modelled FVP parameter is enabled by default in the
model (for simulation accuracy) but is disabled by default in the
machine conf (for simulation speed).

Add two additional machine-specific U-Boot patches to fix the above
issues.

Issue-Id: SCM-4641
Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
Change-Id: I5ab13c9fdadd82456ac3f3e3703df36590d52fb7
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-06-07 05:00:08 -04:00
Peter Hoyes 3d91266704 arm-bsp/u-boot: Update fvp-baser-aemv8r64 patches for v2022.04
The backports are now merged, so remove patches 1 through 5 and
renumber.

Upstream now requires CONFIG_DEFAULT_DEVICE_TREE to be defined, even if
unused, so backport relevant portions of upstream BASER_FVP patch into
the board suppport patch.

Issue-Id: SCM-4304
Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
Change-Id: I327e8aba3463f088bba40e83893c6f15beabb250
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-06-07 05:00:08 -04:00
Jon Mason 56287f9505 arm-bsp: add u-boot v2022.01 support
Upstream has updated u-boot to v2022.04, but the update is causing
problems with some machines.  Temporarily add a v2022.01 recipe until
the issues can be resolved.

u-boot and zephyr hacking

Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-06-01 15:00:07 -04:00
Jon Mason 0cdcb8eed4 CI: add workaround for zephyr
GCC 12 is causing problems in newlib, which is causing problems for
zephyr.  Add a workaround until those issues can be resolved.

Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-06-01 15:00:07 -04:00
Jon Mason c8780e8063 CI: use upstream master branch
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-06-01 15:00:07 -04:00
Jon Mason 0c4c33de09 CI: make qemuarm-secureboot builds more thorough
Build all the things that qemuarm64-secureboot builds, removing those
that fail to compile.  Unfortunately, musl doesn't play nicely with
optee-test.

Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-05-23 16:44:22 -04:00
Ross Burton 232dc039d0 arm-toolchain/layer.conf: remove BB_DANGLINGAPPENDS_WARNONLY
This appears to be historical from when the toolchain was in meta-linaro.

It isn't needed anymore, there's one bbappend in meta-arm-toolchain for
grub which is part of oe-core, so will never be dangling.

This variable has a global effect, so leaving it in here has a negative
impact on users.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-05-23 13:17:59 -04:00
Ross Burton f41c961992 arm-bsp/linux-yocto: move 5.4 kernel recipe to meta-gem5
The only user of the old 5.4 kernel is meta-gem5, so move it into that
layer to keep it separate.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-05-23 13:17:59 -04:00
Abdellatif El Khlifi 005648c3f7 kas: corstone1000: drop the use of the FVP script
FVP script is replaced with the runfvp command.

Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-05-23 08:00:08 -04:00
Abdellatif El Khlifi eeee4d0010 kas: corstone1000: drop use of meta-arm-image
meta-arm-image is no longer supported.

Signed-off-by: Harry Moulton <harry.moulton@arm.com>
Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-05-23 08:00:08 -04:00
Jon Mason 96941ae4ce arm/machine: use QB_GRAPHICS
QB_OPT_APPEND is being used for the graphics parameters, use QB_GRAPHICS
instead.

Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-05-18 09:50:01 -04:00
Jon Mason 8445f99eb0 arm-autonomy: remove README
meta-arm-autonomy has been EOLed for a release now.  Remove the README
and directory.

Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-05-18 09:39:58 -04:00
Jon Mason 1b7f2975e4 arm/linux-yocto: remove tcpci for generic-arm64
Per the comment, it's not necessary post 5.12.

Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-05-18 09:39:58 -04:00
Jon Mason e50f5221a3 arm/scp: remove support for version 2.9
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-05-18 09:39:58 -04:00
emeara01 c42e8bbf4e arm-bsp/trusted-firmware-a: increase BL2 size for TC
The new mbedtls version (v2.28) increase the size of TF-A slightly.
This commit increases the size of BL2 for TC, so that TF-A with updated
mbedtls version can fit.

Signed-off-by: Emekcan Aras <Emekcan.Aras@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-05-18 09:39:55 -04:00
emeara01 aa4d137309 arm-bsp/trusted-firmware-a: corstone1000: fix FF-A Version in SPMC manifest
FF-A version is defined 1.1 in corstone1000_spmc_manifest.dts. However, SPMC
does not support FF-A version 1.1 at the moment. This commit fixes FF-A version
issue by defining 1.0 again.

Signed-off-by: Emekcan Aras <Emekcan.Aras@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-05-18 09:39:55 -04:00
emeara01 36ccb480e9 arm/trusted-firmware-a: upgrade mbedtls to 2.28
The latest TF-A version requires mbedtls v2.28. This
commit upgrades mbedtls to v2.28 for TF-A recipe.
An upstreamed patch included to the base recipe from TF-A master
that fixes the build issues beween TF-A 2.6 and Mbedtls 2.28.

Signed-off-by: Emekcan Aras <Emekcan.Aras@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-05-18 09:39:55 -04:00
Ross Burton a52f85a2af Revert "arm-toolchain/external-arm-toolchain: set the version in the recipe"
This reverts commit ac83feb7cd.

Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-05-18 08:00:09 -04:00
Ross Burton 16fe716dc6 Revert "arm-toolchain/external-arm-toolchain: add back 10.3"
This reverts commit 5fec85b41d.

Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-05-18 08:00:09 -04:00
Ross Burton 047d2b391c CI: remove preferred version from external-gccarm
I misunderstood how the external-arm-toolchain recipes were working, the
latest revision of the recipe works with both 10.3 and 11.2.

Clean up my mess by dropping the PREFERRED_VERSION from the CI, and revert
the addition of versioned recipes.  Simply using the right tarball is
sufficient.

Thanks to Sumit Garg for noticing my mistake.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-05-18 08:00:09 -04:00
Jon Mason 35023b28c7 sbsa-acs: fix patch not applying issue
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-05-17 09:39:19 -04:00
Ross Burton 4c6ccb833c CI: use external-arm-toolchain 10.3
The 11.2 release of the Arm GCC uses Broadwell-onwards instructions, but
our CI (and many other users) have pre-Broadwell hardware.

Until 11.3 is released which fixes this, go back to using 10.3 for our CI.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-05-17 09:39:12 -04:00
Ross Burton 5fec85b41d arm-toolchain/external-arm-toolchain: add back 10.3
Add back the 10.3 release of external-arm-toolchain.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-05-17 09:39:12 -04:00
Ross Burton ac83feb7cd arm-toolchain/external-arm-toolchain: set the version in the recipe
We need to support multiple versions of external-arm-toolchain, partly as
different versions have different layouts on disk, and partly because
11.2 doesn't work on pre-Broadwell hardware.

Rename this recipe so the version is in the filename, and dynamically
set PKGV instead of PV so PREFERRED_VERSION is easier to use.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-05-17 09:39:12 -04:00
Ross Burton a3a6597cfd arm/linux-yocto: refresh skip-unavailable-memory.patch
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-05-17 08:27:01 -04:00
Ross Burton 9ef44ec196 arm/linux-yocto: fix boot failure in qemuarm64-secureboot
The boot crash that appears to be triggered by the ZONE_DMA patches has
been root-caused, so work around the problem whilst upstream figure out
the best way to fix.

Also, upgrade qemuarm64-secureboot to 5.15 instead of pinning back to
5.10.

Signed-off-by: Ross Burton <ross.burton@arm.com>
2022-05-16 11:16:18 -04:00
Khem Raj 53f1a7544d sbsa-acs: Fix build with gcc12
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-05-14 18:37:35 -04:00
Khem Raj 9c07b0c0d0 optee-spdevkit: Disable for 32bit arm
FFA secure partitions aren't supported on 32-bit Arm currently

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-05-14 18:37:19 -04:00
Khem Raj 62db19b371 optee-spdevkit: Apply the sysroot patches
These patches are needed for getting right C runtime library

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-05-14 18:37:19 -04:00
Ross Burton 79a20dc1d7 arm-bsp/optee-os-tadevkit: remove unused bbappend
TC uses 3.14, so remove the unused 3.16 bbappend.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-05-13 11:00:08 -04:00
Ross Burton 155a2f9ed4 arm-bsp/optee-client: remove bbappends
These bbappends do nothing, so remove them.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-05-13 11:00:08 -04:00
Ross Burton 7e09d10e23 arm-bsp/optee-os: remove 3.16 bbappend
Corstone-1000 and TotalCompute uses 3.14, so remove the 3.16 bbappend.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-05-13 11:00:08 -04:00
Ross Burton 6286e0d54c arm-bsp/optee-test: clean up bbappends
The 3.14 bbappend sets DEPENDS which are redundant as they're already
set in the base recipe.

Remove the unused 3.16 bbappend.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-05-13 11:00:08 -04:00
Ross Burton 4b94d77f69 arm-bsp/optee-os: set PV correctly for the corstone1000 build
The corstone1000 build of optee-os has a bbappend which uses a specific
non-upstream branch of optee-os which is actually based on 3.10, so set
PV appropriately in the recipe and update the PREFERRED_VERSION in
corstone1000.inc.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-05-13 11:00:08 -04:00
Vishnu Banavath f68fa49bca arm-bsp/tf-a-tests: Add recipe to build and install TFTF
TFTF is TF-A tests that runs at NS-EL2. This is primarily developed to
test the TF-A interfaces exposed to NS code.

Signed-off-by: Vishnu Banavath <vishnu.banavath@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-05-11 10:00:09 -04:00
Khem Raj cb2eb8e373 hafnium: Fix build when _Noreturn is not available
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Cc: Jon Mason <jon.mason@arm.com>
Cc: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-05-10 19:00:07 -04:00
Khem Raj 03f5819187 optee: Pass HOST_CC_ARCH for locating compiler runtime
This option is used to find the right path and file name of the C
runtime e.g. libgcc or compiler-rt, when using clang it needs to know if
compiler is using hard-float or not, since the compiler-rt file names
are different for these two ABIs libclang_rt.builtins-arm.a or libclang_rt.builtins-armhf.a
The option is computed in HOST_CC_ARCH for OE, this fixes build with
clang+llvm-runtime

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-05-10 18:00:07 -04:00
Ross Burton e651e248a7 CI: use kirkstone branches for meta-clang and meta-virtualization
These branches have kirkstone branches now, so use them.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-05-10 07:00:08 -04:00
Jon Mason faf7e47a38 ci: add qemuarm-secureboot
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-05-06 11:47:58 -04:00
Sumit Garg 7e4cbdb508 linux-yocto: tee.cfg: Enable TEE based fTPM driver
Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-05-06 09:30:50 -04:00
Sumit Garg 152f94fa56 Add new target: "qemuarm-secureboot"
Add a new 32 bit target as "qemuarm-secureboot" on similar lines as
"qemuarm64-secureboot". The boot flow looks like:

BL1 (TF-A) -> BL2 (TF-A) -> OP-TEE -> u-boot -> Linux

Along with this enable support for OP-TEE based firmware TPM.

Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-05-06 09:30:50 -04:00
Ross Burton 28d6f6667b arm-bsp/corstone1000-*-image: mark these as corstone1000-specific
We don't want world builds failing as they try to build these for machines
other than Corstone 1000.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-05-06 09:29:50 -04:00
Ross Burton 80facbb124 arm/optee: remove redundant ${S} in LIC_FILES_CHKSUM
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-05-06 09:29:50 -04:00
Ross Burton c65eed7160 arm-toolchain/arm-binary-toolchain: ensure toolchains don't provide any system libraries
Use PRIVATE_LIBS to ensure that the Arm binary toolchains don't provide
their own libraries to the entire system.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-05-06 09:29:50 -04:00
Rupinderjit Singh 7793860123 arm-bsp/scp-firmware: upgrade TC to version 2.10
* Removed 0001-tc0-fix-sensor-data-api-call.patch as it has now been upstreamed.
* updated 0003-tc0-rename-platform-variant-to-platform-feature-set.patch to fix merge error.

Signed-off-by: Rupinderjit Singh <rupinderjit.singh@arm.com>
Change-Id: I71eafbea9e1f0b9f01a504fe0c8b81e43c24d613
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-05-05 09:23:45 -04:00
Arunachalam Ganapathy cdb6c65f0a arm-bsp/linux: TC: Add Trusty FFA adoption patches
Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
Change-Id: I5c152ca026dce2a7470d6ee7cfd84fa6b3f2e30a
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-05-04 13:00:25 -04:00
Arunachalam Ganapathy b36889fe71 arm-bsp/linux: TC: Add backport of Trusty driver
Backport of trusty driver. This adds Trusty driver from
android-trusty-5.10

Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
Change-Id: I5477ecfc1b67fc3786dbd062711d8cc8d4963744
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-05-04 13:00:25 -04:00
Arunachalam Ganapathy ad88391e95 arm-bsp/linux: TC: Add fixes in FFA driver
Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
Change-Id: I43498b3e66651d4ed8d2cedb7455f678ddf012d1
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-05-04 13:00:25 -04:00
Arunachalam Ganapathy 1ce52a31ae arm-bsp/linux: TC: Update backport patches of FFA driver
This updates the existing FFA driver to the latest upstream version.

Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
Change-Id: Idabf2d97cd497edc6c41e7132e1e82be8e717c59
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-05-04 13:00:25 -04:00
Ben Horgan 006503d94f arm-bsp/hafnium: TC: Support for trusty as a secure partition
Signed-off-by: Ben Horgan <ben.horgan@arm.com>
Change-Id: I2bbb77aa2f220f013cff53efe557df9960d237e3
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-05-04 13:00:25 -04:00
Arunachalam Ganapathy 559ecba813 arm-bsp/trusted-firmware-a: TC: Add Trusty SP support
This patch updates the SHA and include patches that enables Trusty
to run as SP on SEL2 SPMC.

Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
Change-Id: I5586bb3aa592658be9421a4de23f44a69bfb0b2e
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-05-04 13:00:25 -04:00
Arunachalam Ganapathy 7ade3a68b2 arm-bsp/hafnium: TC: update SHA and remove upstreamed patches
Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
Change-Id: I33a7cc01040c6a2392d87763da9c0adc0c5bbe2d
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-05-04 13:00:25 -04:00
Arunachalam Ganapathy 55d4a414e7 arm-bsp/u-boot: TC: Upgrade to 2022.01 and add patch for secure DRAM size
- Upgrade U-boot to 2022.01
- Remove 8GB DRAM increase patch that is merged
- Add patch that update secure DRAM size

Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
Change-Id: I32735cb5e8cba67ac1c6082aadf9a55f7bf51e8a
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-05-04 13:00:25 -04:00
Arunachalam Ganapathy c9bb1eab44 arm-bsp/optee: TC: Set preferred version of OP-TEE to v3.14
This also adds missing optee-os-tadevkit, optee-test append files

Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
Change-Id: I1a217d9db7378f3ec711e984193b07ebb692e382
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-05-04 13:00:25 -04:00
Arunachalam Ganapathy 35445203d2 arm/optee: Add optee 3.14 recipes
Add back v3.14 optee-examples, optee-test, and optee-os-tadevkit for
TC platform compatibility. These files were removed as part of v3.16
upgrade.

Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
Change-Id: Ia12774125909e7f8bfc20a9797c25b04dd850ae7
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-05-04 13:00:25 -04:00
Ross Burton 68b1e2d3e3 arm-bsp/trusted-firmware-m: move corstone1000 to TF-M 1.6.0.
Move the TFM_PLATFORM assignment to the bbappend.

Drop the SRCREV changes, these are all incorporated into the 1.6.0
release.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-05-04 10:00:09 -04:00
Ross Burton 83df1de709 arm/trusted-firmware-m: upgrade to 1.6.0.
Upgrade all SRCREVs, and drop the merged patch to use cbor2.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-05-04 10:00:09 -04:00
Jon Mason 5ea8300b09 arm-bsp/trusted-firmware-m: corstone1000: remove unused patches
commit ab339b24d4 removed the reference to
these patches but did not remove them.  Removing now to clean-up the
tree.

Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-05-03 12:00:15 -04:00
Jon Mason b935fc6153 arm-bsp/trusted-firmware-a: corstone1000: remove unused patch files
commit 24db3b56ba removed references to
the patches, but did not remove the patches.

Suggested-by: Denys Dmytriyenko <denis@denix.org>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-05-03 12:00:15 -04:00
Ross Burton 5f5a93a0f6 tatus: remove file that shouldn't have been committed
This file was accidentally committed previously.

Signed-off-by: Ross Burton <ross.burton@arm.com>
2022-05-03 16:29:53 +01:00
Sumit Garg 50b34c5cc9 external-arm-toolchain: Add support for Arm GCC 11.2 binary release
Arm GCC 11.2 binary release has completely changed the way how libc was
packaged in earlier binary releases. So adjust do_install() accordingly
to support Arm GCC 11.2 as well as earlier binary releases.

Along with this update CI as well to point at Arm GCC 11.2 binary
releases.

Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
Reviewed-by: Denys Dmytriyenko <denis@denix.org>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-04-29 13:14:01 -04:00
Sumit Garg 68adfe2256 external-arm-toolchain-versions: Use ldd to get libc version
Arm GCC 11.2 binary release has moved away from keeping libc library
versioning info as libc-{EAT_VER_LIBC}.so. So rather switch to
retrieving libc version by parsing output from "$ ldd --version".

Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
Reviewed-by: Denys Dmytriyenko <denis@denix.org>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-04-29 13:13:15 -04:00
Rupinderjit Singh 2f9a15ba56 arm-bsp/tc: CI-700 driver enablement in kernel.
Signed-off-by: Rupinderjit Singh <rupinderjit.singh@arm.com>
Change-Id: If30b32a0f8ec9dbfe8bbf527eeb909a4c2540e9b
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-04-29 07:49:26 -04:00
Ross Burton 84abf1d593 CI: use kirkstone branch, not master
Until we have released and branched meta-arm we're tracking kirkstone, not
master.  oe-core has branched and master is changing fast, so switch
the default branch now.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-04-27 17:54:33 -04:00
Abdellatif El Khlifi 4348abbf38 arm-bsp/trusted-services: corstone1000: add sysroot tasks dependency
ffa-debugfs-mod provides arm_ffa_user.h needed by psa-arch-tests source-code.

This commit sets the sysroot tasks dependencies.

Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-04-27 17:54:33 -04:00
Peter Hoyes 74ddd6dd17 kas/fvp-baser-aemv8r64: Install ssh-pregen-hostkeys
We already install ssh-server-openssh with the default Kas config for
the fvp-baser-aemv8r64, so install ssh-pregen-hostkeys too to improve
boot time.

Issue-Id: SCM-4304
Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
Change-Id: I08962585efb88ea56d8ff7b5a34c4a1beda2e3e3
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-04-27 17:54:33 -04:00
Khem Raj 6a105f47b9 optee-ftpm: Install artifacts into nonarch_base_libdir
This ensures that builds do not break with usrmerge distro feature

Fixes
ERROR: QA Issue: optee-ftpm: Files/directories were installed but not shipped in any package:
  /lib
  /lib/optee_armtz
  /lib/optee_armtz/bc50d971-d4c9-42c4-82cb-343fb7f37896.ta
  /lib/optee_armtz/bc50d971-d4c9-42c4-82cb-343fb7f37896.stripped.elf

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-04-27 17:54:33 -04:00
Peter Hoyes c713908b7f arm-bsp/u-boot: Enable fdt overlays for fvp-baser-aemv8r64
Enable the OF_LIBFDT_OVERLAY configuration flag so that U-Boot can apply
fdt overlays using the "fdt apply" command.

This can be used to modify the device tree at runtime to boot a
different payload without changing the firmware.

Issue-Id: SCM-4386
Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
Change-Id: I6e32c5ce833ca7c61f0f73fc256031564e55f1b8
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-04-22 13:00:17 -04:00
Peter Hoyes d412c2a3fd arm-bsp/u-boot: Fix fvp-baser-aemv8r64 fdt memory configuration issue
Add additional fvp-baser-aemv8r64-specific patch for U-Boot, which fixes
an issue where U-Boot was ignoring the `memory` node in the device tree.

Issue-Id: SCM-4386
Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
Change-Id: I1382992fffa159c4bd6325db4f1b26c6478cf391
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-04-22 13:00:17 -04:00
Peter Hoyes 8c063543e0 arm-bsp/boot-wrapper-aarch64: Add fvp-baser support for EL2 SMP payloads
Add additional fvp-baser-aemv8r64-specific patches for
boot-wrapper-aarch64. These patches add a "function call" entry point
for the PSCI services, so that payloads starting at S-EL2 (e.g. Xen) can
boot the secondary cores.

Issue-ID: SCM-4386
Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
Change-Id: I961c78352987f711664e06ab39b00f6eb97a81de
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-04-22 13:00:17 -04:00
Peter Hoyes f2898f5c56 arm-bsp/boot-wrapper-aarch64,u-boot: Clarify fvp-baser Upstream-Status
The final firmware design for the fvp-baser-aemv8r64 is pending further
discussion, so the current implementation contains several "temporary"
patches which are likely to be removed or replaced in the future. These
are already marked as "Inappropriate" to upstream, but amend the reason
to "Implementation pending further discussion" to avoid confusion.

Issue-Id: SCM-4304
Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
Change-Id: I7dc6eae73fbb18f4b7b63540fb45b6a62d455093
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-04-22 13:00:17 -04:00
Peter Hoyes 1a68497771 ci,arm-bsp/conf: Add testimage for fvp-baser-aemv8r64
Add test configuration to machine config. Add testimage to Kas file, so
that testimage works out of the box.

Issue-Id: SCM-4304
Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
Change-Id: I27dc9760a2c58f43ea557efdc97d363b0d3c1447
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-04-22 13:00:17 -04:00
Peter Hoyes 627f8b9f7d arm/fvp-base-r-aem: Automatically download FVP tarball
The FVP_Base_AEMv8R tarball is now available to download directly from
developer.arm.com without logging in. Therefore, remove the
FVP_BASE_R_AEM_TARBALL_URI env var (and references in the documentation)
and update the SRC_URI in the recipe.

Move fvpboot and userNetPorts to the machine conf, now that the
FVP configuration is no longer dependent on an external tarball.

Clarify the currently supported FVP version in the documentation.

Put the current PV in the recipe filename.

Issue-Id: SCM-4304
Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
Change-Id: I776277c690bf4466445ca2df17eedb202f172f58
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-04-22 13:00:17 -04:00
Jon Mason 9f0c905066 CI: add testing for edk2
For platforms that can do both u-boot and edk2, add a yml to switch from
u-boot to edk2.

Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-04-22 11:31:25 -04:00
Jon Mason b37441921d arm/edk2-firmware: add PROVIDES virtual/bootloader
To prevent a collision with u-boot, add the same PROVIDES from it.  The
PROVIDES name need improvement, but this will work in the interim.

This causes a need for making TF-A more flexible.  Add the ability to
reference the UEFI binary for the BL33 portion of the TF-A build
command.  SGI575 is already doing this.  So, it is really just making it
more generic for others to use.

Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-04-22 11:31:25 -04:00
Jon Mason 2b6e3fc1d1 arm-bsp/juno: use virtual/bootloader for u-boot/edk2
To setup juno to use either u-boot or edk2 in CI, abstract out the
relevant parts and setup the parts to allow for it to be done
dynamically.

Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-04-22 11:31:25 -04:00
Ross Burton 698e053663 arm-toolchain/gcc-aarch64-none-elf: remove redundant LIC_FILES_CHKSUM
Setting LIC_FILES_CHKSUM with some anonymous Python to dynamically fetch
the right checksum is pointless when the right values are assigned with
overrides in the first place.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-04-22 11:31:25 -04:00
Abdellatif El Khlifi 99ecf72875 arm-bsp/linux: corstone1000: Handle compatibility with different firmware versions
A kernel patch that fixes FFA version compatibility issues.

Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-04-19 11:00:07 -04:00
Ilias Apalodimas 3ee7d01989 optee-ftpm: Use the latest fTPM sources
The recipe right now is using https://github.com/microsoft/MSRSec.
However this is the initial reference implementation from Microsoft and
things have been moved into https://github.com/microsoft/ms-tpm-20-ref/
(in the directory Samples).  Switch to new and currently maintained branch

Testing against real hardware (the SynQuacer DeveloperBox and a rockpi4)
didn't sound any alarms

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-04-12 22:33:05 -04:00
Rui Miguel Silva 5063ad85c3 arm-bsp/corstone1000: bump u-boot version to 2022.01
Bump version of u-boot from 2021.10 to 2022.01, as at it, take
the chance to squash some patches and reduce the number of
them.

Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-04-12 22:29:36 -04:00
Ross Burton 9c0e0c01cb CI: run more tests for qemuarm64-secureboot
Not that we're not forcing TAP networking the SSH connections work, so
we can run the full test suite.

We have to skip parselogs currently as there is an error:

  software IO TLB: Cannot allocate buffer

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-04-07 12:26:40 -04:00
Ross Burton 39ec9b4ff7 qemuarm64-secureboot: don't set append in extlinux.conf
There's no need to set append in the extlinux.conf, as the kernel will
pull the settings passed from runqemu via the DeviceTree.

By explicitly setting append here the kernel doesn't look in the DT, and
the extlinux.conf hardcoded a TAP network configuration which meant that
networking fails for runqemu using slirp.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-04-07 12:26:40 -04:00
Ross Burton f11103f477 qemuarm64-secureboot: set root device correctly
The default root device is /dev/vda, because typically a bare filesystem
is mounted there.

However, qemuarm64-secureboot uses a disk image with partitions, so this
should be /dev/vda2.  Currently this works because qemuarm64-secureboot
has an extlinux.conf which explicitly sets the root device, but we're
working at removing that.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-04-07 12:26:40 -04:00
Ross Burton acc72a8627 CI: rename sshd section in testimage.yml
Rename the fragment that installs a SSH daemon to 'sshd' instead of the
generic 'packages'.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-04-07 12:26:40 -04:00
Ross Burton 2fe79675ed qemuarm64-secureboot: disable the use of KVM
When using -machine=virt,secure=on KVM cannot be used and will cause an
error, so forcibly disable the use of KVM.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-04-07 12:26:40 -04:00
Ross Burton ea09776ea5 qemuarm64-secureboot: remove redundant UBOOT_MACHINE
This is assigned in the base qemuarm64.conf already.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-04-07 12:26:40 -04:00
Ross Burton 57baaaa218 CI: install pregenerated SSH keys to speed up boot
As we're in a CI environment there's no need to generate unique SSH keys
on boot.  Installing the pregenerated SSH keys means they don't need to
be generated, which saves a reasonable amount of boot time due to the
lack of entropy if virtio-rng isn't available.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-04-07 12:26:40 -04:00
Ross Burton 07c46c0ead arm/scp-firmware: add 2.10
Add a new recipe for SCP Firmware 2.10.

As we're late in the release cycle, keep 2.9 in the tree so that BSPs
that can't be tested in time can stay with 2.9 for now.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-04-07 12:26:40 -04:00
Ross Burton 6919d15ea8 arm-bsp/scp-firmware: specify version for bbappend
In preparation for SCP Firmware 2.10 being integrated, make this append
version-specific so that BSPs can select which SCP release they have
been tested with.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-04-07 12:26:40 -04:00
Satish Kumar 8bf4155ef0 kas/corstone1000.yml: refspec update for run-scripts
Signed-off-by: Satish Kumar <satish.kumar01@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-04-07 09:13:18 -04:00
Peter Hoyes 4c2f4ab95e arm-bsp/linux-yocto: Enable virtio-rng for fvp-baser-aemv8r64
A virtio-rng is available from FVP_BaseR_AEMv8R version 11.17, so add
to the device tree and enable the correpsonding FVP configuration flag.

This improves the boot time and removes the following warning in the
boot log:

    random: udevd: uninitialized urandom read (16 bytes read)

Issue-Id: SCM-4304
Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
Change-Id: Ic935d0b935e21965a489a55db09c4a5f9ac51366
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-04-06 21:54:26 -04:00
Ross Burton faec9a7ad3 arm-toolchain/tcmode-external-arm: skip gcc-cross-*
SKIP_RECIPE applies to the full recipe names, which are gcc-cross-[arch].

Signed-off-by: Ross Burton <ross.burton@arm.com>
Reviewed-by: Sumit Garg <sumit.garg@linaro.org>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-04-06 21:54:02 -04:00
Ross Burton a92e076973 arm-toolchain/external-arm-toolchain: install to libexecdir not datadir
$datadir is for architecture-independent files, and a compiler is not
that.

Install to $libexecdir, and clean up the installation commands whilst
there.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Reviewed-by: Sumit Garg <sumit.garg@linaro.org>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-04-06 21:51:59 -04:00
Harry Moulton 5c83fa8364 arm-bsp/machine: Add runfvp config for corstone1000
Add the runfvp config for corstone1000-fvp.

Signed-off-by: Harry Moulton <harry.moulton@arm.com>
2022-04-04 19:29:21 +01:00
Vishnu Banavath 95da1dcd74 arm-bsp/u-boot: add SDCard support for corstone1000 FVP
This change is to add SDCard support for corstone1000 FVP

Signed-off-by: Vishnu Banavath <vishnu.banavath@arm.com>
2022-04-04 16:06:35 +00:00
Rui Miguel Silva d5406cec2e arm-bsp/corstone500/docs: update for kas and runfvp
Update corstone500 documentation to reflect the new build
infrastructure (kas) and the in tree run of the fvp using the
runfvp command.

Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-04-01 11:00:09 -04:00
Rui Miguel Silva 575d502cc8 kas/ci: add corstone500 platform
Add kas and ci, including testimage support for corstone500
platform. And for all to work add also the FVP setup.

Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-04-01 11:00:09 -04:00
Rui Miguel Silva 7b3ce21458 arm-bsp/corstone500: add wks container for image
Add final wic image that is provider by corstone500-image
target. As at it, remove unnecessary specific filesystem
types.

Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-04-01 11:00:09 -04:00
Rui Miguel Silva 3e3f989ab5 arm-bsp/corstone500: add image and container file
Now that we have the wic_nopt class in meta-arm we can add the
the wks file to create the final image for this platform.

Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-04-01 11:00:09 -04:00
Ross Burton e4cc4d01ca arm/oeqa: add no-op runtime test
Machines which don't have working network stacks in a FVP can still run
a useful testimage, because it will validate that the machine will boot
to a login prompt on the console.

However, we can't set TEST_SUITES to "" because testimage assumes that
was a mistake, so add a no-op test case for use in these situations.

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 5289c05289 CI: add basic selftest job
Currently this just executes the runfvp tests, but we can extend it over
time.

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 ba7803e513 CI: clean up assignments in base.yml
Split the base local.conf configuration into base (absolutely needed)
and setup (typical configuration). This is needed as oe-selftest needs a
minimal configuration to execute in, for example doesn't inherit
rm_work.

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 2b5cc5da3e arm/oeqa: add basic runfvp test cases
Add rudimentary but functional test cases for runfvp.

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 3a0dbcd37f runfvp: strip all suffixes from the image when calculating .fvpconf name
Until testimage tells the controller the basename of the image, make sure
to strip all suffixes from the image name to get the base name, not just
one.  Machines such as corstone500 have images called .wic.nopt, so just
stripping one isn't sufficient.

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 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 c49d401828 CI: fix INHERIT assignment
We were accidentally assigning instead of adding to INHERIT.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-03-28 14:54:08 -04:00
Ross Burton 4c66c6dfd6 CI: run testimage on fvp-base-arm32
Now that virtio networking is up, testimage works.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-03-28 14:53:50 -04:00
Ross Burton 4ab912828e arm-bsp/fvp-base-arm32: use correct DeviceTree
The 64-bit fvp-base machine uses the upstream fvp-base-recv devicetree,
but fvp-base-arm32 was accidentally using the old
fvp-base-gicv3-psci-custom that we patch into the kernel.

As the only difference between these platforms at a "hardware" level is
whether the cores boot in 32- or 64-bit mode, they should both use
fvp-base-revc.

This isn't trivial as devicetree files need to  be under the correct
arch/ directory, so we need to symlink into arch/arm the right files
from arch/arm64.

This has several improvements, but primarily virtio networking works so
we can now use testimage with fvp-base-arm32.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-03-25 10:10:22 -04:00
Ross Burton 0e9df5afbb arm-bsp/fvp-arm32: synchonise kernel config
fvp-base pulls in features/net/net.scc, so fvp-base-arm32 should too.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-03-25 10:10:22 -04:00
Ross Burton d47e6a89e1 arm/fvp: add more helper variables for the versioning
Add more helper variables for the FVP version to help construct URLs.

If PV is 1.2.3, then VERSION is 1.2 and BUILD is 3.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-03-25 10:10:22 -04:00
Ross Burton 22282ea893 arm/fvp-base-a-aem: upgrade to latest release, 11.17.21
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-03-25 10:10:22 -04:00
Ross Burton 966d3ec031 arm/fvp: generalise FVP_ARCH
Use wildcards in the FVP_ARCH assignment, as older FVPs use _GCC-6.4
whilst newer FVPs use _GCC-9.3.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-03-25 10:10:22 -04:00
Jon Mason ccec56deff arm-toolchain: update Arm GCC to 11.2
Update the Arm GCC source to the latest version.  Also, update the GCC
patches to apply cleanly, removing those that are no longer relevant.
Add the CVEs from Sumit Garg's series.

Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-03-23 09:34:09 -04:00
Ross Burton 28acb5fbd4 CI: save task logs when a job fails
Create a job artifact containing all of the task logs if the job fails.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-03-23 09:20:20 -04:00
Ross Burton bff49b6a35 arm-bsp/u-boot: use latest u-boot for fvp-base
Explicitly enable use of CRC instructions: we configure fvp-base to have
armv8.4 cores, but the default uboot config disables crc (see uboot 51d8367d8).

Keep fvp-base-arm32 on 2021.10 as the arm32-specific patches need
rebasing, and a trivial rebase doesn't boot successfully.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-03-18 13:00:07 -04:00
Ross Burton f56e69e135 arm-bsp/fvp-base: configure the FVP with v8.4 cores
Configure the FVP to have v8.4 cores, instead of v8.0. This gives us more
useful instructions, such as pointer authentication.

See this document for more details:

https://developer.arm.com/documentation/102378/0201/Armv8-x-and-Armv9-x-extensions-and-features

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-03-18 13:00:07 -04:00
Ross Burton 583b68cc90 arm-bsp/fvp-base: consolidate FVP configuration
The bulk of the FVP_* variables are common, so move them into
fvp-common.inc.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-03-18 13:00:07 -04:00
Ross Burton 00cde20a9a arm/oeqa/fvp: show more log from the FVP on failure
If the FVP fails to boot, the last 20 lines may just be a stack trace.
Show the last 200 lines for further context.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-03-18 13:00:07 -04:00
Ross Burton 15e3e0daf6 arm-bsp/scp-firmware: correctly set version in TC append
Set PV to 2.9.0+git instead of 2.9+git so the version comparisons are
reliable.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-03-18 09:49:34 -04:00
Emekcan Aras bc278abe27 arm-bsp/corstone1000: remove the need for meta-arm-image
This commit remove meta-arm-image from the yml file and adds
necessary image configuration to meta-arm-bsp/recipes-bsp/images.

Signed-off-by: Emekcan Aras <emekcan.aras@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-03-18 09:49:22 -04:00
Alejandro Enedino Hernandez Samaniego 3d0e5368d1 arm/optee: Upgrade from 3.14 to 3.16
- Removes upstreamed patches for optee-examples
- Fixes optee-examples installation
- Includes new python3-cryptography dependency
- Removes older cryptography backend dependencies
- Fixes python3-cryptography to work with openssl
- Keeps optee-client and optee-os v3.1.4 for corstone1000 compatibility

Tested on qemuarm64-secureboot via optee-examples and xtest -l 15

Signed-off-by: Alejandro Enedino Hernandez Samaniego <alhe@linux.microsoft.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-03-16 15:04:35 -04:00
Ross Burton 1b205211ea arm/trusted-firmware-m: remove python3-pyasn1-native DEPENDS
The use of pyasn1 was replaced with python3-cryptography in mcuboot
ebd050. This is part of mcuboot 1.3.1 onwards, and TF-M 1.5.0 uses
mcuboot 1.8.0.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-03-16 15:04:20 -04:00
Emekcan Aras 956f323a05 meta-arm/classes: Create wic_nopt class
Corstone500 and Corstone1000 use wic_nopt.bbclass. This commit creates
this class for Corstone500 and Corstone1000 in meta-arm classes to remove
the need for meta-arm-image repo.

Signed-off-by: Emekcan Aras emekcan.aras@arm.com
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-03-16 15:04:03 -04:00
Ross Burton 5b4d25133a arm/edk2-firmware: upgrade to 202202
Drop 0001-Fix-VLA-parameter-warning.patch, this is merged upstream.

Signed-off-by: Ross Burton <ross.burton@arm.com>
2022-03-11 13:11:42 -05:00
Peter Hoyes d08e90b316 arm-bsp/docs,kas: Add SSH server to fvp-baser-aemv8r64 image
To make it easier for users to test and evaluate the FVP, including
testing inbound network connections, enable the openssh SSH server by
default and map to port 8022 on the host.

Update fvp-baser-aemv8r64 documentation accordingly in new "Networking"
section.

Issue-Id: SCM-3881
Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
Change-Id: I88329731418e198e2ef5d3449bfb38fde5ae77bb
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-03-11 08:00:08 -05:00
Jon Mason 2d9f342d86 Revert "CI: use kas:latest, needed for the latest bitbake"
This reverts commit a2b945c75e.

Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-03-10 08:43:11 -05:00
Xueliang Zhong 3e6c53f182 arm-bsp/n1sdp: migrate to linux yocto kernel 5.15
This commit includes :
- Rebased and fixed N1SDP kernel 5.4 PCIe quirk patches to apply on 5.15
- Removed 5.10 kernel recipe for N1SDP
- Dropped RT kernel support, as it is no longer supported on N1SDP

Signed-off-by: Xueliang Zhong <xueliang.zhong@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-03-10 08:42:46 -05:00
Jon Mason 4148b31c2d arm/fvp-corstone1000: fix model location
FVP is located at Linux64_GCC-9.3, not Linux64_GCC-9.4

Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-03-08 14:05:44 -05:00
Peter Hoyes fbfd015578 arm-bsp/docs: Minor fvp-baser-aemv8r64 fixes
* Include `--upgrade` in pip3 command to ensure latest kas version is
   installed
 * Ensure all underscores are either quoted or escaped
 * Fix P9 example command

Issue-Id: SCM-3881
Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
Change-Id: Ie460dbd6b1f87f5f9ca2966329341d22da3606d3
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-03-08 07:00:13 -05:00
Rui Miguel Silva b40e705945 arm-bsp/corstone500: move to linux-yocto 5.15
Update linux yocto version in configure file for the
corstone500 platform from 5.4 to 5.15

Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-03-07 17:00:07 -05:00
Rui Miguel Silva 5c83fba36a arm-bsp/corstone500: move to u-boot 2022.01
Update patches and recipes to bump u-boot version used in
corstone500 from 2020.07 to 2022.01.

Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-03-07 17:00:07 -05:00
Harry Moulton 7348f9a760 corstone1000: update meta-arm-image for kirkstone support.
Update the sha for meta-arm-image in the corstone1000 kas file to
add support for kirkstone. Without this support corstone1000 does
not build.

Signed-off-by: Harry Moulton <harry.moulton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-03-07 13:51:58 -05:00
Harry Moulton f397564a05 arm/fvp-corstone1000: update to latest version
Update the URL and checksums for the new Corstone1000 FVP version 11.17.23.

Signed-off-by: Harry Moulton <harry.moulton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-03-07 13:51:39 -05:00
Peter Hoyes fec543da69 arm-bsp/docs: Set required Kas version to 3.0 for fvp-baser-aemv8r64
poky master has changed a variable name to BB_ENV_PASSTHROUGH_ADDITIONS.
Support for this has been added in Kas 3.0

Issue-Id: SCM-3881
Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
Change-Id: Ib42f79d144422272b2dd17fe0515da96909219eb
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-03-07 13:51:23 -05:00
Ross Burton 8b377a5c7d arm-bsp/linux-yocto: remove upstreamed corstone1000 patch
This patch is now merged upstream in 7285daac, 5.15.25 onwards.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-03-07 12:09:46 -05:00
Ross Burton b5a2d1204d Revert "CI: apply in-flight patches to fix lopper and python-dtc"
This reverts commit 628719c5a5.
2022-03-07 13:29:14 +00:00
Ross Burton 478bc14e59 Revert "CI: fix python3-dtc installation"
This is now fixed in meta-virtualization master.

This reverts commit fd34e9bb75.

Signed-off-by: Ross Burton <ross.burton@arm.com>
2022-03-07 12:43:45 +00:00
Ross Burton 643cf58a69 arm-bsp/linux-yocto: fix patch status for the CS1K patch
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-03-03 12:15:18 -05:00
Steve Capper 84a8f97704 arm-bsp/firmware-image-juno: update offset addresses for NOR flash images
This is to allow a larger kernel image size.

Suggested-by: Deepak Pandey <deepak.pandey@arm.com>
Signed-off-by: Steve Capper <steve.capper@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-03-03 11:09:46 -05:00
Peter Hoyes dcf114723e arm/fvp-base-r-aem: Update to version 11.17.21
Also update version and download link in meta-arm-bsp fvp-baser-aemv8r64
documentation

Issue-Id: SCM-3871
Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
Change-Id: I92ec616d25703ff74ed063918a1e4811bac9ff3f
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-03-03 11:08:08 -05:00
Peter Hoyes 1bc6bf2750 arm-bsp/docs: Improve fvp-baser-aemv864 limitation
Add more details about the cache_state_modelled limitation, which can
be worked around by setting cci400.force_on_from_start=1

Issue-Id: SCM-3871
Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
Change-Id: Idde23278a87316dae842c6c3793b9836482e8c3a
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-03-03 11:08:08 -05:00
Ross Burton ce5e683f01 arm/generic-arm64: use latest linux-yocto
We were pinning generic-arm64 to 5.10 because 5.14 was hanging during
boot in qemu, but this appears to have been fixed in 5.15.

Unpin the kernel to use 5.15, and drop the defconfig patch which has
been upstreamed.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-03-02 21:39:10 -05:00
Ross Burton b9fefa2482 arm/fvp: check that FVP binaries are present
If any of the path computation goes wrong (for example, the compiler
changed so FVP_ARCH needs updating) for the real FVP binaries then
bindir contains broken link called FVP_*.

Solve this by checking that the directory contains FVP binaries and
error out if not.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-03-02 21:39:10 -05:00
Ross Burton fd34e9bb75 CI: fix python3-dtc installation
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-03-01 09:30:27 -05:00
Ross Burton 50d820d037 Revert "CI: apply in-flight patches to fix python3-cryptography"
The patches were merged in meta-oe d605093bc.

This reverts commit d97f9d322e.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-03-01 09:30:27 -05:00
Emekcan Aras 24db3b56ba arm-bsp/trusted-firmware-a: corstone1000: update Tfa SHA
This commit updates Tfa SHA to remove the patches from the
recipe since all of them are upstreamed now.

Signed-off-by: Emekcan Aras emekcan.aras@arm.com
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-03-01 09:30:27 -05:00
Emekcan Aras 81193d97ad arm-bsp/linux-yocto: upgrade corstone1000 to 5.15
Update linux-yocto to the latest version for cs1k.
There is a bug in the kernel version 5.15. Following
patch is applied to fix this issue and will be
upstreamed soon (https://lkml.org/lkml/2022/2/18/475).

Signed-off-by: Emekcan Aras emekcan.aras@arm.com
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-03-01 09:30:27 -05:00
Khem Raj 3fbb255aa7 androidclang: Skip useless-rpaths check
This is a prebuilt stuff, better to ignore its guts.

Fixes
androidclang: /usr/share/clang-r416183b/python3/lib/python3.9/lib-dynload/_posixsubprocess.cpython-39-x86_64-linux-gnu.so contains probably-redundant RPATH /../lib [useless-rpaths]

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-03-01 09:30:27 -05:00
Ross Burton 628719c5a5 CI: apply in-flight patches to fix lopper and python-dtc
Signed-off-by: Ross Burton <ross.burton@arm.com>
2022-02-28 14:33:01 +00:00
Ross Burton d97f9d322e CI: apply in-flight patches to fix python3-cryptography
Signed-off-by: Ross Burton <ross.burton@arm.com>
2022-02-28 14:26:38 +00:00
Jon Mason 50fd2d469a Revert "CI: apply a patch so that meta-zephyr is compatible with kirkstone"
This reverts commit 7dd00e4d71.
2022-02-28 09:25:32 -05:00
Ross Burton 41dfded19b Revert "CI: temporarily pin meta-oe to pre-python-wheel removal until oe-core catches up"
python3-wheel is now in oe-core, so we need to use the meta-oe without
python3-wheel.

This reverts commit 5e59ebf2d3.

Signed-off-by: Ross Burton <ross.burton@arm.com>
2022-02-25 16:41:44 +00:00
Peter Hoyes 94682c6d1d arm-bsp/docs: Minor fvp-baser-aemv8r64 updates
* Add clarification on how to mount p9 device
 * Remove instruction to use ctrl + c to stop FVP
 * Add cache_state_modelled to Known Issues

Issue-Id: SCM-3871
Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
Change-Id: I122c5ae5b3ceee1d106205d93a006f75bdbfa2bf
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-02-25 00:05:00 -05:00
Arunachalam Ganapathy 185746b66a arm-bsp/scp-firmware: add patches related to MPMM for TC0
This commits updates the SHA of SCP-firmware and include required
patches to build SCP firmware with experimental features
MPMM/POWER/PERFORMANCE for TC0 platform.

Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
Change-Id: I263b484a467636154b70805f920bb53c6fe2026c
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-02-25 00:05:00 -05:00
Arunachalam Ganapathy 3c16dbc0c6 arm-bsp/linux-yocto: enable autofdo config only for TC1
Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
Change-Id: I75219f174f2fd0a9fa67007a4bc45acecc324390
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-02-25 00:05:00 -05:00
Ross Burton 5e59ebf2d3 CI: temporarily pin meta-oe to pre-python-wheel removal until oe-core catches up
Signed-off-by: Ross Burton <ross.burton@arm.com>
2022-02-24 19:35:39 +00:00
Ross Burton 7259c12a55 CI: run utility jobs last
Run check-layer and coverage jobs after the building tasks, as we want
to start compiling sooner and not wait for check-layer to finish before
compiling.

Signed-off-by: Ross Burton <ross.burton@arm.com>
2022-02-24 17:16:16 +00:00
Ross Burton a2b945c75e CI: use kas:latest, needed for the latest bitbake
As BitBake has renamed BB_ENV_EXTRAWHITE to BB_ENV_PASSTHROUGH_ADDITIONS
the SSTATE_DIR and DL_DIR variables don't get passed from the
environment to bitake anymore.

This is fixed in Kas's git repo, so use :latest until a release is made.

Signed-off-by: Ross Burton <ross.burton@arm.com>
2022-02-24 17:15:44 +00:00
Ross Burton 9d17e4e305 arm/scp-firmware: disable clang builds
We only build with our binary GCC right now, so disable clang from
trying to get involved. This solves the missing strip problem where
do_populate_sysroot wants to use llvm-strip but it hasn't been added
to the sysroot.

Signed-off-by: Ross Burton <ross.burton@arm.com>
2022-02-23 19:34:14 +00:00
Ross Burton 7dd00e4d71 CI: apply a patch so that meta-zephyr is compatible with kirkstone
Signed-off-by: Ross Burton <ross.burton@arm.com>
2022-02-23 13:44:55 +00:00
Ross Burton 19b7bdba9b arm/edk2-firmware: unbreak builds with latest Clang
The latest Clang produced unaligned access warnings, which EDK2 promotes
to errors with -Werror.

  edk2/MdeModulePkg/Include/Guid/ExtendedFirmwarePerformance.h:78:47:
  error: field Guid within 'FPDT_GUID_EVENT_RECORD' is less aligned than 'EFI_GUID'
  and is usually due to 'FPDT_GUID_EVENT_RECORD' being packed, which can lead to
  unaligned accesses [-Werror,-Wunaligned-access]

This has been reported upstream so for now ignore this warning.

Signed-off-by: Ross Burton <ross.burton@arm.com>
2022-02-23 13:39:31 +00:00
Ross Burton 63e06127c0 arm/edk2-firmware: expand comment
We currently disable release builds with Clang, but it appears the
underlying issue has been fixed upstream so make a note that we should
be able to turn release builds back on with EDK2 202202.

Signed-off-by: Ross Burton <ross.burton@arm.com>
2022-02-23 13:39:29 +00:00
Ross Burton 74bd32b2e6 arm-toolchain/external-arm-toolchain: fix missing license updates
Commit 53a40b1 updates the license names to use the SPDX terms, but as
intermediate variables are used in this recipe a few instances were
missed.

Signed-off-by: Ross Burton <ross.burton@arm.com>
2022-02-23 13:39:22 +00:00
Martin Jansa 53a40b1518 meta: update license names
* openembedded-core/scripts/contrib/convert-spdx-licenses.py .
  ...
  All files processed with version 0.01

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Ross Burton <ross.burton@arm.com>
2022-02-22 14:05:46 +00:00
Khem Raj 1ad0aa794d layers: Bump to use kirkstone
its not going to be backward ABI compatible with honister due to variable renaming.

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2022-02-22 12:34:31 +00:00
Ross Burton 479aaa7bfb Update for LICENSE_FLAGS_WHITELIST rename to _ACCEPTED.
LICENSE_FLAGS_WHITELIST has been renamed to LICENSE_FLAGS_ACCEPTED in
oe-core master.

Signed-off-by: Ross Burton <ross.burton@arm.com>
2022-02-22 12:34:31 +00:00
Khem Raj 5119b4ad63 meta-arm-toolchain: Use renamed SKIP_RECIPE var flags
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2022-02-22 12:33:04 +00:00
Khem Raj 37674007ba meta-arm-toolchain: Use renamed BB_BASEHASH_IGNORE_VARS variable
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2022-02-22 12:33:04 +00:00
Emekcan Aras aa18c61018 arm-bsp/security: move TS patches to corstone1000 directory
This commit moves all the trusted-services patches to a new
corstone1000 directory.

Signed-off-by: Vishnu Banavath <vishnu.banavath@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-02-20 09:00:09 -05:00
Jon Mason 962173714f ci: remove psa-arch-tests from corstone1000-common.yml
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-02-18 08:10:11 -05:00
Emekcan Aras d408160e09 kas/corstone1000-base: update meta-arm-image SHA
This commit updates the meta-arm-image SHA to drop psa-arch-test
from the build.

Signed-off-by: Emekcan Aras <emekcan.aras@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-02-17 18:14:45 -05:00
Vishnu Banavath 700eed92e3 arm-bsp/security: trusted-services to fix psa-arch-tests
These changes are to fix failures in psa-arch-tests

Signed-off-by: Vishnu Banavath <vishnu.banavath@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-02-17 18:14:45 -05:00
Vishnu Banavath 31c3f35ccd arm-bsp/security: drop psa-arch-tests recipe
This change is to build and install psa-arch-tests using
trusted-services code and drop psa-arch-tests recipe.

Signed-off-by: Vishnu Banavath <vishnu.banavath@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-02-17 18:14:45 -05:00
Vishnu Banavath 6b262f63d3 arm-bsp/tf-m: update git SHA
This change is to update TF-M git SHA to fix
psa-arch-tests test case failures.

Signed-off-by: Vishnu Banavath <vishnu.banavath@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-02-17 18:14:26 -05:00
Vishnu Banavath 3f9a466c99 arm-bsp/security: replace mbedcrypto with mbedtls
This commit replaces mbedcrpyto with mbedtls on the trusted-service
recipe.

Signed-off-by: Vishnu Banavath <vishnu.banavath@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-02-17 18:14:26 -05:00
Peter Hoyes 692ca08b1d arm-bsp/docs: Update fvp-baser-aemv8r64 docs
Document U-Boot addition, add new architecture section and update the
change log.

Issue-Id: SCM-3871
Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
Change-Id: Ie0e1ff35ade634f2b523c14bb058c9d775802632
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-02-17 16:11:46 -05:00
Peter Hoyes 0519fdf444 arm-bsp/conf: Use real-time clock for fvp-baser-aemv8r64
Enable the bp.refcounter.use_real_time option, so that the CNTPCT_EL0
increments in real-time instead of simulator time.

Issue-Id: SCM-3871
Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
Change-Id: I197d6de4a7316e5299aee34e64e149cbd3d515a9
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-02-17 16:11:46 -05:00
Peter Hoyes d58df6ec52 arm-bsp/kernel: Use 4 Gb of RAM in fvp-baser-aemv8r64
The FVP default configuration has bp.dram_size=4, which is sufficient
for development and testing purposes, so remove the FVP_CONFIG
override and set to 4 Gb in the device tree.

Issue-Id: SCM-3871
Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
Change-Id: I4a96062c9e94d36f5459f33c86aab4d4885bab43
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-02-17 16:11:46 -05:00
Peter Hoyes 9359bc9163 arm-bsp/u-boot: Add U-Boot for fvp-baser-aemv8r64
This patch introduces U-Boot into the fvp-baser-aemv8r64 boot flow,
providing EFI services.

The fvp-baser-aemv8r64 does not have an EL3, so the system starts at
S-EL2. For now, U-Boot is running at S-EL2, alongside boot-wrapper.
Enable the --enable-keep-el option in boot-wrapper-aarch64 so that it
boots the next stage (U-Boot) at S-EL2. Additionally, tell
boot-wrapper-aarch64 to bundle U-Boot instead of the kernel.

Linux only supports booting from S-EL1 on the fvp-baser-aemv8r64, so
U-Boot is configured with CONFIG_SWITCH_TO_EL1, so that booti or bootefi
switch to S-EL1 before booting the EFI payload (unless an enviornment
variable - armv8_switch_to_el1 - is set to 'n').

Add patches to U-Boot, which:
 * Add board support for the fvp-baser-aemv8r64 (with a memory map
   which is inverted from the fvp-base).
 * Enable the configuration of U-Boot using the device tree passed from
   boot-wrapper-aarch64.
 * Enable virtio-net.
 * Disable setting the exception vectors at S-EL2 so that the PSCI
   vectors pass through to Linux.
 * Set up system registers at S-EL2 for Linux.
 * Configure the S-EL2 MPU for the EFI services.
 * Allows bootefi to switch to EL1 before booting Linux.

Issue-Id: SCM-3871
Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
Change-Id: I229d14b0717df412c1fe33772230ca779f79b32d
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-02-17 16:11:46 -05:00
Peter Hoyes 14db960041 arm-bsp/boot-wrapper-aarch64: Update patches for fvp-baser-aemv8r64
Update the machine-specific patches, which makes the following changes:
 * Add PSCI services to /memreserve/ in the device tree using libfdt.
 * Add --enable-keep-el option, which allows boot-wrapper-aarch64 to
   boot the next stage at the same exception level.
 * Update the counter frequency to 100 MHz.

Issue-Id: SCM-3871
Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
Change-Id: I41843e958cf629d69de644bb57b660fb542fc8b7
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-02-17 16:11:46 -05:00
Peter Hoyes 855e6924b3 arm/boot-wrapper-aarch64: Upgrade to newer revision
Upgrade boot-wrapper-aarch64 to 1044c77062573985f7c994c3b6cef5695f57e955

Hold back gem5 at 8d5a765251d9113c3c0f9fa14de42a9e7486fe8a in bbappend.

Issue-Id: SCM-3871
Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
Change-Id: Ia5ccca2234dd117d530970f9f90469dacbb778e3
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-02-17 16:11:46 -05:00
Ross Burton 31446384e6 atp/linux-yocto: use wildcards in the bbappend
Don't hard-code 5.4, use wildcards instead.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-02-11 08:40:57 -05:00
Ross Burton e5334bfabf gem5/linux-yocto: use wildcards in the bbappend
Don't hard-code 5.4, use wildcards instead.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-02-11 08:40:57 -05:00
Ross Burton 6c410376df gem5/gem-aarch64-native: remove duplicate --command-line
The contents of GEM5_RUN_CMDLINE is passed via --command-line, so there
is no need to include --command-line in it.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-02-11 08:40:57 -05:00
Ross Burton bade8df2d8 CI: add meta-gem5 to the pending upgrades report
The gem5-arm64 machine was missing.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-02-11 08:40:57 -05:00
Ross Burton 4ccc5638b5 CI: consolidate target in meta-zephyr.yml
Set a default target in meta-zephyr.yml to avoid duplication now that
most configurations build zephyr-kernel-test-all.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-02-11 08:40:39 -05:00
Ross Burton 3599efc467 arm-bsp/linux-yocto: remove unused 5.3 kernel
corstone500 was the only user of this and now uses 5.4, so this can be
removed.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-02-11 08:38:37 -05:00
Ross Burton ac56d5cecb arm-bsp/corstone500: move to linux-yocto 5.4
Upgrade from 5.3.18 to to 5.4, a maintained stable release.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-02-11 08:38:37 -05:00
Ross Burton 1963fb0c45 arm-bsp/linux-yocto: upgrade 5.4 to 5.4.178
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-02-11 08:38:37 -05:00
Ross Burton 59db2ebad7 arm/secure-partitions: allow network operations during do_configure
trusted-services and psa-arch-tests both use FetchContent to download
more source during configure, and they can't easily be seeded with the
correct sources in advance (unlike TF-M).

Until this is fixed upstream, allow network use during do_configure.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-02-11 06:00:16 -05:00
Ross Burton 77fac4cf2a arm-bsp/trusted-firmware-m: add OpenAMP to the CS1K build
TF-M for corstone1000 uses libmetal and open-amp, downloaded during
configure by FetchContent.  This is bad form, so add these sources and
license statements to the recipe so the fetch doesn't need to happen.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-02-11 06:00:16 -05:00
Ross Burton c6b347d3e6 arm/trusted-firmware-m: stop FetchContent from fetching
TF-M uses FetchContent to download further sources at configure time, but
this is bad form as the sources and licenses are not tracked or archived.

This should now be blocked by the network isolation but as this doesn't
work in some environments (such as Docker containers) we can tell cmake
to never fetch to be sure that all of the sources used are declared in
SRC_URI.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-02-11 06:00:16 -05:00
Ross Burton 94a08c23b0 CI: improve coverage of corstone1000
Consolidate the CS1K kas files into a common file, and respect the
platform policy by setting the DISTRO to poky-tiny. Also add the
CS1K-specific recipes psa-arch-tests and ffa-debugfs-mod to the build.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-02-11 06:00:16 -05:00
Ross Burton f868b51fd3 CI: build perf via CORE_IMAGE_EXTRA_INSTALL
Instead of adding perf to the target: list, add it to
CORE_IMAGE_EXTRA_INSTALL. This means that machine configurations which
need to change the target don't need to also build perf explicitly.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-02-11 06:00:16 -05:00
Ross Burton fa7aafb679 arm-bsp/linux-yocto: remove unused 5.7 kernel
It was used by SGI575, but it is now tracking the latest
release in oe-core.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-02-09 16:43:20 -05:00
Ross Burton 11b4fd20a0 arm-bsp/firmware-image-juno: remove default dependencies
This recipe simply repacks existing artefacts, so there's no need to
depend on the toolchain.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-02-09 12:48:53 -05:00
Ross Burton 0d0bafe7f3 arm-bsp/juno: move to linux-yocto 5.15
The default kernel is now 5.15, so remove the preferred version
assignment.

The mailbox patches went upstream in a different form, so we can drop
the patches and drop in a customised Devicetree file required to use the
new drivers.

In the future we can possibly drop the devicetree patch if it is provided
by firmware, but for now this is known to work.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-02-09 12:48:53 -05:00
Ross Burton ebef5db57c arm-bsp/sgi575: use the default linux-yocto version
Instead of pinning the kernel to 5.7, use the latest default version.
There are no patches, so this shouldn't be a problem.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-02-09 12:48:53 -05:00
Ross Burton c9e1f1fe25 arm-bsp/linux-yocto: drop redundant KMACHINE assignments
KMACHINE defaults to MACHINE, so remove the redundant assignments.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-02-09 12:48:53 -05:00
Ross Burton 7fc51c7c08 arm-bsp/linux-yocto: remove redundant kernel hacking
The CS1K kernel used overrides to empty the kernel-image package, so
the initramfs didn't contain a kernel image.

The initramfs contained a kernel via a bad dependency in ffa-debugfs-mod,
but now that has been worked around we can remove the CS1K workaround.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-02-09 12:48:49 -05:00
Ross Burton a82df9187d arm/ffa-debugfs-mod: remove kernel image runtime dependency
CS1K wants to put the ffa-debugfs kernel module into the initramfs, but
this pulls in the kernel image too because kernel modules depend on the
kernel image (via kernel-module-split.bbclass).  Arguably this should be
controllable somehow, as it's not mandatory to have an image on the same
file system as the modules: initramfs or separate /boot partitions being
notable cases.

Until this is resolved upstream[1] we can work around it by removing the
RDEPENDS on the kernel from the kernel module.  As the package is
generated during do_package this can't be a simple RDEPENDS:remove, but
has to be another package split function which runs after the module
splitting function.

[1] https://lore.kernel.org/openembedded-core/20220209173036.3823144-1-ross.burton@arm.com/T/#t

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-02-09 12:48:49 -05:00
Ross Burton fee71931f4 arm/ffa-debugfs-mod: remove redundant RPROVIDES
There's no need for ffa-debugfs-mod to RPROVIDE
kernel-module-arm-ffa-user, as this is provided by a sub-package of this
recipe already.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-02-09 12:48:49 -05:00
Anders Dellien b0913dc09b arm-bsp/trusted-firmware-a: Update SHA for TC
Move TC to an intermediate SHA based on 2.6. This SHA includes
patches for:
* Support for 8GB DRAM
* Support for GPU
* Removal of kernel command-line (not needed, kept in U-Boot)

Also removed patch that fixes build problems as the problem has
been solved in the updated SHA.

Signed-off-by: Anders Dellien <anders.dellien@arm.com>
Change-Id: Ic8c4ef35e8e7ed25711ff0813abab6b6c8564ef3
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-02-09 09:26:38 -05:00
Jon Mason e09839481a CI: update zephyr based testing
Update the zephyr testcases to be the ones that build and pass tests
(where testing possible).  Also, add comment to qemu-cortex-a53 about
not passing tests.

Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-02-09 00:00:13 -05:00
Jon Mason ee083b940b arm-bsp: space clean-up
Add a space between "Submitted" and URL

Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-02-09 00:00:10 -05:00
Ross Burton 52bb585fa5 arm-bsp/u-boot: remove unused 2020.10 recipe
This was last used by TC0, but that upgraded in 6bf368c.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-02-08 23:10:42 -05:00
Ben Horgan 4de50f4c87 arm-bsp/optee-test: tc: Limit xtest to a single thread
When multiple threads are allowed xtest will fail and
leave the system in a bad state after repeated runs.

Signed-off-by: Ben Horgan <ben.horgan@arm.com>
Change-Id: I16f07df1a362540560975deaa5a291a68c332bfb
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-02-03 12:00:10 -05:00
Davidson K 37ee3eecc5 arm-bsp/tc: enable tracing in Total Compute
Enable coresight components in the config and also port the patches
which were upstreamed in later version of the linux kernel.

Change-Id: I27983abd5f2945328f7465cc1b2af4f8e848b69b
Signed-off-by: Davidson K <davidson.kumaresan@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-02-03 11:00:08 -05:00
Ross Burton dc24699136 CI: use the latest release of the Kas container
If we don't specify a tag name GitLab uses the 'latest' tag, which for
Kas is moved whenever an image build is made.

Instead explicitly use the latest-release tag, which is only updated
when a release is made.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-01-28 19:04:59 -05:00
Ross Burton 8a42328437 Revert "meta-arm: add old version of python3-cryptography"
This reverts commit a15c16068a.

Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-01-27 12:00:08 -05:00
Ross Burton 778236335a Revert "meta-arm-bsp: use old python3-crytography on platforms using TF-M"
This reverts commit 2a27bd4f47.

Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-01-27 12:00:08 -05:00
Ross Burton 1ee7937472 arm/trusted-firmware-m: set OpenSSL provider path
imgtool from mcuboot uses python3-cryptography-native, and the latest
python3-cryptography explicitly loads the legacy provider, which is a
separate shared object in OpenSSL 3.  The search path for providers is
hard-coded into the library so the wrong path is searched and the module
is not found.

Set OPENSSL_MODULES so the right path, so that the legacy module is
found.  In the future we may be able to be removed this if the explict
use of legacy algorithms is removed
(https://github.com/pyca/cryptography/issues/6809).

This also means we can remove the downgrades of python3-crytography that
were being carried in meta-arm.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-01-27 12:00:08 -05:00
Ross Burton 828ad702ac CI: enable memory-resident bitbake
Enable memory-resident bitbake by setting the server timeout to 60s.

For most builds this doesn't have an impact as bitbake is ran once, but
this reduces the time for the pending-upgrades report from 10 minutes to
3 minutes, as it doesn't need to constantly restart bitbake.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-01-27 08:43:37 -05: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 d2c5a5d289 CI: fix check-layer indeterminism
yocto-check-layers is very greedy when searching for layers, and will
find the test layers in Bitbake if given the chance, for example:

bitbake/lib/layerindexlib/tests/testdata/layer4

This layer has the collection name openembedded-layer and is only
compatible with Sumo.  The selection of layer from collection name is
not deterministic, so it's possible that this layer is selected which
then fails the check as it isn't compatible.

Solve this by restricting the dependency layers in meta-arm to just
meta-arm/meta-*, so it doesn't recurse into meta-arm/work/poky/bitbake.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-01-24 13:00:06 -05:00
Ross Burton 710cf290b5 CI: update for meta-zephyr changes
As of meta-zephyr dde88ba the layer is structured different, split into
meta-zephyr-core and meta-zephyr-bsp.

As we define our own machines for use with Zephyr, we can just use
meta-zephyr-core.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-01-24 13:00:06 -05:00
Ross Burton ed737688f2 arm/psa-arch-tests: set PV correctly
Don't use SRCREV in the PV, but use SRCPV as this truncates the SHA.

Also bump to 1.2+git, as the psa-arch-tests project does tag releases.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-01-24 12:00:31 -05:00
Ross Burton 1fbdea98ce arm-bsp/optee-os: use SRCPV in the corstone1000 overrides
corstone1000 currently has a git snapshot of optee-os, so that the
version number is managable use SRCPV instead of SRCREV.

Also fix whitespace in SRC_URI.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-01-24 12:00:31 -05:00
Ross Burton 82d91ee3ac arm-bsp/trusted-firmware-m: use SRCPV in the corstone1000 overrides
corstone1000 currently has a git snapshot of TF-M, so that the version
number is managable use SRCPV instead of SRCREV.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-01-24 12:00:31 -05:00
Ross Burton 8411792668 arm/trusted-firmware-m: use relative paths for SRC_URI destsuffix
It's not recommended to use ${S} in SRC_URI as S contains references
to the version which results in a circular list of variable lookups.

destsuffix is relative to WORKDIR and defaults to git/, so use relative
paths with the same result.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-01-24 12:00:31 -05:00
Ross Burton 558af689d5 arm-toolchain/gcc-arm-none-eabi: remove old 2020-q2 recipe
This was only used by Corstone 700, so is redundant now.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-01-24 12:00:08 -05:00
Ross Burton 3a8c1fd59a arm-bsp/linux-yocto: remove old 5.6 recipe
This was only used by Corstone 700, so is redundant now.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-01-24 12:00:08 -05:00
Ross Burton 1d34798b5c arm-bsp/u-boot: remove old 2020.04 recipe
This was only used by Corstone 700, so is redundant now.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-01-24 12:00:08 -05:00
Ross Burton 92490b7fc5 arm-bsp: remove Corstone 700
Corstone 700 is end-of-life, so remove it from meta-arm master.

It will remain in the stable branches for existing users, but new users
are encouraged to use Corstone 1000 instead.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-01-24 12:00:08 -05: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 edf050394e arm/oeqa/fvp: fix scoping issues with the bootlog
If wait_for_login() times out then it raises an exception instead of
passing back return values, so the bootlog is never assigned.

We always want a boot log, so initialise it outside of wait_for_login and
pass it in.

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
Arunachalam Ganapathy 5377fb7e09 arm/u-boot: add patch to support higher DRAM on TC
Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
Change-Id: Ifbf9e73a0e1134d1a0ecce036c9ba53fe7d5b1bf
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-01-21 07:00:07 -05:00
Arunachalam Ganapathy 88334e1664 arm-bsp: Set preferred u-boot version to 2021.10 for TC
Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
Change-Id: I1c814cdbcff158f70910cafb4cbd0656271acaef
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-01-21 07:00:07 -05:00
Arunachalam Ganapathy 2201fa268d arm-bsp/optee: add patch to support higher DRAM on TC
Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
Change-Id: I54831317126b27e8635d941dce321df8471301f1
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-01-21 07:00:07 -05:00
Ross Burton 0c0b88bc56 arm-bsp/secure-partitions: add missing Signed-off-by tags to patches
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-01-20 15:00:06 -05:00
Ross Burton 92ad824b70 arm-bsp/optee-os: clean up TC patches
Instead of patching a file we patched, integrate the changes directly
into the first patch.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-01-20 15:00:06 -05:00
Jon Mason 8601ba85f7 Revert "ci: ignore distutil warnings"
This reverts commit 63cb70be72.

Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-01-20 11:41:44 -05:00
Jon Mason 2766987583 ci: use matrix for yocto-check-layer
The check-layers task takes longer than any of the individual tests
running.  Split this up to take advantage of parallelism and speed up
the overall runs.

Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-01-20 11:40:28 -05:00
Ross Burton 2a27bd4f47 meta-arm-bsp: use old python3-crytography on platforms using TF-M
As the latest python3-crytography breaks TF-M builds, downgrade those
machines using TF-M (musca and corstone) to python3-crytography-native
3.3.2 temporarily.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-01-20 11:35:57 -05:00
Ross Burton a15c16068a meta-arm: add old version of python3-cryptography
meta-python has upgraded to python3-cryptography 36, which has a problem
when used in native recipes:

  cryptography.exceptions.InternalError: Unknown OpenSSL error

This causes all builds of TF-M to fail.

Until this error is fixed, add the old version of python3-cryptography.
A BBMASK is set so that it has to be explicitly opted-in, as it DEPENDS
on recipes from meta-python which isn't a hard dependency for meta-arm.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-01-20 11:35:57 -05:00
Ross Burton aaac054165 CI: update for changes to machine-summary
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 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
Arunachalam Ganapathy 763764dd2a arm-bsp/hafnium: extend stage-1 mapping limit on TC
Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
Change-Id: Ia6fb2cfd7812a63a003dc3ffbc84fb8d410d02c3
2022-01-19 14:00:10 -05:00
Davidson K 8734d14674 arm-bsp: tc: use proper UUID in optee and linux kernel
Recently the way of handling Secure Partitions UUID changed in TF-A
and that needs corresponding changes in required components.  Hence
changing them for optee and linux kernel.

Signed-off-by: Davidson K <davidson.kumaresan@arm.com>
2022-01-19 10:00:11 -05:00
Vishnu Banavath 522350ba73 arm-bsp/psa-arch-tests: change master to main for psa-arch-tests repo
master branch is renamed to main on psa-arch-tests github

Signed-off-by: Vishnu Banavath <vishnu.banavath@arm.com>
Change-Id: I6bd49c68aa1a2358c976a3eb0adc5b2a9c5edb94
2022-01-18 13:29:32 -05:00
Jon Mason 74caf3d057 arm-bsp: create u-boot 2020.10 to resolve warning
Poky, etc master branches updated the u-boot recipes to use 2022.01,
causing bbappends for 2021.10 to no longer function.  Create a temporary
recipe for 2021.10 until all the BSPs can update to support the latest
version.

Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-01-18 13:00:12 -05:00
Anders Dellien daa8388dad arm: update Android common kernel and config
Move to newer tag of ACK as well as update to the latest gki_defconfig
using fragments to support TC.

Signed-off-by: Anders Dellien <anders.dellien@arm.com>
Change-Id: I71fe31730ce063e9604b8adc879e0a626b3320e7
2022-01-18 13:00:12 -05:00
Anders Dellien db56f59865 arm-toolchain: Support linux-arm64-ack build with Android Clang
This commit introduces a configuration variable, LINUX_ACK_TOOLCHAIN_CLANG,
that (if set) switches the kernel build to use the Android Clang compiler

Change-Id: Iab362916159bf6e8096061f1b7281a7513001d61
2022-01-18 13:00:12 -05:00
Usama Arif c4fb4f53cb arm-toolchain: Fetch prebuilt Android Clang, version r416183b
This Clang version is present in Android master
(as of October 8, 2021)

Signed-off-by: Usama Arif <usama.arif@arm.com>
Signed-off-by: Anders Dellien <anders.dellien@arm.com>
Change-Id: I957742ee943ef68119fd7c7e2bd8ee62b717b31c
2022-01-18 13:00:12 -05:00
Vishnu Banavath c1f1a040e7 arm-bsp/uboot: fix null pointer exception for get_image_info
This change is to fix NULL pointer exception for get_image_info
API for corstone1000 platform

Signed-off-by: Vishnu Banavath <vishnu.banavath@arm.com>
2022-01-17 15:59:43 -05:00
Vishnu Banavath edde4cbf68 arm-bsp/tf-m: fix capsule instability issue for corstone1000
This change is to upgrade TF-M to latest git hash which contains
fix for capsule instability issue for corstone1000 platform.

Latest TF-M would also require v3.1 mbedtls. Also updated git hash
for mbedtls repo.
2022-01-17 15:59:43 -05:00
Diego Sueiro a70e04d9f8 meta-arm: Make generic-arm64 kernel cfg based on linux-yocto standard kernel type
By having the generic-arm64 machine using the same kernel config as the
linux-yocto standard kernel type, application layers can rely on the same base
configuration, independently of the target machine.

Also, the kernel-yocto.bbclass searches for .scc files in the FILESEXTRAPATHS.
Hence, we don't need to list generic-arm64-standard.scc in the SRC_URI.

Issue-Id: SCM-3910
Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
Change-Id: I46889ce38b32521d8350534cc590b57b158ad573
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-01-17 10:12:00 -05:00
Ryan Fairfax 940b9afdde arm/optee-os: Fix build race condition when building fTPM
Change ftpm to install embeddable (stripped) version to sysroot.  When
building optee-os pick up from sysroot instead of DEPLOY_DIR_IMAGE.
This fixes a build race condition where DEPENDS was only waiting for
optee-ftpm:do_populate_sysroot instead of do_deploy.

Signed-off-by: Ryan Fairfax <rfairfax@microsoft.com>
2022-01-17 10:12:00 -05:00
Jon Mason 63cb70be72 ci: ignore distutil warnings
distutil warnings are causing CI to fail.  This is caused by changes
outside of meta-arm, and are not relevant for anything present in
meta-arm.  Temporarily ignore these until they can be handled upstream.

Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-01-17 11:56:47 +00:00
Peter Hoyes 3d38ee3e11 arm-bsp/fvp-baser-aemv8r64: Fix PL011 and SP805 register sizes
The Linux kernel expects the peripheral ID register to be just below the
end of the address range, which for the PL011 and SP805 is at 0xFE0 not
0xFFE0, so set the size to 0x1000.

Issue-Id: SCM-3881
Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
Change-Id: Iada28e8192d72b1647822c33d13deffe507043b5
2022-01-14 14:46:04 -05:00
Ben Horgan 447b7059c9 arm-bsp/optee-os: total-compute: Exchange patches to fix managed-exit
Signed-off-by: Ben Horgan <ben.horgan@arm.com>
Change-Id: I1e47c7b87450258840c68e045194e07e66b35478
2022-01-14 14:46:04 -05:00
Jon Mason 30e50575f8 arm-bsp/fvp-baser-aemv8r64: Update to the 5.15 kernel
The Linux 5.14 kernel has been removed.  Update to the latest kernel.

Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-01-14 10:00:09 -05:00
Ross Burton a834653374 arm/opencsd: upgrade to 1.2.0
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-01-11 14:03:08 -05:00
Ross Burton 44ea1e59a2 arm-bsp/juno: also build EDK2 firmware
So that all possible combinations are built, add edk2-firmware to the
default image dependencies too.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-01-11 14:02:53 -05:00
Ross Burton 24ef21c36b arm-bsp/edk2-firmware: enable building EDK2 for Juno
This doesn't build successfully with Clang, so for now the build forces
the use of GCC.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-01-11 14:02:53 -05:00
Ross Burton 0b1f4967b7 arm/edk2-firmware: explicitly set level of parallelisation
Explicitly set the level of parallelisation instead of letting build.sh
determine it.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-01-11 14:02:53 -05:00
Ross Burton 0d2a9f6640 arm/trusted-firmware-a: remove TF-A 2.5
Nothing is using TF-A 2.5 anymore, so remove the recipe.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-01-11 14:02:29 -05:00
Ben Horgan 48c1342f9a arm-bsp/optee-os-tadevkit: total-compute: Add optee-os-tadevkit
The optee-os recipe was recently split into optee-os and
optee-os-tadevkit.

Signed-off-by: Ben Horgan <ben.horgan@arm.com>
Change-Id: Id9794b7c4a7e2f3fac4286498fa44c35fd8aaa0b
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-01-09 13:26:42 -05:00
Ross Burton 22b453f785 arm-toolchain: remove armcompiler-specific licenses
The Armcompiler-* licenses are specific to a single release of the
Arm Compiler, so remove them from the layer and use NO_GENERIC_LICENSE
to extract them from the source directly.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-01-06 08:59:22 -05:00
Ross Burton 07c7d2f948 arm-toolchain/armcompiler: upgrade to 6.17
Upgrade to the latest release, now based on Clang 14.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-01-06 08:59:22 -05:00
Vishnu Banavath 82909f95d8 arm-bsp/uboot: send bootcomplete event to secure enclave
On corstone1000 platform, Secure Enclave will be expecting
an event from uboot when it performs capsule update. Previously,
an event is sent at exitbootservice level. This will create a problem
when user wants to interrupt at UEFI shell, hence, it is required
to send an uboot efi initialized event at efi sub-system initialization
stage.

Change-Id: I7d16e184675d537d790365e1b03a414ac802694a
Signed-off-by: Vishnu Banavath <vishnu.banavath@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-01-06 08:58:14 -05:00
Ross Burton b398c1bcdf arm-bsp/trusted-firmware-a: upgrade TC to 2.6
Upgrade TC's TF-A from a post-2.5 snapshot to the 2.6 release.

This means increasing the maximum size of BL31.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-01-05 08:50:04 -05:00
Ross Burton 8d53f4c3eb arm-bsp/trusted-firmware-a: use full option names in sgdisk call
The TC appends include a long sgdisk invocation which can be made a lot
clearer by using the full option names (e.g. --change-name) instead of
short (e.g. -c).

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-01-05 08:50:04 -05:00
Vishnu Banavath bff6ce17b8 arm-bsp/secure-partitions: add check for null attribute field
UEFI spec says that if 0 is passed in the attributes filed in
setVariable() API, it means that it's a delete variable call.
Currently smm gateway doesn't handle this case. This change
is to add above mentioned check.

Signed-off-by: Vishnu Banavath <vishnu.banavath@arm.com>
Change-Id: Id3a54601d403102da5c5617d7b4da8ec51029200
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-01-04 13:12:11 -05:00
Gowtham Suresh Kumar 274f82247d arm-bsp/u-boot: corstone1000: Disable mm_communicate failure log
When a getVariable() call is made with data size set to 0,
mm_communicate should return EFI_BUFFER_TOO_SMALL. This is
an expected behavior. There should not be any failure logs
in this case. So the error log is commented here.

Change-Id: Id5b36928b1450ef9f83d34a3ab7feb4839ff9734
Signed-off-by: Gowtham Suresh Kumar <gowtham.sureshkumar@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-01-04 13:11:55 -05:00
Ross Burton 82ef0cce84 arm/hafnium: add missing headers to native-dtc.patch
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-01-04 13:11:31 -05:00
Ross Burton 564abfcb9a CI: run pending-updates on x86
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-01-04 13:11:12 -05:00
Vishnu Banavath 8061ecf0cd arm-bsp/u-boot: fix EFI image load alignment
This patch is cherry-picked from upstream to fix misalignment
of efi load image

Change-Id: If64e635a80cd0b6ecb8f09c62aa2b248d0e36f4e
Signed-off-by: Vishnu Banavath <vishnu.banavath@arm.com>
2021-12-23 19:02:42 +00:00
Ross Burton df0da2d486 CI: add patch status metrics
Embed an improved patchreview tool which can generate metrics.txt files,
and run that as part of the CI.  This means that every merge request
will include a section if the metrics change, so it is easy to spot if
patches with bad headers are added.

The changes to patchreview will merge into oe-core soon, so when that
happens we can drop the copy.

Signed-off-by: Ross Burton <ross.burton@arm.com>
2021-12-23 10:57:54 +00:00
Vishnu Banavath ae753c34dc arm-bsp/u-boot: add ethernet device and enable configs for SCT
These changes are to add
* ethernet device SMC911x device and this is required to support
  bootfromnetwork SCT
* also enabled other config options to fix SCT issues

Change-Id: Ic6112c019cb08f77e29508ad47980f851f79088c
Signed-off-by: Vishnu Banavath <vishnu.banavath@arm.com>
2021-12-22 09:00:12 -05:00
Gowtham Suresh Kumar 2680423fe2 arm-bsp/secure-partitions: Add error cases to setVariable() and getNextVariableName()
This patch fixes the SCT errors seen for setVariable() and
getNextVariableName() functions. The existing implementation of these
functions does not cover certain error conditions which are listed in
the uefi specification. This patch adds these changes.

Change-Id: Idcddc799588339de6729b73c0ceada5c2018dd4b
Signed-off-by: Gowtham Suresh Kumar <gowtham.sureshkumar@arm.com>
2021-12-21 14:00:14 -05:00
Gowtham Suresh Kumar 6b8a967eb0 arm-bsp/secure-partitions: corstone1000: Change UID of variable index in SMM
This patch fixes the os_indications setVariable() failure. The variable
index UID in SMM gateway which was 1 is changed in this patch. TFM has a
special usage for variable with UID 1, which makes it write once only.
This is not required for SMM variable index.

Change-Id: I50d60b87d3ef44ffd50e71ec4f20d31fdacf7acd
Signed-off-by: Gowtham Suresh Kumar <gowtham.sureshkumar@arm.com>
2021-12-21 14:00:14 -05:00
Ross Burton 31a5208383 runfvp: add basic documentation
Signed-off-by: Ross Burton <ross.burton@arm.com>
2021-12-20 17:52:22 -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
Ross Burton 17f7371ca8 arm/oeqa/fvp: wrap bootlog output correctly
Join the list of boot log lines with newlines, so it displays properly.

Signed-off-by: Ross Burton <ross.burton@arm.com>
2021-12-20 17:52:22 -05:00
Vishnu Banavath e795f09d14 arm-bsp/u-boot: populate ESRT table with image_info
These changes are to support populating corstone1000 image_info
to ESRT table

Change-Id: I6e5cdd8a3477fbf3c480bf7a725198841ed79796
Signed-off-by: Vishnu Banavath <vishnu.banavath@arm.com>
2021-12-20 10:00:14 -05:00
Gowtham Suresh Kumar d689c9d7b4 arm-bsp/security: Revert set append write TS patch
Change-Id: I6e8aea102ea24271097efe92f4eb820c68ff70d5
Signed-off-by: Gowtham Suresh Kumar <gowtham.sureshkumar@arm.com>
2021-12-20 10:00:14 -05:00
Gowtham Suresh Kumar 9b07bb8901 arm-bsp/u-boot: corstone1000: Fix SCT failures
This patch removes the CONFIG_CMD_DHCP and CONFIG_CMD_PING
config parameters from the defconfig. It also reverts the workaround
patch which disabled NV get and set on u-boot.

Change-Id: I80f41235dbca2e76003c28164b42f4403dadc499
Signed-off-by: Gowtham Suresh Kumar <gowtham.sureshkumar@arm.com>
2021-12-20 10:00:14 -05:00
Gowtham Suresh Kumar 53a8363f29 arm-bsp/secure-partitions: corstone1000: Configure storage in SMM gateway
This patch will add a macro to configure the volatile and
non volatile storage in SMM gateway. Few useful logs are
also added to the secure world.

Change-Id: Ifdb405a09a9a72718df8b335b9f42509dd8c850c
Signed-off-by: Gowtham Suresh Kumar <gowtham.sureshkumar@arm.com>
2021-12-20 10:00:14 -05:00
Ross Burton c4f5359672 trusted-firmware-a: move corstone1000 to TF-A 2.6
Now that we have a TF-A 2.6 recipe there is no need to use a post-2.5
git snapshot.

Signed-off-by: Ross Burton <ross.burton@arm.com>
2021-12-16 06:01:14 -05:00
Ross Burton 1c3c71694e arm-bsp/trusted-firmware-m: update CS1K bbappend for TF-M 1.5.0, again
Remove the explicit SRCREV_mcuboot as this is the same as the 1.5.0
recipe.

Signed-off-by: Ross Burton <ross.burton@arm.com>
2021-12-16 06:00:42 -05:00
Abdellatif El Khlifi 4742b45466 kas: corstone1000: update the FVP script repo SHA
Setting the model script SHA to use the right FVP
options.

Change-Id: I7f92fb97466bf4f5f48b8d184a396bf87bdeb401
Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-12-15 14:08:31 -05:00
Jon Mason f028dc0e8b arm-bsp: add zephyr for musca-s1
Zephyr supports musca-s1 boards.  Add support in the machine config file
and the relevant CI entries to build it.

Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-12-15 14:07:26 -05:00
Ross Burton 9cc42e5256 arm-bsp/trusted-firmware-m: update CS1K bbappend for TF-M 1.5
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-12-15 07:00:10 -05:00
Ross Burton 018fd6aecf arm/trusted-firmware-m: use Ninja to build
Ninja is a better Make.  Add progress feedback and parallelisation
options, reducing the time to build TF-M on my machine from 100s to 6s.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-12-15 07:00:10 -05:00
Ross Burton 7519014213 arm/trusted-firmware-m: upgrade to 1.5.0
Update tfm-tests and mcuboot SHAs.  mbedtls is still recommended to be
at 3.0.0, newer releases do not build.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-12-15 07:00:10 -05:00
Ross Burton 3d3d04ce09 arm/trusted-firmware-m: remove stale patch
This patch should have been removed as part of the 1.2.0 upgrade.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-12-15 07:00:10 -05:00
Vishnu Banavath d5085549ce arm-bsp/trusted-firmware-m: corstone1000: update TF-M SHA
This change is to update TF-M SHA which has fixes for capsule update.

Change-Id: I016381c2a95fcdd9629772671143a1e7332196e5
Signed-off-by: Vishnu Banavath <vishnu.banavath@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-12-14 14:51:34 -05:00
Gowtham Suresh Kumar ce3af4b0e4 arm-bsp/u-boot: corstone1000: Fix efi debug issue
This patch will fix the ffa mm communicate function behavior as
expected by efi_get_var() and also fix the com buffer size used by
u-boot.

Change-Id: I8ce28a2e51b8f52856d81ea6e3c1e2e72cfaa362
Signed-off-by: Gowtham Suresh Kumar <gowtham.sureshkumar@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-12-14 14:51:34 -05:00
Gowtham Suresh Kumar 125707768c arm-bsp/u-boot: corstone1000: Remove GetVariable() fix
The efi_get_var() expects EFI_BUFFER_TOO_SMALL return value
from efi_get_variable_int() to just read the size of the data.
So when comm buffer is smaller than received buffer,
efi_get_variable_int is expected to return error code. This
functionality will be fixed in future patches.

Change-Id: I3e5119b1fdf18c965cc2ebc11056b6ca70d57e0f
Signed-off-by: Gowtham Suresh Kumar <gowtham.sureshkumar@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-12-14 14:51:34 -05:00
Vishnu Banavath acdead8bc0 arm-bsp/secure-partitions: add capsule update interface to SE proxy SP
This change is to add capsule update interface to SE proxy SP.
This interface sends following events to secure enclave
* firmware update request - SE will read the capsule and will flash the
image to flash to previous active bank
* kernel boot event - SE will delete timer on reciption of this event and
marks all the images as accepted if in trial state

Change-Id: I7cf9b729128d1e07e891253661fcd891191e8024
Signed-off-by: Vishnu Banavath <vishnu.banavath@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-12-14 14:51:34 -05:00
Gowtham Suresh Kumar 997d354fcc arm-bsp/secure-partitions: corstone1000: Increase SMM Gateway variable handling capacity
The maximum number of UEFI variables that can be supported by SMM
gateway is currently 40. When more than 40 variables are written,
or read SMM gateway returns error code. Currently this value is
increased to 100 to support more UEFI variables.

Change-Id: I3ebef8052fd01c5b1c19cdfe71ab3c02447a005b
Signed-off-by: Gowtham Suresh Kumar <gowtham.sureshkumar@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-12-14 14:51:34 -05:00
Emekcan Aras 4720b3e010 arm-bsp/psa-arch-tests: corstone1000: configuring crypto and attestation test
This commit configures crypto and attestation tests for Corstone1000
platform.

It also fixes CMake issues on the current trusted-service CMake source
files to enable this configuration.

Change-Id: I334d661c1bc349e03f92611d6010360c08e6cc89
Signed-off-by: Emekcan Aras <emekcan.aras@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-12-14 14:51:34 -05:00
Emekcan Aras 20c1de521a arm-bsp/trusted-firmware-m: corstone1000: Aligning with TF-M master
Setting the last master branch SHA for openamp changes.

Change-Id: I58bc0a1adb7754af901fc1734ffeb92aad191fe5
Signed-off-by: Emekcan Aras <emekcan.aras@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-12-14 11:30:24 -05:00
Satish Kumar 6ba9c1a537 arm-bsp/secure-partitions: corstone1000: add psa ipc crypto backend
Add psa ipc crypto backend and attach it to se proxy
deployment.

Change-Id: I072cd3f0661be33773a2132c2222dc4c7b8c6cb4
Signed-off-by: Satish Kumar <satish.kumar01@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-12-14 11:30:24 -05:00
Satish Kumar 42a65ba26b arm-bsp/secure-partitions: corstone1000: Setup its backend
Setup its backend as openamp rpc using secure storage ipc
implementation.

Change-Id: I0329c87d11de7a721b3eaf004935befa6e7389c8
Signed-off-by: Satish Kumar <satish.kumar01@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-12-14 11:30:24 -05:00
Satish Kumar 90fd7da98b arm-bsp/secure-partitions: corstone1000: Add psa ipc attestation to se proxy
Implement attestation client API as psa ipc and include it to
se proxy deployment.

Change-Id: I0a1130d2013717c6499da5bb2cd6cd11a752bcce
Signed-off-by: Satish Kumar <satish.kumar01@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-12-14 11:30:24 -05:00
Satish Kumar 70256f1e77 arm-bsp/secure-partitions: corstone1000: Use address instead of pointers
Since secure enclave is 32bit and we 64bit there is an issue
in the protocol communication design that force us to handle
on our side the manipulation of address and pointers to make
this work.

Change-Id: Icb29fdec6928dba6da7e845b3a13d8a3560c5fe1
Signed-off-by: Rui Miguel Silva <rui.silva@arm.com>
Signed-off-by: Satish Kumar <satish.kumar01@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-12-14 11:30:24 -05:00
Satish Kumar 89cd9c81e2 arm-bsp/secure-partitions: fixes required to run psa-arch-test
Fixes needed to run psa-arch-test

Change-Id: Iba090e151298a216f8f1bf81a72bba4587bec389
Signed-off-by: Satish Kumar <satish.kumar01@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-12-14 11:30:24 -05:00
Huifeng Zhang ebf413ea3c arm/fvpboot: change the execution order of do_write_fvpboot_conf
add the do_write_fvpboot_conf function into IMAGE_POSTPROCESS_COMMAND
so that this function can be called after the build system created the
final image output files.

It's possible that bitbake doesn't run start from the do_rootfs task but
run start from do_image_<type> at the stage of image generation.

For example, there are multiple partitions in the wic file and the
grub.cfg file is placed to the first partition and the rootfs is placed
to the second partition. At this time, if we change the content of
the grub.cfg file resided in the related recipe's directory and build,
the do_rootfs task won't be run by bitbake but a new wic file will be
generated. In this situation, the fvpconf file also won't be updated and
the 'bp.virtioblockdevice.image_path' is still pointing to a old image
file.

Issue-Id: SCM-3724
Signed-off-by: Huifeng Zhang <Huifeng.Zhang@arm.com>
Change-Id: I7a41afa1d7471d09b60d118c4a6c99c57a6b548c
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-12-14 11:30:24 -05:00
Abdellatif El Khlifi 321082a168 arm-bsp/trusted-firmware-m: corstone1000: set SRCREV_FORMAT
Adding to SRCREV_FORMAT the names of the repos fetched.

Change-Id: Idf80065c39b2124bf384d0dbb4028138b27c1e10
Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
2021-12-14 14:21:42 +00:00
Abdellatif El Khlifi 4ff491b558 kas: corstone1000: update for new Kas include semantics in kas folder
With Kas 2.6 included YAML files need to be relative to the repository,
not the including file:

https://kas.readthedocs.io/en/latest/format-changelog.html#version-11

Change-Id: I851c9137d1f70f754d1a70a1fc14828c39ff3de7
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
2021-12-14 14:21:42 +00:00
Abdellatif El Khlifi fe5f367deb kas: corstone1000: update meta-arm-image SHA
Aligning to the last meta-arm-image version to
add psa-arch-tests to the rootfs.

Change-Id: I40e945f814df4b6f7c30772d3dd6f91e6b6fcafc
Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
2021-12-14 14:21:42 +00:00
Emekcan Aras 49edcfc12d arm-bsp/psa-arch-tests: corstone1000: build the test applications
This commit adds support for building/installing the test
application.

Also fixing CMake issues on the current trusted-service CMake source files.

Change-Id: Iae0fc9bf9362cf5b7d65cd7b9f0445f62f3b83eb
Signed-off-by: Emekcan Aras <emekcan.aras@arm.com>
Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
2021-12-14 14:21:42 +00:00
Abdellatif El Khlifi d93f7c31c4 arm/psa-arch-tests: introduce the recipe
This commit adds a recipe for psa-arch-tests linux
userspace application.

Included tests are; crypto, protected_storage,
internal_trusted_storage and attestation.

Change-Id: I6285aa2a6ae8fdd25f4327f1d301c59a88bce775
Signed-off-by: Emekcan Aras <emekcan.aras@arm.com>
Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
2021-12-14 14:21:42 +00:00
Abdellatif El Khlifi d68c6419cd arm/secure-partitions: remove the use of EXTRA_OEMAKE
EXTRA_OEMAKE is not needed since we are using CMake.

Change-Id: Ifc0dcc9313fe4e473cbba8eb3b716e11cf8e45ee
Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
2021-12-14 14:21:42 +00:00
Ross Burton 93d5313f60 arm/sbsa-acs: upgrade to 3.1
Remove a backported patch which has been incorporated in this release.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-12-13 09:57:27 -05:00
Ross Burton b180c39f15 arm/sbsa-acs: reset PACKAGE_ARCH
edk2-firmware is machine-specific, but this is a generic binary so we
can reset PACKAGE_ARCH to the tune.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-12-13 09:57:27 -05:00
Abdellatif El Khlifi fcf135d7ee arm-bsp/u-boot: corstone1000: add the header file for invalidate_dcache_all function
The invalidate_dcache_all function has been implicitly declared.
This commit fixes that.

Change-Id: I83e985e219af8687c0679045f6a979c91923be69
Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-12-13 08:54:02 -05:00
Abdellatif El Khlifi 3c30cb6f06 arm-bsp/u-boot: corstone1000: arm_ffa: removing the cast when using binary OR on FIELD_PREP macros
When the GENMASK used is above 16-bits wide a u16 cast will cause
loss of data.

This commit fixes that.

Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
Change-Id: I72e5e42971a50ce167500a92cc529c5cb3ff781f
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-12-13 08:54:02 -05:00
Vishnu Banavath 7664222af7 arm-bsp/u-boot: corstone1000: make capsule guid check platform agnostic
This change is to delete a separate check for guid for corstone1000
target. Generic check of fmp guid check should suffice.

Change-Id: Idec92c9307f903e52985057404daac2e40d05295
Signed-off-by: Vishnu Banavath <vishnu.banavath@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-12-13 08:54:02 -05:00
Vishnu Banavath bf698c82df arm-bsp/u-boot: corstone1000: passing interface ID and event ID in register w4
Changing where to pass the SE Proxy interface and event IDs.

Now they are passed to the SE Proxy in register w4.

The events involved are kernel started and buffer ready
events.

Change-Id: Ib60897e9f01cd87b9923892198f8868e02cc830d
Signed-off-by: Vishnu Banavath <vishnu.banavath@arm.com>
Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-12-13 08:54:02 -05:00
Abdellatif El Khlifi f01e8234ab arm-bsp/secure-partitions: corstone1000: using the default SHA
No need to set again the same SHA as the one provided
by the recipe.

Change-Id: I034aca31c1cc30868552be67a04400db20ad59b2
Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-12-11 19:22:09 -05:00
Abdellatif El Khlifi e8432d0333 arm/secure-partitions: introducing a common file
Moving common settings that can be used by other
components to a common file: secure-partitions.inc

Change-Id: I81691ee52bef3dfbd72c59afe20b01a5cf2222ea
Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-12-11 19:22:09 -05:00
Gowtham Suresh Kumar 0bf8eb4caa arm-bsp/u-boot: corstone1000: Fix GetVariable data size issue
This patch fixes the GetVariable() issue which causes
mm_communicate failure when called with 0 data size. The comm buffer
is set to maximum size when 0 data size request is made to handle the
MM response from the secure world. This is a generic fix but used by
corstone1000.

Change-Id: Id50619816a924b4fa7597295f89d54827191fbb5
Signed-off-by: Gowtham Suresh Kumar <gowtham.sureshkumar@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-12-11 19:22:09 -05:00
Vishnu Banavath 13e4bd913b arm-bsp/optee-os: cherry pick fixes from upstream integration branch
These changes are to fix missing error check during sp init
and add support for defining memory regions

Change-Id: I381ff9805288590809471494bdff5e7f62232f7c
Signed-off-by: Vishnu Banavath <vishnu.banavath@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-12-11 19:22:09 -05:00
Vishnu Banavath 56d2e4e79c arm-bsp/secure-partitions: rebase TS patches
These changes is to rebase patches to latest
SHA(a365a04f937b9b76ebb2e0eeade226f208cbc0d2) of integration branch.
Also cherry-picked other bug fixes with the exemption of adding
newlib changes. newlib changes brakes the build because of musl
libc, hence dropped those changes for now

Change-Id: If0131d00e63eb0f574fa41dd95cfee4351e696e8
Signed-off-by: Vishnu Banavath <vishnu.banavath@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-12-11 19:22:09 -05:00
Abdellatif El Khlifi 55e3fef745 arm-bsp/optee-os: corstone1000: unpack sp_manifest_combined_se.dts in WORKDIR
When using devtool the S is no longer an unpack location.
Let's use the default unpack location WORKDIR that works
whether devtool is used or not.

Change-Id: I34dfb53feddddfba82ff68a43b6cfe89a60c7701
Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-12-11 19:22:09 -05:00
Abdellatif El Khlifi ea8d5b2eeb arm-bsp/trusted-firmware-m: corstone1000: bump the version to 1.5
Setting TF-M version to 1.5

Change-Id: Ieb0994f0a13c4d65b2a8938e269f137f722780cb
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-12-11 19:22:09 -05:00
Ross Burton d446f7f80b CI: update for new Kas include semantics
With Kas 2.6 included YAML files need to be relative to the repository,
not the including file:

https://kas.readthedocs.io/en/latest/format-changelog.html#version-11

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-12-10 10:35:28 -05:00
Drew Reed a5f0508464 arm-bsp/trusted-firmware-m: corsone1000: Fix circular dependency in SRCPV
Change the setting of PV from referancing SRCPV to using SRCREV.

Also drop the use of PREFERRED_VERSION. The existing TF-M recipe will
be selected automatically (1.4.1). Corstone1000 bbappend sets the SHA and
PV to 1.5

Change-Id: Id9332fd87e271608ba425e05e796f75fd1c0268d
Signed-off-by: Drew Reed <drew.reed@arm.com>
Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-12-10 09:49:38 -05:00
Vishnu Banavath 7a6fba6e54 arm-bsp/secure-partitions: Use secure storage ipc and openamp for se_proxy
Remove mock up backend for secure storage in se proxy
deployment and use instead the secure storage ipc backend with
openamp as rpc to secure enclave side.

Change-Id: I5225966ec621be9fa126b5af6ede0a1f6bbf469b
Signed-off-by: Rui Miguel Silva <rui.silva@arm.com>
Signed-off-by: Vishnu Banavath <vishnu.banavath@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-12-10 09:49:38 -05:00
Vishnu Banavath d411433a11 arm-bsp/secure-partitions: add secure storage ipc backend
Add secure storage ipc ff-m implementation which may use
openamp as rpc to communicate with other processor.

Change-Id: I6707f3b0654fb255cacef930d9314662b106273c
Signed-off-by: Vishnu Banavath <vishnu.banavath@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-12-10 09:49:38 -05:00
Vishnu Banavath 31f5df490d arm-bsp/secure-partitions: add common service component to ipc support
Add support for inter processor communication for PSA
including, the openamp client side structures lib.

Change-Id: Icb86045b7915c4b04d2ec73b88ed40a3d65be4af
Signed-off-by: Vishnu Banavath <vishnu.banavath@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-12-10 09:49:38 -05:00
Vishnu Banavath e038575aa5 arm-bsp/secure-partitions: Add psa client definitions for ff-m
Add PSA client definitions in common include to add future
ff-m support.

Change-Id: I0860fa347fd882d6e99da136a4273a0ef5d7d684
Signed-off-by: Rui Miguel Silva <rui.silva@arm.com>
Signed-off-by: Vishnu Banavath <vishnu.banavath@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-12-10 09:49:38 -05:00
Vishnu Banavath d248aa2a70 arm-bsp/optee-os: add openamp-virtio
Adding openamp-virtio node to the SP manifest

Change-Id: I1123eab65f2f05d00433b7d940b74766457ac7cf
Signed-off-by: Vishnu Banavath <vishnu.banavath@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-12-10 09:49:38 -05:00
Vishnu Banavath 4c8b25c317 arm-bsp/secure-partitions: add openamp rpc caller
Add openamp rpc caller

Change-Id: Ifb69f3ea3cf84fa01566033f82ed1657490ba87d
Signed-off-by: Vishnu Banavath <vishnu.banavath@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-12-10 09:49:38 -05:00
Satish Kumar ab339b24d4 arm-bsp/trusted-firmware-m: corstone1000: Aligning with TF-M master
Setting the last master branch SHA.

Change-Id: I668868f991bc090cf0720ac940fe658aa253ed56
Signed-off-by: Satish Kumar <satish.kumar01@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-12-10 09:49:38 -05:00
Abdellatif El Khlifi 60af6f3745 arm-bsp/u-boot: corstone1000: remove the use of fdt_addr_r
The device tree is embedded in the u-boot binary
and located at the end of the DDR. Its address
is specified in fdtcontroladdr environment variable.

No need to use fdt_addr_r anymore.

Change-Id: I58b17fbcab36c7236d57eb2498c41b5f4960b6eb
Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-12-10 09:49:38 -05:00
Abdellatif El Khlifi 3fe3273198 arm-bsp/u-boot: corstone1000: setting the boot console output
Setting stdout-path in the chosen node.

Change-Id: Ie0a6b140492f0c5fc323690d2f6bc921cbe76cb3
Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-12-10 09:49:38 -05:00
Khem Raj 8ccbed681c Revert "trusted-firmware-a: Pin to use gcc for now"
Change moved to meta-rockchip

This reverts commit ad030e5830.

Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-12-10 09:49:38 -05:00
Ross Burton dae1f79a93 arm-bsp/scp-firmware: add comment to explain where a UUID is defined
The N1SDP build uses a non-standard FIP UUID, so explain where it comes
from.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-12-09 08:23:17 -05:00
Ross Burton 0ee6e86680 arm-bsp/scp-firmware: remove redundant SGI-575-specific do_install
The base recipe can install the required files, so this is redundant.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-12-09 08:23:17 -05:00
Hugo L'Hostis 3c2f7c3d05 kas: Update include syntax to kas 2.6
Using a path relative to a kas yaml file to include another kas yaml
file won't be supported in the future. This patch also updates the
documentation for fvp-baser to set the minimal supported version of kas
to 2.6.

Signed-off-by: Hugo L'Hostis <hugo.lhostis@arm.com>
Change-Id: I757103c5433bca7af9ab024370cd1e994d59fe0e
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-12-09 08:23:16 -05:00
Khem Raj 67332589e0 trusted-firmware-a: Mark qemuarm64-secureboot as compatible
qemuarm64 fails to build since PLAT=invalid when MACHINE=qemuarm64

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-12-08 17:27:41 -05:00
Khem Raj ad030e5830 trusted-firmware-a: Pin to use gcc for now
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-12-08 17:27:40 -05:00
Vishnu Banavath 7fa39fc38d arm-bsp/optee-os: add MHU device regions in the SP manifest
Declaring the MHU device regions nodes.

Change-Id: Idc9faf570b8b97193f69ed32fa71a4a3ca359409
Signed-off-by: Vishnu Banavath <vishnu.banavath@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-12-08 10:24:56 -05:00
Vishnu Banavath e128e8b296 arm-bsp/secure-partitions: Implement mhu driver
This commit adds mhu driver (v2.1 and v2) to the secure
partition se_proxy and a conversion layer to communicate with
the secure enclave using OpenAmp.

Change-Id: I3d7893f2f52fdcfe6aae4c471c261b6ffd76b274
Signed-off-by: Vishnu Banavath <vishnu.banavath@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-12-08 10:24:56 -05:00
Vishnu Banavath 584f509329 arm/secure-partitions: pass TS_PLATFORM in the configure task
This commit passes the platform name to CMake through the
configure task.

Change-Id: I7aaf10e3709507c65dd81c31e0301df57bbdf4fc
Signed-off-by: Vishnu Banavath <vishnu.banavath@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-12-08 10:24:56 -05:00
Abdellatif El Khlifi 647be3ed42 arm-bsp/secure-partitions: corstone1000: add openamp support in SE proxy SP
This change is to fetch and build openamp and libmetal
as part of SE proxy secure partitions

Change-Id: I251525f830535ceb1e1fc9f994c22a8b149fe7b6
Signed-off-by: Vishnu Banavath <vishnu.banavath@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-12-08 10:24:48 -05:00
Abdellatif El Khlifi bc26590ccd arm-bsp/secure-partitions: corstone1000: add mbed-crypto and nanopb to platform code
Moving dependencies to the BSP.

Change-Id: I32abd6c0568030550dda0442a2a4f624967b561c
Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-12-08 09:21:30 -05:00
Abdellatif El Khlifi 75091146ff arm/secure-partitions: remove platform specific dependencies
Keeping the recipe platform independent.

Additional components can be added at the platform level.

Change-Id: Ib1b0dd8d50486a037257dd99fea0d0ba2c80c7fb
Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-12-08 09:21:30 -05:00
Vishnu Banavath a55cb25bd6 arm/optee-spdevkit: add missing header file in optee-spdevkit
This change is to add following header file to optee-spdevkit
and these are required by openAMP:

* features.h
* error.h

Change-Id: I51b801911b5a0131bf938ac1d520c4818e416637
Signed-off-by: Vishnu Banavath <vishnu.banavath@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-12-08 09:21:30 -05:00
Vishnu Banavath 7d69d62dc4 arm-bsp/optee-os: increase core heap size
This change is to increase optee core heap size to 131072 bytes
from its default value to accomodate openAMP and smm-gateway

Change-Id: I40912334f59a50bb3baf853bb5ff4b01c3b23966
Signed-off-by: Vishnu Banavath <vishnu.banavath@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-12-08 09:21:30 -05:00
Ross Burton 17d1be7b4a arm-bsp/trusted-firmware-a: move most BSPs to TF-A 2.6
Most BSPs don't need a specific release of TF-A, so add a bbappend for
TF-A 2.6 and remove the preferred version assignments.

Notable exceptions are TC0/TC1 and Corstone1000, which both are currently
using intermediate SHAs pre-2.6:

- TC0/TC1 fails to build with TF-A 2.6 as the binary doesn't fit in the
  specific space.

- Corstone1000 patches need to be rebased on top of 2.6

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-12-07 15:07:51 -05:00
Ross Burton 16f86aa00d arm/trusted-firmware-a: add new recipe for 2.6
Keeping 2.5 around temporarily until all of the machines are ported.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-12-07 15:07:51 -05:00
Ross Burton 377f6a08cf arm-bsp/trusted-firmware-a: explicitly set the full PV for corstone1000
The bbappend is fetching a specific SHA, so explicitly set the PV
to match.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-12-07 15:07:51 -05:00
Ross Burton 8fb3c6c645 arm/trusted-firmware-a: move SRCREV_FORMAT to common include
Instead of every versioned recipe setting this, move it to the common
include.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-12-07 15:07:51 -05:00
Ross Burton 0813344225 trusted-firmware-a: don't use virtual/trusted-firmware-a
There's no need to use virtual/trusted-firmware-a, as there's only one
provider of trusted-firmware-a: trusted-firmware-a.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-12-07 15:07:51 -05:00
Ross Burton d16fd5e343 arm-bsp/scp-firmware: update for 2.9
Use a generic wildcard in the arm-bsp bbappend to avoid needing to rename
in the future.

Remove the N1SDP patch as this has now been merged upstream (c5e45a7).

Remove TC? overrides which pinned it to an intermediate SHA.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-12-06 17:00:10 -05:00
Ross Burton dc3fd61dba arm/scp-firmware: upgrade to 2.9
Drop a patch which was backported and is now included in 2.9.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-12-06 17:00:10 -05:00
Khem Raj 18a0b35ad2 ffa-debugfs-mod: Pin to arm/aarch64 hosts
This seems to be needing arm specific kernel headers, so I infer this
still is arm specific module

Fixes below error on non-arm hosts

/git/arm_ffa_user.c:12:10: fatal error: linux/arm_ffa.h: No such file or directory
|    12 | #include <linux/arm_ffa.h>
|       |          ^~~~~~~~~~~~~~~~~
| compilation terminated.

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-12-06 09:30:06 -05:00
Khem Raj bf0b41be6a optee-ftpm: Limit to supported machines
If we build aarch64 based machines living outside meta-arm then these
recipes report as unsupported e.g.

ERROR: Nothing PROVIDES 'optee-os-tadevkit' (but /mnt/b/yoe/master/sources/meta-arm/meta-arm/recipes-security/optee-ftpm/optee-ftpm_git.bb DEPENDS on or otherwise requires it)
optee-os-tadevkit was skipped: incompatible with machine rock-pi-4b (not in COMPATIBLE_MACHINE)
ERROR: Nothing RPROVIDES 'optee-ftpm' (but /mnt/b/yoe/master/sources/meta-arm/meta-arm/recipes-security/optee-ftpm/optee-ftpm_git.bb RDEPENDS on or otherwise requires it)
No eligible RPROVIDERs exist for 'optee-ftpm'
NOTE: Runtime target 'optee-ftpm' is unbuildable, removing...
Missing or unbuildable dependency chain was: ['optee-ftpm']
ERROR: Nothing RPROVIDES 'optee-ftpm-dev' (but /mnt/b/yoe/master/sources/meta-arm/meta-arm/recipes-security/optee-ftpm/optee-ftpm_git.bb RDEPENDS on or otherwise requires it)
No eligible RPROVIDERs exist for 'optee-ftpm-dev'
NOTE: Runtime target 'optee-ftpm-dev' is unbuildable, removing...
Missing or unbuildable dependency chain was: ['optee-ftpm-dev']

Therefore its better to limit this recipe to machines supporting
optee-os

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-12-06 09:29:43 -05:00
Ross Burton e329253758 CI: also build qemu-generic-arm64 for clang
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-12-03 10:24:59 -05:00
Ross Burton a0296bf8a0 arm/edk2-firmware: force debug builds when using Clang
edk2-firmware release builds with clang fail:

MdePkg/Library/UefiMemoryAllocationLib/MemoryAllocationLib.c:142:15:
error: variable 'Status' set but not used [-Werror,-Wunused-but-set-variable]

This is upstream as https://bugzilla.tianocore.org/show_bug.cgi?id=3758,
but until that is resolved we can just force debug builds with clang.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-12-03 10:24:59 -05:00
Ross Burton fb9232c4e1 arm/edk2-firmware: correctly set the target prefix in Clang builds
We set GCC5_AARCH64_PREFIX so the tools are prefixed correctly in GCC
builds, but didn't set CLANG38_AARCH64_PREFIX. This meant the clang build
used the host objcopy, which may not know about the target architecture.

Also these can just be the prefix and not a full path, as the binaries
are on $PATH.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-12-03 10:24:59 -05:00
Satish Kumar ad58f344f4 kas: corstone1000: update SE binary sizes
Update the size of bl2_signed.bin and tfm_s_signed.bin

Change-Id: I8312dd6d50faff53e1ca489cbf73c5f25671b21c
Signed-off-by: Satish Kumar <satish.kumar01@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-12-03 08:20:23 -05:00
Satish Kumar 4121a1dc44 arm-bsp/u-boot: identify which bank to load kernel from
Secure enclave, based on the firmware update state of the
system, decides the boot bank. In this commit, u-boot
identifies the selected boot bank and loads the kernel
from it.

Change-Id: Ifcef126dc79c7808b30ef0319d83482d2d29fd13
Signed-off-by: Satish Kumar <satish.kumar01@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-12-03 08:20:23 -05:00
Satish Kumar a4a669cb61 arm-bsp/trusted-firmware-a: patch to identify which bank to load fip from
Secure enclave decide the boot bank based on the firmware update
state of the system and updated the boot bank information at a given
location in the flash. In this commit, bl2 reads the givev flash location
to indentify the bank from which it should load fip from.

Change-Id: I2f7518c82c1664355da2aa1596f4f65f7a49a53d
Signed-off-by: Satish Kumar <satish.kumar01@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-12-03 08:20:23 -05:00
Satish Kumar 978595a8f5 arm-bsp/u-boot: patch to change kernel flash address
More space in the flash is reserved up front for metadata
parser and UEFI variables. That requires change in the flash
base address of where images are present.

Change-Id: I2d23d06099ffbf15458afaeb21c5dd4bcc4ffecb
Signed-off-by: Satish Kumar <satish.kumar01@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-12-03 08:20:23 -05:00
Satish Kumar e2dbbf2002 arm-bsp/trusted-firmware-a: patch to change flash base address of FIP
More space in the flash is reserved up front for metadata
parser and UEFI variables. That requires change in the flash
base address of where images are present.

Change-Id: If6c048a6117023aae2e748c23ed52447857b0d04
Signed-off-by: Satish Kumar <satish.kumar01@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-12-03 08:20:23 -05:00
Satish Kumar 25c5d5eba3 arm-bsp/trusted-firmware-m: corstone1000: firmware update changes
The patchset perform the following changes:

a. Disable secure debug by default.
b. OTA Firmware Update Agent implementation.
c. Implementation of boot index propagation mechanism.
d. Openamp version/commit hash correction.
e. Implementation of host watchdog interrupt handler.

Change-Id: Ie5e1028bb29ce337d51ad8ef47d2bd8175187402
Signed-off-by: Satish Kumar <satish.kumar01@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-12-03 08:20:23 -05:00
Emekcan Aras a224d8eac6 arm-bsp/u-boot: corstone1000: Implement autoboot storage device selection
This commit implements distro_bootcmd in config_bootcommand in u-boot.
This command traverses all the USB devices connected to the board and
finds a usb device that has bootable image to boot from it. If it cannot
find a usb device with the bootable image, it will boot the system using
the existing flash.

Change-Id: Ia05ca02d6f490a1b51fcf377afcc86ea0ed4e19c
Signed-off-by: Emekcan Aras <emekcan.aras@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-12-03 08:20:23 -05:00
Emekcan Aras e7e4b7dfb3 arm-bsp/trusted firmware-a: corstone1000: implement EFI reset system
This commit implements efi_reset_system for corstone1000 platform. In
order to reset the system, the host uses secure host watchdog to assert
an interrupt (WS1) on the secure-enclave side, then secure-enclave
resets the system.

Change-Id: I772181cd43e789f1d6508aaa433eb109d8f85b5d
Signed-off-by: Emekcan Aras <emekcan.aras@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-12-03 08:20:23 -05:00
Emekcan Aras 3b0d8b0eaf arm-bsp/u-boot: corstone1000: Enable PSCI Reset
This commit enables PSCI Reset for corstone1000 platform. It configures
u-boot to use PSCI interfaces in efi_reset_system function.

Change-Id: I88ea55fde2b2c6e455a4b38e885e62a410b0b0e7
Signed-off-by: Emekcan Aras <emekcan.aras@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-12-03 08:20:23 -05:00
Harry Moulton d8934cc3a3 arm-bsp/u-boot: corstone1000: Fix ISP1760 EFI boot issue
This patch does three things:
 - Add the CONFIG_EFI_PARTITION option to the corstone1000_defconfig
    to allow u-boot to detect EFI filesystems.
 - Add isp1760_get_max_xfer_size(), this fixes an issue where
    GPT partition info could not be loaded.
 - Fix the issue while detecting EFI filesystem, and loading GPT
    partition info.

Change-Id: Ic04c8710f4ea7e156aca196d7e54f090b9376c49
Signed-off-by: Harry Moulton <harry.moulton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-12-03 08:20:23 -05:00
Gowtham Suresh Kumar 583f810f34 arm-bsp/u-boot: corstone1000: Enable SMM gateway
This patch updates shared buffer address, disables get/set of NV
variables, and invalidates the cache after write to shared buffer as the
SPs have cache disabled.

Change-Id: Iead01edf3011e192df205236df098415e5bde9a5
Signed-off-by: Gowtham Suresh Kumar <gowtham.sureshkumar@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-12-03 08:20:23 -05:00
Ross Burton 31cffcd59c arm/edk2-firmware: default to release builds
Default to release builds and let machines enable debug builds if they
want that.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-12-01 16:04:10 -05:00
Ross Burton 6c5086872a arm/edk2-firmware: set a default invalid COMPATIBLE_MACHINE
Building edk2-firmware needs explicit configuration for the target
machine, so set an invalid COMPATIBLE_MACHINE to stop edk2-firmware
building for, example, qemumips.

sbsa-acs is an application, so unset COMPATIBLE_MACHINE in that recipe
as it will work on all aarch64 targets.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-12-01 16:04:10 -05:00
Ross Burton 282de87aff arm/edk2-firmware: organise bbappend
Group the qemuarm64-secureboot and qemu-generic-arm64 overrides so that
they are easier to read.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-12-01 16:04:10 -05:00
Ross Burton bb2bda7186 arm/edk2-firmware: set EDK2_ARCH centrally
There is only a limited number of EDK2 architectures, so we can set
the architecture using overrides in the base recipe instead of every
machine customisation needing to set it explicitly.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-12-01 16:04:10 -05:00
Ross Burton 5a8fafb796 arm-bsp/edk2-firmware: drop N1SDP patches
These patches have been merged into edk2-platforms bd53d309 onwards,
which is built with edk2-firmware 202111.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-12-01 16:04:10 -05:00
Ross Burton 58707a85bf arm/edk2-firmware: upgrade to 202111
Also update sbsa-acs to build against 202111.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-12-01 16:00:29 -05:00
Ross Burton c225b33f91 arm/edk2-firmware: set invalid platform names for better errors
Set the default platform name/descriptor to 'unset' so that build.sh fails
with obvious errors, instead of generic argument parsing failures.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-12-01 16:00:29 -05:00
Jon Mason a70500117a ci: QEMU_USE_KVM needs empty variable
QEMU_USE_KVM needs to be empty, not 0.  Otherwise, it doesn't catch and
runs KVM anyway (which breaks inside our docker containers).

Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-12-01 15:52:46 -05:00
Gowtham Suresh Kumar 28f6956415 arm-bsp/optee-os: corstone1000: enabling smm-gateway partition
This commit enables smm-gateway in optee-os by making the following changes:

- Updating the existing SP manifest file with a combined manifest file
  that includes information about both se-proxy and SMM gateway SP.
- Including the SMM gateway SP makefile in optee include file
  to embed smm gateway sp binary into optee image.

Change-Id: Iebcf2c534a9e9ced411c943ff583b522ad9d69fa
Signed-off-by: Gowtham Suresh Kumar <gowtham.sureshkumar@arm.com>
Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
2021-12-01 13:36:14 +00:00
Gowtham Suresh Kumar a70d0287e8 arm-bsp/secure-partitions: corstone1000: add smm-gateway partition
smm-gateway secure partition is a slim version of StMM for low memory
devices.

This commit adds support for smm-gateway for corstone1000 at the
secure partitions level by making the following changes:

- Configure TS_DEPLOYMENTS to include SMM Gateway SP, SMM gateway to use
  device region for shared buffer, and set the NV store macro.
- Updating secure partitions recipe to point to HEAD of integration
 branch to fetch stmm-gateway changes.

Change-Id: I56ff325cca250749448364e12ac06e3ea289fa29
Signed-off-by: Gowtham Suresh Kumar <gowtham.sureshkumar@arm.com>
Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
2021-12-01 13:36:14 +00:00
Abdellatif El Khlifi 4c04b58c41 arm-bsp/linux: setting the FFA_VERSION compatibility checks
This commit introduces a new kernel patch that aligns the FF-A
versions checks according to the FF-A specification v1.0.

Without this fix, the FF-A bus fails to initialize when the FF-A
framework is version 1.1 (comes with the latest TF-A).

The bus driver which is v1.0 rejects the framework v1.1 despite
the fact they are compatible according to the specification.

This kernel patch changes the logic of the version checking based on
the specification.

Change-Id: If9d7b6c0d5e24e73d4f42c6532cd56ff2d05fcec
Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-11-30 11:03:29 -05:00
Abdellatif El Khlifi 12a05f0d20 arm-bsp/u-boot: corstone1000: adjust the environment and heap sizes
env size set to 64 KB
heap size 64 KB + 32 MB

Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
Change-Id: I913862e855afa8864e91e0a7c0707279b7cbd987
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-11-30 11:03:29 -05:00
Abdellatif El Khlifi 6e7b258b3d arm-bsp/u-boot: corstone1000: introducing EFI capsule update
This commit implements capsule update for Corstone-1000.

Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
Change-Id: I3031018eebb9aaae56c0823d24ee5c148857f2fa
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-11-30 11:03:29 -05:00
Abdellatif El Khlifi 40f3e0d10d arm-bsp/u-boot: corstone1000: introducing Arm FF-A and MM support
This commit provides these new generic u-boot features:

- The FF-A low-level driver implementing Arm Firmware Framework for Armv8-A (FF-A)
- MM communication using FF-A (compatible with StandaloneMM and smm-gateway)
- A new armffa command and a test module to test the FF-A helper functions to
  communicate with secure world.

It also enables FF-A and MM communication for the Corstone-1000 platform.

Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
Change-Id: Ic71dcae2411aefae00557284c08be662bfe80b98
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-11-30 11:03:29 -05:00
Vishnu Banavath 2677e682d2 arm-bsp/optee-os: add a rule in optee-os Makefile for secure partitions
These changes are to add a rule in optee-os Makefile to include
secure partitions as part of optee-os image

Signed-off-by: Vishnu Banavath <vishnu.banavath@arm.com>
Change-Id: I2f6f93ffca9a2332cbe9ffe4e9903b8ec524df51
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-11-30 11:03:29 -05:00
Ross Burton b6551e85a6 CI: disable use of KVM
oe-core c2a2d47 changed the default of QEMU_USE_KVM to 1, so qemu will
want to use KVM and will error if it can't.  Our CI runners don't have
KVM, so we need to disable this.

In the long term this should be more intelligent as some workers have
KVM and some don't, but this will get successful builds again.

Signed-off-by: Ross Burton <ross.burton@arm.com>
2021-11-30 11:21:58 +00:00
Ross Burton 4862014474 CI: build optee-spdevkit for qemuarm64
To ensure that optee-spdevkit works in all configurations, but it in the
CI for qemuarm64 not just corstone1000.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-11-29 10:36:30 -05:00
Ross Burton 5536ce026d arm/optee-spdevkit: fix non-corstone1000 builds
This recipe was setting a default SRCREV which doesn't contain the
Secure Partition devkit, as this is only in the psa-development branch
on the trustedfirmware.org mirror which is set by the corstone1000
bbappend.

Use this branch/revision by default, and set the PV correctly: this
branch is currently based on optee-os 3.10 not 3.14.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-11-29 10:36:30 -05:00
Ross Burton d6a8931a55 arm-bsp/hafnium: update bbappend for 2.6
No need for this to be versioned as it complicates upgrades.

Remove the explicit post-2.5 SRCREV now that the recipe has upgraded to
2.6, and remove assignments which are already the default for
conciseness.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-11-29 10:35:18 -05:00
Ross Burton 4be5357cb5 arm/hafnium: enable qemuarm64
Hafnium can do a qemu/aarch64 build, so enable that for future testing
purposes.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-11-29 10:35:18 -05:00
Ross Burton dca6cc8434 arm/hafnium: upgrade to 2.6
hashbang.patch isn't needed anymore, and rebase the other patches.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-11-29 10:35:18 -05:00
Ross Burton 8c44d09406 arm/edk2-firmware: don't PROVIDE virtual/uefi-firmware
Interchangable firmware isn't really a workable concept, so there's no
real need to have a virtual name.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-11-29 10:34:34 -05:00
Ross Burton ae14735509 arm-bsp: use edk2-firmware instead of virtual/uefi-firmware
Firmware isn't arbitarily interchangable as by definition it is specific
to the platform, so use the real recipe name instead of a virtual name.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-11-29 10:34:34 -05:00
Ross Burton 498b350446 arm/sbsa-acs: upgrade to EDK2 202108
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-11-29 10:34:34 -05:00
Ross Burton 33d8df93e4 arm/edk2-firmware: upgrade to edk2-firmware 202108
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-11-29 10:34:34 -05:00
Ross Burton c55ff70355 CI: build optee-test in qemuarm64-secureboot
This recipe doesn't get built through dependencies, so add it explicitly.

Signed-off-by: Ross Burton <ross.burton@arm.com>
2021-11-26 15:00:24 +00:00
Ross Burton 20a02a7537 arm/optee-test: change DEPENDS to optee-os-tadevkit
Now that the TA devkit has been split out of optee-os, the build
dependencies of optee-test need to be updated too.

Signed-off-by: Ross Burton <ross.burton@arm.com>
2021-11-26 15:00:24 +00:00
Ross Burton d3ea92806b arm/optee-test: use precise BSD license
Signed-off-by: Ross Burton <ross.burton@arm.com>
2021-11-26 15:00:24 +00:00
Abdellatif El Khlifi b8552becc3 meta-arm-bsp/security: corstone1000: add trusted services support
These changes are to add support to build TrustedServices.
corstone1000 platfrom uses optee-sp option which will include
secure partitions into optee Image

Following changes are made to trusted-services code
* TS_PLATFORM should be set at the external build system level.
* fix EARLY_TA_PATHS environment variable
* se-proxy string and make it as child node

Change-Id: I58d76b5e25e7f285794c93dc92c1b93fdd77cfb9
Signed-off-by: Vishnu Banavath <vishnu.banavath@arm.com>
Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
2021-11-24 23:16:40 +00:00
Abdellatif El Khlifi 9577a5a44e arm/secure-partitions: introducing the recipe
Adding secure-partitions recipe.

Change-Id: I4320fb7087157a7c0f9305ce1d8f8574d4500fd0
Signed-off-by: Vishnu Banavath <vishnu.banavath@arm.com>
Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
2021-11-24 23:16:31 +00:00
Abdellatif El Khlifi f47ab03514 arm/optee-spdevkit: introducing the recipe
Adding optee-spdevkit recipe.

Change-Id: Ib31d7f0a9fa2f72b71c2057f2752b1c52be6f890
Signed-off-by: Vishnu Banavath <vishnu.banavath@arm.com>
Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
2021-11-24 23:06:24 +00:00
Arpita S.K 74c90a0dca arm-bsp/u-boot: introducing corstone1000 MPS3 machine
Add support for corstone1000-mps3 machine which have a cortex-a35
aarch64, this will boot till u-boot prompt.

Change-Id: Ifdd81d35a5409cdd1563388a841885c14b748cad
Signed-off-by: Arpita S.K <Arpita.S.K@arm.com>
Signed-off-by: Vishnu Banavath <vishnu.banavath@arm.com>
Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
2021-11-24 23:06:03 +00:00
Arpita S.K fecc5e2db1 arm-bsp/machine: introducing corstone1000 MPS3 machine
This commit adds the corstone1000-mps3 machine.

Change-Id: I99f657574a693527d7763cb4cc9b0b05218bb316
Signed-off-by: Arpita S.K <Arpita.S.K@arm.com>
Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
2021-11-23 16:06:41 +00:00
Maxim Uvarov 1c871d3ffe machine/qemuarm64-secureboot.conf: add optee-ftpm
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-11-20 14:02:59 -05:00
Maxim Uvarov 29aa96b0d0 arm: add optee-ftpm recipe
Add software TPM emulated in the OPTEE-OS.

Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-11-20 14:02:45 -05:00
Maxim Uvarov 3210fe4e65 optee: update optee-os.inc to support external TAs
Separate recipe for TA devkit is needed to solve
circular dependency to build TAs with the devkit
 and integrate it inside optee-os.

Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-11-19 10:51:42 -05:00
Jon Mason 26f92c011e CI: use matrix for more defined way of doing things and cleanup
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-11-17 13:35:41 -05:00
Ross Burton 1229061f8b arm/boot-wrapper-aarch64: specify precise BSD license flavour
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-11-16 12:01:07 -05:00
Ross Burton 5cf722a312 gem5/gem5: specify precise BSD license flavour
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-11-16 12:01:07 -05:00
Ross Burton a9da0f3aab CI: remove utility tasks
These tasks made some limited sense when there was only one runner, but
in a setup where there are N runners they arere pretty useless as you
can't control which runner is executing the jobs.

Disk usage should be managed out-of-band, so delete the jobs.

Signed-off-by: Ross Burton <ross.burton@arm.com>
2021-11-15 15:27:39 +00:00
Ross Burton b09863db6e CI: disable use of Yocto sstate server
The public sstate server isn't up to the load just yet and often-enough
will take a very long time to respond, causing build failures.

Signed-off-by: Ross Burton <ross.burton@arm.com>
2021-11-15 12:34:37 +00:00
Ross Burton 6bc7edfe83 arm-toolchain: upgrade gcc-arm-none-eabi (GNU-RM) to 10.3-2021.10
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-11-12 11:12:01 -05:00
Ross Burton 2098ffd84a Remove use of deprecated lnr command
lnr is deprecated and will be removed soon, so replace it with `ln -rs`

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-11-12 11:10:20 -05:00
Jon Mason c40fb5348b arm/qemuarm64-sbsa: replace with qemu-generic-arm64
Migrate the qemuarm64-sbsa machine to use the generic-arm64 machine as a
base.  This new qemu-generic-arm64 should contain only the parts
necessary to boot the generic-arm64 in qemu (using the SBSA machine).
This allows for a single generic image with testing for SBSA compliance.

NOTE: a unique WIC file is needed due to the inability to pass kernel
bootargs (due to needing DHCP for testimage).

Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-11-11 17:22:03 -05:00
Ross Burton 91233ff996 arm-bsp/trusted-firmware-m: remove INSANE_SKIP in corstone1000
The build is successful without this, so presumably it's obsolete.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-11-11 11:20:46 -05:00
Ross Burton 3d62efc282 arm-bsp/trusted-firmware-m: clean up corestone1000 do_install
No point checking that a directory exists before installing from it, as
it will fail immediately anyway if the files are not present.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-11-11 11:20:46 -05:00
Ross Burton 982c170391 arm-bsp/trusted-firmware-m: remove meaningless PACKAGECONFIGs
The corstone1000 customisations override the test-* PACKAGECONFIGs to
always disable the tests, even when they're enabled.

The proper way to do this is to not enable the tests in the first place,
and the tests are not enabled.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-11-11 11:20:46 -05:00
Ross Burton 3523e25699 arm-bsp/trusted-firmware-m: update corstone1000 customisations for 1.4.1 update
This BSP sets an intermediate SHA that is newer than the 1.4.1, but the
branch needs specifying now.

Also remove SRCREV_FORMAT, the PV doesn't include SRCPV so it isn't being used.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-11-11 11:20:46 -05:00
Ross Burton 164392f905 arm/trusted-firmware-m: upgrade to 1.4.1
Extract the TF-M branch name as a variable, as BSPs may wish to use
intermediate SHAs.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-11-11 11:20:46 -05:00
Jon Mason edbc4d1f8f CI: remove unnecessary "+="
Seeing error of
WARNING: ZEPHYRTESTS:remove += is not a recommended operator combination, please replace it.

Correcting the issue by changing it accordingly.

Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-11-11 09:34:23 -05:00
Ross Burton 24b5a304de arm-bsp/fvp-base: track latest linux-yocto
We don't have any invasive kernel patches for the FVP machines anymore,
so remove the PREFERRED_VERSION and track the default version of
linux-yocto instead.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-11-10 23:39:46 -05:00
Ross Burton 4ccd87245d arm/python3-cbor: remove, cbor2 is used now
This recipe was used by trusted-firmware-m and python3-imgtool, both of
which now use python3-cbor2.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-11-10 23:39:46 -05:00
Ross Burton fdcf1f232a arm-bsp/python3-imgtool: remove, this is now in meta-python
A newer version of this recipe is now in meta-python[1]

[1] https://git.openembedded.org/meta-openembedded/commit/?id=94fc0589b50f43afd1a19303a40389652929bf38

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-11-10 23:39:46 -05:00
Ross Burton a3f79e5e12 arm/trusted-firmware-m: use python3-cbor2 instead of python3-cbor
Backport a patch to switch from the unmaintained python3-cbor module to
the active python3-cbor2 module.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-11-10 23:39:46 -05:00
Ross Burton 0417374521 arm/hafnium: fix kernel tool linking
We need to be sure that the host linker flags are passed to the kernel
build, as otherwise it is possible that binaries are incorrectly linked.
For example:

HOSTCC scripts/extract-cert
ld: .../recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libcrypto.so: undefined reference to `pthread_once@GLIBC_2.34'

Signed-off-by: Ross Burton <ross.burton@arm.com>
2021-11-10 15:51:59 +00:00
Ross Burton 80ed458cac gem5/gem5-aarch64-native: fix fuzz in patch
Not sure how this wasn't caught by the CI, human error no doubt.

Signed-off-by: Ross Burton <ross.burton@arm.com>
2021-11-09 17:55:12 +00:00
Ross Burton 2ef815bb71 atp/atp-native: don't pass -Werror
New compiler is now warning about ignored return values[1], so patch out
the use of -Werror, which is bad practise outside of development builds.

[1] https://github.com/ARM-software/ATP-Engine/issues/9

Signed-off-by: Ross Burton <ross.burton@arm.com>
2021-11-09 14:38:51 +00:00
Ross Burton 8527e69355 arm/trusted-firmware-a: ensure native cert_create has -rpath
Patch in BUILD_LDFLAGS into the cert_create Makefile so that the -rpath
arguments are passed to the native build, meaning it can find libssl
correctly.  This somewhat worked previously as the host libssl and
sysroot libssl matched, but now that OE has OpenSSL 3 that often isn't
the case.

Signed-off-by: Ross Burton <ross.burton@arm.com>
2021-11-09 14:37:15 +00:00
Ross Burton 46ca470dfe arm: add fvp-corestone1000
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-11-08 12:27:26 -05:00
Ross Burton 77b2b5eff7 gem5/gem5: fix the build with Python 3.10
gem5 imported collections.Mapping, but this was deprecated in 3.3 and
removed in 3.10.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-11-05 07:37:40 -04:00
Tudor Cretu a214398d13 arm-bsp/trusted-firmware-a: Add FWU support for TC
Add recipe to generate GPT with FIP and metadata.
Add Python script to generate the FWU metadata.

Signed-off-by: Tudor Cretu <tudor.cretu@arm.com>
Change-Id: Icfe3d1491442af17aa5300d8ff8654ac65ae30aa
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-11-05 07:37:01 -04:00
Jon Mason 50389eb377 CI: remove target from testimage yml file
Since we are using TESTIMAGE_AUTO, providing the target field in the
testimage yml file is no longer necessary.  This allows for multiple
payloads to be built, while still allowing for testing.

Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-11-04 10:19:12 -04:00
Jon Mason 6ce74e521a arm-bsp: fix corstone u-boot
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-11-04 10:19:12 -04:00
Ross Burton aa3804f26a Update git: SRC_URIs
GitHub has deprecated the unauthorised git protocol[1], so all GitHub
URLs need to specify protocol=https.

Also the git fetcher is making the branch parameter mandatory, so add it
where it is currently implicit.

[1] https://github.blog/2021-09-01-improving-git-protocol-security-github/

Signed-off-by: Ross Burton <ross.burton@arm.com>
2021-11-03 16:00:06 +00:00
Jon Mason ad7257cc1b arm-bsp: use new u-boot version
Changes necessary to get the u-boot version 2020.10.  TC patches are no
longer necessary, as they are upstreamed.

Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-11-01 21:01:07 -04:00
Jon Mason 8aa1242d94 CI: use master branch again
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-11-01 21:01:07 -04:00
Diego Sueiro c2ff49c4a9 arm-autonomy: Remove code from master as part of the deprecation plan
The meta-arm-autonomy layer is being deprecated from master, with bug fixes
only being applied to the following branches. Additionally, all support and
maintenance of meta-arm-autonomy will stop as per the schedule below.

    honister: End-of-life scheduled to June 2022
    hardknot: End-of-life scheduled to December 2021
    gatesgarth: End-of-life scheduled to October 2021
    dunfell: End-of-life scheduled to October 2021
    master: End-of-life scheduled to October 2021 and code removed

Issue-Id: SCM-3552
Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
Change-Id: I3ca58f8c13b1ecb3dbaf0d60f0f52b016292633d
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-10-29 10:03:47 -04:00
Arpita S.K 8b82d1230d arm/trusted-firmware-a,fiptool-native: Fix fiptool execution wrt corstone1000
After http://git.yoctoproject.org/cgit/cgit.cgi/meta-arm/commit/?id=648571b113b39420735859461fcd69cfc6f66c76,
building the corstone1000-image fails with the below error.
    fiptool_platform.h:19:11: fatal error: openssl/sha.h: No such file or directory
    # include <openssl/sha.h>

Put back the inclusion of BUILD_LDFLAGS to fix this.

Change-Id: I57396eefe2c9a58e4c5c6a751b2ee7d32509cac5
Signed-off-by: Arpita S.K <Arpita.S.K@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-10-29 09:22:35 -04:00
Arpita S.K a5d8dfa52e corstone1000: Introducing ci and kas files
Adding ci and yaml files to support
corstone1000-fvp.

Change-Id: I74ebc3570d4b0c8abae58be5ef69064fc33e5bea
Signed-off-by: Arpita S.K <Arpita.S.K@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-10-29 09:22:35 -04:00
Abdellatif El Khlifi dca725e0f1 arm/ffa-debugfs: corstone1000: enabling FF-A Debugfs Linux driver
- This commit provides a recipe for the FF-A Debugfs Linux
   driver v2.1.0.

  The driver is an out-of-tree loadable modules. It exposes
  FF-A operations to user space and only used for development
  purposes.

- Create a dev package for ffa-debugfs-mod

  ffa-debugfs-mod recipe provides arm_ffa_user.h header for
  other recipes that need it at build time.
  The header is put in ffa-debugfs-mod-dev package.

Change-Id: I92f33e20b5fdfc9a32cff03ae2a137150d0328db
Signed-off-by: Arpita S.K <Arpita.S.K@arm.com>
Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-10-29 09:22:35 -04:00
Abdellatif El Khlifi e46e5e1852 arm-bsp/linux: corstone1000: integrating ARM_FFA_TRANSPORT in v5.10 kernel
This commit adds the Arm Firmware Framework for Armv8-A to the v5.10 kernel.

The integrated patches are cherry-picked from kernel v5.14-rc2 and
compatible with SMCCCv1.2

Change-Id: If8964b94ed83caa5e0fc5d2a8a9b6a21f8b378ec
Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-10-29 09:22:35 -04:00
Abdellatif El Khlifi 1a25d20717 arm-bsp/trusted-firmware-m: corstone1000: signing trusted-firmware-a binaries
This commit allows to sign trusted-firmware-a BL2 and FIP using MCUBOOT
tools.

Change-Id: Ide3045982f5f8515c1ccd59b6b0d29816fbfdd68
Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
Signed-off-by: Satish Kumar <satish.kumar01@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-10-29 09:22:35 -04:00
Abdellatif El Khlifi 401647d16c arm-bsp/python3-imgtool: add the recipe
Until this is integrated into meta-python, hold a copy of
python3-imgtool in meta-arm-bsp used by trusted-firmware-m.

Change-Id: I2e86be503bee03de549f5714dc52921165afa2bf
Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
Signed-off-by: Arpita S.K <Arpita.S.K@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-10-29 09:22:35 -04:00
Rui Miguel Silva f3ba65844a arm-bsp/linux: corstone1000: enable efi
In an effort to setup capsule update and efi runtime service
handlers, enable the correspondent efi config options.

Signed-off-by: Rui Miguel Silva <rui.silva@arm.com>
Change-Id: Ib068448564268dcacb9bcad3667a3b293f177a83
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-10-29 09:22:35 -04:00
Vishnu Banavath 6b01d4ebb4 arm-bsp/u-boot: corstone1000: extend efi support
enable efi boot including secure config options, add a
load command which integrate with efi subsystem.

And as at it, enable the efi capsule options for future
use.

Change-Id: Iced8ab2b9bca41805f6201150760692b4b716d7d
Signed-off-by: Arpita S.K <Arpita.S.K@arm.com>
Signed-off-by: Vishnu Banavath <vishnu.banavath@arm.com>
Signed-off-by: Rui Miguel Silva <rui.silva@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-10-29 09:22:35 -04:00
Vishnu Banavath 33b394c523 arm-bsp/optee: introducing corstone1000 FVP machine
These changes are to add corstone1000-fvp machine
to optee-os.

Change-Id: I9ddfaca476234c0307a89d5444ae2d0e688a9b59
Signed-off-by: Arpita S.K <Arpita.S.K@arm.com>
Signed-off-by: Vishnu Banavath <vishnu.banavath@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-10-29 09:22:35 -04:00
Abdellatif El Khlifi 08a0fd35bf arm-bsp/trusted-firmware-a: introducing corstone1000 FVP machine
This commit enables TF-A v2.5 with Trusted Board Boot support for the
Corstone1000 64-bit platform.

Disables Non-Volatile counters in the TBB.

Change-Id: Idb9e18df7066cb617df72b2e147147ce49db292c
Signed-off-by: Arpita S.K <Arpita.S.K@arm.com>
Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
Signed-off-by: Vishnu Banavath <vishnu.banavath@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-10-29 09:22:35 -04:00
Rui Miguel Silva 2afa936eea arm-bsp/u-boot: introducing corstone1000 FVP machine
Add support for corstone1000-fvp machine which have a cortex-a35
aarch64, this will boot till u-boot prompt.

Remove kernel devicetree configuration and add the devicetree here and
enable it in the diphda defconfig.

Adds the build options required to support an RTC emulator which in
turn is required to support the UEFI functions GetTime()
and SetTime().

Change-Id: I0d66ece1193494bd2f59a9800d802dff1c4a0db6
Signed-off-by: Arpita S.K <Arpita.S.K@arm.com>
Signed-off-by: Rui Miguel Silva <rui.silva@arm.com>
Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
Signed-off-by: Vishnu Banavath <vishnu.banavath@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-10-29 09:22:35 -04:00
Vishnu Banavath f4c7e11d78 arm-bsp/trusted-firmware-m: introducing corstone1000 FVP machine
Enables trusted-firmware-m on the corstone1000-fvp machine.

Change-Id: Id38d565e1f2b2d0a80cbd58740e64f56ddbc4cee
Signed-off-by: Drew Reed <drew.reed@arm.com>
Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
Signed-off-by: Arpita S.K <Arpita.S.K@arm.com>
Signed-off-by: Satish Kumar <satish.kumar01@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-10-29 09:22:35 -04:00
Abdellatif El Khlifi a933940df2 arm-bsp/linux: introducing corstone1000 FVP machine
This commit enables Linux kernel v5.10 for corstone1000-fvp
machine.

Change-Id: I882902bba273355428af06c29796358e17f9b379
Signed-off-by: Arpita S.K <Arpita.S.K@arm.com>
Signed-off-by: Satish Kumar <satish.kumar01@arm.com>
Signed-off-by: Vishnu Banavath <vishnu.banavath@arm.com>
Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
Signed-off-by: Rui Miguel Silva <rui.silva@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-10-29 09:22:35 -04:00
Diego Sueiro 1597b866f8 arm/trusted-firmware-a,fiptool-native: Fix fiptool execution
After http://git.yoctoproject.org/cgit/cgit.cgi/meta-arm/commit/?id=648571b113b39420735859461fcd69cfc6f66c76
the fiptool create command fails with:
    tools/fiptool/fiptool: error while loading shared libraries: libcrypto.so.3: cannot open shared object file: No such file or directory

Put back the inclusion of BUILD_LDFLAGS to fix this.

Issue-Id: SCM-3548
Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
Change-Id: I8bfddd0528d5c4dbf5dfd87c9ae17db4e0071b1c
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-10-27 10:34:37 -04:00
Ross Burton bcdbd6438f arm-bsp/n1sdp: remove explicit preferred edk2-firmware version
Whilst we have just one version of edk2-firmware, there is no reason to
select a preferred version.

Change-Id: I816de3b7dbcfc543307c792bcd16a5d69f5f4f2d
Signed-off-by: Ross Burton <ross.burton@arm.com>
2021-10-26 13:45:59 -04:00
Ross Burton f791c49103 arm/edk2-firmware: upgrade to 202105
Change-Id: I3ea527d820f410a774ff5494c9a02c434913f550
Signed-off-by: Ross Burton <ross.burton@arm.com>
2021-10-26 13:45:59 -04:00
Ross Burton 648571b113 arm/trusted-firmware-a: improve OpenSSL build fix
Take a patch that is heading upstream to pass OPENSSL_DIR to the fiptool
build, removing the need to alter the Makefiles at build time.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-10-26 09:26:52 -04:00
Ross Burton 1bef98b9ad arm/fiptool-native: improve OpenSSL build fix
Take a patch that is heading upstream to pass OPENSSL_DIR to the fiptool
build, removing the need to alter the Makefiles at build time.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-10-26 09:26:52 -04:00
Abdellatif El Khlifi fbe056ca0c arm/fiptool-native: bumping the version to v2.5
The commit provides the v2.5 recipe for fiptool-native
and removes the older versions.

Change-Id: Ie87ca97bc63bfe7ba2337b1bf05d9658921bab83
Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-10-26 09:26:52 -04:00
Ross Burton a3192e564b arm/trusted-firmware-a: remove obsolete TF-A 1.5
TF-A 1.5 is very old, remove. People who still need 1.5 will likely be
using older releases.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-10-26 09:26:52 -04:00
Abdellatif El Khlifi 536386d97d arm-bsp/trusted-firmware-a: remove TARGET_FPU build argument
TARGET_FPU passed to TF-A Makefile but is not used in TF-A source code.

Change-Id: I7c275711ed1e9fb9ee4e4df2b9c1606cacc4138c
Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-10-26 09:26:52 -04:00
Ross Burton 0078730c5e arm/fvp-library: upgrade to 11.15_14
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-10-26 09:26:52 -04:00
Ross Burton 4dc32d9047 arm/fvp-*: upgrade N1 Edge and SGI575 ecosystem models to 11.15.26
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-10-26 09:26:52 -04:00
Ross Burton 2e0c479b00 CI: use honister branch for meta-clang
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-10-26 09:26:52 -04:00
Ross Burton 9a485a96d3 arm/oeqa/fvp: handle the FVP process exiting
If the FVP has already quit when we're stopping an exception is raised,
so catch that and do nothing.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-10-26 09:26:52 -04:00
Ross Burton 99e57b7788 arm/fvp-base-a-aem: upgrade to 11.16.16
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-10-26 09:26:52 -04: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 98ee2bf6e1 arm-bsp/musca*: update trusted-firmware-m platform names
With trusted-firmware-m 1.4 the platform names have changed.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-10-21 09:09:23 -04:00
Satish Kumar 1c7e0a922a arm/trusted-firmware-m: upgrade to 1.4.0
Update TF-M to version 1.4.0, mbed TLS to 3.0.0, TF-M tests to 1.4.0,
and MCUBoot to TF-Mv1.4-integ tag.

Change-Id: I9172ed9fbf6c6c2ed88303256ef2452dafc665be
Signed-off-by: Satish Kumar <satish.kumar01@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-10-21 09:09:23 -04:00
Abdellatif El Khlifi 6a3bdad1b4 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-21 09:09:23 -04:00
Abdellatif El Khlifi 945fb594eb 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-21 09:09:23 -04:00
Ross Burton ee8d20ab2b 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>
2021-10-21 09:49:27 +01:00
Ross Burton 0b2b50b54a 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:20 +01:00
Ross Burton ba00c6d905 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-18 13:45:29 -04:00
Ross Burton bf99c56b9c 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-18 13:45:29 -04:00
Ross Burton b35745be23 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-18 13:45:29 -04:00
Ross Burton e951b861b1 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-18 13:45:29 -04:00
Ross Burton 2ecdf7e21d 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-18 13:45:29 -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 fa3c9af4fc 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-18 10:00:11 -04:00
865 changed files with 72656 additions and 37396 deletions
+1
View File
@@ -0,0 +1 @@
__pycache__
+132 -136
View File
@@ -1,9 +1,7 @@
image: ghcr.io/siemens/kas/kas
image: ghcr.io/siemens/kas/kas:latest-release
# First do a common bootstrap, and then build all the targets
stages:
- prep
- bootstrap
- build
# Common job fragment to get a worker ready
@@ -27,26 +25,21 @@ 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-get update && sudo apt-get install --yes telnet python3-subunit
# Generalised fragment to do a Kas build
.build:
extends: .setup
script:
- KASFILES=$(./ci/jobs-to-kas $CI_JOB_NAME)
- KASFILES=$(./ci/jobs-to-kas "$CI_JOB_NAME")
- kas shell --update --force-checkout $KASFILES -c 'cat conf/*.conf'
- kas build $KASFILES
- ./ci/check-warnings $KAS_WORK_DIR/build/warnings.log
# Workaround for Zephyr not currectly handling TESTIMAGE_AUTO
.build_and_test:
extends: .setup
script:
- KASFILES=$(./ci/jobs-to-kas $CI_JOB_NAME)
- kas shell --update --force-checkout $KASFILES -c 'cat conf/*.conf'
- kas build $KASFILES
- kas build $KASFILES -c testimage
- ./ci/check-warnings $KAS_WORK_DIR/build/warnings.log
artifacts:
name: "logs"
when: on_failure
paths:
- $CI_PROJECT_DIR/work/build/tmp/work*/**/temp/log.do_*.*
#
# Prep stage, update repositories once
@@ -57,77 +50,68 @@ update-repos:
script:
- flock --verbose --timeout 60 $KAS_REPO_REF_DIR ./ci/update-repos
#
# Bootstrap stage, bootstrap and machine coverage
#
# Build a number of native tools first to ensure the other builders don't race
# over them
n1sdp/bootstrap:
extends: .build
stage: bootstrap
n1sdp/clang/clang-bootstrap:
extends: .build
stage: bootstrap
# What percentage of machines in the layer do we build
machine-coverage:
stage: bootstrap
interruptible: true
script:
- ./ci/check-machine-coverage
coverage: '/Coverage: \d+/'
#
# Build stage, the actual build jobs
#
# Validate layers are Yocto Project Compatible
check-layers:
extends: .setup
coverage: '/Coverage: \d+/'
script:
- kas shell --update --force-checkout ci/base.yml:ci/meta-arm-autonomy.yml:ci/meta-openembedded.yml --command \
"$CI_PROJECT_DIR/ci/check-layers.py $CI_PROJECT_DIR/ci/check-layers.yml $CI_PROJECT_DIR $KAS_WORK_DIR"
pending-updates:
extends: .setup
artifacts:
paths:
- update-report.html
script:
- kas shell ci/qemuarm64.yml:ci/meta-openembedded.yml -c "$CI_PROJECT_DIR/scripts/machine-summary.py -t updates.html -o $CI_PROJECT_DIR/update-report.html $($CI_PROJECT_DIR/ci/listmachines.py meta-arm meta-arm-bsp)"
# Available options for building are
# TOOLCHAINS: [gcc, clang, armgcc, external-gccarm]
# TCLIBC: [glibc, musl]
# FIRMWARE: [uboot, edk2]
# VIRT: [none, xen]
# TESTING: testimage
corstone500:
extends: .build
parallel:
matrix:
- TESTING: testimage
tags:
- x86_64
corstone700-fvp:
corstone1000-fvp:
extends: .build
parallel:
matrix:
- TESTING: [testimage,tftf]
tags:
- x86_64
corstone700-mps3:
corstone1000-mps3:
extends: .build
fvp-base:
extends: .build
parallel:
matrix:
- TESTING: testimage
tags:
- x86_64
fvp-base-arm32:
extends: .build
fvp-base-arm32/external-gccarm:
extends: .build
parallel:
matrix:
- TOOLCHAINS: [gcc, external-gccarm]
TESTING: testimage
tags:
- x86_64
fvp-baser-aemv8r64:
extends: .build
parallel:
matrix:
- TESTING: testimage
tags:
- x86_64
fvps:
extends: .build
gem5-arm64:
extends: .build
gem5-arm64/xen:
extends: .build
parallel:
matrix:
- VIRT: [none, xen]
gem5-atp-arm64:
extends: .build
@@ -137,12 +121,10 @@ generic-arm64:
juno:
extends: .build
juno/clang:
extends: .build
microbit-v1/testimage-zephyr:
extends: .build_and_test
parallel:
matrix:
- TOOLCHAINS: [gcc, clang]
FIRMWARE: [uboot, edk2]
musca-b1:
extends: .build
@@ -152,57 +134,60 @@ musca-s1:
n1sdp:
extends: .build
parallel:
matrix:
- TOOLCHAINS: [gcc, armgcc]
n1sdp/armgcc:
qemu-generic-arm64:
extends: .build
parallel:
matrix:
- TOOLCHAINS: [gcc, clang]
TESTING: testimage
qemu-cortex-a53:
qemuarm64-secureboot:
extends: .build
parallel:
matrix:
- TOOLCHAINS: [gcc, clang]
TCLIBC: [glibc, musl]
TS: [none, trusted-services]
TESTING: testimage
qemu-cortex-m3/testimage-zephyr:
extends: .build_and_test
qemu-cortex-r5:
qemuarm64:
extends: .build
parallel:
matrix:
- TOOLCHAINS: [gcc, clang]
EFI: [uboot, edk2]
TESTING: testimage
- VIRT: xen
qemuarm64-sbsa:
qemuarm-secureboot:
extends: .build
parallel:
matrix:
- TOOLCHAINS: [gcc, clang]
TESTING: testimage
qemuarm64-secureboot/testimage:
qemuarm:
extends: .build
parallel:
matrix:
- TOOLCHAINS: [gcc, clang]
EFI: [uboot, edk2]
TESTING: testimage
- VIRT: xen
qemuarm64-secureboot/clang/testimage:
extends: .build
qemuarm64-secureboot/clang/musl/testimage:
extends: .build
qemuarm64-secureboot/musl/testimage:
extends: .build
qemuarm64/xen:
extends: .build
qemuarm/clang/testimage:
extends: .build
qemuarm/testimage:
extends: .build
qemuarm/xen:
extends: .build
qemuarmv5/testimage:
qemuarmv5:
extends: .build
parallel:
matrix:
- TESTING: testimage
sgi575:
extends: .build
tc0:
extends: .build
tags:
- x86_64
tc1:
extends: .build
tags:
@@ -211,53 +196,64 @@ tc1:
toolchains:
extends: .build
#
# Utility tasks, not executed automatically
#
delete-dl-dir:
selftest:
extends: .setup
stage: prep
when: manual
script:
- rm -rf $DL_DIR/*
- KASFILES=./ci/qemuarm64.yml:./ci/selftest.yml
- kas shell --update --force-checkout $KASFILES -c 'oe-selftest --num-processes 1 --run-tests runfvp'
delete-repo-dir:
# Validate layers are Yocto Project Compatible
check-layers:
extends: .setup
stage: prep
when: manual
script:
- rm -rf $KAS_REPO_REF_DIR/*
- kas shell --update --force-checkout ci/base.yml:ci/meta-openembedded.yml --command \
"yocto-check-layer-wrapper $CI_PROJECT_DIR/$LAYER --dependency $CI_PROJECT_DIR/meta-* $KAS_WORK_DIR/meta-openembedded/meta-oe --no-auto-dependency"
parallel:
matrix:
- LAYER: [meta-arm, meta-arm-bsp, meta-arm-toolchain, meta-gem5]
# Delete all sstate
delete-sstate:
pending-updates:
extends: .setup
stage: prep
when: manual
artifacts:
paths:
- update-report
script:
- rm -rf $SSTATE_DIR/*
- rm -fr update-report
# This configuration has all of the layers we need enabled
- kas shell ci/gem5-arm64.yml --command \
"$CI_PROJECT_DIR/scripts/machine-summary.py -t report -o $CI_PROJECT_DIR/update-report $($CI_PROJECT_DIR/ci/listmachines.py meta-arm meta-arm-bsp meta-gem5)"
# Do this on x86 whilst the compilers are x86-only
tags:
- x86_64
delete-toolchains:
extends: .setup
stage: prep
when: manual
# What percentage of machines in the layer do we build
machine-coverage:
stage: build
interruptible: true
script:
- rm -rf $TOOLCHAIN_DIR/*
- ./ci/check-machine-coverage
coverage: '/Coverage: \d+/'
# Wipe out old sstate
prune-sstate:
metrics:
extends: .setup
stage: prep
when: manual
artifacts:
reports:
metrics: metrics.txt
script:
- du -h -s $SSTATE_DIR
- find $SSTATE_DIR -type f -atime +30 -delete
- du -h -s $SSTATE_DIR
- kas shell --update --force-checkout ci/base.yml --command \
"$CI_PROJECT_DIR/ci/patchreview $CI_PROJECT_DIR/meta-* --verbose --metrics $CI_PROJECT_DIR/metrics.txt"
# Report on disk usage
usage:
documentation:
extends: .setup
stage: prep
when: manual
script:
- du -h -s $DL_DIR $SSTATE_DIR $KAS_REPO_REF_DIR $TOOLCHAIN_DIR
- |
sudo pip3 install -r meta-arm-bsp/documentation/requirements.txt
for CONF in meta-*/documentation/*/conf.py ; do
SOURCE_DIR=$(dirname $CONF)
MACHINE=$(basename $SOURCE_DIR)
sphinx-build -vW $SOURCE_DIR build-docs/$MACHINE
done
test -d build-docs/
artifacts:
paths:
- build-docs/
+2 -2
View File
@@ -1,6 +1,6 @@
header:
version: 9
version: 11
local_conf_header:
cc: |
GCCVERSION = "arm-10.3"
GCCVERSION = "arm-11.3"
+8 -14
View File
@@ -1,11 +1,11 @@
header:
version: 9
version: 11
distro: poky
defaults:
repos:
refspec: honister
refspec: langdale
repos:
meta-arm:
@@ -27,24 +27,18 @@ env:
local_conf_header:
base: |
CONF_VERSION = "2"
LICENSE_FLAGS_ACCEPTED += "Arm-FVP-EULA"
setup: |
PACKAGE_CLASSES = "package_ipk"
LICENSE_FLAGS_WHITELIST += "armcompiler Arm-FVP-EULA"
PACKAGECONFIG:remove:pn-qemu-system-native = "gtk+ sdl"
EXTRA_IMAGE_FEATURES:append = " debug-tweaks"
BB_NUMBER_THREADS = "16"
PARALLEL_MAKE = "-j16"
INHERIT += "rm_work"
PACKAGECONFIG:append:pn-perf = " coresight"
noptest: |
INHERIT += "rm_work"
DISTRO_FEATURES:remove = "ptest"
sstate_mirror: |
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"
perf: |
CORE_IMAGE_EXTRA_INSTALL += "perf"
machine: unset
target:
- core-image-base
- perf
- core-image-sato
-9
View File
@@ -1,9 +0,0 @@
header:
version: 9
target:
- binutils-cross-aarch64
- gcc-cross-aarch64
- python3-native
- opkg-native
- rpm-native
-44
View File
@@ -1,44 +0,0 @@
#! /usr/bin/env python3
import argparse
import pathlib
import re
import subprocess
import sys
import yaml
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument("config", type=argparse.FileType())
parser.add_argument("metaarm", type=pathlib.Path, help="Path to meta-arm")
parser.add_argument("others", type=pathlib.Path, help="Path to parent of dependencies")
args = parser.parse_args()
config = yaml.safe_load(args.config)
layers = config["layers"]
dependencies = config["dependencies"]
found_layers = [p for p in args.metaarm.glob("meta-*") if p.is_dir()]
print(f"Testing {len(layers)} layers: {', '.join(layers)}.")
print(f"Found {len(found_layers)} layers in meta-arm.")
print()
cli = ["yocto-check-layer-wrapper",]
cli.extend([args.metaarm / layer for layer in layers])
cli.append("--dependency")
cli.extend([args.others / layer for layer in dependencies])
cli.append("--no-auto-dependency")
passed = 0
process = subprocess.Popen(cli, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, universal_newlines=True)
while True:
line = process.stdout.readline()
if process.poll() is not None:
break
print(line.strip())
if re.search(r"meta-.+ PASS", line):
passed += 1
print(f"Coverage: {int(passed / len(found_layers) * 100)}%")
sys.exit(process.returncode)
-13
View File
@@ -1,13 +0,0 @@
layers:
- meta-arm
- meta-arm-bsp
- meta-arm-toolchain
- meta-gem5
- meta-arm-autonomy
dependencies:
- meta-openembedded/meta-oe
- meta-openembedded/meta-networking
- meta-openembedded/meta-python
- meta-openembedded/meta-filesystems
- poky/meta-poky
- meta-virtualization
-10
View File
@@ -1,10 +0,0 @@
header:
version: 9
target:
- binutils-cross-aarch64
- clang-cross-aarch64
- clang-native
- python3-native
- opkg-native
- rpm-native
+1 -1
View File
@@ -1,5 +1,5 @@
header:
version: 9
version: 11
repos:
meta-clang:
+15
View File
@@ -0,0 +1,15 @@
header:
version: 11
includes:
- ci/base.yml
- ci/meta-openembedded.yml
local_conf_header:
perf: |
# Intentionally blank to prevent perf from being added to the image in base.yml
distro: poky-tiny
target:
- corstone1000-image
- perf
+12
View File
@@ -0,0 +1,12 @@
header:
version: 11
includes:
- ci/corstone1000-common.yml
local_conf_header:
fvp-config: |
# Remove Dropbear SSH as it will not fit into the corstone1000 image.
IMAGE_FEATURES:remove = " ssh-server-dropbear"
INHERIT += "fvpboot"
machine: corstone1000-fvp
+6
View File
@@ -0,0 +1,6 @@
header:
version: 11
includes:
- ci/corstone1000-common.yml
machine: corstone1000-mps3
+15 -2
View File
@@ -1,6 +1,19 @@
header:
version: 9
version: 11
includes:
- base.yml
- ci/base.yml
local_conf_header:
testimagefvp: |
INHERIT += "fvpboot"
IMAGE_FEATURES:remove = " ssh-server-dropbear"
perf: |
# Intentionally blank to prevent perf from being added to the image in base.yml
machine: corstone500
distro: poky-tiny
target:
- core-image-minimal
- perf
-10
View File
@@ -1,10 +0,0 @@
header:
version: 9
includes:
- base.yml
machine: corstone700-fvp
local_conf_header:
image: |
CORE_IMAGE_EXTRA_INSTALL = "corstone700-test-app"
-6
View File
@@ -1,6 +0,0 @@
header:
version: 9
includes:
- corstone700-fvp.yml
machine: corstone700-mps3
+17
View File
@@ -0,0 +1,17 @@
header:
version: 11
local_conf_header:
bootfirmware: |
PREFERRED_PROVIDER_virtual/bootloader = "edk2-firmware"
MACHINE_FEATURES += "efi"
TFA_UBOOT = "0"
TFA_UEFI = "1"
EXTRA_IMAGEDEPENDS += "edk2-firmware"
EFI_PROVIDER ?= "grub-efi"
QB_DEFAULT_BIOS = "QEMU_EFI.fd"
WKS_FILE ?= "efi-disk.wks.in"
failing_tests: |
TEST_SUITES:remove = "xorg"
+2 -2
View File
@@ -1,8 +1,8 @@
header:
version: 9
version: 11
local_conf_header:
cc: |
PNBLACKLIST[gcc-cross-arm] = "Using external toolchain"
SKIP_RECIPE[gcc-cross-arm] = "Using external toolchain"
TCMODE = "external-arm"
EXTERNAL_TOOLCHAIN = "${TOPDIR}/toolchains/${TARGET_ARCH}"
+14 -2
View File
@@ -1,6 +1,18 @@
header:
version: 9
version: 11
includes:
- base.yml
- ci/base.yml
machine: fvp-base-arm32
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:8122, and forward that to SSH in the FVP.
TEST_TARGET_IP = "127.0.0.1:8122"
FVP_CONFIG[bp.virtio_net.hostbridge.userNetPorts] = "8122=22"
failing_tests: |
TEST_SUITES:remove = "xorg"
+13 -2
View File
@@ -1,7 +1,18 @@
header:
version: 9
version: 11
includes:
- base.yml
- ci/base.yml
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"
failing_tests: |
TEST_SUITES:remove = "xorg"
+2 -2
View File
@@ -1,7 +1,7 @@
header:
version: 9
version: 11
includes:
- base.yml
- ci/base.yml
machine: fvp-baser-aemv8r64
+3 -4
View File
@@ -1,9 +1,9 @@
# Simple target to build the FVPs that are publically available
header:
version: 9
version: 11
includes:
- base.yml
- ci/base.yml
machine: qemuarm64
@@ -16,5 +16,4 @@ target:
- nativesdk-fvp-n1-edge
- nativesdk-fvp-sgi575
- nativesdk-fvp-corstone500
- nativesdk-fvp-corstone700
- nativesdk-fvp-tc0
- nativesdk-fvp-corstone1000
+3 -4
View File
@@ -1,8 +1,8 @@
header:
version: 9
version: 11
includes:
- base.yml
- meta-openembedded.yml
- ci/base.yml
- ci/meta-openembedded.yml
repos:
meta-arm:
@@ -13,5 +13,4 @@ machine: gem5-arm64
target:
- core-image-minimal
- perf
- gem5-aarch64-native
+2 -2
View File
@@ -1,7 +1,7 @@
header:
version: 9
version: 11
includes:
- gem5-arm64.yml
- ci/gem5-arm64.yml
repos:
meta-arm:
+2 -2
View File
@@ -1,6 +1,6 @@
header:
version: 9
version: 11
includes:
- base.yml
- ci/base.yml
machine: generic-arm64
+9 -9
View File
@@ -2,7 +2,7 @@
set -u
HOST_ARCH=$(uname -m)
VER="10.3-2021.07"
VER="11.3.rel1"
DOWNLOAD_DIR=$1
TOOLCHAIN_DIR=$2
@@ -15,32 +15,32 @@ if [ $HOST_ARCH = "aarch64" ]; then
#AArch64 Linux hosted cross compilers
#AArch32 target with hard float (arm-none-linux-gnueabihf)
wget -P $DOWNLOAD_DIR -nc https://developer.arm.com/-/media/Files/downloads/gnu-a/$VER/binrel/gcc-arm-$VER-$HOST_ARCH-arm-none-linux-gnueabihf.tar.xz
wget -P $DOWNLOAD_DIR -nc https://developer.arm.com/-/media/Files/downloads/gnu/$VER/binrel/arm-gnu-toolchain-$VER-$HOST_ARCH-arm-none-linux-gnueabihf.tar.xz
elif [ $HOST_ARCH = "x86_64" ]; then
#x86_64 Linux hosted cross compilers
#AArch32 target with hard float (arm-linux-none-gnueabihf)
wget -P $DOWNLOAD_DIR -nc https://developer.arm.com/-/media/Files/downloads/gnu-a/$VER/binrel/gcc-arm-$VER-$HOST_ARCH-arm-none-linux-gnueabihf.tar.xz
wget -P $DOWNLOAD_DIR -nc https://developer.arm.com/-/media/Files/downloads/gnu/$VER/binrel/arm-gnu-toolchain-$VER-$HOST_ARCH-arm-none-linux-gnueabihf.tar.xz
#AArch64 GNU/Linux target (aarch64-none-linux-gnu)
wget -P $DOWNLOAD_DIR -nc https://developer.arm.com/-/media/Files/downloads/gnu-a/$VER/binrel/gcc-arm-$VER-$HOST_ARCH-aarch64-none-linux-gnu.tar.xz
wget -P $DOWNLOAD_DIR -nc https://developer.arm.com/-/media/Files/downloads/gnu/$VER/binrel/arm-gnu-toolchain-$VER-$HOST_ARCH-aarch64-none-linux-gnu.tar.xz
#AArch64 GNU/Linux target (aarch64_be-none-linux-gnu)
wget -P $DOWNLOAD_DIR -nc https://developer.arm.com/-/media/Files/downloads/gnu-a/$VER/binrel/gcc-arm-$VER-$HOST_ARCH-aarch64_be-none-linux-gnu.tar.xz
wget -P $DOWNLOAD_DIR -nc https://developer.arm.com/-/media/Files/downloads/gnu/$VER/binrel/arm-gnu-toolchain-$VER-$HOST_ARCH-aarch64_be-none-linux-gnu.tar.xz
else
echo "ERROR - Unknown build arch of $HOST_ARCH"
exit 1
fi
for i in arm aarch64 aarch64_be; do
if [ ! -d $TOOLCHAIN_DIR/gcc-arm-$VER-$HOST_ARCH-$i-none-linux-gnu*/ ]; then
if [ ! -f $DOWNLOAD_DIR/gcc-arm-$VER-$HOST_ARCH-$i-none-linux-gnu*.tar.xz ]; then
if [ ! -d $TOOLCHAIN_DIR/arm-gnu-toolchain-$VER-$HOST_ARCH-$i-none-linux-gnu*/ ]; then
if [ ! -f $DOWNLOAD_DIR/arm-gnu-toolchain-$VER-$HOST_ARCH-$i-none-linux-gnu*.tar.xz ]; then
continue
fi
tar -C $TOOLCHAIN_DIR -axvf $DOWNLOAD_DIR/gcc-arm-$VER-$HOST_ARCH-$i-none-linux-gnu*.tar.xz
tar -C $TOOLCHAIN_DIR -axvf $DOWNLOAD_DIR/arm-gnu-toolchain-$VER-$HOST_ARCH-$i-none-linux-gnu*.tar.xz
fi
# Setup a link for the toolchain to use local to the building machine (e.g., not in a shared location)
ln -s $TOOLCHAIN_DIR/gcc-arm-$VER-$HOST_ARCH-$i-none-linux-gnu* $TOOLCHAIN_LINK_DIR/$i
ln -s $TOOLCHAIN_DIR/arm-gnu-toolchain-$VER-$HOST_ARCH-$i-none-linux-gnu* $TOOLCHAIN_LINK_DIR/$i
done
+20 -12
View File
@@ -1,19 +1,27 @@
#! /bin/bash
# Read a GitLab CI job name on $1 and transform it to a
# list of Kas yaml files
# This script is expecting an input of machine name, optionally followed by a
# colon and a list of one or more parameters separated by commas between
# brackets. For example, the following are acceptable:
# corstone500
# fvp-base: [testimage]
# qemuarm64-secureboot: [clang, glibc, testimage]
#
# Turn this list into a series of yml files separated by colons to pass to kas
set -e -u
# Read Job namne from $1 and split on /
IFS=/ read -r -a PARTS<<<$1
FILES="ci/$(echo $1 | cut -d ':' -f 1).yml"
# Prefix each part with ci/
PARTS=("${PARTS[@]/#/ci/}")
for i in $(echo $1 | cut -s -d ':' -f 2 | sed 's/[][,]//g'); do
# Given that there are no yml files for gcc or glibc, as those are the
# defaults, we can simply ignore those parameters. They are necessary
# to pass in so that matrix can correctly setup all of the permutations
# of each individual run.
if [[ $i == 'none' || $i == 'gcc' || $i == 'glibc' || $i == 'uboot' ]]; then
continue
fi
FILES+=":ci/$i.yml"
done
# Suffix each part with .yml
PARTS=("${PARTS[@]/%/.yml}")
# Print colon-separated
IFS=":"
echo "${PARTS[*]}"
echo $FILES
+2 -2
View File
@@ -1,6 +1,6 @@
header:
version: 9
version: 11
includes:
- base.yml
- ci/base.yml
machine: juno
-10
View File
@@ -1,10 +0,0 @@
header:
version: 9
includes:
- meta-openembedded.yml
- meta-virtualization.yml
repos:
meta-arm:
layers:
meta-arm-autonomy:
+1 -1
View File
@@ -1,5 +1,5 @@
header:
version: 9
version: 11
repos:
meta-openembedded:
+2 -2
View File
@@ -1,7 +1,7 @@
header:
version: 9
version: 11
includes:
- meta-openembedded.yml
- ci/meta-openembedded.yml
repos:
meta-virtualization:
-9
View File
@@ -1,9 +0,0 @@
header:
version: 9
includes:
- meta-openembedded.yml
repos:
meta-zephyr:
url: https://git.yoctoproject.org/git/meta-zephyr
refspec: master
-16
View File
@@ -1,16 +0,0 @@
header:
version: 9
includes:
- base.yml
- meta-zephyr.yml
local_conf_header:
nonbuilding_tests: |
ZEPHYRTESTS:remove = "common"
failing_tests: |
ZEPHYRTESTS:remove = "context early_sleep sleep"
machine: microbit-v1
target:
- zephyr-kernel-test-all
+3 -4
View File
@@ -1,11 +1,10 @@
header:
version: 9
version: 11
includes:
- base.yml
- meta-zephyr.yml
- ci/base.yml
- ci/meta-openembedded.yml
machine: musca-b1
target:
- trusted-firmware-m
- zephyr-philosophers
+3 -3
View File
@@ -1,8 +1,8 @@
header:
version: 9
version: 11
includes:
- base.yml
- meta-openembedded.yml
- ci/base.yml
- ci/meta-openembedded.yml
machine: musca-s1
+1 -1
View File
@@ -1,5 +1,5 @@
header:
version: 9
version: 11
local_conf_header:
libc: |
+2 -2
View File
@@ -1,6 +1,6 @@
header:
version: 9
version: 11
includes:
- base.yml
- ci/base.yml
machine: n1sdp
Executable
+286
View File
@@ -0,0 +1,286 @@
#! /usr/bin/env python3
#
# SPDX-License-Identifier: GPL-2.0-only
#
# TODO
# - option to just list all broken files
# - test suite
# - validate signed-off-by
import argparse
import collections
import json
import os
import re
import subprocess
status_values = (
"accepted",
"pending",
"inappropriate",
"backport",
"submitted",
"denied",
)
class PatchResult:
# Whether the patch has an Upstream-Status or not
missing_upstream_status = False
# If the Upstream-Status tag is malformed in some way (string for bad bit)
malformed_upstream_status = None
# If the Upstream-Status value is unknown (boolean)
unknown_upstream_status = False
# The upstream status value (Pending, etc)
upstream_status = None
# Whether the patch has a Signed-off-by or not
missing_sob = False
# Whether the Signed-off-by tag is malformed in some way
malformed_sob = False
# The Signed-off-by tag value
sob = None
# Whether a patch looks like a CVE but doesn't have a CVE tag
missing_cve = False
class Summary:
total = 0
cve_missing = 0
sob_missing = 0
sob_malformed = 0
status_missing = 0
status_malformed = 0
status_pending = 0
def blame_patch(patch):
"""
From a patch filename, return a list of "commit summary (author name <author
email>)" strings representing the history.
"""
return subprocess.check_output(("git", "log",
"--follow", "--find-renames", "--diff-filter=A",
"--format=%s (%aN <%aE>)",
"--", patch)).decode("utf-8").splitlines()
def patchreview(patches):
# General pattern: start of line, optional whitespace, tag with optional
# hyphen or spaces, maybe a colon, some whitespace, then the value, all case
# insensitive.
sob_re = re.compile(r"^[\t ]*(Signed[-_ ]off[-_ ]by:?)[\t ]*(.+)", re.IGNORECASE | re.MULTILINE)
status_re = re.compile(r"^[\t ]*(Upstream[-_ ]Status:?)[\t ]*(\w*)", re.IGNORECASE | re.MULTILINE)
cve_tag_re = re.compile(r"^[\t ]*(CVE:)[\t ]*(.*)", re.IGNORECASE | re.MULTILINE)
cve_re = re.compile(r"cve-[0-9]{4}-[0-9]{4,6}", re.IGNORECASE)
results = {}
for patch in patches:
result = PatchResult()
results[patch] = result
content = open(patch, encoding="ascii", errors="ignore").read()
# Find the Signed-off-by tag
match = sob_re.search(content)
if match:
value = match.group(1)
if value != "Signed-off-by:":
result.malformed_sob = value
result.sob = match.group(2)
else:
result.missing_sob = True
# Find the Upstream-Status tag
match = status_re.search(content)
if match:
value = match.group(1)
if value != "Upstream-Status:":
result.malformed_upstream_status = value
value = match.group(2).lower()
# TODO: check case
if value not in status_values:
result.unknown_upstream_status = True
result.upstream_status = value
else:
result.missing_upstream_status = True
# Check that patches which looks like CVEs have CVE tags
if cve_re.search(patch) or cve_re.search(content):
if not cve_tag_re.search(content):
result.missing_cve = True
# TODO: extract CVE list
return results
def analyse(results, want_blame=False, verbose=True):
"""
want_blame: display blame data for each malformed patch
verbose: display per-file results instead of just summary
"""
# want_blame requires verbose, so disable blame if we're not verbose
if want_blame and not verbose:
want_blame = False
summary = Summary()
for patch in sorted(results):
r = results[patch]
summary.total += 1
need_blame = False
# Build statistics
if r.missing_sob:
summary.sob_missing += 1
if r.malformed_sob:
summary.sob_malformed += 1
if r.missing_upstream_status:
summary.status_missing += 1
if r.malformed_upstream_status or r.unknown_upstream_status:
summary.status_malformed += 1
# Count patches with no status as pending
summary.status_pending += 1
if r.missing_cve:
summary.cve_missing += 1
if r.upstream_status == "pending":
summary.status_pending += 1
# Output warnings
if r.missing_sob:
need_blame = True
if verbose:
print("Missing Signed-off-by tag (%s)" % patch)
if r.malformed_sob:
need_blame = True
if verbose:
print("Malformed Signed-off-by '%s' (%s)" % (r.malformed_sob, patch))
if r.missing_cve:
need_blame = True
if verbose:
print("Missing CVE tag (%s)" % patch)
if r.missing_upstream_status:
need_blame = True
if verbose:
print("Missing Upstream-Status tag (%s)" % patch)
if r.malformed_upstream_status:
need_blame = True
if verbose:
print("Malformed Upstream-Status '%s' (%s)" % (r.malformed_upstream_status, patch))
if r.unknown_upstream_status:
need_blame = True
if verbose:
print("Unknown Upstream-Status value '%s' (%s)" % (r.upstream_status, patch))
if want_blame and need_blame:
print("\n".join(blame_patch(patch)) + "\n")
return summary
def display_summary(summary, verbose):
def percent(num):
try:
return "%d (%d%%)" % (num, round(num * 100.0 / summary.total))
except ZeroDivisionError:
return "N/A"
if verbose:
print()
print("""Total patches found: %d
Patches missing Signed-off-by: %s
Patches with malformed Signed-off-by: %s
Patches missing CVE: %s
Patches missing Upstream-Status: %s
Patches with malformed Upstream-Status: %s
Patches in Pending state: %s""" % (summary.total,
percent(summary.sob_missing),
percent(summary.sob_malformed),
percent(summary.cve_missing),
percent(summary.status_missing),
percent(summary.status_malformed),
percent(summary.status_pending)))
def generate_metrics(summary, output):
# https://github.com/OpenObservability/OpenMetrics/blob/main/specification/OpenMetrics.md
# Summary attribute name, MetricPoint help
mapping = (
("total", "Total patches"),
("cve_missing", "Patches missing CVE tag"),
("sob_malformed", "Patches with malformed Signed-off-by"),
("sob_missing", "Patches with missing Signed-off-by"),
("status_malformed", "Patches with malformed Upstream-Status"),
("status_missing", "Patches with missing Upstream-Status"),
("status_pending", "Patches with Pending Upstream-Status")
)
for attr, help in mapping:
metric = f"patch_check_{attr}"
value = getattr(summary, attr)
output.write(f"""
# TYPE {metric} gauge
# HELP {help}
{metric} {value}
""")
output.write("\n# EOF\n")
def histogram(results):
import math
from toolz import dicttoolz, recipes
counts = recipes.countby(lambda r: r.upstream_status, results.values())
bars = dicttoolz.valmap(lambda v: "#" * int(math.ceil(float(v) / len(results) * 100)), counts)
for k in bars:
print("%-20s %s (%d)" % (k.capitalize() if k else "No status", bars[k], counts[k]))
def gather_patches(directories):
patches = []
for directory in directories:
filenames = subprocess.check_output(("git", "-C", directory, "ls-files", "recipes-*/**/*.patch", "recipes-*/**/*.diff")).decode("utf-8").split()
patches += [os.path.join(directory, f) for f in filenames]
return patches
if __name__ == "__main__":
args = argparse.ArgumentParser(description="Patch Review Tool")
args.add_argument("-b", "--blame", action="store_true", help="show blame for malformed patches")
args.add_argument("-v", "--verbose", action="store_true", help="show per-patch results")
args.add_argument("-g", "--histogram", action="store_true", help="show patch histogram")
args.add_argument("-j", "--json", help="update JSON")
args.add_argument("-m", "--metrics", type=argparse.FileType('w'), help="write OpenMetrics")
args.add_argument("dirs", metavar="DIRECTORY", nargs="+", help="directory to scan")
args = args.parse_args()
patches = gather_patches(args.dirs)
results = patchreview(patches)
summary = analyse(results, want_blame=args.blame, verbose=args.verbose)
display_summary(summary, verbose=args.verbose)
if args.json:
if os.path.isfile(args.json):
data = json.load(open(args.json))
else:
data = []
row = collections.Counter()
row["total"] = len(results)
row["date"] = subprocess.check_output(["git", "-C", args.dirs[0], "show", "-s", "--pretty=format:%cd", "--date=format:%s"]).decode("utf-8").strip()
for r in results.values():
if r.upstream_status in status_values:
row[r.upstream_status] += 1
if r.malformed_upstream_status or r.missing_upstream_status:
row["malformed-upstream-status"] += 1
if r.malformed_sob or r.missing_sob:
row["malformed-sob"] += 1
data.append(row)
json.dump(data, open(args.json, "w"))
if args.metrics:
generate_metrics(summary, args.metrics)
if args.histogram:
print()
histogram(results)
-14
View File
@@ -1,14 +0,0 @@
header:
version: 9
includes:
- base.yml
- meta-zephyr.yml
local_conf_header:
nonbuilding_tests: |
ZEPHYRTESTS:remove += "common device poll queue sleep"
machine: qemu-cortex-a53
target:
- zephyr-kernel-test-all
-16
View File
@@ -1,16 +0,0 @@
header:
version: 9
includes:
- base.yml
- meta-zephyr.yml
local_conf_header:
tclibc: |
TCLIBC = "newlib"
nonbuilding_tests: |
ZEPHYRTESTS:remove = "common context pending poll sleep"
machine: qemu-cortex-m3
target:
- zephyr-kernel-test-all
-10
View File
@@ -1,10 +0,0 @@
header:
version: 9
includes:
- base.yml
- meta-zephyr.yml
machine: qemu-cortex-r5
target:
- zephyr-philosophers
+14
View File
@@ -0,0 +1,14 @@
header:
version: 11
includes:
- ci/generic-arm64.yml
local_conf_header:
failing_tests: |
DEFAULT_TEST_SUITES:remove = "parselogs"
machine: qemu-generic-arm64
target:
- core-image-sato
- sbsa-acs
+12
View File
@@ -0,0 +1,12 @@
header:
version: 11
includes:
- ci/base.yml
machine: qemuarm-secureboot
target:
- core-image-base
- optee-examples
- optee-test
- optee-os-tadevkit
+2 -2
View File
@@ -1,6 +1,6 @@
header:
version: 9
version: 11
includes:
- base.yml
- ci/base.yml
machine: qemuarm
-11
View File
@@ -1,11 +0,0 @@
header:
version: 9
includes:
- base.yml
machine: qemuarm64-sbsa
target:
- core-image-base
- perf
- sbsa-acs
+4 -8
View File
@@ -1,16 +1,12 @@
header:
version: 9
version: 11
includes:
- base.yml
- ci/base.yml
machine: qemuarm64-secureboot
local_conf_header:
bugs: |
# Only ping until errors can be resolved
TEST_SUITES = "ping"
target:
- core-image-base
- perf
- optee-examples
- optee-test
- optee-os-tadevkit
+2 -2
View File
@@ -1,6 +1,6 @@
header:
version: 9
version: 11
includes:
- base.yml
- ci/base.yml
machine: qemuarm64
+2 -2
View File
@@ -1,6 +1,6 @@
header:
version: 9
version: 11
includes:
- base.yml
- ci/base.yml
machine: qemuarmv5
+7
View File
@@ -0,0 +1,7 @@
header:
version: 11
local_conf_header:
setup: |
BB_LOGCONFIG = ""
SANITY_TESTED_DISTROS = ""
+2 -2
View File
@@ -1,6 +1,6 @@
header:
version: 9
version: 11
includes:
- base.yml
- ci/base.yml
machine: sgi575
-10
View File
@@ -1,10 +0,0 @@
header:
version: 9
includes:
- base.yml
machine: tc0
target:
- tc-artifacts-image
- perf
+2 -3
View File
@@ -1,10 +1,9 @@
header:
version: 9
version: 11
includes:
- base.yml
- ci/base.yml
machine: tc1
target:
- tc-artifacts-image
- perf
-8
View File
@@ -1,8 +0,0 @@
header:
version: 9
local_conf_header:
testimage: |
IMAGE_CLASSES += "testimage"
TEST_TARGET = "QemuTargetZephyr"
TEST_SUITES = "zephyr"
+8 -6
View File
@@ -1,17 +1,19 @@
header:
version: 9
version: 11
local_conf_header:
testimage: |
IMAGE_CLASSES += "testimage"
TESTIMAGE_AUTO = "1"
kvm: |
QEMU_USE_KVM = ""
slirp: |
TEST_RUNQEMUPARAMS = "slirp"
TEST_SERVER_IP = "127.0.0.1"
QEMU_USE_SLIRP = "1"
packages: |
sshd: |
IMAGE_FEATURES:append = " ssh-server-dropbear"
# Multiple targets are available, put it down to just one
target:
- core-image-base
sshkeys: |
CORE_IMAGE_EXTRA_INSTALL += "ssh-pregen-hostkeys"
universally_failing_tests: |
TEST_SUITES:remove = "opkg"
+7
View File
@@ -0,0 +1,7 @@
header:
version: 9
local_conf_header:
tftf: |
TFA_UBOOT = "0"
TFTF_TESTS = "1"
+3 -4
View File
@@ -1,7 +1,7 @@
header:
version: 9
version: 11
includes:
- base.yml
- ci/base.yml
# Target is arm64 and SDK is x86-64 to ensure that we exercise both
# architectures
@@ -11,10 +11,9 @@ local_conf_header:
toolchains: |
SDKMACHINE = "x86_64"
# No target armcompiler as currently there is no arm64 build
target:
- nativesdk-armcompiler
- gcc-aarch64-none-elf
- nativesdk-gcc-aarch64-none-elf
- gcc-arm-none-eabi
- nativesdk-gcc-arm-none-eabi
- nativesdk-androidclang
+14
View File
@@ -0,0 +1,14 @@
header:
version: 11
includes:
- ci/meta-openembedded.yml
local_conf_header:
trusted_services: |
TEST_SUITES:append = " trusted_services"
# Include TS Crypto, Storage, ITS, Attestation and SMM-Gateway SPs into optee-os image
MACHINE_FEATURES:append = " arm-ffa ts-crypto ts-storage ts-its ts-attestation ts-smm-gateway"
# Include TS demo/test tools into image
IMAGE_INSTALL:append = " packagegroup-ts-tests"
# Include TS PSA Arch tests into image
IMAGE_INSTALL:append = " packagegroup-ts-tests-psa"
-1
View File
@@ -22,7 +22,6 @@ repositories = (
"https://git.yoctoproject.org/git/poky",
"https://git.openembedded.org/meta-openembedded",
"https://git.yoctoproject.org/git/meta-virtualization",
"https://git.yoctoproject.org/git/meta-zephyr",
"https://github.com/kraj/meta-clang",
)
+2 -2
View File
@@ -1,7 +1,7 @@
header:
version: 9
version: 11
includes:
- meta-virtualization.yml
- ci/meta-virtualization.yml
local_conf_header:
meta-virt: |
+55
View File
@@ -0,0 +1,55 @@
# OEQA on Arm FVPs
OE-Core's [oeqa][OEQA] framework provides a method of performing runtime tests on machines using the `testimage` Yocto task. meta-arm has good support for writing test cases against [Arm FVPs][FVP], meaning the [runfvp][RUNFVP] boot configuration can be re-used.
Tests can be configured to run automatically post-build by setting the variable `TESTIMAGE_AUTO="1"`, e.g. in your Kas file or local.conf.
There are two main methods of testing, using different test "targets".
## OEFVPTarget
This runs test cases on a machine using SSH. It therefore requires that an SSH server is installed in the image.
In test cases, the primary interface with the target is, e.g:
```
(status, output) = self.target.run('uname -a')
```
which runs a single command on the target (using `ssh -c`) and returns the status code and the output. It is therefore useful for running tests in a Linux environment.
For examples of test cases, see meta/lib/oeqa/runtime/cases in OE-Core. The majority of test cases depend on `ssh.SSHTest.test_ssh`, which first validates that the SSH connection is functioning.
Example machine configuration:
```
TEST_TARGET = "OEFVPTarget"
TEST_SERVER_IP = "127.0.0.1"
TEST_TARGET_IP = "127.0.0.1:8022"
IMAGE_FEATURES:append = " ssh-server-dropbear"
FVP_CONFIG[bp.virtio_net.hostbridge.userNetPorts] ?= "8022=22"
```
## OEFVPSerialTarget
This runs tests against one or more serial consoles on the FVP. It is more flexible than OEFVPTarget, but test cases written for this test target do not support the test cases in OE-core. As it does not require an SSH server, it is suitable for machines with performance or memory limitations.
Internally, this test target launches a [Pexpect][PEXPECT] instance for each entry in FVP_CONSOLES which can be used with the provided alias. The whole Pexpect API is exposed on the target, where the alias is always passed as the first argument, e.g.:
```
self.target.expect('default', r'root@.*\:~#', timeout=30)
self.assertNotIn(b'ERROR:', self.target.before('tf-a'))
```
For an example of a full test case, see meta-arm/lib/oeqa/runtime/cases/linuxboot.py This test case can be used to minimally verify that a machine boots to a Linux shell. The default timeout is 10 minutes, but this can be configured with the variable TEST_FVP_LINUX_BOOT_TIMEOUT, which expects a value in seconds.
The SSH interface described above is also available on OEFVPSerialTarget to support writing a set of hybrid test suites that use a combination of serial and SSH access. Note however that this test target does not guarantee that Linux has booted to shell prior to running any tests, so the test cases in OE-core are not supported.
Example machine configuration:
```
TEST_TARGET="OEFVPSerialTarget"
TEST_SUITES="linuxboot"
FVP_CONSOLES[default] = "terminal_0"
FVP_CONSOLES[tf-a] = "s_terminal_0"
```
[OEQA]: https://docs.yoctoproject.org/test-manual/intro.html
[FVP]: https://developer.arm.com/tools-and-software/simulation-models/fixed-virtual-platforms
[RUNFVP]: runfvp.md
[PEXPECT]: https://pexpect.readthedocs.io/en/stable/overview.html
+131
View File
@@ -0,0 +1,131 @@
# Running Images with a FVP
The `runfvp` tool in meta-arm makes it easy to run Yocto Project disk images inside a [Fixed Virtual Platform (FVP)][FVP]. Some FVPs, such as the [Arm Architecture Models][AEM], are available free to download, but others need registration or are only available commercially. The `fvp-base` machine in meta-arm-bsp uses one of these AEM models.
## Running images with `runfvp`
To build images with the FVP integration, the `fvpboot` class needs to be inherited. If the machine does not do this explicitly it can be done in `local.conf`:
```
INHERIT += "fvpboot"
```
The class will download the correct FVP and write a `.fvpconf` configuration file when an image is built.
To run an image in a FVP, pass either a machine name or a `.fvpconf` path to `runfvp`.
```
$ ./meta-arm/scripts/runfvp tmp/deploy/images/fvp-base/core-image-minimal-fvp-base.fvpconf
```
When a machine name is passed, `runfvp` will start the latest image that has been built for that machine. This requires that the BitBake environment has been initialized (using `oe-init-build-env` or similar) as it will start BitBake to determine where the images are.
```
$ ./meta-arm/scripts/runfvp fvp-base
```
Note that currently meta-arm's `scripts` directory isn't in `PATH`, so a full path needs to be used.
`runfvp` will automatically start terminals connected to each of the serial ports that the machine specifies. This can be controlled by using the `--terminals` option, for example `--terminals=none` will mean no terminals are started, and `--terminals=tmux` will start the terminals in [`tmux`][tmux] sessions. Alternatively, passing `--console` will connect the serial port directly to the current session, without needing to open further windows.
The default terminal can also be configured by writing a [INI-style][INI] configuration file to `~/.config/runfvp.conf`:
```
[RunFVP]
Terminal=tmux
```
Arbitrary options can be passed directly to the FVP by specifying them after a double dash, for example this will list all of the FVP parameters:
```
$ runfvp fvp-base -- --list-params
```
## Configuring machines with `fvpboot`
To configure a machine so that it can be ran inside `runfvp`, a number of variables need to be set in the machine configuration file (such as `meta-arm-bsp/conf/machine/fvp-base.conf`).
Note that at present these variables are not stable and their behaviour may be changed in the future.
### `FVP_EXE`
The name of the FVP binary itself, for example `fvp-base` uses `FVP_Base_RevC-2xAEMvA`.
### `FVP_PROVIDER`
The name of the recipe that provides the FVP executable set in `FVP_EXE`, for example `fvp-base` uses `fvp-base-a-aem-native`. This *must* be a `-native` recipe as the binary will be executed on the build host.
There are recipes for common FVPs in meta-arm already, and writing new recipes is trivial. For FVPs which are free to download `fvp-base-a-aem.bb` is a good example. Some FVPs must be downloaded separately as they need an account on Arm's website, `fvp-base-r-aem.bb` is a good example of those.
If `FVP_PROVIDER` is not set then it is assumed that `FVP_EXE` is installed on the host already.
### `FVP_CONFIG`
Parameters passed to the FVP with the `--parameter`/`-C` option. These are expressed as variable flags so individual parameters can be altered easily. For example:
```
FVP_CONFIG[bp.flashloader0.fname] = "${DEPLOY_DIR_IMAGE}/fip-fvp.bin"
```
### `FVP_DATA`
Specify raw data to load at the specified address, passed to the FVP with the `--data` option. This is a space-separated list of parameters in the format `[INST=]FILE@[MEMSPACE:]ADDRESS`. For example:
```
FVP_DATA = "cluster0.cpu0=${DEPLOY_DIR_IMAGE}/Image@0x80080000 \
cluster0.cpu0=${DEPLOY_DIR_IMAGE}/fvp-base-revc.dtb@0x83000000"
```
### `FVP_APPLICATIONS`
Applications to load on the cores, passed to the FVP with the `--application` option. These are expressed as variable flags with the flag name being the instance and flag value the filename, for example:
```
FVP_APPLICATIONS[cluster0] = "${DEPLOY_DIR_IMAGE}/linux-system.axf"
```
Note that symbols are not allowed in flag names, so if you need to use a wildcard in the instance then you'll need to use `FVP_EXTRA_ARGS` and `--application` directly.
### `FVP_TERMINALS`
Map hardware serial ports to abstract names. For example the `FVP_Base_RevC-2xAEMvA` FVP exposes four serial ports, `terminal_0` to `terminal_3`. Typically only `terminal_0` is used in the `fvp-base` machine so this can be named `"Console"` and the others `""`. When runfvp starts terminals it will only start named serial ports, so instead of opening four windows where only one is useful, it will only open one.
For example:
```
FVP_TERMINALS[bp.terminal_0] = "Console"
FVP_TERMINALS[bp.terminal_1] = ""
FVP_TERMINALS[bp.terminal_2] = ""
FVP_TERMINALS[bp.terminal_3] = ""
```
### `FVP_CONSOLES`
This specifies what serial ports can be used in oeqa tests, along with an alias to be used in the test cases. Note that the values have to be the FVP identifier but without the board prefix, for example:
```
FVP_CONSOLES[default] = "terminal_0"
FVP_CONSOLES[tf-a] = "s_terminal_0"
```
The 'default' console is also used when `--console` is passed to runfvp.
### `FVP_EXTRA_ARGS`
Arbitrary extra arguments that are passed directly to the FVP. For example:
```
FVP_EXTRA_ARGS = "--simlimit 60"
```
### `FVP_ENV_PASSTHROUGH`
The FVP is launched with an isolated set of environment variables. Add the name of a Bitbake variable to this list to pass it through to the FVP environment. For example:
```
FVP_ENV_PASSTHROUGH = "ARMLMD_LICENSE_FILE FM_TRACE_PLUGINS"
```
[AEM]: https://developer.arm.com/tools-and-software/simulation-models/fixed-virtual-platforms/arm-ecosystem-models
[FVP]: https://developer.arm.com/tools-and-software/simulation-models/fixed-virtual-platforms
[tmux]: https://tmux.github.io/
[INI]: https://docs.python.org/3/library/configparser.html
+53
View File
@@ -0,0 +1,53 @@
# The Trusted Services: framework for developing root-of-trust services
meta-arm layer includes recipes for [Trusted Services][1] Secure Partitions and Normal World applications
in `meta-arm/recipes-security/trusted-services`
## Secure Partitions recipes
We define dedicated recipes for all supported Trusted Services (TS) Secure Partitions.
These recipes produce ELF and DTB files for SPs.
These files are automatically included into optee-os image accordingly to defined MACHINE_FEATURES.
### How to include TS SPs
To include TS SPs into optee-os image you need to add into MACHINE_FEATURES
features for each [Secure Partition][2] you would like to include:
| Secure Partition | MACHINE_FEATURE |
| ----------------- | --------------- |
| Attestation | ts-attesation |
| Crypto | ts-crypto |
| Internal Storage | ts-its |
| Protected Storage | ts-storage |
| se-proxy | ts-se-proxy |
| smm-gateway | ts-smm-gateway |
Other steps depend on your machine/platform definition:
1. For communications between Secure and Normal Words Linux kernel option `CONFIG_ARM_FFA_TRANSPORT=y`
is required. If your platform doesn't include it already you can add `arm-ffa` into MACHINE_FEATURES.
2. optee-os might require platform specific OP-TEE build parameters (for example what SEL the SPM Core is implemented at).
You can find examples in `meta-arm/recipes-security/optee/optee-os_%.bbappend` for qemuarm64-secureboot machine
and in `meta-arm-bsp/recipes-security/optee/optee-os-n1sdp.inc` and `meta-arm-bsp/recipes-security/optee/optee-os-corstone1000-common.inc`
for N1SDP and Corstone1000 platforms accordingly.
3. trusted-firmware-a might require platform specific TF-A build parameters (SPD and SPMC details on the platform).
See `meta-arm/recipes-bsp/trusted-firmware-a/trusted-firmware-a_%.bbappend` for qemuarm64-secureboot machine
and in `meta-arm-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware-a-n1sdp.inc` and
`meta-arm-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware-a-corstone1000.inc` for N1SDP and Corstone1000 platforms.
## Normal World applications
Optionally for testing purposes you can add `packagegroup-ts-tests` and `packagegroup-ts-tests-psa` package groups into your image.
They include [Trusted Services test and demo tools][3]
## OEQA Trusted Services tests
meta-arm also includes Trusted Service OEQA tests which can be used for automated testing.
See `ci/trusted-services.yml` for an example how to include them into an image.
[1] https://trusted-services.readthedocs.io/en/integration/overview/introduction.html
[2] https://trusted-services.readthedocs.io/en/integration/developer/deployments/secure-partitions.html
[3] https://trusted-services.readthedocs.io/en/integration/developer/deployments/test-executables.html
+42
View File
@@ -0,0 +1,42 @@
header:
version: 11
distro: poky-tiny
defaults:
repos:
refspec: langdale
repos:
meta-arm:
layers:
meta-arm:
meta-arm-bsp:
meta-arm-toolchain:
poky:
url: https://git.yoctoproject.org/git/poky
layers:
meta:
meta-poky:
meta-yocto-bsp:
meta-openembedded:
url: https://git.openembedded.org/meta-openembedded
layers:
meta-oe:
meta-python:
local_conf_header:
base: |
CONF_VERSION = "2"
PACKAGE_CLASSES = "package_ipk"
LICENSE_FLAGS_ACCEPTED += "armcompiler"
BB_NUMBER_THREADS ?= "16"
PARALLEL_MAKE ?= "-j16"
PACKAGECONFIG:append:pn-perf = " coresight"
machine: unset
target:
- corstone1000-image
+16
View File
@@ -0,0 +1,16 @@
header:
version: 11
includes:
- kas/corstone1000-base.yml
machine: corstone1000-fvp
local_conf_header:
fvp-config: |
# Remove Dropbear SSH as it will not fit into the corstone1000 image.
IMAGE_FEATURES:remove = " ssh-server-dropbear"
INHERIT = " ${@bb.utils.contains('BUILD_ARCH', 'x86_64', 'fvpboot', '', d)}"
LICENSE_FLAGS_ACCEPTED:append = " Arm-FVP-EULA"
target:
- corstone1000-image
+6
View File
@@ -0,0 +1,6 @@
header:
version: 11
includes:
- kas/corstone1000-base.yml
machine: corstone1000-mps3
+47
View File
@@ -0,0 +1,47 @@
header:
version: 11
distro: poky-tiny
defaults:
repos:
refspec: master
repos:
meta-arm:
layers:
meta-arm:
meta-arm-bsp:
meta-arm-toolchain:
poky:
url: https://git.yoctoproject.org/git/poky
refspec: master
layers:
meta:
meta-poky:
meta-yocto-bsp:
meta-openembedded:
url: https://git.openembedded.org/meta-openembedded
refspec: master
layers:
meta-oe:
meta-python:
local_conf_header:
base: |
CONF_VERSION = "2"
PACKAGE_CLASSES = "package_ipk"
LICENSE_FLAGS_ACCEPTED += "armcompiler"
BB_NUMBER_THREADS ?= "16"
PARALLEL_MAKE ?= "-j16"
PACKAGECONFIG:append:pn-perf = " coresight"
fvp-config: |
IMAGE_CLASSES:append = " ${@bb.utils.contains('BUILD_ARCH', 'x86_64', 'fvpboot', '', d)}"
LICENSE_FLAGS_ACCEPTED:append = " Arm-FVP-EULA"
machine: corstone500
target:
- core-image-minimal
+4 -4
View File
@@ -25,7 +25,6 @@ repos:
meta-poky:
env:
FVP_BASE_R_AEM_TARBALL_URI: ""
FVP_BASE_R_ARM_EULA_ACCEPT: "False"
local_conf_header:
@@ -33,9 +32,10 @@ local_conf_header:
CONF_VERSION = "2"
PACKAGE_CLASSES = "package_ipk"
PACKAGECONFIG:remove:pn-qemu-system-native = "gtk+ sdl"
EXTRA_IMAGE_FEATURES:append = " debug-tweaks"
IMAGE_CLASSES:append = " ${@oe.utils.ifelse(d.getVar('FVP_BASE_R_AEM_TARBALL_URI'), 'fvpboot', '')}"
LICENSE_FLAGS_WHITELIST:append = " ${@oe.utils.vartrue('FVP_BASE_R_ARM_EULA_ACCEPT', 'Arm-FVP-EULA', '', d)}"
EXTRA_IMAGE_FEATURES:append = " debug-tweaks ssh-server-openssh"
CORE_IMAGE_EXTRA_INSTALL:append = " ssh-pregen-hostkeys"
LICENSE_FLAGS_ACCEPTED:append = " ${@oe.utils.vartrue('FVP_BASE_R_ARM_EULA_ACCEPT', 'Arm-FVP-EULA', '', d)}"
IMAGE_CLASSES:append = " testimage"
target:
- core-image-minimal
+1 -1
View File
@@ -1,7 +1,7 @@
header:
version: 9
includes:
- fvp-baser-aemv8r64-bsp.yml
- kas/fvp-baser-aemv8r64-bsp.yml
local_conf_header:
base-rt: |
+7
View File
@@ -0,0 +1,7 @@
header:
version: 9
local_conf_header:
tftf: |
TFA_UBOOT = "0"
TFTF_TESTS = "1"
-93
View File
@@ -1,93 +0,0 @@
meta-arm-autonomy Yocto Layer
=============================
Introduction
------------
This layer provides an hypervisor based solution (currently based on Xen) for
autonomous system. It contains recipes and classes to build host and guest
images.
To start using this layer, please check the
[Quick Start Guide](documentation/arm-autonomy-quickstart.md).
Dependencies
------------
This layer depends on several other Yocto layers:
* meta-openembedded (https://git.openembedded.org/meta-openembedded)
* poky (https://git.yoctoproject.org/poky)
* meta-virtualization (https://git.yoctoproject.org/meta-virtualization)
* meta-networking (git://git.openembedded.org/meta-openembedded)
Distribution Features
---------------------
This layer adds the following Yocto DISTRO_FEATURES:
* arm-autonomy-host: this feature activates functionalities required to build
an autonomy host system. It has the following effects:
- add 'xen' and 'ipv4' to DISTRO_FEATURES.
- add xen backend drivers to linux kernel configuration.
- To reduce the root filesystem image size the kernel image is not installed.
* arm-autonomy-guest: this feature activates functionalities to run as guest
of an autonomy system. It is doing the following:
- add 'ipv4' to DISTRO_FEATURES.
- add xen frontend drivers to linux kernel configuration.
- add console on hvc0 during init.
Bitbake variables
-----------------
Some recipes and classes in this layer are introducing variables which can be
modified by the user in local.conf.
Each recipe introducing such variables has a chapter "Bitbake parameters" in
its documentation.
Those documentation files should be checked for variables:
- [xen-devicetree](documentation/xen-devicetree.md)
- [xenguest-manager](documentation/xenguest-manager.md)
- [xenguest-network](documentation/xenguest-network.md)
BSPs
----
This layer adds the following machine:
* arm64-autonomy-guest: This machine creates a minimal BSP suitable to be used
as an autonomy guest. It is in fact only activating ARM64 architecture and
SMP in the linux kernel and is enabling the DISTRO_FEATURE
'arm-autonomy-guest'.
Images
------
This layer is adding the following images:
* arm-autonomy-host-image-minimal: This image includes all elements required
to create a minimal arm-autonomy-host system. This includes xen, and tools to
manage xen guests and xenguest images. This image depends on
'arm-autonomy-host' distribution feature.
Recipes and classes
-------------------
This layer adds the following recipes and classes:
* [xen-devicetree](documentation/xen-devicetree.md): This is a recipe to modify
a device tree blob to add information required to boot xen and a Dom0 linux.
* [xenguest-mkimage](documentation/xenguest-mkimage.md): This is a tool used to
create and modify images to be used as Xen guests.
* [xenguest-manager](documentation/xenguest-manager.md): This is a tool used to
create/remove/start/stop xen guest generated using xenguest-mkimage.
* [xenguest-network](documentation/xenguest-network.md): This
recipe add tools and init scripts to create a bridge connected to the
external network on the host and allow guests to be connected to it.
Contributing
------------
This project has not put in place a process for contributions currently. If you
would like to contribute, please contact the maintainers
Maintainer(s)
-------------
* Diego Sueiro <diego.sueiro@arm.com>
* Bertrand Marquis <bertrand.marquis@arm.com>
@@ -1,26 +0,0 @@
# This class is to be inherited by image recipes that want to build and install
# an alternate kernel (set via PREFERRED_PROVIDER_alternate/kernel).
#
# It is mandatory to also set the KERNEL_PACKAGE_NAME for the alternate kernel
# recipe via KERNEL_PACKAGE_NAME:pn-${PREFERRED_PROVIDER_alternate/kernel} and
# its value needs to be different from "kernel" since this is the default set
# for PREFERRED_PROVIDER_virtual/kernel.
#
# An example of these settings can be found at meta-arm-autonomy/dynamic-layers/meta-arm-bsp/conf/machine/n1sdp-extra-settings.inc
#
# When building and installing an alternate kernel, the kernel-modules packages
# for both virtual/kernel and alternate/kernel will be installed.
PREFERRED_PROVIDER_alternate/kernel ??= ""
python () {
alternate_kernel = d.getVar('PREFERRED_PROVIDER_alternate/kernel')
if alternate_kernel:
alternate_kernel_pkg_name = d.getVar('KERNEL_PACKAGE_NAME:pn-%s' % alternate_kernel)
if alternate_kernel_pkg_name:
d.appendVar('EXTRA_IMAGEDEPENDS', ' ' + alternate_kernel)
d.appendVar('IMAGE_INSTALL', ' kernel-modules')
d.appendVar('IMAGE_INSTALL', ' ' + alternate_kernel_pkg_name + '-modules')
else:
raise bb.parse.SkipRecipe("No KERNEL_PACKAGE_NAME:pn-%s set" % alternate_kernel )
}
@@ -1,5 +0,0 @@
# Include arm-autonomy distro config files if the distro features are set
require ${@bb.utils.contains('DISTRO_FEATURES', 'arm-autonomy-host', '${ARM_AUTONOMY_DISTRO_CFGDIR}/arm-autonomy-host.inc', '', d)}
require ${@bb.utils.contains('DISTRO_FEATURES', 'arm-autonomy-guest', '${ARM_AUTONOMY_DISTRO_CFGDIR}/arm-autonomy-guest.inc', '', d)}
@@ -1,115 +0,0 @@
# Docker Extern Containers
#
# This class allows docker image tarballs to be installed in the rootfs
#
# The images can be selected using the variable CONTAINER_IMAGE_FILES which
# should contain a space seperated list of absolute paths or yocto urls for
# docker images that have been exported using docker export:
# - https://docs.docker.com/engine/reference/commandline/export/
#
# src_uri_parse_var.bbclass is used to parse CONTAINER_IMAGE_FILES
#
# There are 4 supported formats for CONTAINER_IMAGE_FILES entries:
#
# - http/https url
# - CONTAINER_IMAGE_FILES = "https://[url]:[port]/alpine.tar;md5sum=..."
#
# - file:// absolute local path from root
# - CONTAINER_IMAGE_FILES = "file:///containers/alpine2.tar"
#
# - file:// path relative to FILESEXTRAPATHS
# - CONTAINER_IMAGE_FILES = "file://foo/alpine3.tar"
# FILESEXTRAPATHS .= "/containers:"
#
# - plain absolute local path from root
# - CONTAINER_IMAGE_FILES = "/containers/foo/bar/alpine4.tar"
#
# It is not recommended to use other yocto URL types, as they may result in
# undefined behaviour.
#
# A semicolon seperated list of install arguments can follow each image path:
# - conname : the name that will be attached when the image is imported
# (default: [filename, without extension])
# - contag : the tag that will be attached when the image is imported
# (default: local)
# - conkeep : Flag for whether the exported container image file should be
# kept once the import has been completed
# (default: 0)
#
# Any other arguments, for example an md5sum, will be assumed to be fetch
# arguments, and will be kept when the path is added to the SRC_URI
#
# e.g. CONTAINER_IMAGE_FILES = "\
# https://[url]:[port]/alpine.tar;md5sum=[checksum];conkeep=1 \
# file:///containers/alpine2.tar;contag=latest;conname=docker2 \
# file://foo/alpine3.tar \
# /containers/foo/bar/alpine4.tar;contag=1.0;conkeep=1 "
#
# Resulting Manifest:
# ARCHIVE NAME TAG KEEP
# alpine.tar alpine local 1
# alpine2.tar docker2 latest 0
# alpine3.tar alpine3 local 0
# alpine4.tar alpine4 1.0 1
#
# Other configurable variables:
# CONTAINERS_INSTALL_DIR : The folder underneath ${WORKDIR} where the docker
# images will be stored
# (default: "/usr/share/docker/images")
# CONTAINERS_MANIFEST : The name of the manifest file containing image
# parameters, also stored in CONTAINERS_INSTALL_DIR
# (default: "containers.manifest")
# CONTAINERS_TAG_DEFAULT : Use this to change the value that will be used as
# contag if no value is provided
# (default: "local")
# CONTAINERS_KEEP_DEFAULT : Use this to change the value that will be used for
# conkeep if no value is provided
# (default: "0")
#
inherit features_check
REQUIRED_DISTRO_FEATURES = "docker"
RDEPENDS:${PN} = "packagegroup-docker-runtime-minimal"
CONTAINER_IMAGE_FILES ??= ""
CONTAINERS_INSTALL_DIR ??= "${datadir}/docker/images"
CONTAINERS_MANIFEST ??= "containers.manifest"
CONTAINERS_TAG_DEFAULT ??= "local"
CONTAINERS_KEEP_DEFAULT ??= "0"
inherit set_src_uri_from_var
SRC_URI_FROM_VAR_NAME = "CONTAINER_IMAGE_FILES"
# Define installation params
SRC_URI_FROM_VAR_MANIFEST_PARAMS = "conname=[basename] \
contag=${CONTAINERS_TAG_DEFAULT} conkeep=${CONTAINERS_KEEP_DEFAULT}"
SRC_URI_FROM_VAR_UNPACK_DIR = "containers"
# Read manifest and install container images
do_install() {
local archive name tag keep
if [ -f "${WORKDIR}/${SRC_URI_FROM_VAR_UNPACK_DIR}/manifest" ]; then
install -d "${D}${CONTAINERS_INSTALL_DIR}"
install -m 644 \
"${WORKDIR}/${SRC_URI_FROM_VAR_UNPACK_DIR}/manifest" \
"${D}${CONTAINERS_INSTALL_DIR}/${CONTAINERS_MANIFEST}"
while read -r archive name tag keep _; do
[ -f "${WORKDIR}/${SRC_URI_FROM_VAR_UNPACK_DIR}/${archive}" ] ||
bbfatal "${archive} does not exist"
install -m 644 \
"${WORKDIR}/${SRC_URI_FROM_VAR_UNPACK_DIR}/${archive}" \
"${D}${CONTAINERS_INSTALL_DIR}/${archive}"
done < "${D}${CONTAINERS_INSTALL_DIR}/${CONTAINERS_MANIFEST}"
fi
}
do_install[vardeps] += "CONTAINER_IMAGE_FILES"
FILES:${PN} += "${CONTAINERS_INSTALL_DIR}"
@@ -1,169 +0,0 @@
# Create a xenguest image with kernel and filesystem produced by Yocto
# This will create a .xenguest file that the xenguest-manager can use.
inherit xenguest_image
# We are creating our guest in a local subdirectory
# force the value so that we are not impacted if the user is changing it
XENGUEST_IMAGE_DEPLOY_DIR = "${WORKDIR}/tmp-xenguest"
# Name of deployed file (keep standard image name and add .xenguest)
XENGUEST_IMAGE_DEPLOY ??= "${IMAGE_NAME}"
# Add kernel XENGUEST_IMAGE_KERNEL from DEPLOY_DIR_IMAGE to image
xenguest_image_add_kernel() {
srcfile="${1:-}"
if [ -z "${srcfile}" ]; then
srcfile="${DEPLOY_DIR_IMAGE}/${XENGUEST_IMAGE_KERNEL}"
fi
call_xenguest_mkimage partial --xen-kernel=$srcfile
}
# Add rootfs file to the image
xenguest_image_add_rootfs() {
call_xenguest_mkimage partial \
--disk-add-file=${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.${IMAGE_TYPEDEP:xenguest}:rootfs.${IMAGE_TYPEDEP:xenguest}
}
# Pack xenguest image
xenguest_image_pack() {
mkdir -p ${IMGDEPLOYDIR}
rm -f ${IMGDEPLOYDIR}/${XENGUEST_IMAGE_DEPLOY}.xenguest
call_xenguest_mkimage pack \
${IMGDEPLOYDIR}/${XENGUEST_IMAGE_DEPLOY}.xenguest
}
#
# Task finishing the bootimg
# We need this task to actually create the symlinks
#
python do_bootimg_xenguest() {
subtasks = d.getVarFlag('do_bootimg_xenguest', 'subtasks')
bb.build.exec_func('xenguest_image_clone', d)
if subtasks:
for tk in subtasks.split():
bb.build.exec_func(tk, d)
bb.build.exec_func('xenguest_image_pack', d)
bb.build.exec_func('create_symlinks', d)
}
# This is used to add sub-tasks to do_bootimg_xenguest
do_bootimg_xenguest[subtasks] = ""
# Those are required by create_symlinks to find our image
do_bootimg_xenguest[subimages] = "xenguest"
do_bootimg_xenguest[imgsuffix] = "."
do_bootimg_xenguest[depends] += "xenguest-base-image:do_deploy"
# Need to have rootfs so all recipes have deployed their content
do_bootimg_xenguest[depends] += "${PN}:do_rootfs"
# This set in python anonymous after, just set a default value here
IMAGE_TYPEDEP:xenguest ?= "tar"
# We must not be built at rootfs build time because we need the kernel
IMAGE_TYPES_MASKED += "xenguest"
IMAGE_TYPES += "xenguest"
XENGUEST_IMAGE_RECIPE = "${PN}"
XENGUEST_IMAGE_VARS += "XENGUEST_IMAGE_RECIPE"
# Merge intermediate env files from all recipes into a single file
python do_merge_xenguestenv () {
import re
# Open final merged file in DEPLOY_DIR_IMAGE for writing, or create
outdir = d.getVar('DEPLOY_DIR_IMAGE')
with open(os.path.join(outdir,'xenguest.env'), 'w') as merged_file:
# Adds vars from xenguest_image to list
merged_env = []
xenguest_vars = d.getVar('XENGUEST_IMAGE_VARS')
for var in xenguest_vars.split():
value = d.getVar(var)
if value:
merged_env.append(var + "=" + " ".join(value.split()) + "\n")
# Resolve dependencies for this task to find names of intermediate
# .xenguestenv files
taskdepdata = d.getVar('BB_TASKDEPDATA')
task_mc = d.getVar('BB_CURRENT_MC')
task_file = d.getVar('FILE')
# See runqueue.py function build_taskdepdata
DEPS_INDEX = 3
depdata_key = task_file + ":do_merge_xenguestenv"
# If in a multiconfig, need to add that to the key
if task_mc != "default":
depdata_key = "mc:" + task_mc + ":" + depdata_key
# Retrieve filename using regex
get_filename = re.compile(r'/([^/]+\.bb):do_deploy_xenguestenv$')
env_dir = d.getVar('XENGUEST_ENV_STAGING_DIR')
for task_dep in taskdepdata[depdata_key][DEPS_INDEX]:
if task_dep.endswith(":do_deploy_xenguestenv"):
filename = re.search(get_filename, task_dep).group(1) + ".xenguestenv"
bb.note("Merging: " + filename)
try:
with open(env_dir + "/" + filename, 'r') as f:
# Eliminate duplicates
merged_env = list(set(merged_env + f.readlines()))
except (FileNotFoundError, IOError):
bb.note(" " + filename + " has no extra vars")
# Sort Alphabetically and write
merged_env.sort()
merged_file.write("".join(merged_env))
}
do_merge_xenguestenv[dirs] = "${DEPLOY_DIR_IMAGE}"
do_merge_xenguestenv[vardeps] += "${XENGUEST_IMAGE_VARS}"
do_merge_xenguestenv[vardepsexclude] += "BB_TASKDEPDATA"
do_merge_xenguestenv[recrdeptask] += "do_deploy_xenguestenv"
addtask merge_xenguestenv before do_populate_lic_deploy after do_image_complete
python __anonymous() {
# Do not do anything if we are not in the want FSTYPES
if bb.utils.contains_any('IMAGE_FSTYPES', 'xenguest', '1', '0', d):
# Check the coherency of the configuration
rootfs_needed = False
rootfs_file = ''
kernel_needed = False
rootfs_file = xenguest_image_rootfs_file(d)
if rootfs_file:
rootfs_needed = True
if d.getVar('XENGUEST_IMAGE_KERNEL') and not d.getVar('INITRAMFS_IMAGE'):
# If INITRAMFS_IMAGE is set, even if INITRAMFS_IMAGE_BUNDLE is not
# set to 1 to bundle the initramfs with the kernel, kernel.bbclass
# is setting a dependency on ${PN}:do_image_complete. We cannot
# in this case depend on do_deploy as it would create a circular
# dependency:
# do_image_complete would depend on kernel:do_deploy which would
# depend on ${PN}:do_image_complete
# In the case INITRAMFS_IMAGE_BUNDLE = 1, the kernel-xenguest class
# will handle the creation of a xenguest image with the kernel.
# In the other case the kernel can be added manually to the image.
kernel_needed = True
bb.build.addtask('do_bootimg_xenguest', 'do_image_complete', None, d)
if rootfs_needed:
# tell do_bootimg_xenguest to call add_rootfs
d.appendVarFlag('do_bootimg_xenguest', 'subtasks', ' xenguest_image_add_rootfs')
# do_bootimg_xenguest will need the tar file
d.appendVarFlag('do_bootimg_xenguest', 'depends', ' %s:do_image_tar' % (d.getVar('PN')))
# set our TYPEDEP to the proper compression
d.setVar('IMAGE_TYPEDEP:xenguest', 'tar' + (rootfs_file.split('.tar', 1)[1] or ''))
if kernel_needed:
# Tell do_bootimg_xenguest to call xenguest_image_add_kernel
d.appendVarFlag('do_bootimg_xenguest', 'subtasks', ' xenguest_image_add_kernel')
# we will need kernel do_deploy
d.appendVarFlag('do_bootimg_xenguest', 'depends', ' virtual/kernel:do_deploy')
}
@@ -1,37 +0,0 @@
# Create a xenguest image containing the kernel with initramfs when
# initramfs is activated
# This is done using kernel-fitimage as model
# To activate this, kernel-xenguest must be added to KERNEL_CLASSES
# Add a variable name to XENGUEST_IMAGE_VARS_EXTRA if you want it to
# appear in xenguest.env when the image is deployed
inherit xenguest_image
# use a local copy to pack all together
XENGUEST_IMAGE_DEPLOY_DIR = "${WORKDIR}/tmp-xenguest"
python __anonymous () {
# only if xenguest image type is present
if bb.utils.contains('IMAGE_FSTYPES', 'xenguest', '1', '0', d):
# only if initramfs bundle is activated
if d.getVar('INITRAMFS_IMAGE') and d.getVar('INITRAMFS_IMAGE_BUNDLE') == "1":
if not bb.utils.contains('KERNEL_IMAGETYPES', 'Image', '1', '0', d):
bb.fatal("xenguest image type with initramfs require Image kernel image type")
bb.build.addtask('do_assemble_xenguest_initramfs', 'do_deploy', 'do_bundle_initramfs', d)
}
do_assemble_xenguest_initramfs() {
xenguest_image_clone
call_xenguest_mkimage partial --xen-kernel=${B}/${KERNEL_OUTPUT_DIR}/Image.initramfs
rm -f ${B}/${KERNEL_OUTPUT_DIR}/Image-initramfs.xenguest
call_xenguest_mkimage pack ${B}/${KERNEL_OUTPUT_DIR}/Image-initramfs.xenguest
}
do_assemble_xenguest_initramfs[depends] += "${INITRAMFS_IMAGE}:do_merge_xenguestenv"
kernel_do_deploy:append() {
if [ -f "${B}/${KERNEL_OUTPUT_DIR}/Image-initramfs.xenguest" ]; then
install -m 0644 ${B}/${KERNEL_OUTPUT_DIR}/Image-initramfs.xenguest "$deployDir/Image-${INITRAMFS_NAME}.xenguest"
ln -snf Image-${INITRAMFS_NAME}.xenguest $deployDir/Image-${INITRAMFS_LINK_NAME}.xenguest
fi
}
@@ -1,224 +0,0 @@
# Set SRC_URI from Variable
# This class parses a variable named in SRC_URI_FROM_VAR_NAME for entries that
# should be added to the SRC_URI
#
# There are 4 supported formats for entries:
#
# - http/https url
# - Note that a checksum (md5sum or sha256sum) must be provided for http(s)
#
# - file:// absolute local path from root
# - In this case the filename will be added to SRC_URI and the path from '/'
# added to FILESEXTRAPATHS
#
# - file:// path relative to FILESEXTRAPATHS
# - In this case the filename will be added to SRC_URI and the preceding path
# added to FILESOVERRIDES, so that the full path to the file will
# be available in FILESPATH when it is generated by combining
# FILESEXTRAPATHS and FILESOVERRIDES.
#
# - plain absolute local path from root
# - This will be treated the same as an file:// path from root. Plain paths
# must be absolute, and cannot be relative to FILESEXTRAPATHS
#
# It is not recommended to use other yocto URL types, as they may result in
# undefined behaviour.
#
# These entries will be added to the SRC_URI so that the yocto fetcher can
# unpack a copy into ${WORKDIR}/${SRC_URI_FROM_VAR_UNPACK_DIR}
#
#
# A list of arguments can follow each entry in the input variable, seperated
# by semi-colons (;). Arguments may be FETCH arguments or MANIFEST arguments.
#
# FETCH arguments will be appended to the entry in SRC_URI, for example
# "downloadfilename" to specify the filename used when storing a
# downloaded file.
# Each SRC_URI entry will automatically have the arguments
# "unpack=0;subdir=${SRC_URI_FROM_VAR_UNPACK_DIR}" added to them, so do not
# attempt to set these options.
#
# MANIFEST arguments are defined in the variable
# SRC_URI_FROM_VAR_MANIFEST_PARAMS which should be a space seperated list of
# names, each optionally followed by an equals sign (=) and a default value.
#
# The values provided for the manifest arguments will be written to the manifest
# file in ${WORKDIR}/${SRC_URI_FROM_VAR_UNPACK_DIR} as columns, in the same
# order as they appear in SRC_URI_FROM_VAR_MANIFEST_PARAMS.
#
# For entries that do not provide a value for a manifest argument, the default
# value will be used if possible.
# If no default is availale, omitting the parameter on any item will cause
# an error.
#
# "[basename]" is a special case default that will set the value to
# the filename without the path or file extension.
#
# e.g.
# SRC_URI_FROM_VAR_MANIFEST_PARAMS="conname=[basename] contag=local conkeep"
#
# Any arguments that follow an entry in SRC_URI_FROM_VAR_NAME, that are not
# named in SRC_URI_FROM_VAR_MANIFEST_PARAMS are assumed to be FETCH arguments,
# so are added to the corresponding entry in the SRC_URI.
SRC_URI_FROM_VAR_NAME ??= ""
SRC_URI_FROM_VAR_MANIFEST_PARAMS ??= ""
SRC_URI_FROM_VAR_UNPACK_DIR ??= "items"
python __anonymous() {
parse_var = d.getVar('SRC_URI_FROM_VAR_NAME')
if not parse_var:
return
parse_var_items = d.getVar(parse_var)
if parse_var_items:
for item in parse_var_items.split(' '):
if not item:
continue
if item.startswith('/'):
# If not a Yocto URL, must be an absolute path
yocto_url = "file://" + item
else:
# Otherwise assume valid Yocto URL.
# Error case is caught later
yocto_url = item
fetcher = host = path = parm = None
try:
# Attempt to parse a Yocto URL
fetcher,host,path,_,_,parm = bb.fetch.decodeurl(yocto_url)
except:
# Something invalid is in the variable!
raise bb.parse.SkipRecipe(parse_var + \
" contains an invalid entry:\n'" + \
item + "'")
# This var is space seperated list of parameter names,
# with optional default value following an equals sign
# (name=default)
item_params_str = d.getVar('SRC_URI_FROM_VAR_MANIFEST_PARAMS')
# remove directories from path
filename = os.path.basename(path)
if "downloadfilename" in parm:
filename = parm["downloadfilename"]
item_manifest_args = {"filename": filename}
if item_params_str:
# required manifest arguments have been provided
# If no default is given add "=" for map parsing
item_params_list = [ arg + "=" if '=' not in arg
else arg
for arg in item_params_str.split(' ')
]
# Generate key value pairs of argument names and
# default values
item_params_map = dict( (name.strip(), val.strip())
for name, val in (arg.split('=')
for arg in item_params_list)
)
for argname in item_params_map:
# Iterate over required manifest arguments
argvalue = parm.pop(argname, None)
if argvalue:
# a value has been provided for this item
item_manifest_args[argname] = argvalue
else:
# No value provided, process default value
default = item_params_map[argname]
if default:
# A default value is provided
if default == "[basename]":
# use the filename without extension
default = os.path.splitext(filename)[0]
# store default value in dict
item_manifest_args[argname] = default
else:
# No default provided
raise bb.fatal(parse_var + \
" entry is missing a required parameter '" + \
argname + "':\n'" + item + "'")
# Write value to var flags to ensure data structure is preserved
# Each entry of parse_var will have a varflag where the value
# is a dictionary of argument names and values
d.setVarFlags(parse_var, {item: item_manifest_args})
src_uri_entry_suffix = ';'
# HTTP(S) fetcher must provide a checksum
if fetcher.startswith('http') and not \
( 'md5sum' in parm or 'sha256sum' in parm ):
# Ensure http/https fetchers get a checksum
raise bb.parse.SkipRecipe(parse_var + \
" entry is missing a checksum:\n'" + \
item + "'")
# add remaining fetch parameters including checksum
for arg in parm:
src_uri_entry_suffix += ";" + arg + "=" + parm[arg]
# Add default and extra parameters to SRC_URI entry
src_uri_entry_suffix += ';unpack=0;subdir=' + \
d.getVar('SRC_URI_FROM_VAR_UNPACK_DIR')
if fetcher == 'file':
# Prevent local fetcher from re-creating dir structure
filedir = os.path.split(path)[0]
if filedir.startswith('/'):
# Path is from the root
d.appendVar('FILESEXTRAPATHS', filedir + ':')
else:
# Path is relative to FILESEXTRAPATHS
d.appendVar('FILESOVERRIDES', ':' + filedir)
# Add filename without path to SRC_URI
d.appendVar('SRC_URI', ' file://' + \
filename + src_uri_entry_suffix)
else:
# Add full entry to SRC_URI
d.appendVar('SRC_URI', ' ' + fetcher + \
"://" + host + path + src_uri_entry_suffix)
}
python generate_manifest() {
parse_var = d.getVar('SRC_URI_FROM_VAR_NAME')
if not parse_var:
return
target_dir = os.path.join(d.getVar('WORKDIR'),
d.getVar('SRC_URI_FROM_VAR_UNPACK_DIR'))
# Write a manifest file containing the parameters so SRC_URI
# doesn't need to be parsed by do_install
with open (target_dir + "/manifest", 'w') as manifest_file:
manifest_args = d.getVarFlags(parse_var)
parse_var_items = d.getVar(parse_var)
if parse_var_items:
for item in parse_var_items.split():
manifest_file.write(" ".join(manifest_args[item].values())+"\n")
}
do_unpack[cleandirs] += "${WORKDIR}/${SRC_URI_FROM_VAR_UNPACK_DIR}"
do_unpack[postfuncs] += "generate_manifest"
do_unpack[vardeps] += "${SRC_URI_FROM_VAR_NAME}"
@@ -1,251 +0,0 @@
# This class must be used to create, extend or pack a xenguest image.
# It is using xenguest-mkimage tool to do operations
DEPENDS += "xenguest-mkimage-native"
#
# Xenguest image parameters
# All the following parameters can be modified in local.conf or on recipes
# inheriting this class
#
# Guest memory size in MB
XENGUEST_IMAGE_MEMORY_SIZE ??= "512"
# Guest number of vcpus
XENGUEST_IMAGE_NUM_VCPUS ??= "1"
# Guest auto boot during init, set to 1 to have guest started during init or
# to 0 if the guest should not be auto started
XENGUEST_IMAGE_AUTOBOOT ??= "1"
# Partition containing the root file system
# Xen will actually add root=${XENGUEST_IMAGE_ROOT} to your guest kernel
# command line
# You can let this empty if the root filesystem is specified in an other way
# and have root= option added to the command line for example or if you don't
# need a root filesystem mounted for your guest (initrd for example)
XENGUEST_IMAGE_ROOT ??= "/dev/xvda1"
# Guest kernel command line arguments
XENGUEST_IMAGE_CMDLINE ??= "earlyprintk=xenboot console=hvc0 rw"
# Extra commands to add to xenguest_image when creating the image
XENGUEST_IMAGE_EXTRA_CMD ??= ""
# Kernel binary
# This value is used by the xenguest image type but is declared here to have
# all variables in the same place
# If this value is empty no kernel will be added to the image
XENGUEST_IMAGE_KERNEL ??= "Image"
# Size of the disk to create (if 0 no disk will be created and rootfs will not
# be included in the xenguest image)
XENGUEST_IMAGE_DISK_SIZE ??= "${@ '4' if not d.getVar('INITRAMFS_IMAGE') else '0'}"
# set empty partition to be used by xenguest-manager for this image
XENGUEST_IMAGE_DISK_DEVICE ??= ""
#
# XENGUEST_IMAGE_DISK_PARTITIONS is used to describe the partitions to setup
# and their content.
# It must be set to a space separated list of entries with each entry having
# the format num:sz:[fs]:[file] where:
# - num is a partition number
# - sz is the partition size in MB or GB(default), e.g 1000M or 1[G]
# - fs is optional filesystem to use for the partition
# - file is optionally pointing to a file to use as content of the partition
# Please check image_types_xenguest.bbclass for rootfs handling of files
#
# Default value creates a partition 1 using the full disk, formated with ext4
# and containing the root filesystem produced by Yocto
XENGUEST_IMAGE_DISK_PARTITIONS ??= "1:${XENGUEST_IMAGE_DISK_SIZE}:ext4:rootfs.tar.gz"
# XENGUEST_IMAGE_NETWORK_TYPE can be set to "bridge", "nat" or "none".
# The "bridge" type will share the physical eth interface from dom0 with the
# domU. This will allow the domU to have access to the external network.
# The "nat" type will setup a virtual network between dom0 and domU and also
# configure and run the kea dhcp4 server on dom0 to serve the domU.
# The "none" type will not affect any networking setting between on dom0 and
# domU.
XENGUEST_IMAGE_NETWORK_TYPE ??= "bridge"
# Sub-directory in wich the guest is created. This is create in deploy as a
# subdirectory and must be coherent between all components using this class so
# it must only be modified from local.conf if needed
XENGUEST_IMAGE_DEPLOY_SUBDIR ?= "xenguest"
# Directory in which the xenguest should be deployed
# a sub-directory named ${XENGUEST_IMAGE_DEPLOY_SUBDIR} will be created there.
# This should be set to:
# - ${DEPLOYDIR} (default) if creating or extending the xenguest for a normal
# recipe.
# - something in ${WORKDIR} if you need to clone and manipulate an image
XENGUEST_IMAGE_DEPLOY_DIR ??= "${DEPLOYDIR}"
# These vars are used by image_types_xenguest.bbclass to generate the
# xenguest.env file. In a recipe that inherits this class and extra variables
# that should be included in xenguest.env need to be added to
# XENGUEST_IMAGE_VARS_EXTRA
XENGUEST_IMAGE_VARS ?= "\
MACHINE DISTRO DISTRO_VERSION DISTRO_FEATURES TUNE_FEATURES TARGET_FPU \
IMAGE_FEATURES INITRAMFS_IMAGE_BUNDLE INITRAMFS_IMAGE \
XENGUEST_IMAGE_MEMORY_SIZE XENGUEST_IMAGE_NUM_VCPUS XENGUEST_IMAGE_AUTOBOOT \
XENGUEST_IMAGE_ROOT XENGUEST_IMAGE_CMDLINE XENGUEST_IMAGE_EXTRA_CMD \
XENGUEST_IMAGE_KERNEL XENGUEST_IMAGE_DISK_SIZE XENGUEST_IMAGE_DISK_DEVICE \
XENGUEST_IMAGE_DISK_PARTITIONS XENGUEST_IMAGE_NETWORK_TYPE"
#
# Wrapper to call xenguest-mkimage
# It is using XENGUEST_IMAGE_DEPLOY_DIR and XENGUEST_IMAGE_DEPLOY_SUBDIR
# to find the image to operate on
#
# Usage: call_xenguest_mkimage [operation] [args]
call_xenguest_mkimage() {
local cmd="${1}"
local img="${XENGUEST_IMAGE_DEPLOY_DIR}/${XENGUEST_IMAGE_DEPLOY_SUBDIR}"
shift
echo "xenguest-mkimage $cmd $img $@"
xenguest-mkimage $cmd $img $@
}
#
# Create an initial xenguest image.
# This is a task which must be added in a recipe inheriting deploy
# It is using XENGUEST_IMAGE_MEMORY_SIZE, XENGUEST_IMAGE_NUM_VCPUS,
# XENGUEST_IMAGE_AUTOBOOT, XENGUEST_IMAGE_ROOT, XENGUEST_IMAGE_EXTRA_CMD,
# XENGUEST_IMAGE_CMDLINE, XENGUEST_IMAGE_DISK_SIZE and
# XENGUEST_IMAGE_DISK_PARTITIONS to customize the initial guest
#
xenguest_image_create() {
if [ -z "${XENGUEST_IMAGE_DEPLOY_DIR}" -o \
-z "${XENGUEST_IMAGE_DEPLOY_SUBDIR}" ]; then
die "Configuration error: XENGUEST_IMAGE_DEPLOY_DIR or XENGUEST_IMAGE_DEPLOY_SUBDIR is empty"
fi
rm -rf ${XENGUEST_IMAGE_DEPLOY_DIR}/${XENGUEST_IMAGE_DEPLOY_SUBDIR}
mkdir -p ${XENGUEST_IMAGE_DEPLOY_DIR}/${XENGUEST_IMAGE_DEPLOY_SUBDIR}
# Create the image
call_xenguest_mkimage create --xen-memory=${XENGUEST_IMAGE_MEMORY_SIZE} \
--xen-vcpus=${XENGUEST_IMAGE_NUM_VCPUS} \
--xen-root=${XENGUEST_IMAGE_ROOT} \
${XENGUEST_IMAGE_EXTRA_CMD}
# add command line
if [ -n "${XENGUEST_IMAGE_CMDLINE}" ]; then
call_xenguest_mkimage update --xen-clean-extra
for arg in ${XENGUEST_IMAGE_CMDLINE}; do
call_xenguest_mkimage update --xen-extra=$arg
done
fi
# create disk if needed
disksize="${XENGUEST_IMAGE_DISK_SIZE}"
case ${disksize:=0} in
0|0M|0G)
;;
*)
# setup disk size
call_xenguest_mkimage update --disk-reset-config --disk-size=$disksize
diskparts="${XENGUEST_IMAGE_DISK_PARTITIONS}"
if [ -n "$diskparts" ]; then
for arg in $diskparts; do
call_xenguest_mkimage update --disk-add-part=$arg
done
fi
diskdevice="${XENGUEST_IMAGE_DISK_DEVICE}"
if [ -n "$diskdevice" ]; then
call_xenguest_mkimage update --disk-device="${diskdevice}"
fi
;;
esac
if [ "${XENGUEST_IMAGE_AUTOBOOT}" = "1" ]; then
call_xenguest_mkimage update --set-param=GUEST_AUTOBOOT=1
else
call_xenguest_mkimage update --set-param=GUEST_AUTOBOOT=0
fi
if [ -n "${XENGUEST_IMAGE_NETWORK_TYPE}" ]; then
call_xenguest_mkimage update --set-param=XENGUEST_NETWORK_TYPE="${XENGUEST_IMAGE_NETWORK_TYPE}"
else
call_xenguest_mkimage update --set-param=XENGUEST_NETWORK_TYPE="none"
fi
}
XENGUEST_ENV_STAGING_DIR ??= "${STAGING_DIR}/${MACHINE}/xenguestenv"
# Create an intermediary file containing all variables used to by a
# particular recipe that inherits this class
# File will contain the values of all variables listed in:
# XENGUEST_IMAGE_VARS_EXTRA
python do_deploy_xenguestenv () {
xenguest_vars = d.getVar('XENGUEST_IMAGE_VARS_EXTRA')
if not xenguest_vars:
return
outdir = d.getVar('XENGUEST_ENV_STAGING_DIR')
# Writes file to tmp/sysroots/${MACHINE}/xenguestenv/ by default
filename = os.path.basename(d.getVar('FILE')) + '.xenguestenv'
with open(os.path.join(outdir, filename), 'w') as envf:
for var in xenguest_vars.split():
value = d.getVar(var)
if value:
# Write value only if set
envf.write('%s="%s"\n' % (var, " ".join(value.split())))
envf.close()
}
# Since the intermediary file is deleted by do_merge_xenguestenv it
# must be re-created every time
do_deploy_xenguestenv[vardeps] += "${XENGUEST_IMAGE_VARS_EXTRA}"
do_deploy_xenguestenv[dirs] = "${XENGUEST_ENV_STAGING_DIR}"
addtask deploy_xenguestenv before do_populate_sysroot
# Clone the current xenguest from deploy to manipulate it locally
# This is required if you need to change things before packing an image
# To set the local directory where to clone you must set
# XENGUEST_IMAGE_DEPLOY_DIR if you don't want to use do_deploy to modify the
# image
#
xenguest_image_clone() {
if [ -z "${XENGUEST_IMAGE_DEPLOY_DIR}" -o \
-z "${XENGUEST_IMAGE_DEPLOY_SUBDIR}" ]; then
die "Configuration error: XENGUEST_IMAGE_DEPLOY_DIR or XENGUEST_IMAGE_DEPLOY_SUBDIR is empty"
fi
if [ ! -f ${DEPLOY_DIR_IMAGE}/${XENGUEST_IMAGE_DEPLOY_SUBDIR}/guest.cfg ]; then
die "xenguest_image: ${DEPLOY_DIR_IMAGE}/${XENGUEST_IMAGE_DEPLOY_SUBDIR} does not contain a valid guest"
fi
rm -rf ${XENGUEST_IMAGE_DEPLOY_DIR}/${XENGUEST_IMAGE_DEPLOY_SUBDIR}
mkdir -p ${XENGUEST_IMAGE_DEPLOY_DIR}
cp -rf ${DEPLOY_DIR_IMAGE}/${XENGUEST_IMAGE_DEPLOY_SUBDIR} \
${XENGUEST_IMAGE_DEPLOY_DIR}/${XENGUEST_IMAGE_DEPLOY_SUBDIR}
}
# Helper function to retrieve rootfs file if present in one partition
# This can return an empty string or rootfs.tar[.COMP]
def xenguest_image_rootfs_file(d):
disksize = d.getVar('XENGUEST_IMAGE_DISK_SIZE')
# if disksize is 0, we don't create anything
if not disksize or disksize == '0':
return ""
# Find first partition with file=rootfs.tar*
partlist = d.getVar('XENGUEST_IMAGE_DISK_PARTITIONS')
if partlist:
for partdesc in partlist.split():
partelems = partdesc.split(':', 3)
if partelems[3]:
if partelems[3].startswith('rootfs.tar'):
return partelems[3]
return ""
@@ -1,123 +0,0 @@
# This class must be used to extend the xenguest image
# It provides variables to add init scripts, a dtb, xen files or disk files.
#
# The class is extending deploy function so you recipe must inherit deploy and
# have a do_deploy function (even if it is empty)
# Add a variable name to XENGUEST_IMAGE_VARS_EXTRA if you want it to
# appear in xenguest.env when the image is deployed
# Use standard xenguest_image
inherit xenguest_image
# Add a DTB file for the guest
# Only one file should be added, if this is set multiple times or in several
# recipes, the last recipe setting it will prevail.
XENGUEST_EXTRA_DTB ??= ""
# Add a ramdisk file for the guest
# Only one file should be added, if this is set multiple times or in several
# recipes, the last recipe setting it will prevail.
XENGUEST_EXTRA_RAMDISK ??= ""
# Append something to the guest xen configuration
# All files here will be merged together in the final xen configuration
# This can contain several files or be used in several recipes
XENGUEST_EXTRA_XENCONFIG ??= ""
# Add a xenguest init, init-pre or init-post script
XENGUEST_EXTRA_INIT_PRE ??= ""
XENGUEST_EXTRA_INIT ??= ""
XENGUEST_EXTRA_INIT_POST ??= ""
# Add xenguest files, (to be used in extra xen config for example)
# several files may be added, space separated, the path will be kept on the
# generated xenguest image (if dir1/file1 is added, it can be used as
# dir1/file1 file in the xen configuration).
XENGUEST_EXTRA_FILES ??= ""
# Add xenguest disk files (to be used as disk partition content)
# several files may be added, space separated, the path will be kept on the
# generated xenguest image (if dir1/file1 is added, it can be used as
# dir1/file1 file in the disk content parameters).
XENGUEST_EXTRA_DISK_FILES ??= ""
# Extra vars to be written to xenguest.env
XENGUEST_IMAGE_VARS_EXTRA += "\
XENGUEST_EXTRA_DTB XENGUEST_EXTRA_RAMDISK XENGUEST_EXTRA_XENCONFIG \
XENGUEST_EXTRA_INIT_PRE XENGUEST_EXTRA_INIT XENGUEST_EXTRA_INIT_POST \
XENGUEST_EXTRA_FILES XENGUEST_EXTRA_DISK_FILES"
do_deploy:append() {
if [ -z "${XENGUEST_IMAGE_DEPLOY_DIR}" -o \
-z "${XENGUEST_IMAGE_DEPLOY_SUBDIR}" ]; then
die "Configuration error: XENGUEST_IMAGE_DEPLOY_DIR or XENGUEST_IMAGE_DEPLOY_SUBDIR is empty"
fi
rm -rf ${XENGUEST_IMAGE_DEPLOY_DIR}/${XENGUEST_IMAGE_DEPLOY_SUBDIR}
mkdir -p ${XENGUEST_IMAGE_DEPLOY_DIR}/${XENGUEST_IMAGE_DEPLOY_SUBDIR}
if [ -n "${XENGUEST_EXTRA_DTB}" ]; then
if [ ! -f ${XENGUEST_EXTRA_DTB} ]; then
die "xenguest_image: DTB file ${XENGUEST_EXTRA_DTB} does not exist"
fi
call_xenguest_mkimage partial --xen-device-tree=${XENGUEST_EXTRA_DTB}
fi
if [ -n "${XENGUEST_EXTRA_RAMDISK}" ]; then
if [ ! -f ${XENGUEST_EXTRA_RAMDISK} ]; then
die "xenguest_image: DTB file ${XENGUEST_EXTRA_RAMDISK} does not exist"
fi
call_xenguest_mkimage partial --xen-ramdisk=${XENGUEST_EXTRA_RAMDISK}
fi
if [ -n "${XENGUEST_EXTRA_XENCONFIG}" ]; then
for f in ${XENGUEST_EXTRA_XENCONFIG}; do
if [ ! -f $f ]; then
die "xenguest_image: Xen config $f does not exist"
fi
call_xenguest_mkimage partial --xen-append=$f
done
fi
if [ -n "${XENGUEST_EXTRA_INIT_PRE}" ]; then
if [ ! -f ${XENGUEST_EXTRA_INIT_PRE} ]; then
die "xenguest_image: Init script ${XENGUEST_EXTRA_INIT_PRE} does not exist"
fi
call_xenguest_mkimage partial --init-pre=${XENGUEST_EXTRA_INIT_PRE}
fi
if [ -n "${XENGUEST_EXTRA_INIT}" ]; then
if [ ! -f ${XENGUEST_EXTRA_INIT} ]; then
die "xenguest_image: Init script ${XENGUEST_EXTRA_INIT} does not exist"
fi
call_xenguest_mkimage partial --init-script=${XENGUEST_EXTRA_INIT}
fi
if [ -n "${XENGUEST_EXTRA_INIT_POST}" ]; then
if [ ! -f ${XENGUEST_EXTRA_INIT_POST} ]; then
die "xenguest_image: Init script ${XENGUEST_EXTRA_INIT_POST} does not exist"
fi
call_xenguest_mkimage partial --init-post=${XENGUEST_EXTRA_INIT_POST}
fi
if [ -n "${XENGUEST_EXTRA_FILES}" ]; then
for f in ${XENGUEST_EXTRA_FILES}; do
if [ ! -f $f ]; then
die "xenguest_image: Xen file $f does not exist"
fi
call_xenguest_mkimage partial --xen-add-file=$f
done
fi
if [ -n "${XENGUEST_EXTRA_DISK_FILES}" ]; then
for f in ${XENGUEST_EXTRA_DISK_FILES}; do
if [ ! -f $f ]; then
die "xenguest_image: Disk file $f does not exist"
fi
call_xenguest_mkimage partial --disk-add-file=$f
done
fi
}
# Need to have xenguest_image tool
do_deploy[depends] += "xenguest-base-image:do_deploy"
@@ -1,15 +0,0 @@
# This files is added when DISTRO_FEATURES contains arm-autonomy-guest
# We need to have ipv4 activated
DISTRO_FEATURES:append = " ipv4"
# Build a xenguest type image
IMAGE_CLASSES += "image_types_xenguest"
IMAGE_FSTYPES += "xenguest"
# xenguest kernel extension to handle initramfs
KERNEL_CLASSES += "kernel-xenguest"
IMAGE_INSTALL:append = "${@bb.utils.contains('DISTRO_FEATURES', 'docker', \
' packagegroup-docker-runtime-minimal', \
'', d)}"
@@ -1,23 +0,0 @@
# This files is added when DISTRO_FEATURES contains arm-autonomy-host
ARM_AUTONOMY_HOST_OVERRIDES = ":autonomy-host"
# We need to have xen and ipv4 activated
DISTRO_FEATURES:append = " xen ipv4"
DISTRO_FEATURES_NATIVE:append = " arm-autonomy-host"
# Don't include kernels in standard images when building arm-autonomy-host
# If the kernel image is needed in the rootfs the following should be set from
# a bbappend: RDEPENDS:${KERNEL_PACKAGE_NAME}-base = "${KERNEL_PACKAGE_NAME}-image"
RDEPENDS:${KERNEL_PACKAGE_NAME}-base ?= ""
# Require extra machine specific settings from meta-arm-bsp dynamic-layers only
# if meta-arm-bsp is in the bblayers.conf
# Directory for meta-arm-autonomy/dynamic-layers/meta-arm-bsp machine extra settings
ARM_AUTONOMY_ARM_BSP_DYNAMIC_EXTRA_CFGDIR = "${ARM_AUTONOMY_ARM_BSP_DYNAMIC_DIR}/conf/machine"
ARM_AUTONOMY_MACHINE_EXTRA_REQUIRE ?= \
"${ARM_AUTONOMY_ARM_BSP_DYNAMIC_EXTRA_CFGDIR}/arm-autonomy-machine-extra-settings.inc"
require ${@bb.utils.contains('BBFILE_COLLECTIONS', 'meta-arm-bsp', \
'${ARM_AUTONOMY_MACHINE_EXTRA_REQUIRE}' , \
'', d)}
-39
View File
@@ -1,39 +0,0 @@
# Add layer to BBPATH
BBPATH .= ":${LAYERDIR}"
# Add recipes-* directories to BBFILES
BBFILES += " \
${LAYERDIR}/recipes-*/*/*.bb \
${LAYERDIR}/recipes-*/*/*.bbappend \
"
BBFILE_COLLECTIONS += "meta-arm-autonomy"
BBFILE_PATTERN_meta-arm-autonomy = "^${LAYERDIR}/"
BBFILE_PRIORITY_meta-arm-autonomy = "5"
LAYERDEPENDS_meta-arm-autonomy = " \
core \
yocto \
openembedded-layer \
networking-layer \
virtualization-layer \
"
LAYERSERIES_COMPAT_meta-arm-autonomy = "honister"
# We don't activate virtualization feature from meta-virtualization as it
# brings in lots of stuff we don't need. We need to disable the sanity check
# otherwise the user will see a warning on each build.
SKIP_META_VIRT_SANITY_CHECK = "1"
ARM_AUTONOMY_LAYERDIR := "${LAYERDIR}"
# Directory of our distro config files
ARM_AUTONOMY_DISTRO_CFGDIR = "${ARM_AUTONOMY_LAYERDIR}/conf/distro/include/"
# Add class to handle arm-autonomy distro extensions
USER_CLASSES:append = " arm-autonomy-features"
BBFILES_DYNAMIC += " \
meta-arm-bsp:${LAYERDIR}/dynamic-layers/meta-arm-bsp/*/*/*.bbappend \
meta-arm-bsp:${LAYERDIR}/dynamic-layers/meta-arm-bsp/*/*/*.bb \
"
# Root directory for the meta-arm-autonomy/dynamic-layers/meta-arm-bsp
ARM_AUTONOMY_ARM_BSP_DYNAMIC_DIR = "${ARM_AUTONOMY_LAYERDIR}/dynamic-layers/meta-arm-bsp"
@@ -1,17 +0,0 @@
#@TYPE: Machine
#@NAME: Autonomy Guest ARM64 machine
#@DESCRIPTION: Machine configuration for ARM64 Autonomy Guest
TUNE_FEATURES = "aarch64"
require conf/machine/include/arm/arch-armv8a.inc
KERNEL_IMAGETYPE = "Image"
IMAGE_FSTYPES:append = " tar.bz2"
PREFERRED_PROVIDER_virtual/kernel = "linux-yocto"
PREFERRED_VERSION_linux-yocto ?= "5.10%"
DISTRO_FEATURES += "arm-autonomy-guest"
-5
View File
@@ -1,5 +0,0 @@
# This file will be required by different xenguest recipes to provide
# common variables, which can be configured in local.conf
# Xenguest image file install location
XENGUEST_MANAGER_GUEST_DIR ?= "${datadir}/guests/"
@@ -1,226 +0,0 @@
arm-autonomy Multiconfig Build Environment Instructions
==================
This documentation explains how to simplify the process of building hosts
and guests in a single bitbake command, rather than in seperate build
folders. You can read more about multiconfig in the bitbake documentation:
- [bitbake user manual](https://www.yoctoproject.org/docs/latest/bitbake-user-manual/bitbake-user-manual.html)
To achieve a multiconfig build, a number of different config files need to
be created in a single build directory.
Create a new project
----------------
Before you start, you will need to follow the instructions in
"Create a project" from the quickstart guide, to create a new project
directory with
```
oe-init-build-env my-mc-project
```
Ensure it has all the required layers in bblayers.conf as listed in
`arm-autonomy-quickstart.md`. The result should be a directory containing:
```
-- conf
| -- bblayers.conf
| -- local.conf
| -- templateconf.cfg
```
Add multiconfig
----------------
The steps required to make the project build both the host and any
number of guests as required are:
1. Create a new directory under `conf/` named `multiconfig/`
2. Create two new files in this directory:
`multiconfig/host.conf`
`multiconfig/guest.conf`
These files will contain any configurations that are specific to either the
host or the guest. The resulting directory tree should be:
```
-- conf
| -- bblayers.conf
| -- local.conf
| -- templateconf.cfg
| -- multiconfig
| -- host.conf
| -- guest.conf
```
3. In `local.conf` the following config variables must be added:
```
MACHINE ?= "fvp-base"
# ---Guest Config Start--- #
MC_GUEST = "guest"
MC_GUEST_NAME = "guest1"
MC_GUEST_IMAGERECIPE = "core-image-minimal"
MC_GUEST_MACHINE = "arm64-autonomy-guest"
MC_GUEST_INITRAMFS_IMAGE_BUNDLE ?= ""
MC_GUEST_INITRAMFS_IMAGE ?= ""
# Uncomment for initramfs
#MC_GUEST_INITRAMFS_IMAGE_BUNDLE = "1"
#MC_GUEST_INITRAMFS_IMAGE = "${MC_GUEST_IMAGERECIPE}"
# These variables are set automatically, don't override them!
MC_GUEST_FILENAME_PREFIX = "${@ 'Image-initramfs' if d.getVar('MC_GUEST_INITRAMFS_IMAGE_BUNDLE',d) else '${MC_GUEST_IMAGERECIPE}' }"
MC_GUEST_FILENAME = "${MC_GUEST_FILENAME_PREFIX}-${MC_GUEST_MACHINE}.xenguest"
MC_GUEST_DEP = "${@ 'virtual/kernel:do_deploy' if d.getVar('MC_GUEST_INITRAMFS_IMAGE_BUNDLE',d) else '${MC_GUEST_IMAGERECIPE}:do_merge_xenguestenv'}"
MC_DOIMAGE_MCDEPENDS += "mc:${MC_HOST}:${MC_GUEST}:${MC_GUEST_DEP} "
BBMULTICONFIG += "${MC_GUEST} "
ARM_AUTONOMY_HOST_IMAGE_EXTERN_GUESTS += "file://${TOPDIR}/${MC_GUEST}/deploy/images/${MC_GUEST_MACHINE}/${MC_GUEST_FILENAME};guestname=${MC_GUEST_NAME} "
# ---Guest Config End--- #
# ---Host Config Start--- #
MC_HOST = "host"
BBMULTICONFIG += "${MC_HOST} "
# ---Host Config End--- #
```
These variables will be used in both of the multiconf files. `MC_HOST` and
`MC_GUEST` should not be altered without renaming the conf files, but most
`MC_GUEST_*` variables can be customised if you desire.
4. Next set the contents of `multiconfig/guest.conf`:
```
TMPDIR = "${TOPDIR}/${MC_GUEST}"
MACHINE = "${MC_GUEST_MACHINE}"
DISTRO_FEATURES += " arm-autonomy-guest"
INITRAMFS_IMAGE_BUNDLE = "${MC_GUEST_INITRAMFS_IMAGE_BUNDLE}"
INITRAMFS_IMAGE = "${MC_GUEST_INITRAMFS_IMAGE}"
IMAGE_FSTYPES += "${@ 'cpio' if d.getVar('MC_GUEST_INITRAMFS_IMAGE_BUNDLE',d) else ''}"
# ANY OTHER GUEST CONFIG
```
To modify the MACHINE or INITRAMFS variables change the equivalent
config in local.conf rather than modifying this file directly. You can also
append any other config desired for the guest after "ANY OTHER GUEST CONFIG",
for example `XENGUEST_IMAGE_DISK_SIZE`.
Make sure not to change `${DEPLOY_DIR_IMAGE}` to anything other than
`${TMPDIR}/deploy/images`, as this is assumed by local.conf.
5. Lastly set the contents of `multiconfig/host.conf`:
```
TMPDIR = "${TOPDIR}/${MC_HOST}"
DISTRO_FEATURES += " arm-autonomy-host"
# ANY OTHER HOST CONFIG
```
Building the image
----------------
To build the multiconfig image the command is:
```
bitbake mc:host:arm-autonomy-host-image-minimal
```
The first time this is run you may see a warning related to the SRC_URI:
```
Unable to get checksum for xenguest-extern-guests SRC_URI entry foo.xenguest: file could not be found
```
This is expected, and only indicates that the guest image has not yet been
generated when the host parses the SRC_URI. By the time it is needed by the
host recipe fetch task it will be present.
During the build you should see that guest tasks are also being executed in
parallel. Once the build completes the guest will already be in the rootfs of
the host thanks to `ARM_AUTONOMY_HOST_IMAGE_EXTERN_GUEST`
The final host image including the guests will be deployed in
`host/deploy/images/`
Multiple Guests
----------------
To have multiple guests with the same config the line which appends to
`ARM_AUTONOMY_HOST_IMAGE_EXTERN_GUESTS` just needs to pass the argument
'guestcount=#' to install symlink copies of the xenguest file on the host.
Documentation for the guestcount parameter can be found in
documentation/arm-autonomy-quickstart.md in the section titled
'Include guests directly in the host image'. This will ensure that the guest
is still only built once, despite resulting in multiple copies on the target.
If guests are required to have different configurations, each will need its own
config file, e.g. 'netguest.conf'. Ensure that the name of the conf file does
not contain any hyphens, as this will create errors when it becomes part of a
function name. In this file the values of TMPDIR, MACHINE, DISTRO_FEATURES etc.
should be the same as above, but with the prefix "MC_GUEST_*" modified to
something different to avoid collisions (e.g. MC_GUEST_2_*).
As before, your additional config for the guest type should
follow "ANY OTHER GUEST CONFIG"
In your local.conf, everything between `---Guest Config Start---` and
`---Guest Config End---` will need to be duplicated for each desired guest type.
All copies of variables that start `MC_GUEST` must be modified with the same
prefix as in the new guest config file (e.g. `MC_GUEST_2_*`).
Each chunk of guest config in local.conf has automatic guest variables
(found after the line "These variables are set automatically...").
These should all use the same prefix as their chunk in their values,
for example:
```
MC_GUEST_2_FILENAME_PREFIX = "${@ 'Image-initramfs' if d.getVar('MC_GUEST_2_INITRAMFS_IMAGE_BUNDLE',d) else '${MC_GUEST_2_IMAGERECIPE}' }"
```
Guest with provisioned disk
----------------
To add guest rootfs partition to host wic image,
set `AUTONOMY_HOST_EXTRA_PARTITION` with proper wks partition entry, e.g:
```
AUTONOMY_HOST_EXTRA_PARTITION = "part --label provisioned-guest --source rawcopy --fstype=ext4 --ondisk sda --align 1024 \
--sourceparams=file=${TOPDIR}/${MC_GUEST}/deploy/images/${MC_GUEST_MACHINE}/${MC_GUEST_FILENAME_PREFIX}-${MC_GUEST_MACHINE}.ext4"
```
inside your host.conf file.
The rest of the configuration has to be appended to guest.conf file:
```
# ANY OTHER GUEST CONFIG
XENGUEST_IMAGE_DISK_SIZE = "0"
XENGUEST_IMAGE_SRC_URI_XEN_CONFIG = "file://\${TOPDIR}/path/to/rootdisk.cfg"
XENGUEST_IMAGE_DISK_DEVICE = "_GUEST_DISK_DEVICE_"
XENGUEST_IMAGE_ROOT = "/dev/xvda"
IMAGE_ROOTFS_SIZE = "102400"
IMAGE_FSTYPES = "ext4"
```
Example content of rootdisk.cfg:
```
disk = ["phy:_GUEST_DISK_DEVICE_,xvda,w"]
```
`_GUEST_DISK_DEVICE_` should be substituted with `/dev/sdaX`,
according to wks file.
@@ -1,272 +0,0 @@
arm-autonomy Quick Start
==================
This documentation explains how to quickly start with the arm-autonomy layer,
and the main features provided.
In the documentation directory you will find some more detailed documentation
for each of the functionalites provided by this layer.
What to use this layer for?
---------------------------
Using this layer, you can easily and rapidly create a system based on Xen with
one or more guests created using Yocto.
For this you will need to create at least 2 Yocto projects:
- a host project: This one will compile Xen and create a Linux system to be
used as Xen Dom0. The Linux system will contain all functionalities required
to start and manage guests.
- one or several guest projects: Those will create Linux systems with the
required Linux kernel configuration to run as Xen DomU.
Prepare your system
-------------------
First you must download the Yocto layers needed:
- [meta-openembedded](https://git.openembedded.org/meta-openembedded)
- [poky](https://git.yoctoproject.org/poky)
- [meta-virtualization](https://git.yoctoproject.org/meta-virtualization)
- [meta-arm](https://git.yoctoproject.org/meta-arm)
- all other layers you might want to use
For each of the downloaded layer make sure you checkout the release of Yocto
you want to use (for example honister using `git checkout honister`).
Please follow [Yocto documentation](https://www.yoctoproject.org/docs/latest/brief-yoctoprojectqs/brief-yoctoprojectqs.html)
in order to have the required dependencies.
Create a project
----------------
Here are the main steps to create an arm-autonomy project:
1. create a new Yocto project using `oe-init-build-env` in a new directory:
```
oe-init-build-env my-project
```
2. Add `meta-arm/meta-arm-autonomy` layer to the list of layers of your
project in the `conf/bblayers.conf`. Also add any other layers you
might need (for example `meta-arm/meta-arm-bsp` and `meta-arm/meta-arm` to
use Arm boards like Juno or FVP emulator). You can achieve this by using
the `bitbake-layers add-layer layerdir [layerdir ...]` command.
For example:
```
export LAYERDIR_BASE="/home/user/arm-autonomy/"
bitbake-layers add-layer $LAYERDIR_BASE/meta-poky $LAYERDIR_BASE/meta-yocto-bsp \
$LAYERDIR_BASE/meta-openembedded/meta-oe $LAYERDIR_BASE/meta-openembedded/meta-python \
$LAYERDIR_BASE/meta-openembedded/meta-filesystems $LAYERDIR_BASE/meta-openembedded/meta-networking \
$LAYERDIR_BASE/meta-arm/meta-arm $LAYERDIR_BASE/meta-arm/meta-arm-toolchain \
$LAYERDIR_BASE/meta-arm/meta-arm-bsp $LAYERDIR_BASE/meta-arm/meta-arm-autonomy \
```
Example of a `conf/bblayers.conf`:
```
BBLAYERS ?= " \
/home/user/arm-autonomy/poky/meta \
/home/user/arm-autonomy/poky/meta-poky \
/home/user/arm-autonomy/poky/meta-yocto-bsp \
/home/user/arm-autonomy/meta-openembedded/meta-oe \
/home/user/arm-autonomy/meta-openembedded/meta-python \
/home/user/arm-autonomy/meta-openembedded/meta-filesystems \
/home/user/arm-autonomy/meta-openembedded/meta-networking \
/home/user/arm-autonomy/meta-virtualization \
/home/user/arm-autonomy/meta-arm/meta-arm \
/home/user/arm-autonomy/meta-arm/meta-arm-toolchain \
/home/user/arm-autonomy/meta-arm/meta-arm-bsp \
/home/user/arm-autonomy/meta-arm/meta-arm-autonomy \
"
```
Be aware that changing the order may break some dependencies if editing the
config file manually.
Those steps will have to be done for each project you will have to create.
Host project
------------
The host project will build Xen and the Dom0 Linux. It will be the only project
that will be specific to the board (MACHINE) you will be running on.
To create a host project:
1. Follow the steps of "Create a project"
2. Add the layers in `bblayers.conf` required to build a Yocto project for the
board you want to use.
For example to use Arm FVP Base emulator, add `meta-arm/meta-arm` and
`meta-arm/meta-arm-bsp`.
3. edit conf/local.conf to add `arm-autonomy-host` to the DISTRO_FEATURES and
set MACHINE to the board you want to use.
For example, add the following lines:
```
MACHINE = "fvp-base"
DISTRO_FEATURES += "arm-autonomy-host"
```
4. build the image using `bitbake arm-autonomy-host-image-minimal`
The project will generate a Linux kernel, a root filesystem, a Xen binary and
a DTB modified to include the required entries to boot Xen and Linux as Dom0
(this DTB has the extension `-xen.dtb`).
To boot the system using a u-boot base board for machines other than FVP-Base
you will need to:
- Load the kernel (by default at 0x80080000 unless you modify
XEN_DEVICETREE_DOM0_ADDR value)
- Load the xen device tree (for example at 0x83000000)
- Load the xen-efi binary (for example at 0x84000000)
- run using `booti 0x84000000 - 0x83000000`
In this example the addresses might need to be adapted depending on your board.
For arm-autonomy host on FVP-Base, u-boot has been modified such that
`booti 0x84000000 - 0x83000000` is the default boot command. If FVP-Base is your
MACHINE target there should be no need to interfere with u-boot.
Guest project
-------------
The guest projects are not target specific and will instead use a Yocto MACHINE
defined in meta-arm-autonomy to include only the Linux configuration required to
run a xen guest.
To create a guest project:
1. Follow the steps of "Create a project"
2. Optionally add layers required to build the guest image, and any features you
need.
3. Edit conf/local.conf to add `arm-autonomy-guest` to the DISTRO_FEATURES and
set MACHINE to `arm64-autonomy-guest`:
```
MACHINE = "arm64-autonomy-guest"
DISTRO_FEATURES += "arm-autonomy-guest"
```
4. Build the image you want.
For example `bitbake core-image-minimal`
The build will create a ".xenguest" image that can be use on an host project
with the xenguest-manager, as well as a file "xenguest.env" containing the
variables used to configure and generate the guest image.
The guest can also be built as a 'multiconfig' sub project of the host, see
`meta-arm-autonomy/documentation/arm-autonomy-multiconfig.md` for more
information
Include guests directly in the host image
-----------------------------------------
The layer provides a way to directly include one or more images generated by
guest projects in the host project.
To use this feature, you must edit your host project `local.conf` file and
add set the value of 'ARM_AUTONOMY_HOST_IMAGE_EXTERN_GUESTS' to the list of
paths to xenguest images you want to include in your host.
There are 4 supported formats for ARM_AUTONOMY_HOST_IMAGE_EXTERN_GUESTS
entries:
- http/https url
- "https://[url]:[port]/foo.xenguest;md5sum=..."
- file:// absolute local path from root
- "file:///xenguests/bar.xenguest"
- file:// path relative to FILESEXTRAPATHS
- "file://relative/baz.xenguest"
- plain absolute local path from root
- "/xenguests/absolute/xyzzy.xenguest"
It is not recommended to use other bitbake URL types, as they may result in
undefined behaviour.
A semicolon seperated list of install arguments can follow each image path:
- guestname : the name that will be attached when the image is imported
(default: [filename, without extension])
- guestcount : the number of copies of the guest to install, with
incrementing numbers appended to the name
(default: 1)
Any other arguments, for example an md5sum, will be assumed to be fetch
arguments, and will be appended to the path in the SRC_URI.
For example:
```
ARM_AUTONOMY_HOST_IMAGE_EXTERN_GUESTS = "\
https://[url]:[port]/base.xenguest;md5sum=[checksum];guestname=http \
file:///guests/base.xenguest;guestname=file_abs \
file://foo/base.xenguest;guestname=file_rel;guestcount=2 \
/guests/foo/bar/base.xenguest;guestname=no_fetcher \ "
```
Documentation for setting up a multiconfig build can be found in:
meta-arm-autonomy/documentation/arm-autonomy-multiconfig.md
Add support for your board
--------------------------
Most of arm-autonomy layer is board independent but some functionalities
might need to be customized for your board:
### Add the kernel configuration for the host
The layer is using KERNEL_FEATURES to add drivers required to be a Xen Dom0
system.
Depending on the kernel used by your BSP and how it is configured you might
need to add the required drivers to your kernel configuration:
- if KERNEL_FEATURES system is supported by your kernel, make sure that the
file `recipes-kernel/linux/linux-arm-autonomy.inc` from the layer is included
by your kernel recipe.
- if it is not supported, you must add the proper drivers inside your kernel
(modules are possible but they must be loaded before xenguest-manager is
started). You can find the complete list of the kernel configuration elements
required in `recipes-kernel/linux/arm-autonomy-kmeta/features/arm-autonomy/xen-host.cfg`.
### Define the drive and partition to use for the LVM volume
The xenguest-manager creates guest storage drives using LVM on an empty
partition. The default value is set to use /dev/sda2.
You can change this for your board by setting XENGUEST_MANAGER_VOLUME_DEVICE.
Check `recipes-extended/xenguest/xenguest-manager.bbappend` for examples.
Please also read xenguest-manager.md.
### Define the interface to add to xenguest network bridge
xenguest-network bridge creates a bridge on the host and adds network
interfaces to it so that guests connected to it have access to external network.
By default `eth0` is set as the list of interfaces to be added to the bridge.
Depending on your board or use case you might want to use an other interface
or use multiple interfaces.
You can change this for your board by setting XENGUEST_NETWORK_BRIDGE_MEMBERS.
Check `recipes-extended/xenguest/xenguest-network.bbappend` for
exmaples.
Please also read xenguest-network-bridge.md.
### Define the network configuration of the xenguest network bridge
xenguest-network puts the host network interfaces in a bridge and configures it
by default to use dhcp.
If you need a different type of configuration you can set
XENGUEST_NETWORK_BRIDGE_CONFIG in your xenguest-network-bridge.bbappend to use
a different file.
The recipe will look for the file in ${WORKDIR}, so you will need to add it to
the SRC_URI in your bbappend.
The recipe will also substitute `###BRIDGE_NAME###` with the bridge name
configured in ${XENGUEST_NETWORK_BRIDGE_NAME} when the config file is installed.
You can find an example configuration file in
`recipes-extended/xenguest/files/xenguest-network-bridge-dhcp.cfg.in`.
Please also read xenguest-network.md.
### Customize Dom0 and Xen boot arguments for you board
xen-devicetree modifies the generated DTB Xen and Linux boot arguments,
as long as the address where Dom0 Linux kernel can be found.
You might need to have different values for your board or depending on your
use case.
You can find examples to customize this in
`recipes-extended/xen-devicetree/xen-devicetree.bbappend`.
Please also read xen-devicetree.md.
@@ -1,34 +0,0 @@
Customizing Arm Autonomy Host image layout for N1SDP
====================================================
When buiding with `DISTRO_FEATURES += "arm-autonomy-host"` the user can
perform a couple of customizations in the generated wic image:
1. Set the guest partition size (default: 4iG) via `GUEST_PART_SIZE` and
`GUEST_PART_SIZE_UNIT` (M or G) variables to be set in any conf file. The
value of these variables should be aligned with the sum of all
XENGUEST_IMAGE_DISK_SIZE set for the guests. By default, LVM2 metadata is
1 MiB per physical volume, hence it needs to be taken into account when
setting GUEST_PART_SIZE.
2. Set the boot partition size (default: 100M) via `BOOT_PART_SIZE` and
`BOOT_PART_SIZE_UNIT` (M or G) variables in any conf file. The default
bootimg is ~44M so 100M leaves just over 50M of free space.
3. The wic image partition layout and contents with a custom wks file via
`ARM_AUTONOMY_WKS_FILE` variable (default:
arm-autonomy-n1sdp-efidisk.wks.in which is affected by GUEST_PART_SIZE,
GUEST_PART_SIZE_UNIT, BOOT_PART_SIZE, BOOT_PART_SIZE_UNIT and
GRUB_CFG_FILE variables).
4. Custom grub.cfg file via `GRUB_CFG_FILE` (default:
arm-autonomy-n1sdp-grub.cfg) variable to be set in any conf file. The full
path or relative to `ARM_AUTONOMY_WKS_FILE` should be set.
The `arm-autonomy-n1sdp-efidisk.wks.in` and `arm-autonomy-n1sdp-grub.cfg` files
are located at `meta-arm-autonomy/dynamic-layers/meta-arm-bsp/wic`.
Other variables can also be customized to set what files need to be included
in the wic image boot partition. Please refer to
`meta-arm-autonomy/dynamic-layers/meta-arm-bsp/conf/machine/n1sdp-extra-settings.inc`
for more details.
@@ -1,110 +0,0 @@
Xen device tree
===============
Introduction
------------
xen-devicetree recipe can be used to modify an existing Device Tree Blob,
produced by Linux kernel or another recipe, to include in it entries required
to start Xen and a Dom0 Linux on top of it.
The recipe will do the following processing:
- generate a xen.dtsi file with entries required for xen based on parameters
- turn DTBs in ${XEN_DEVICETREE_DTBS} back to dts
- include in xen.dtsi and all other dtsi from
${XEN_DEVICETREE_DTSI_MERGE} (check Bitbake parameters for more information
on this).
- use dtc to create a new DTB file
The recipe will generate new files in deploy/images and name them with the
extension "-xen.dtb".
For example **machine.dtb** will generate **machine-xen.dtb**.
Entries added to the DTBs
-------------------------
When a DTB is processed by the recipe, the following block is added:
```
chosen {
xen,dom0-bootargs = "VAL";
xen,xen-bootargs = "VAL";
modules {
#size-cells = <0x00000001>;
#address-cells = <0x00000001>;
module@0 {
reg = <VAL VAL>;
compatible = "multiboot,module";
};
};
};
```
Each occurence of **VAL** is replaced by the content of the variables listed in
this documentation.
Bitbake parameters
------------------
Several parameters are available to configure the xen-devicetree during Yocto
project compilation (those can be set in your project local.conf, for exmple).
The following parameters are available:
- XEN_DEVICETREE_DEPEND: This variable can be used to indicate which recipe
task is generating the DTBs that xen-devicetree will modify. This makes sure
the xen devicetrees are properly regenerated if the source DTBs are changed.
This variable is set by default to "virtual/kernel:do_deploy" to use DTBs
generated during the compilation of the Linux kernel. This must be changed
if the machine you are using is not using a DTB listed in
KERNEL_DEVICETREE.
- XEN_DEVICETREE_DTBS: This should be set to the list of DTBs you want to be
modified by xen-devicetree. Those must be files that xen-devicetree can find
in the ${DEPLOY_DIR_IMAGE} directory using only the basename of the entries.
For example "mydir/board.dtb" will make the recipe look for
${DEPLOY_DIR_IMAGE}/board.dtb.
This variable is set by default to "${KERNEL_DEVICETREE}" to process the DTBs
generated by the Linux kernel.
- XEN_DEVICETREE_DOM0_MEM: Memory size to allocate to Dom0.
This variable is only used if XEN_DEVICETREE_XEN_BOOTARGS has a value
containing "dom0_mem=${XEN_DEVICETREE_DOM0_MEM}" as the memory assigned to
dom0 is defined using Xen boot arguments.
This variable is set by default to "1024M,max:1024", and cannot be empty.
The value can simply specify a size, e.g. "1024M", but best practice is to
also provide a max, documented here:
https://wiki.xenproject.org/wiki/Xen_Project_Best_Practices
- XEN_DEVICETREE_DOM0_BOOTARGS: Boot arguments to pass to Dom0 Linux when
booting it.
This variable is set by default to "console=hvc0 earlycon=xen".
- XEN_DEVICETREE_XEN_BOOTARGS: this variable should be set with the boot
arguments to be passed to Xen on boot.
This variable is set by default to
"noreboot dom0_mem=${XEN_DEVICETREE_DOM0_MEM}".
- XEN_DEVICETREE_DOM0_ADDR: This is the address from which the Linux kernel to
be used for Dom0 will be copied. When using u-boot, this is the address at
which you will load the kernel Image before starting Xen.
This variable is set by default to "0x80080000", and cannot be empty.
Values for this variable can be in hex (prefixed with '0x') or in decimal.
- XEN_DEVICETREE_DOM0_SIZE: This is the size of the kernel loaded at
${XEN_DEVICETREE_DOM0_ADDR}. Xen will copy this amount of data inside the
guest before starting it so the size must be at least equal to the kernel
size but can be bigger. You must be careful not to have a value too big as it
could slow down boot or copy other parts with it (like the DTB).
You might need to increase this if you use a kernel with a bundled initramfs.
This variable is set by default to "0x01000000" and cannot be empty.
Values for this variable can be in hex (prefixed with '0x') or in decimal.
- XEN_DEVICETREE_DTSI_MERGE: This variable contains the list of dtsi files that
must be included inside the generated DTB file. By default the only one
include is the "xen.dtsi" generated by the recipe.
If your board or project needs to include more fixes or entries in the DTB,
this variable can be appended from a bbappend file to include other dtsi. The
files must be inside the recipe workspace during Yocto compilation.
You can check xen-devicetree.bbappend for an example.
@@ -1,144 +0,0 @@
Xenguest Manager
================
Introduction
------------
xenguest-manager is a tool to manage Xenguest images generated by
[xenguest-mkimage](xenguest-mkimage.md).
On a Xen Dom0 system it can:
- create a xen guest from a xenguest image: extract its components, create a
disk for the guest using LVM volumes.
- start/stop a xen guest (during init or using xenguest-manager directly).
- check guest status
xenguest-manager is composed of 2 shell scripts:
- xenguest-manager which can be used from command line to start/stop/check
guests and create or remove guest using xenguest images.
- xenguest-init which is called during init to automatically create and start
some guests as part of the host init process.
Usage
-----
xenguest-manager must be called like this:
`xenguest-manager [-v(v)] OPERATION [OPTIONS]`
The following operations are available:
- create XENGUEST_IMAGE [GUESTNAME]: create a guest from a xenguest image file
as guest GUESTNAME. If GUESTNAME is not given the image file name is used
without the xenguest extension.
- remove GUESTNAME: remove the guest GUESTNAME.
- start GUESTNAME: start the guest GUESTNAME.
- stop GUESTNAME: stop the guest GUESTNAME (this is using `xl stop` which is
sending a stop signal to the running guest).
- kill GUESTNAME: force stopping the guest GUESTNAME.
- list: list the available guests.
- status [GUESTNAME]: print the current status of GUESTNAME. If GUESTNAME is
not given, print the status of all guests.
Passing -v or -vv will increase the logging written to the logfile.
The terminal will always show only error messages, regardless of the logfile.
For a detailed help on available options please use:
`xenguest-manager --help`
Bitbake parameters
------------------
Several parameters are available to configure the xenguest manager during Yocto
project compilation (those can be set in your project local.conf, for example).
This config will be written to a file xenguest-manager.conf in /etc/xenguest/.
The following parameters are available:
- XENGUEST_MANAGER_VOLUME_DEVICE: This is the device path used by the
xenguest-manager on the device to create LVM disks when guests have a disk
configuration.
This is set by default to "/dev/sda2".
- XENGUEST_MANAGER_VOLUME_NAME: This is the LVM volume name that the
xenguest-manager will create and use to create guest LVM disks.
This is set by default to "vg-xen".
- XENGUEST_MANAGER_GUEST_DIR: This is the directory on Dom0 where the
xenguest-manager will look for xenguest images to create during init. That's
the place where xenguest images can be added to have them automatically
created during next Dom0 boot. The xenguests found there will only be created
if they were not already before (the basename of the files is used as guest
name).
This is set by default to "/usr/share/guests".
- XENGUEST_MANAGER_LOG_LEVEL: Set the default log level for xenguest manager.
Must be one of ERROR, INFO, VERBOSE (default: ERROR). The logs will be
written to /var/log/xenguest.
If a verbosity argument (-v or -vv) is passed to xenguest-manager directly, it
will override the setting in xenguest-manager.conf
Since /var/log is by default a volatile location, extra configuration is
required if logs are desired to be kept between reboots:
VOLATILE_LOG_DIR="no"
Read more here: https://www.yoctoproject.org/docs/latest/mega-manual/mega-manual.html#var-VOLATILE_LOG_DIR
When this is enabled, logrotate will monitor the file to ensure it does not
grow excessively large. See recipes-extended/xenguest/files/logrotate-xenguest
Init scripts
------------
Shell scripts can be executed on the host when a guest is started. Depending on
when the script should be executed it should be installed in a different
directory on the target:
- /etc/xenguest/init.pre : Executed first, prior to guest creation
- /etc/xenguest/init.d : Executed after guest creation, but before it is started
- /etc/xenguest/init.post : Executed after starting the guest
Inside the directory, scripts will be executed in alphabetical order.
Since these scripts are sourced by xenguest-manager, they can acccess functions
and variables from the parent file's scope, including:
- ${guestname} : The name of the guest being created
- ${guestdir} : The path to the guest directory
- ${guestcfgfile} : The name of the config file for the starting guest
- log() : Used to write a log to the logfile, default level INFO.
Takes an optional log level and a message body
e.g. log ERROR "blah"
Options for log level: ERROR, INFO, VERBOSE,
and FATAL which will call exit 1 immediately after logging
the message at level ERROR.
- log_command() : Used to call a shell command and log that it has been
called, as well as capturing both stdout and stderr.
By default the command output is dumped to the logfile as an
error if the command returns a status > 0, or as a verbose
message if the whole script is running in verbose mode.
An optional log level can be passed to alter the level the
log should be if the command returns a status >0, which may
be useful if the command is expected to return a non-zero
result.
e.g. log_command INFO "ls -lh ~"
Options for log level: ERROR, INFO, and VERBOSE
Attempting to call any other functions from xenguest_manager in an init script
may result in a fatal error, from which cleanup is not guarenteed.
Init scripts also have access to config variables defined in params.cfg.
An example of how to create the directory and install an init shell script can
be found in:
recipes-extended/xenguest/xenguest-network.bb
Where network-bridge.sh is installed from network-bridge.sh.in
@@ -1,128 +0,0 @@
Xenguest mkimage
================
Introduction
------------
xenguest-mkimage is a tool to create and modify images to be used as a Guest
with Xen. It defines a format to store completely defined guests as a file or as
a directory, and provides options to create and modify those images.
A xenguest image contains all elements required to create a xen guest.
This is the base elements like a Xen configuration and a Linux kernel binary
but also some more advanced elements like init scripts or a disk definition.
The format is made to be deployable easily by storing everything in a single
file and provide tools to easily manipulate the images. It can also easily be
extended to have features like encryption or signature of images, updates or
complex configurations by providing the ability to have init scripts embedded
inside the image that will be executed on the host when the guest is started.
Xenguest images content
-----------------------
### params.cfg
This file contains parameters that can be used by tools to configure some
functionalities on the host. This can be used by init scripts to have
configurable parameters as it is sourced before calling init scripts.
### guest.cfg and guest.d
guest.cfg is the main xen configuration and guest.d contains optional
configuration parts. All those will be merged into one final xen configuration
before starting the guest.
### files
This directory contains files that can be used by the xen configuration, for
example the kernel image referenced in xen configuration.
This is where the kernel binary, the dtb or a ramdisk will be stored.
### init.pre, init.d and init.post
These directories contain init scripts that will be executed on the host
during the guest startup. Those must be shell scripts and each directory
contains scripts called at a different time:
- init.pre: scripts executed before the guest is created. This can be used
to prepare some features required to create the guest in xen or to
generate part of the xen configuration dynamically.
- init.d: scripts executed when the guest has been created but before it is
started. This can be used to do some xenstore operations or configure the
guest behaviour, using xl for example.
- init.post: scripts executed just after starting the guest. This can be
used to configure things created by xen for the guest like network
network interfaces.
When a directory contains several scripts, those will be called in alphabetical
order.
### disk.cfg and disk-files
disk.cfg contains the guest disk description (disk size and disk partitions).
The file contains the following entries:
- `DISK_SIZE=X`: size of the disk to create in MB or GB(default),
e.g. 1000M or 4[G]
- `DISK_PARTX=SIZE:FS:CONTENT`: create a partition number X (1 to 4) with a
size of SIZE MB or GB(default), e.g 1000M or 2[G].
Format it with filesystem FS (can be ext2, ext3, ext4, vfat or swap)
and extract CONTENT as initial partition content (.tar[.gz|.xz|.bz2] file
or img[.gz|.bz2] file to be dumped in the partition).
FS and CONTENT can be empty.
- `DISK_DEVICE=X`: disk or partition to be used by lvm. Setting this option
allows to bind guest disk with any partition or disk available on host,
e.g. /dev/sda3 or /dev/sdb.
This variable is not set by default, but if set, it overrides disk settings
inside xenguest-manager.conf - 'XENGUEST_VOLUME_DEVICE'.
The disk-files contain files to be used for initializing the disk partitions
content. Those should be used to create a LVM or a physical disk and initialize
it (create partitions, format them and put the initial content).
Usage
-----
xenguest-mkimage is a shell script which must be called like this:
`xenguest-mkimage OPERATION XENGUEST [OPTIONS]`
### Operations
- create: create a xenguest image. If XENGUEST is an existing empty directory,
the image is created as a directory otherwise it will be created as a file.
- check: verify that XENGUEST is a valid xenguest image.
- update: modify a xenguest image (see --help for a list of operations).
- pack: pack a xenguest image directory into a xenguest image file. The file to
be created must be given as 3rd argument.
- extract: extract a xenguest image file into a directory. The destination
directory must be given as 3rd argument.
- dump-xenconfig: dump xenguest image xen configuration.
- dump-diskconfig: dump xenguest image disk configuration.
- dump-paramsconfig: dump xenguest image parameters configuration.
For a detailed help on available operations, please use:
`xenguest-mkimage --help`
### Options
- --kernel=FILE: add kernel FILE as guest kernel. This is both adding the file
to the image and modifying the xen configuration to use it.
- --xen-memory=SIZE: set the guest memory size in MB.
- --xen-extra: add a kernel command line argument. This can be called several
times to add several command line options.
- --xen-device-tree=FILE: add dtb FILE as device tree. This both adding the
file to the image and modifying the xen configuration to use it.
- --xen-ramdisk=FILE: add ramdisk FILE as guest ramdisk. This both adding the
file to the image and modifying the xen configuration to use it.
- --init-script=FILE: add guest init script. The script is embedded inside the
image file. Several script can be added and the basename of FILE is used to
distinguish them (calling the option twice with the same file will update the
script in the image with the second one).
--disk-size=SIZE: set the guest disk size to SIZE in MB or GB(default),
e.g 1000M or 2[G]. Calling this with 0 disable the guest disk.
- --disk-add-part=NUM:SIZE:FS:CONTENT: This is adding a partition to the
xenguest image disk. The partition is described with the arguments:
- NUM: partition number.
- SIZE: partition size in MB or GB(default), e.g 1000M or 2[G].
- FS: filesystem to format the partition with. This can be ext2, ext3, ext4,
vfat of swap. If empty the partition is not formated.
- CONTENT: tar of img file to use to initialize the partition. The file must
be added to the image using --disk-add-file=FILE:CONTENT.
For a detailed help on available options, please use:
`xenguest-mkimage OPERATION --help`
@@ -1,80 +0,0 @@
Xenguest Network
================
Introduction
------------
The xenguest-network package is primarly creating a network bridge to share
the host eth physical interfaces with the guests virtual interfaces (vif).
This way the guests can have access to the external network.
At the moment 3 types of network arrangements are provided:
- Bridge: where the guest vif is added to the created bridge interface;
- NAT: where a private subnet is created for the guest,
a kea dhcp4 server is started on the host to serve the guest
and the proper iptables rules are created
to allow the guest to access the external network;
- None: the guest vif is not connected to the bridge.
Usage
-----
On the host project the package xenguest-network must be included in your
image, and on the guest project the XENGUEST_NETWORK_TYPE needs to be set to
"bridge", "nat" or "none".
Bitbake parameters
------------------
Several parameters are available to configure the xenguest network bridge
during Yocto project compilation (those can be set in your project local.conf
or xenguest-network.bbappend, for example).
The following parameters are available:
- XENGUEST_NETWORK_BRIDGE_NAME: This variable defines the name of the network
bridge that is created on the host during init.
This is set by default to "xenbr0".
- XENGUEST_NETWORK_BRIDGE_MEMBERS: This variable defines the list of the
physical network interfaces that are added to the bridge when it is created
on the host during init.
By default no physical interfaces are added.
- XENGUEST_NETWORK_BRIDGE_CONFIG: This variable defines the configuration file
to use to configure the bridge network. By default it points to have file
configuring the network using dhcp.
You can provide a different file using a bbappend and make this variable
point to it if you want to customize your network configuration.
- XENGUEST_IMAGE_NETWORK_TYPE: This variable can be set to "bridge" (default),
"nat" or "none".
The **bridge** type will add the domU vif interface to a bridge which also
contains the dom0 physical interface giving the guest direct access to the
external network.
The **nat** type will setup a private network between dom0 and domU, setup
the appropriate routing table, configure and run the kea dhcp4 server
on dom0 to serve the domU and apply the iptables rules to allow the guest
to acess the external network. The kea dhcp4 server configuration for
the guest can be customised by replacing the
"meta-arm-autonomy/recipes-extended/xenguest/files/kea-subnet4.json" file
in a xenguest-network.bbappend. The kea-subnet4.json file is installed in
the xenguest image and copied to
"/etc/xenguest/guests/${guestname}/files/kea-subnet4.json" when the guest
image is created. It will be consumed by the
"/etc/xen/scripts/vif-post.d/00-vif-xenguest.hook" script which is called by
"/etc/xen/scripts/vif-nat" script when starting/stopping the xenguest.
After guest start, "/etc/xenguest/init.post/xenguest-network-init-post.sh"
script is called to reload kea dhcp4 server with updated configuration,
after virtual network interface is ready.
In the guest project, the NAT port forward can be customised by changing
the XENGUEST_IMAGE_HOST_PORT (default: "1000 + ${domid}") and
XENGUEST_IMAGE_GUEST_PORT (default: "22") variables in local.conf or
xenguest-base-image.bbappend. This configuration is implemented and installed
in "/etc/xenguest/guests/${guestname}/files/00-xenguest-nat-port-forward.hook"
script which is called by "/etc/xen/scripts/vif-post.d/00-vif-xenguest.hook".
The **none** type will not affect any networking setting between on dom0 and
domU.
@@ -1,7 +0,0 @@
# Require extra machine specific settings
ARM_BSP_DYN_MACHINE_EXTRA_REQUIRE ?= ""
ARM_BSP_DYN_MACHINE_EXTRA_REQUIRE:n1sdp = "n1sdp-extra-settings.inc"
ARM_BSP_DYN_MACHINE_EXTRA_REQUIRE:fvp-base = "fvp-base-extra-settings.inc"
ARM_BSP_DYN_MACHINE_EXTRA_REQUIRE:juno = "juno-extra-settings.inc"
require ${ARM_BSP_DYN_MACHINE_EXTRA_REQUIRE}
@@ -1,39 +0,0 @@
# Extra machine settings for fvp-base
# FVP uses vda as hard drive and partition 1 is the
# default rootfs, so use vda2 for guest lvm
XENGUEST_MANAGER_VOLUME_DEVICE ?= "/dev/vda2"
# We need to extend the wks search path to be able to find the wks file set in
# ARM_AUTONOMY_WKS_FILE.
WKS_SEARCH_PATH:prepend := "${ARM_AUTONOMY_ARM_BSP_DYNAMIC_DIR}/wic:"
ARM_AUTONOMY_WKS_FILE ?= "arm-autonomy-fvp-base-disk.wks.in"
# set wks file only if INITRAMFS_IMAGE_BUNDLE is not set
WKS_FILE = "${@bb.utils.contains('INITRAMFS_IMAGE_BUNDLE', '1', '',\
'${ARM_AUTONOMY_WKS_FILE}', d)}"
XEN_FILE ?= "xen-fvp-base"
DTB_FILE ?= "${@ get_xen_dtb_filename(d)}"
XEN_ADDR ?= "0x84000000"
DTB_ADDR ?= "0x83000000"
FVP_DATA += "cluster0.cpu0=${DEPLOY_DIR_IMAGE}/${XEN_FILE}@${XEN_ADDR} \
cluster0.cpu0=${DEPLOY_DIR_IMAGE}/${DTB_FILE}@${DTB_ADDR}"
# Set the wks guest partition size and unit. It must be aligned with the sum of
# all XENGUEST_IMAGE_DISK_SIZE set for the guests. By default, LVM2 metadata is
# 1 MiB per physical volume, hence it needs to be taken into account when
# setting GUEST_PART_SIZE. The XENGUEST_IMAGE_DISK_SIZE default value is 4GiB.
GUEST_PART_SIZE ?= "4097"
GUEST_PART_SIZE_UNIT ?= "M"
XENGUEST_NETWORK_BRIDGE_MEMBERS ?= "eth0"
# This function uses the "KERNEL_DEVICETREE" variable and manipulates it to
# return the xen kernel device tree file name.
def get_xen_dtb_filename(d):
kernel_dtb_filename = d.getVar('KERNEL_DEVICETREE',d)
xen_dtb_filename = os.path.splitext(os.path.basename(kernel_dtb_filename))[0] + '-xen.dtb'
return xen_dtb_filename
@@ -1,26 +0,0 @@
# Extra machine settings for juno
KERNEL_ALT_IMAGETYPE = "Image.lzma"
# Juno board has 2 network interfaces, add both of them to the bridge
XENGUEST_NETWORK_BRIDGE_MEMBERS ?= "eth0 eth1"
XEN_DEVICETREE_DOM0_SIZE ?= "0x02400000"
# We need to extend the wks search path to be able to find the wks file set in
# ARM_AUTONOMY_WKS_FILE.
WKS_SEARCH_PATH:prepend := "${ARM_AUTONOMY_ARM_BSP_DYNAMIC_DIR}/wic:"
ARM_AUTONOMY_WKS_FILE ?= "arm-autonomy-juno-disk.wks.in"
# set wks file only if INITRAMFS_IMAGE_BUNDLE is not set
WKS_FILE = "${@bb.utils.contains('INITRAMFS_IMAGE_BUNDLE', '1', '',\
'${ARM_AUTONOMY_WKS_FILE}', d)}"
# Set the wks guest partition size and unit. It must be aligned with the sum of
# all XENGUEST_IMAGE_DISK_SIZE set for the guests. By default, LVM2 metadata is
# 1 MiB per physical volume, hence it needs to be taken into account when
# setting GUEST_PART_SIZE. The XENGUEST_IMAGE_DISK_SIZE default value is 4GiB.
GUEST_PART_SIZE ?= "4097"
GUEST_PART_SIZE_UNIT ?= "M"
# set wic image type only if INITRAMFS_IMAGE_BUNDLE is not set
IMAGE_FSTYPES += "${@bb.utils.contains('INITRAMFS_IMAGE_BUNDLE', '1', '',\
'wic wic.gz wic.bmap', d)}"
@@ -1,94 +0,0 @@
# Extra machine settings for n1sdp
# We need to extent the wks search path to be able to find the wks file set in
# ARM_AUTONOMY_WKS_FILE.
WKS_SEARCH_PATH:prepend := "${ARM_AUTONOMY_ARM_BSP_DYNAMIC_DIR}/wic:"
ARM_AUTONOMY_WKS_FILE ?= "arm-autonomy-n1sdp-efidisk.wks.in"
WKS_FILE = "${ARM_AUTONOMY_WKS_FILE}"
# Set the wks guest partition size and unit. It must be aligned with the sum of
# all XENGUEST_IMAGE_DISK_SIZE set for the guests. By default, LVM2 metadata is
# 1 MiB per physical volume, hence it needs to be taken into account when
# setting GUEST_PART_SIZE. The XENGUEST_IMAGE_DISK_SIZE default value is 4GiB.
GUEST_PART_SIZE ?= "4097"
GUEST_PART_SIZE_UNIT ?= "M"
# Set default boot partition size and unit
BOOT_PART_SIZE ?= "100"
BOOT_PART_SIZE_UNIT ?= "M"
# The GRUB_CFG_FILE affects arm-autonomy-n1sdp-efidisk.wks.in file
#
# When alternate-kernel DISTRO_FEATURE is present we set the
# arm-autonomy-n1sdp-rt-grub.cfg by default. This GRUB config file has
# additional entries for booting with the PREEMPT_RT kernel.
GRUB_CFG_FILE ?= "${@bb.utils.contains('DISTRO_FEATURES','alternate-kernel', \
'${ARM_AUTONOMY_ARM_BSP_DYNAMIC_DIR}/wic/arm-autonomy-n1sdp-rt-grub.cfg', \
'${ARM_AUTONOMY_ARM_BSP_DYNAMIC_DIR}/wic/arm-autonomy-n1sdp-grub.cfg' \
, d)}"
# From arm-autonomy-n1sdp-efidisk.wks.in, the /boot partition is /dev/sda1, and
# the "/" partition is /dev/sda2.
XENGUEST_MANAGER_VOLUME_DEVICE ?= "/dev/sda3"
XENGUEST_NETWORK_BRIDGE_MEMBERS ?= "eth0"
# The XEN_DEVICETREE_DEPEND and XEN_DEVICETREE_DTBS variables aftect the
# xen-devicetree.bb recipe
XEN_DEVICETREE_DEPEND = "virtual/trusted-firmware-a:do_deploy"
XEN_DEVICETREE_DTBS ?= "n1sdp-single-chip.dtb"
# XEN_MOD_DEVICETREE_DTBS are the generated devicetrees for Xen. By default the
# xen-devicetree.bb recipe adds '-xen' suffix to it
XEN_MOD_DEVICETREE_DTBS ?= "n1sdp-single-chip-xen.dtb"
# When generating the wic image we need to have the xen deployed
do_image_wic[depends] += "xen:do_deploy"
# Select the extra files to be included in the boot partition
IMAGE_EFI_BOOT_FILES += "xen-n1sdp.efi;xen.efi"
IMAGE_EFI_BOOT_FILES += "${XEN_MOD_DEVICETREE_DTBS}"
# When alternate-kernel DISTRO_FEATURE is present we set the linux-yocto-rt
# by default
PREFERRED_PROVIDER_alternate/kernel ?= "\
${@bb.utils.contains('DISTRO_FEATURES', 'alternate-kernel', \
'linux-yocto-rt', '', d)}"
KERNEL_PACKAGE_NAME_alternate/kernel ?= "kernel-rt"
# When alternate-kernel DISTRO_FEATURE is present we set the kernel-rt by
# default
KERNEL_PACKAGE_NAME:pn-linux-yocto-rt = "\
${@ d.getVar('KERNEL_PACKAGE_NAME_alternate/kernel') \
if bb.utils.contains('DISTRO_FEATURES', 'alternate-kernel', True, False, d) \
else 'kernel' }"
# Relative path from DEPLOY_DIR_IMAGE of the Kernel PREEMPT_RT deployed Image
KERNEL_RT_IMAGE ?= "kernel-rt/Image-n1sdp.bin;Image-preempt-rt"
# Only include the Kernel PREEMPT_RT Image if we are building with
# alternate-kernel DISTRO_FEATURE
IMAGE_EFI_BOOT_FILES += "\
${@ d.getVar('KERNEL_RT_IMAGE',d) or '' \
if bb.utils.contains('DISTRO_FEATURES', 'alternate-kernel', True, False, d) and \
d.getVar('PREFERRED_PROVIDER_alternate/kernel') else ''}"
EFIDIR ?= "/EFI/BOOT"
GRUB_CFG_EXTRA_FILE ?= "${ARM_AUTONOMY_ARM_BSP_DYNAMIC_DIR}/wic/arm-autonomy-n1sdp-grub.cfg;.${EFIDIR}}"
# When alternate-kernel DISTRO_FEATURE is present we set the
# arm-autonomy-n1sdp-rt-grub.cfg by default. This GRUB config file has
# additional entries for booting with the PREEMPT_RT kernel and also includes
# the main GRUB config file set by GRUB_CFG_EXTRA_FILE.
IMAGE_EFI_BOOT_FILES += "\
${@ d.getVar('GRUB_CFG_EXTRA_FILE',d) or '' \
if bb.utils.contains('DISTRO_FEATURES', 'alternate-kernel', True, False, d) and \
d.getVar('PREFERRED_PROVIDER_alternate/kernel') else ''}"
# Additionnal kernel modules are necessary for n1sdp to be able to mount FAT
# filesystems using CP437.
MACHINE_ESSENTIAL_EXTRA_RDEPENDS:append = " kernel-module-nls-cp437 kernel-module-nls-iso8859-1"
# '-mcpu=' and '-march=' conflicts for xen build
# lets not set '-march=' and let xen to overwrite '-mcpu='
TUNE_CCARGS:remove:pn-xen = "${TUNE_CCARGS_MARCH}${TUNE_CCARGS_MARCH_OPTS}"
@@ -1,50 +0,0 @@
# Use OVERRIDES to minimize the usage of
# ${@bb.utils.contains('DISTRO_FEATURES', 'autonomy-host', ...
OVERRIDES:append = "${ARM_AUTONOMY_HOST_OVERRIDES}"
FILESEXTRAPATHS:prepend:autonomy-host := "${THISDIR}/${PN}:"
DEPENDS:append:autonomy-host = " dos2unix-native"
SRC_URI:append:autonomy-host = " file://add-xen-support.patch;patchdir=../"
do_install:append:autonomy-host() {
mv -v ${D}/${UNPACK_DIR}/SOFTWARE/uEnv.txt \
${D}/${UNPACK_DIR}/SOFTWARE/uenvfile
for dir in $(ls ${D}/${UNPACK_DIR}/SITE1/)
do
unix2dos ${D}/${UNPACK_DIR}/SITE1/${dir}/images.txt
done
}
DEPLOY_EXTRA_DEPS ??= ""
DEPLOY_EXTRA_DEPS:autonomy-host = "xen:do_deploy xen-devicetree:do_deploy"
do_deploy[depends] += "${DEPLOY_EXTRA_DEPS}"
do_deploy:prepend:autonomy-host() {
# To avoid dependency loop between firmware-image-juno:do_install,
# xen:do_deploy and xen-devicetree:do_deploy when
# INITRAMFS_IMAGE_BUNDLE = "1", we need to handle the xen and
# xen-devicetree binaries copying in the do_deploy task.
mkdir -p ${D}/${UNPACK_DIR}/SOFTWARE/XEN
cp -v ${DEPLOY_DIR_IMAGE}/xen-${COMPATIBLE_MACHINE}.efi \
${D}/${UNPACK_DIR}/SOFTWARE/XEN/xen
for dtb in $(basename -s .dtb ${KERNEL_DEVICETREE})
do
cp -v ${DEPLOY_DIR_IMAGE}/${dtb}-xen.dtb \
${D}/${UNPACK_DIR}/SOFTWARE/XEN/${dtb}.dtb
done
bbnote "Xen binaries added under SOFTWARE/XEN directory"
if [ "${INITRAMFS_IMAGE_BUNDLE}" != "1" -a "${KERNEL_ALT_IMAGETYPE}" = "Image.lzma" ]; then
# KERNEL_ALT_IMAGETYPE is expected to be Image.lzma,
# however NOR flash filesystem is DOS compatible with 8.3 naming,
# so we need to replace ".lzma" with ".lzm"
cp -L -f ${DEPLOY_DIR_IMAGE}/${KERNEL_ALT_IMAGETYPE} \
${D}/${UNPACK_DIR}/SOFTWARE/Image.lzm
fi
}
@@ -1,173 +0,0 @@
arm-bsp/firmware-image-juno: add xen support
This patch adds xen and dtbs binaries entries to images-r[012].txt files.
These images-r[012].txt files contain NOR filesystem entries details,
like file offset, name, path etc.
It also adds customization for uEnv.txt file, that allows to autoboot xen.
Upstream-Status: Inappropriate [configuration]
Signed-off-by: Kamil Dziezyk <kamil.dziezyk@arm.com>
diff -u a/images-r0.txt b/images-r0.txt
--- a/images-r0.txt 2020-11-25 20:25:38.677687712 +0100
+++ b/images-r0.txt 2020-11-25 20:36:55.482194294 +0100
@@ -1,7 +1,7 @@
TITLE: Versatile Express Images Configuration File
[IMAGES]
-TOTALIMAGES: 10 ;Number of Images (Max: 32)
+TOTALIMAGES: 11 ;Number of Images (Max: 32)
NOR0UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
NOR0ADDRESS: 0x00000000 ;Image Flash Address
@@ -17,14 +17,14 @@
NOR2UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
NOR2ADDRESS: 0x00500000 ;Image Flash Address
-NOR2FILE: \SOFTWARE\Image ;Image File Name
-NOR2NAME: norkern ;Rename kernel to norkern
+NOR2FILE: \SOFTWARE\Image.lzm ;Image File Name
+NOR2NAME: norkern.lzm ;Rename kernel to norkern.lzm
NOR2LOAD: 00000000 ;Image Load Address
NOR2ENTRY: 00000000 ;Image Entry Point
NOR3UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
NOR3ADDRESS: 0x02900000 ;Image Flash Address
-NOR3FILE: \SOFTWARE\juno.dtb ;Image File Name
+NOR3FILE: \SOFTWARE\XEN\juno.dtb ;Image File Name
NOR3NAME: board.dtb ;Specify target filename to preserve file extension
NOR3LOAD: 00000000 ;Image Load Address
NOR3ENTRY: 00000000 ;Image Entry Point
@@ -64,8 +64,13 @@
NOR9UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
NOR9ADDRESS: 0x02A80000 ;Image Flash Address
NOR9NAME: uEnv.txt
-NOR9FILE: \SOFTWARE\uEnv.txt ;Image File Name
+NOR9FILE: \SOFTWARE\uenvfile ;Image File Name
NOR9LOAD: 00000000 ;Image Load Address
NOR9ENTRY: 00000000 ;Image Entry Point
-
+NOR10UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
+NOR10ADDRESS: 0x03000000 ;Image Flash Address
+NOR10FILE: \SOFTWARE\XEN\xen ;Image File Name
+NOR10NAME: xen
+NOR10LOAD: 00000000 ;Image Load Address
+NOR10ENTRY: 00000000 ;Image Entry Point
diff -u a/images-r1.txt b/images-r1.txt
--- a/images-r1.txt 2020-11-25 20:40:19.005177152 +0100
+++ b/images-r1.txt 2020-11-25 20:41:17.500886263 +0100
@@ -1,7 +1,7 @@
TITLE: Versatile Express Images Configuration File
[IMAGES]
-TOTALIMAGES: 10 ;Number of Images (Max: 32)
+TOTALIMAGES: 11 ;Number of Images (Max: 32)
NOR0UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
NOR0ADDRESS: 0x00000000 ;Image Flash Address
@@ -17,14 +17,14 @@
NOR2UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
NOR2ADDRESS: 0x00500000 ;Image Flash Address
-NOR2FILE: \SOFTWARE\Image ;Image File Name
-NOR2NAME: norkern ;Rename kernel to norkern
+NOR2FILE: \SOFTWARE\Image.lzm ;Image File Name
+NOR2NAME: norkern.lzm ;Rename kernel to norkern.lzm
NOR2LOAD: 00000000 ;Image Load Address
NOR2ENTRY: 00000000 ;Image Entry Point
NOR3UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
NOR3ADDRESS: 0x02900000 ;Image Flash Address
-NOR3FILE: \SOFTWARE\juno-r1.dtb ;Image File Name
+NOR3FILE: \SOFTWARE\XEN\juno-r1.dtb ;Image File Name
NOR3NAME: board.dtb ;Specify target filename to preserve file extension
NOR3LOAD: 00000000 ;Image Load Address
NOR3ENTRY: 00000000 ;Image Entry Point
@@ -64,8 +64,13 @@
NOR9UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
NOR9ADDRESS: 0x02A80000 ;Image Flash Address
NOR9NAME: uEnv.txt
-NOR9FILE: \SOFTWARE\uEnv.txt ;Image File Name
+NOR9FILE: \SOFTWARE\uenvfile ;Image File Name
NOR9LOAD: 00000000 ;Image Load Address
NOR9ENTRY: 00000000 ;Image Entry Point
-
+NOR10UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
+NOR10ADDRESS: 0x03000000 ;Image Flash Address
+NOR10FILE: \SOFTWARE\XEN\xen ;Image File Name
+NOR10NAME: xen
+NOR10LOAD: 00000000 ;Image Load Address
+NOR10ENTRY: 00000000 ;Image Entry Point
diff -u a/images-r2.txt b/images-r2.txt
--- a/images-r2.txt 2020-11-25 20:40:30.625119321 +0100
+++ b/images-r2.txt 2020-11-25 20:41:30.720820597 +0100
@@ -1,7 +1,7 @@
TITLE: Versatile Express Images Configuration File
[IMAGES]
-TOTALIMAGES: 10 ;Number of Images (Max: 32)
+TOTALIMAGES: 11 ;Number of Images (Max: 32)
NOR0UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
NOR0ADDRESS: 0x00000000 ;Image Flash Address
@@ -17,14 +17,14 @@
NOR2UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
NOR2ADDRESS: 0x00500000 ;Image Flash Address
-NOR2FILE: \SOFTWARE\Image ;Image File Name
-NOR2NAME: norkern ;Rename kernel to norkern
+NOR2FILE: \SOFTWARE\Image.lzm ;Image File Name
+NOR2NAME: norkern.lzm ;Rename kernel to norkern.lzm
NOR2LOAD: 00000000 ;Image Load Address
NOR2ENTRY: 00000000 ;Image Entry Point
NOR3UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
NOR3ADDRESS: 0x02900000 ;Image Flash Address
-NOR3FILE: \SOFTWARE\juno-r2.dtb ;Image File Name
+NOR3FILE: \SOFTWARE\XEN\juno-r2.dtb ;Image File Name
NOR3NAME: board.dtb ;Specify target filename to preserve file extension
NOR3LOAD: 00000000 ;Image Load Address
NOR3ENTRY: 00000000 ;Image Entry Point
@@ -64,8 +64,13 @@
NOR9UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
NOR9ADDRESS: 0x02A80000 ;Image Flash Address
NOR9NAME: uEnv.txt
-NOR9FILE: \SOFTWARE\uEnv.txt ;Image File Name
+NOR9FILE: \SOFTWARE\uenvfile ;Image File Name
NOR9LOAD: 00000000 ;Image Load Address
NOR9ENTRY: 00000000 ;Image Entry Point
-
+NOR10UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
+NOR10ADDRESS: 0x03000000 ;Image Flash Address
+NOR10FILE: \SOFTWARE\XEN\xen ;Image File Name
+NOR10NAME: xen
+NOR10LOAD: 00000000 ;Image Load Address
+NOR10ENTRY: 00000000 ;Image Entry Point
diff -u a/uEnv.txt b/uEnv.txt
--- a/uEnv.txt 2020-11-20 13:48:31.845078690 +0100
+++ b/uEnv.txt 2020-11-25 20:30:00.572306675 +0100
@@ -1,11 +1,16 @@
+xen_name=xen
+xen_addr=0x84000000
uenvcmd=run mybootcmd
+kernel_alt_name=norkern.lzm
+kernel_comp_addr_r=0x88080000
mybootcmd=echo Loading custom boot command; \
echo Loading kernel; \
afs load ${kernel_name} ${kernel_addr_r} ; \
-if test $? -eq 1; then echo Loading ${kernel_alt_name} instead of ${kernel_name}; afs load ${kernel_alt_name} ${kernel_addr_r}; fi; \
+if test $? -eq 1; then echo Loading ${kernel_alt_name} instead of ${kernel_name}; afs load ${kernel_alt_name} ${kernel_comp_addr_r}; lzmadec ${kernel_comp_addr_r} ${kernel_addr_r}; fi; \
echo Loading device tree; \
afs load ${fdtfile} ${fdt_addr_r}; \
if test $? -eq 1; then echo Loading ${fdt_alt_name} instead of ${fdtfile}; \
afs load ${fdt_alt_name} ${fdt_addr_r}; fi; fdt addr ${fdt_addr_r}; fdt resize; \
-booti ${kernel_addr_r} - ${fdt_addr_r};
-
+echo Loading Xen; \
+afs load ${xen_name} ${xen_addr}; \
+if test $? -eq 0; then echo Booting Xen; bootefi ${xen_addr} ${fdt_addr_r}; fi;
@@ -1,16 +0,0 @@
Upstream-Status: Inappropriate [meta-arm-autonomy specific u-boot config]
Signed-off-by: Nathan Dunne <nathan.dunne@arm.com>
diff --git a/include/configs/vexpress_aemv8a.h b/include/configs/vexpress_aemv8a.h
index e63c335f85..9ee050a4a6 100644
--- a/include/configs/vexpress_aemv8a.h
+++ b/include/configs/vexpress_aemv8a.h
@@ -162,7 +162,7 @@
#elif CONFIG_TARGET_VEXPRESS64_BASE_FVP
#define CONFIG_EXTRA_ENV_SETTINGS \
"kernel_name=Image\0" \
- "kernel_addr=0x80080000\0" \
+ "kernel_addr=0x84000000\0" \
"initrd_name=ramdisk.img\0" \
"initrd_addr=0x88000000\0" \
"fdtfile=devtree.dtb\0" \
@@ -1,10 +0,0 @@
# Use OVERRIDES to minimize the usage of
# ${@bb.utils.contains('DISTRO_FEATURES', 'autonomy-host', ...
OVERRIDES:append = "${ARM_AUTONOMY_HOST_OVERRIDES}"
FILESEXTRAPATHS:prepend:autonomy-host:fvp-base := "${THISDIR}/${PN}:"
#
# FVP BASE
#
SRC_URI:append:autonomy-host:fvp-base = " file://xen_u-boot_kernel_addr.patch"
@@ -1,11 +0,0 @@
/*
* Disable IOMMU on juno board when Xen is used
*/
/ {
/* turn off iommu */
iommu@2b600000 {
status = "disabled";
};
};
@@ -1,41 +0,0 @@
/*
* Modify N1SDP DTB to work properly when Xen is used
*/
/ {
/*
* pmu is using PPI interrupts which are reserved by xen
* remove pm nodes
*/
/delete-node/ pmu;
/delete-node/ spe-pmu;
soc {
/*
* disable IOMMU until we have a proper support in xen
*/
/delete-node/ iommu@4f000000;
/delete-node/ iommu@4f400000;
/*
* Set extra registers required for PCI quirks to communicate with SCP
* and remove invalid properties due to removal
*/
pcie@68000000 {
reg = <0 0x68000000 0 0x1200000>,
<0 0x06000000 0 0x80000>,
<0 0x62000000 0 0x80000>;
/delete-property/ msi-map;
/delete-property/ iommu-map;
};
pcie@70000000 {
reg = <0 0x70000000 0 0x1200000>,
<0 0x06000000 0 0x80000>,
<0 0x60000000 0 0x80000>;
/delete-property/ msi-map;
/delete-property/ iommu-map;
};
};
};
@@ -1,23 +0,0 @@
# Platform dependent parameters
FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
# Add a dtb snippet to turn off iommu in dom0 on Juno board
SRC_URI:append:juno = " file://xen-juno.dtsi"
XEN_DEVICETREE_DTSI_MERGE:append:juno = " xen-juno.dtsi"
# Add a dtb snippet to remove pmu and iommu in dom0 on N1SDP
SRC_URI:append:n1sdp = " file://xen-n1sdp.dtsi"
XEN_DEVICETREE_DTSI_MERGE:append:n1sdp = " xen-n1sdp.dtsi"
# For N1SDP, the XEN_DEVICETREE_DEPEND and XEN_DEVICETREE_DTBS variables are
# being set in meta-arm-autonomy/dynamic-layers/meta-arm-bsp/conf/machine/n1sdp-extra-settings.inc
# Board specific configs
XEN_DEVICETREE_DOM0_BOOTARGS:append:juno = " root=/dev/sda1 rootwait"
XEN_DEVICETREE_XEN_BOOTARGS:append:juno = " console=dtuart dtuart=serial0 bootscrub=0 iommu=no"
XEN_DEVICETREE_DOM0_BOOTARGS:append:n1sdp = " root=/dev/sda2 rootwait"
XEN_DEVICETREE_XEN_BOOTARGS:append:n1sdp = " console=dtuart dtuart=serial0 bootscrub=0 iommu=no"
XEN_DEVICETREE_DOM0_BOOTARGS:append:fvp-base = " root=/dev/vda1"
XEN_DEVICETREE_XEN_BOOTARGS:append:fvp-base = " console=dtuart dtuart=serial0 bootscrub=0"

Some files were not shown because too many files have changed in this diff Show More