blob: e82e790246d1b6a79e5f0d55cef153dbc56dbc92 [file] [log] [blame] [view]
Leonardo Sandoval42065f32020-08-28 15:29:01 -05001
2Copyright (c) 2020, Arm Limited. All rights reserved.
3
4SPDX-License-Identifier: BSD-3-Clause
5
6
7LAVA FVP containers
8==============
9
10Scripts that create dockerfile/dockerimages with FVP models installed to be consumed by a FVP LAVA device.
11
12Build
13=====
14
15Fetch any FVP model from [ARM sites][2][4] and either place the tarballs either inside current project and
16type `make`. This will create new docker images.
17
18For example, lets assume that we download the model `FVP_Base_Cortex-A35x124_11.11_34.tgz` and store at current
19directory as seen below:
20
21```bash
22ls -la
23total 46858
24drwxrwxr-x 3 lsandov1 lsandov1 4096 2020-08-28 13:33 .
25drwxrwxr-x 9 lsandov1 lsandov1 4096 2020-08-28 13:13 ..
26-rw-rw-r-- 1 lsandov1 lsandov1 47966029 2020-08-28 13:29 FVP_Base_Cortex-A35x124_11.11_34.tgz
27-rw-rw-r-- 1 lsandov1 lsandov1 540 2020-07-03 11:49 Makefile
28-rw-rw-r-- 1 lsandov1 lsandov1 2405 2020-08-28 13:32 README.md
29-rwxrwxr-x 1 lsandov1 lsandov1 691 2020-07-03 11:36 create_fvp_dockerfile.sh
30-rw-rw-r-- 1 lsandov1 lsandov1 753 2020-08-05 22:21 dockerfile-template
31-rwxrwxr-x 1 lsandov1 lsandov1 171 2020-07-03 10:56 tag.sh
32drwxrwxr-x 3 lsandov1 lsandov1 4096 2020-08-28 13:33 ws
33```
34
35then execute `make`
36
37```bash
38make
39base=FVP_Base_Cortex-A35x124_11.11_34.tgz && \
40tag=fvp_base_cortex-a35x124_11.11_34 && \
41mkdir -p ws/${tag} && \
42cp FVP_Base_Cortex-A35x124_11.11_34.tgz ws/${tag} && \
43./create_fvp_dockerfile.sh ws/${tag} ${base} && \
44docker build --tag fvp:${tag} ws/${tag}/
45Sending build context to Docker daemon 47.97MB
46Step 1/6 : FROM ubuntu:bionic
47 ---> 6526a1858e5d
48Step 2/6 : RUN apt-get update && apt-get install --no-install-recommends --yes bc libatomic1 telnet libdbus-1-3 xterm && rm -rf /var/cache/apt
49 ---> Using cache
50 ---> 822600bee149
51Step 3/6 : RUN mkdir /opt/model
52 ---> Using cache
53 ---> 58db835c0b3c
54Step 4/6 : ADD FVP_Base_Cortex-A35x124_11.11_34.tgz /opt/model
55 ---> Using cache
56 ---> bb634f5def64
57Step 5/6 : RUN cd /opt/model && /opt/model/FVP_Base_Cortex-A35x124.sh --i-agree-to-the-contained-eula --verbose --destination /opt/model/FVP_Base_Cortex-A35x124
58 ---> Using cache
59 ---> 49989d166049
60Step 6/6 : WORKDIR /fvp
61 ---> Using cache
62 ---> cc3a4494599a
63Successfully built cc3a4494599a
64Successfully tagged fvp:fvp_base_cortex-a35x124_11.11_34
65~/repos/tf/dockerfiles/fvp $
66```
67
68as seen in the log above, a new docker image has been created `fvp:fvp_base_cortex-a35x124_11.11_34`.
69In case you want to see the `Dockerfile` for this particular model, check the following directory
70`$PWD/ws/fvp_base_cortex-a35x124_11.11_34/Dockerfile`
71
72Rerefence dockerfile
73====================
74
75The [dockerfile](./dockerfile-template) use on this project is similar to the [reference dockerfile][1]
76but the former also installs the model. The reason to this extra step is that [LAVA][3] expects the
77container with the model installed.
78
79
80[1]: https://validation.linaro.org/static/docs/v2/fvp.html?highlight=fvp
81[2]: https://developer.arm.com/tools-and-software/simulation-models/fixed-virtual-platforms
82[3]: https://git.lavasoftware.org/lava/lava
83[4]: https://silver.arm.com/browse/FM000