You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/learning-paths/servers-and-cloud-computing/glibc-linux-fvp/_index.md
+7-15Lines changed: 7 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
---
2
-
title: Glibc + Linux + FVP
2
+
title: Build and test a custom Linux image on an FVP
3
3
4
4
draft: true
5
5
cascade:
@@ -8,32 +8,24 @@ cascade:
8
8
minutes_to_complete: 60
9
9
10
10
who_is_this_for: >
11
-
Developers who wish to run a Linux system (optionally using a custom kernel and
12
-
a C library) on an Arm Fixed Virtual Platform (FVP) model. For example, this
13
-
guide might be useful if you want to test patches for the Linux kernel or Glibc.
11
+
This is an advanced topic for developers who wish to run a Linux system (optionally using a custom kernel and
12
+
a C library) on an Arm Fixed Virtual Platform (FVP) model. This learning path might be useful to follow if you want to test patches for the Linux kernel or Glibc prior to having hardware available.
14
13
15
-
learning_objectives:
14
+
learning_objectives:
16
15
- Build the Linux kernel.
17
16
- Install the Shrinkwrap tool, build firmware for the FVP and run it.
18
17
- Configure and boot a Linux system on the FVP.
19
-
- Configure guest OS to make running Glibc tests easier.
18
+
- Configure guest OS and run Glibc tests.
20
19
- Build Glibc and run tests on the system running on the FVP.
21
20
22
21
prerequisites:
23
-
- An AArch64 or x86 host running a Linux system.
24
-
- GCC cross toolchain for the `aarch64-none-linux-gnu` target.
25
-
- Docker.
26
-
- Git to checkout sources.
27
-
- Make to build the tools.
28
-
- Bash for your shell.
29
-
- Python 3.x and `pip` to create a Python virtual environment.
30
-
- Common tools like `wget`, `unxz`, `truncate`.
22
+
- An AArch64 or x86_64 Linux machine. The instructions in this Learning Path have been tested on AArch64 Linux machine running Ubuntu 24.04.
The GCC cross toolchain installation directory contains everything a cross toolchain would need, for example, the path to the `gcc` tool would be `/usr/bin/aarch64-linux-gnu-gcc`.
In the following sections you will checkout sources and build various tools on your Linux host machine. Before you begin, lets look at the directory structure of where you will build the different parts of software stack needed to run this learning path.
37
+
38
+
Table 1. Directory layout
40
39
41
-
In the next steps we create a Python virtual environment. It doesn't matter where
42
-
it is located, but to avoid ambiguity let's presume it is in `~/workspace/venv`.
Putting Shrinkwrap's main executable on your `PATH` is all you need to install the tool.
@@ -52,12 +51,15 @@ is activated, then run this command:
52
51
shrinkwrap --version
53
52
```
54
53
55
-
## Build firmware for FVP
54
+
You should see a version printed.
56
55
57
-
Before proceeding, ensure that Docker is installed and usable. Follow the installation
58
-
instructions for your distro [here][4].
56
+
```output
57
+
shrinkwrap v1.0.0
58
+
```
59
+
60
+
## Build firmware for the FVP
59
61
60
-
Now, we use the Shrinkwrap tool to build the firmware, the third essential ingredient in our
62
+
Now, you can use the Shrinkwrap tool to build the firmware, the third essential ingredient in our
61
63
setup. The following step needs to be done once although you will need to repeat it if you
62
64
want to rebuild the firmware:
63
65
@@ -78,17 +80,17 @@ the components including the device tree for the FVP.
78
80
At this point, we have everything required to boot our system. Shrinkwrap uses so called overlay
79
81
configuration files. The following file instructs Shrinkwrap to connect all the pieces together
80
82
and locate the kernel image, and rootfs. It can also be used to tweak any of the FVP
81
-
parameters. Save this file as `~/workspace/aarch64.yaml`:
83
+
parameters. Create a file in $HOME/workspace directory called `aarch64.yaml` using a text editor of your choice. Copy the contents shown below into the file:
@@ -108,15 +110,15 @@ The most important parts in this configuration file are:
108
110
You can add more ports as needed.
109
111
110
112
The FVP has many parameters that can be tweaked in this config by adding a `-C param: value`
111
-
line to the `params` section. Refer to the [Fast Models Fixed Virtual Platforms Reference Guide][5]
113
+
line to the `params` section. Refer to the [Fast Models Fixed Virtual Platforms Reference Guide](https://developer.arm.com/documentation/100966/latest/Getting-Started-with-Fixed-Virtual-Platforms/Configuring-the-model).
112
114
for more details.
113
115
114
116
## Run FVP with Shrinkwrap
115
117
116
118
To run the FVP using Docker, execute the following command:
117
119
118
120
```bash
119
-
shrinkwrap run ns-edk2.yaml --overlay ~/workspace/aarch64.yaml
121
+
shrinkwrap run ns-edk2.yaml --overlay $HOME/workspace/aarch64.yaml
120
122
```
121
123
122
124
At first, Shrinkwrap starts a Docker container and runs the FVP in it. At the beginning
@@ -156,9 +158,6 @@ uname -a
156
158
cat /proc/cpuinfo
157
159
```
158
160
159
-
We will do more setup during the next step. This additional setup is optional but it
160
-
helps prepare our guest system for running Glibc tests and doing other complex tasks.
161
-
162
161
## Powering down
163
162
164
163
You can always press `Ctrl+]` to stop Shrinkwrap in the terminal where Shrinkwrap is
@@ -171,8 +170,6 @@ from the root console of your guest system, for example:
0 commit comments