| Leonardo Sandoval | 42065f3 | 2020-08-28 15:29:01 -0500 | [diff] [blame] | 1 | |
| 2 | Copyright (c) 2020, Arm Limited. All rights reserved. |
| 3 | |
| 4 | SPDX-License-Identifier: BSD-3-Clause |
| 5 | |
| 6 | |
| 7 | LAVA FVP containers |
| 8 | ============== |
| 9 | |
| 10 | Scripts that create dockerfile/dockerimages with FVP models installed to be consumed by a FVP LAVA device. |
| 11 | |
| 12 | Build |
| 13 | ===== |
| 14 | |
| 15 | Fetch any FVP model from [ARM sites][2][4] and either place the tarballs either inside current project and |
| 16 | type `make`. This will create new docker images. |
| 17 | |
| 18 | For example, lets assume that we download the model `FVP_Base_Cortex-A35x124_11.11_34.tgz` and store at current |
| 19 | directory as seen below: |
| 20 | |
| 21 | ```bash |
| 22 | ls -la |
| 23 | total 46858 |
| 24 | drwxrwxr-x 3 lsandov1 lsandov1 4096 2020-08-28 13:33 . |
| 25 | drwxrwxr-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 |
| 32 | drwxrwxr-x 3 lsandov1 lsandov1 4096 2020-08-28 13:33 ws |
| 33 | ``` |
| 34 | |
| 35 | then execute `make` |
| 36 | |
| 37 | ```bash |
| 38 | make |
| 39 | base=FVP_Base_Cortex-A35x124_11.11_34.tgz && \ |
| 40 | tag=fvp_base_cortex-a35x124_11.11_34 && \ |
| 41 | mkdir -p ws/${tag} && \ |
| 42 | cp FVP_Base_Cortex-A35x124_11.11_34.tgz ws/${tag} && \ |
| 43 | ./create_fvp_dockerfile.sh ws/${tag} ${base} && \ |
| 44 | docker build --tag fvp:${tag} ws/${tag}/ |
| 45 | Sending build context to Docker daemon 47.97MB |
| 46 | Step 1/6 : FROM ubuntu:bionic |
| 47 | ---> 6526a1858e5d |
| 48 | Step 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 |
| 51 | Step 3/6 : RUN mkdir /opt/model |
| 52 | ---> Using cache |
| 53 | ---> 58db835c0b3c |
| 54 | Step 4/6 : ADD FVP_Base_Cortex-A35x124_11.11_34.tgz /opt/model |
| 55 | ---> Using cache |
| 56 | ---> bb634f5def64 |
| 57 | Step 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 |
| 60 | Step 6/6 : WORKDIR /fvp |
| 61 | ---> Using cache |
| 62 | ---> cc3a4494599a |
| 63 | Successfully built cc3a4494599a |
| 64 | Successfully tagged fvp:fvp_base_cortex-a35x124_11.11_34 |
| 65 | ~/repos/tf/dockerfiles/fvp $ |
| 66 | ``` |
| 67 | |
| 68 | as seen in the log above, a new docker image has been created `fvp:fvp_base_cortex-a35x124_11.11_34`. |
| 69 | In 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 | |
| 72 | Rerefence dockerfile |
| 73 | ==================== |
| 74 | |
| 75 | The [dockerfile](./dockerfile-template) use on this project is similar to the [reference dockerfile][1] |
| 76 | but the former also installs the model. The reason to this extra step is that [LAVA][3] expects the |
| 77 | container 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 |