This document outlines how to share data between a host PC and development/reference platform, such as the Juno development board or Armv8 Base Platform FVP. The following methods are covered:
host$ --> run as regular user on host PC host# --> run as root privilege on host machine (e.g. sudo) client$ --> run as regular user in development environment (e.g. Juno) client# --> run as root privilege in development environment
NFS allows a system to share directories and files with others over a network. By using NFS, users and programs can access files on remote systems as if they were local files. This offers great flexibility and scalability. Configuring NFS requires the following steps:
To do this:
### Install the required packages host# apt-get update && apt-get install nfs-kernel-server rpcbind ### Configure the directories to be exported by adding them to /etc/exports file by adding the following line like so: /path/to/dir_shared *(rw,nohide,insecure,no_subtree_check,async,no_root_squash) ### Restart the NFS server host# service nfs-kernel-server restart ### On the client create a mount point and then use the 'mount' command to mount the shared NFS directory from the host client$ mkdir mnt_point client# mount <host_name>:/path/to/dir_shared /path/to/mnt_point
SCP or secure copy allows secure transferring of files between two networked machines. It uses the same authentication and security as the SSH protocol. SCP comes pre-installed on most Linux distributions so there is no need to install any additional packages. To use SCP:
### Copy a file from the local host (host PC) to the development board (remote host) host$ scp /path/to/file <client_user>@<client_name>:/path/to/target/directory
The system will ask you to provide a password for <client_user> in order to complete the file transfer.
<client_user>
scp
To "bake" files into the target filesystem the following steps need to be followed:
### Mount the filesystem image onto a local directory host$ mkdir mnt_point host# mount /path/to/target_fs.img mnt_point ### Edit the files on the filesystem. ### For example creating a new directory and tranferring a file on it can be done like so: host# mkdir /path/to/mnt_point/home/root/test_folder host# cp /path/to/file1 /path/to/mnt_point/home/root/test_folder/
P9 virtio allows for sharing data between a host PC and a model (i.e. FVPs). Detailed instruction of setting up and using p9 virtio for the ARM FVPs can be found here.