From 4c3c2fda93af4900887f222d57a5af709dda5f20 Mon Sep 17 00:00:00 2001 From: Richard Neill Date: Thu, 29 Apr 2021 09:57:01 +0100 Subject: [PATCH] arm-bsp/linux: Add preempt-rt support for fvp-baser-aemv8r64 Add kernel configuration necessary to build an image with preempt-rt support for fvp-baser-aemv8r64, together with a build configuration file to build it via kas. Update BSP documentation for RT linux support on the machine. Issue-Id: SCM-2343 Signed-off-by: Richard Neill Change-Id: I11e3ba3ad7da00db1810c70fa4f98bfffd4b8254 Signed-off-by: Ross Burton --- kas/fvp-baser-aemv8r64-rt-bsp.yml | 8 ++++++ .../documentation/fvp-baser-aemv8r64.md | 26 ++++++++++++++----- .../fvp-baser-aemv8r64-preempt-rt.scc | 6 +++++ .../linux/linux-yocto-rt_%.bbappend | 3 ++- 4 files changed, 36 insertions(+), 7 deletions(-) create mode 100644 kas/fvp-baser-aemv8r64-rt-bsp.yml create mode 100644 meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/fvp-baser-aemv8r64-preempt-rt.scc diff --git a/kas/fvp-baser-aemv8r64-rt-bsp.yml b/kas/fvp-baser-aemv8r64-rt-bsp.yml new file mode 100644 index 00000000..2e712f81 --- /dev/null +++ b/kas/fvp-baser-aemv8r64-rt-bsp.yml @@ -0,0 +1,8 @@ +header: + version: 9 + includes: + - fvp-baser-aemv8r64-bsp.yml + +local_conf_header: + base: | + PREFERRED_PROVIDER_virtual/kernel = "linux-yocto-rt" diff --git a/meta-arm-bsp/documentation/fvp-baser-aemv8r64.md b/meta-arm-bsp/documentation/fvp-baser-aemv8r64.md index 18a01afb..439e0f37 100644 --- a/meta-arm-bsp/documentation/fvp-baser-aemv8r64.md +++ b/meta-arm-bsp/documentation/fvp-baser-aemv8r64.md @@ -17,10 +17,16 @@ Fast Models Fixed Virtual Platforms (FVP) Reference Guide: https://developer.arm.com/docs/100966/latest ## BSP Support -The fvp-baser-aemv8r64 Yocto MACHINE supports the following BSP components: +The fvp-baser-aemv8r64 Yocto MACHINE supports the following BSP components, +where either a standard or Real-Time Linux kernel (PREEMPT\_RT) can be built +and run: - boot-wrapper-aarch64 - - Kernel: linux-yocto-5.10 + - Linux kernel: linux-yocto-5.10 + - Linux kernel with PREEMPT\_RT support: linux-yocto-rt-5.10 + +Note that the Real-Time Linux kernel (PREEMPT\_RT) does not use the real-time +architectural extensions of the Armv8-R feature set. ## Quick start: Howto Build and Run @@ -32,19 +38,27 @@ Install the kas setup tool for bitbake based projects: https://kas.readthedocs.io/en/latest/userguide.html#dependencies-installation ### Fetch sources -Fetch meta-arm repository: +Fetch the meta-arm repository into a build directory: ``` -mkdir -p ~/fvp-baser-aemv8r64-bsp -cd ~/fvp-baser-aemv8r64-bsp +mkdir -p ~/fvp-baser-aemv8r64-build +cd ~/fvp-baser-aemv8r64-build git clone https://git.yoctoproject.org/git/meta-arm ``` ### Build + +Building with the standard Linux kernel: ``` -cd ~/fvp-baser-aemv8r64-bsp +cd ~/fvp-baser-aemv8r64-build kas build meta-arm/kas/fvp-baser-aemv8r64-bsp.yml ``` +Building with the Real-Time Linux kernel (PREEMPT\_RT): +``` +cd ~/fvp-baser-aemv8r64-build +kas build meta-arm/kas/fvp-baser-aemv8r64-rt-bsp.yml +``` + ### Run To Run the Fixed Virtual Platform simulation tool you must download "Armv8-R AEM FVP" from Arm developer (This might require the user to register) from this diff --git a/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/fvp-baser-aemv8r64-preempt-rt.scc b/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/fvp-baser-aemv8r64-preempt-rt.scc new file mode 100644 index 00000000..e8fea0b8 --- /dev/null +++ b/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/fvp-baser-aemv8r64-preempt-rt.scc @@ -0,0 +1,6 @@ +define KMACHINE fvp-baser-aemv8r64 +define KTYPE preempt-rt +define KARCH arm64 + +include ktypes/preempt-rt/preempt-rt.scc +include fvp-baser-aemv8r64.scc diff --git a/meta-arm-bsp/recipes-kernel/linux/linux-yocto-rt_%.bbappend b/meta-arm-bsp/recipes-kernel/linux/linux-yocto-rt_%.bbappend index 7f6030fa..14da805d 100644 --- a/meta-arm-bsp/recipes-kernel/linux/linux-yocto-rt_%.bbappend +++ b/meta-arm-bsp/recipes-kernel/linux/linux-yocto-rt_%.bbappend @@ -1,5 +1,6 @@ -# Only enable linux-yocto-rt for n1sdp +# Only enable linux-yocto-rt for n1sdp and the Armv8-R AArch64 AEM FVP LINUX_YOCTO_RT_REQUIRE ?= "" LINUX_YOCTO_RT_REQUIRE_n1sdp = "linux-arm-platforms.inc" +LINUX_YOCTO_RT_REQUIRE_fvp-baser-aemv8r64 = "linux-arm-platforms.inc" require ${LINUX_YOCTO_RT_REQUIRE}