Hi,
I want to experiment with capability enabled LLVM - but would like to have a shared directory between the Morello FVP and the host linux. Please could you give some more detailed instructions on this, sorry if I have missed anything obvious in the documentation.
Thanks,
Andy
Hi Andy,
Apologies for my brief summary on how to enable the virtio_p9. The changes are only applied to the guest OS, the one running on the FVP. Please follow the steps below under the morello_workspace poky directory structure:
1 - Add the build kernel flags below to <path to workspace>morello_workspace/bsp/build-poky/tmp-poky/work/morello_fvp-poky-linux/linux-yocto/5.4.51+gitAUTOINC+caafbdfe38_fed60f1c8e-r0/defconfig
CONFIG_NET_9P=yCONFIG_NET_9P_VIRTIO=yCONFIG_9P_FS=yCONFIG_9P_FS_POSIX_ACL=yCONFIG_PCI=yCONFIG_VIRTIO_PCI=yCONFIG_9P_FSCACHE=yCONFIG_9P_FS_SECURITY=y
2 - Add the virtio_p9 configuration shown below to <path to workspace>morello_workspace/bsp/build-poky/tmp-poky/work/morello_fvp-poky-linux/trusted-firmware-a/1.0+gitAUTOINC+746e7e322f-r0/git/fdts/morello-fvp.dts
virtio_p9@1c1A0000 { compatible = "virtio,mmio"; reg = <0x0 0x1c1a0000 0x0 0x200>; interrupts = <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>;};
3 - Recompile TFA:
bitbake trusted-firmware-a -C compile
4 - Recompile linux-yocto:
bitbake linux-yocto -C compile
5 - Recreate the images: (You might get a few warnings showing that some tfa and linux have been modified)
bitbake core-image-minimal
6 - Add to <path to workspace>morello_workspace/run-scripts/run_model.sh the following model parameter (at around line 371)
-C "board.virtio_p9.root_path=$PWD/shared_folder"
7 - Before launching the model create a folder on the host named shared_folder
mkdir <path to workspace>morello_workspace/shared_folder
**On the morello_workspace you should have the following folders: bsp docs run-scripts shared_folder
8 - Launch the model
./run-scripts/run_model.sh -m <path to fvp executable> -f poky
9 - On the model, when Poky finishes booting, log in as root and on the guest terminal, create and mount the shared folder as follows:
mkdir shared_folder
mount -t 9p -o trans=virtio,version=9p2000.L FM shared_folder
10 - Try to create a file from the guest terminal on the shared_folder and then reading it from the host shared folder. Try the other way round.
Although this might not be the optimal solution, I have made it work on a poky build.
I hope this temporary solution helps for now while we're looking into adding it to the repository.
Best regards,
Mauricio
Many many thanks, that was very easy to follow first time. For the benefit of others - a minor thing, if you've executed a
devtool modify trusted-firmware-a
then you will obviously need to update the dts file ... something like
<morello workspace>/bsp/build-poky/workspace/sources/trusted-firmware-a/fdts/morello-fvp.dts