Skip to content

Commit 2b7656c

Browse files
committed
WIP Technical Review
1 parent 80e9b72 commit 2b7656c

3 files changed

Lines changed: 47 additions & 18 deletions

File tree

content/learning-paths/embedded-and-microcontrollers/linux-on-fvp/intro.md

Lines changed: 41 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Several pre-built Armv8-A FVPs can be downloaded for free from the [Arm Ecosyste
2323
- Infrastructure
2424
- IoT
2525

26-
A popular model is the **AEMv8-A Base Platform RevC**, which supports Armv8.7 and Armv9-A. The [Arm reference software stack](https://gitlab.arm.com/arm-reference-solutions/arm-reference-solutions-docs/-/blob/master/docs/aemfvp-a/user-guide.rst) is designed for this model.
26+
A popular model is the **AEMv8-A Base Platform RevC**, which supports Armv8.7 and Armv9-A. The [Arm reference software stack](https://gitlab.arm.com/arm-reference-solutions/arm-reference-solutions-docs/-/blob/master/docs/aemfvp-a/user-guide.rst) is designed for this model. In this Learning Path, you will use the Armv-A Base Platform RevC FVP to get started.
2727

2828
### CPU-Specific Arm Base FVPs
2929
Other FVPs target specific CPU types and come pre-configured with a fixed number of cores. These are often called **CPU FVPs**.
@@ -39,8 +39,44 @@ To use these, request access via [support@arm.com](mailto:support@arm.com).
3939
### Setting Up Your Environment
4040
This Learning Path uses the [Arm reference software stack](https://gitlab.arm.com/arm-reference-solutions/arm-reference-solutions-docs/-/blob/master/docs/aemfvp-a/user-guide.rst).
4141

42-
To get started:
43-
1. Follow the software user guide to download the stack.
44-
2. Set up the required toolchain and environment variables.
42+
Create a workspace directory to use as a base for this Learning Path.
4543

46-
Once configured, you’ll be ready to run and debug Linux on your selected Arm FVP model.
44+
```
45+
mkdir linux-on-fvp-workspace && cd linux-on-fvp-workspace
46+
export WORKSPACE=$PWD
47+
```
48+
49+
Follow the software user guide to download the stack, up until the point of enabling the network. You can use the workspace directory you just created, instead of creating an additional one. This includes downloading the FVP, installing some dependencies and using a pre-built docker image to set up the packages needed. Install some additional dependencies, and add the FVP binary to your `PATH` environment variable.
50+
51+
```
52+
sudo apt update
53+
sudo apt install bridge-utils net-tools mtools
54+
export PATH=$WORKSPACE/Base_RevC_AEMvA_pkg/models/Linux64_armv8l_GCC-9.3
55+
:$PATH
56+
```
57+
58+
To verify the process, you should be able to run the `build-test-busybox.sh` script.
59+
60+
```
61+
cd $WORKSPACE
62+
docker_run ./build-scripts/aemfvp-a/build-test-busybox.sh -p aemfvp-a all
63+
```
64+
65+
The build will take a few minutes.
66+
67+
{{% notice Note %}}
68+
If you're running into compatibility issues with OpenSSL, you have to install a separate version:
69+
70+
```bash
71+
cd $WORKSPACE
72+
wget https://www.openssl.org/source/openssl-1.1.1.tar.gz
73+
tar -xvzf openssl-1.1.1.tar.gz
74+
cd openssl-1.1.1/
75+
./Configure linux-aarch64 --prefix=/usr/local/ssl --openssldir=/usr/local/ssl shared zlib
76+
make -j$(($(nproc)+1))
77+
sudo make install
78+
export LD_LIBRARY_PATH=/usr/local/ssl/lib:${LD_LIBRARY_PATH}
79+
```
80+
{{% /notice %}}
81+
82+
Once configured, you’ll be ready to run and debug Linux on your selected Arm FVP model. Move on to the next section.

content/learning-paths/embedded-and-microcontrollers/linux-on-fvp/modify.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ layout: learningpathall
88

99
## Modify the Device Tree for CPU FVPs
1010

11-
To run Linux on Arm CPU FVPs, you need to adjust the device tree to match the hardware features of these platforms. This involves removing unsupported nodes (like SMMU (System Memory Management Unit)and PCI (Peripheral Component Interconnect)) and ensuring CPU affinity values are set correctly.
11+
To run Linux on Arm CPU FVPs, you need to adjust the device tree to match the hardware features of these platforms. This involves removing unsupported nodes - like SMMU (System Memory Management Unit) and PCI (Peripheral Component Interconnect) - and ensuring CPU affinity values are set correctly.
1212

1313
### Step 1: Remove PCI and SMMU Nodes
1414

@@ -35,7 +35,7 @@ Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b
3535
Each FVP model uses specific CPU affinity values. If these don’t match what’s in the device tree, some CPU cores won’t boot.
3636
1. Find the correct affinities:
3737
```bash
38-
FVP_Base_Cortex-A55x4 -l | grep pctl.CPU-affinities
38+
FVP_Base_RevC-2xAEMvA -l | grep pctl.CPU-affinities
3939
```
4040
Example output:
4141

content/learning-paths/embedded-and-microcontrollers/linux-on-fvp/steps.md

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,32 +23,25 @@ lib/cpus/aarch64/cortex_a53.S
2323
... etc.
2424
```
2525

26-
## Why you need this
27-
28-
If the firmware is built without proper cpu_ops, you’ll hit an assertion failure like:
26+
If the firmware is built without proper `cpu_ops`, you’ll hit an assertion failure like:
2927

3028
```output
3129
ASSERT: File lib/cpus/aarch64/cpu_helpers.S Line 00035
3230
```
3331

3432
This means the required CPU operation routines are missing from the build.
3533

36-
## Step-by-Step: Add TF-A Build Flags
34+
## Add TF-A Build Flags
3735

3836
To include the correct `cpu_ops`, you need to set TF-A build options depending on the CPU.
3937

40-
### Example: A55 CPU FVP
4138

42-
Add the following line to your TF-A build script:
39+
Add the following line to your TF-A build script to update the options for the the AEMv8-A Base Platform RevC:
4340

44-
```output
41+
```bash
4542
ARM_TF_BUILD_FLAGS="$ARM_TF_BUILD_FLAGS HW_ASSISTED_COHERENCY=1 USE_COHERENT_MEM=0"
4643
```
4744

48-
### Example: A78 CPU FVP
49-
```output
50-
ARM_TF_BUILD_FLAGS="$ARM_TF_BUILD_FLAGS HW_ASSISTED_COHERENCY=1 USE_COHERENT_MEM=0 CTX_INCLUDE_AARCH32_REGS=0"
51-
```
5245
{{% notice Note %}}
5346
USE_COHERENT_MEM=1 cannot be used with HW_ASSISTED_COHERENCY=1.
5447
{{% /notice %}}

0 commit comments

Comments
 (0)