The fvp-baser-aemv8r64 Yocto MACHINE supports the following BSP components, where either a standard or Real-Time Linux kernel (PREEMPT_RT) can be built and run:
Linux kernel with PREEMPT_RT support: linux-yocto-rt-5.10
Note that the Real-Time Linux kernel (PREEMPT_RT) does not use the real-time architectural extensions of the Armv8-R feature set.
Host environment setup
The following instructions have been tested on hosts running Ubuntu 18.04 and Ubuntu 20.04.
Install the required packages for the build host:
https://docs.yoctoproject.org/singleindex.html#required-packages-for-the-build-host
Install the kas setup tool for bitbake based projects:
$ pip3 install --user kas
For more details on kas, see https://kas.readthedocs.io/
To build the images for fvp-base machine, you also need to:
FVP_Base_AEMv8R_11.15_14.tgz
FVP_BASE_R_AEM_TARBALL_URI
FVP_BASE_R_ARM_EULA_ACCEPT
The variables should be set like so:
$ FVP_BASE_R_AEM_TARBALL_URI="file:///absolute/path/to/FVP_Base_AEMv8R_11.15_14.tgz"$ FVP_BASE_R_ARM_EULA_ACCEPT="True"
Note: The host machine should have at least 50 GBytes of free disk space for the next steps to work correctly.
Fetch sources
Fetch the meta-arm repository into a build directory:
$ mkdir -p ~/fvp-baser-aemv8r64-build$ cd ~/fvp-baser-aemv8r64-build$ git clone https://git.yoctoproject.org/git/meta-arm$ cd meta-arm$ git checkout ba55d78916338d84965d77c586ea92628ac55831
Build
Building with the standard Linux kernel:
$ cd ~/fvp-baser-aemv8r64-build$ export FVP_BASE_R_AEM_TARBALL_URI="file:///absolute/path/to/FVP_Base_AEMv8R_11.15_14.tgz" $ export FVP_BASE_R_ARM_EULA_ACCEPT="True" $ kas build meta-arm/kas/fvp-baser-aemv8r64-bsp.yml
Building with the Real-Time Linux kernel (PREEMPT_RT):
$ cd ~/fvp-baser-aemv8r64-build $ export FVP_BASE_R_AEM_TARBALL_URI="file:///absolute/path/to/FVP_Base_AEMv8R_11.15_14.tgz" $ export FVP_BASE_R_ARM_EULA_ACCEPT="True" $ kas build meta-arm/kas/fvp-baser-aemv8r64-rt-bsp.yml
Networking
To enable networking on the FVP via a host network interface, you will need to install the following package(s):
Ubuntu 18.04:
$ sudo apt-get install libvirt-bin net-tools
Ubuntu 20.04:
$ sudo apt-get install libvirt-dev libvirt-daemon qemu-kvm libvirt-daemon-system libvirt-clients bridge-utils net-tools
Once that is installed for your OS version, setup tap0 using the following commands:
$ sudo virsh net-start default $ sudo ip tuntap add dev tap0 mode tap user $(whoami) $ sudo ifconfig tap0 0.0.0.0 promisc up $ sudo brctl addif virbr0 tap0
To clean up the tap0 interface on the host use the following commands:
$ sudo brctl delif virbr0 tap0$ sudo ip link set virbr0 down$ sudo brctl delbr virbr0$ sudo virsh net-destroy default$ sudo ip link delete tap0
Run
To run an image after the build is done with the standard Linux kernel:
$ kas shell --keep-config-unchanged \ meta-arm/kas/fvp-baser-aemv8r64-bsp.yml \ --command "../layers/meta-arm/scripts/runfvp \ --console \ -- \ --parameter 'bp.smsc_91c111.enabled=1' \ --parameter 'bp.virtio_net.hostbridge.interfaceName=tap0'"
To run an image after the build is done with the Real-Time Linux kernel (PREEMPT_RT):
$ kas shell --keep-config-unchanged \ meta-arm/kas/fvp-baser-aemv8r64-rt-bsp.yml \ --command "../layers/meta-arm/scripts/runfvp \ --console \ -- \ --parameter 'bp.smsc_91c111.enabled=1' \ --parameter 'bp.virtio_net.hostbridge.interfaceName=tap0'"
Note: The terminal console login is root without password.
root
To finish the fvp emulation, you need to close the telnet session and stop the runfvp script:
runfvp
ctrl+]
quit
Ctrl+C
kas
File sharing between host and fvp
It is possible to share a directory between the host machine and the fvp using the virtio P9 device component included in the kernel. To do so, create a directory to be mounted from the host machine:
$ mkdir /path/to/host-mount-dir
Then, add the following parameter containing the path to the directory when launching the model:
$ --parameter 'bp.virtiop9device.root_path=/path/to/host-mount-dir'
Once you are logged into the fvp, the host directory can be mounted in a directory on the model using the following command:
$ mount -t 9p -o trans=virtio,version=9p2000.L FM /path/to/fvp-mount-dir
Devices supported in the kernel
Known Issues and Limitations