feat(fvp-launcher): script to locally launch model simulations

There are cases where a certain LAVA job fails in the CI, even on
re-submission, and one way to debug issues is to replicate the model
simulation locally, on users machines. This script, 'fvp-launcher.sh'
takes a Jenkins tf-a-builder URL as parameter, where it fetch all
required build artifacts and construct two commands: a
docker run command where the model is run inside a container and a
baremetal command. Both uses the same artefacts but under different
environments. If user does not have the corresponding container for
the first option, one can simply launch the baremetal version,
providing the same results.

This script has allowed to run same model, under different network
enviroments (Arm & Linaro), allowing to quickly reproduce any issue
and move faster on the debuging phase.

To see script in action, we can run the command and run manually any
of the output commands

    $ ./fvp-launcher.sh https://ci.trustedfirmware.org/job/tf-a-builder/252606/
    Docker command

    docker run --env="DISPLAY" --net=host --rm --interactive --hostname lava --name lava-203256-2.1.2 --volume /home/lsandov1/repos/fvp/fvp-launcher/var/lib/lava/dispatcher/tmp/203256/fvp-deploy-rkr89_nu/bl1/bl1.bin:/lava-203256-2.1.2/bl1.bin --volume /home/lsandov1/repos/fvp/fvp-launcher/var/lib/lava/dispatcher/tmp/203256/fvp-deploy-rkr89_nu/el3_payload/el3_payload.bin:/lava-203256-2.1.2/el3_payload.bin --volume /home/lsandov1/repos/fvp/fvp-launcher/var/lib/lava/dispatcher/tmp/203256/fvp-deploy-rkr89_nu/fip/fip.bin:/lava-203256-2.1.2/fip.bin --volume /home/lsandov1/repos/fvp/fvp-launcher/var/lib/lava/dispatcher/tmp/203256/fvp-deploy-rkr89_nu/ns_bl1u/ns_bl1u.bin:/lava-203256-2.1.2/ns_bl1u.bin 987685672616.dkr.ecr.us-east-1.amazonaws.com/fvp:fvp_base_revc-2xaemva_11.14_21 /opt/model/Base_RevC_AEMvA_pkg/models/Linux64_GCC-6.4/FVP_Base_RevC-2xAEMvA -C bp.ve_sysregs.exit_on_shutdown=1 -C pctl.startup=0.0.0.0 -C cache_state_modelled=1 -C bp.secureflashloader.fname=/lava-203256-2.1.2/bl1.bin -C bp.flashloader0.fname=/lava-203256-2.1.2/fip.bin --data cluster0.cpu0=/lava-203256-2.1.2/ns_bl1u.bin@0x0beb8000 -Q 1000 -C bp.pl011_uart0.unbuffered_output=1 -C bp.pl011_uart1.unbuffered_output=1 -C bp.pl011_uart2.unbuffered_output=1 -C bp.pl011_uart3.unbuffered_output=1 --stat --data cluster0.cpu0=/lava-203256-2.1.2/el3_payload.bin@0x80000000

    Baremetal command

    /opt/model/Base_RevC_AEMvA_pkg/models/Linux64_GCC-6.4/FVP_Base_RevC-2xAEMvA  -C  bp.ve_sysregs.exit_on_shutdown=1  -C  pctl.startup=0.0.0.0  -C  cache_state_modelled=1  -C  bp.secureflashloader.fname=/home/lsandov1/repos/fvp/fvp-launcher/lava/bl1.bin  -C  bp.flashloader0.fname=/home/lsandov1/repos/fvp/fvp-launcher/lava/fip.bin  --data  cluster0.cpu0=/home/lsandov1/repos/fvp/fvp-launcher/lava/ns_bl1u.bin@0x0beb8000  -Q  1000  -C  bp.pl011_uart0.unbuffered_output=1  -C  bp.pl011_uart1.unbuffered_output=1  -C  bp.pl011_uart2.unbuffered_output=1  -C  bp.pl011_uart3.unbuffered_output=1  --stat  --data  cluster0.cpu0=/home/lsandov1/repos/fvp/fvp-launcher/lava/el3_payload.bin@0x80000000

Signed-off-by: Leonardo Sandoval <leonardo.sandoval@linaro.org>
Change-Id: I985eb9a57f1db4883f53f2e131b331534b3e6904
1 file changed