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,
To enable and use the virtio P9 device you need to follow the steps below:
1- Enable the following kernel build flags.
CONFIG_NET_9PCONFIG_NET_9P_VIRTIOCONFIG_9P_FSCONFIG_9P_FS_POSIX_ACLCONFIG_9P_FSCACHECONFIG_9P_FS_SECURITY
2 - Add the following configuration to your DTS:
virtio_p9@1c1A0000 { compatible = "virtio,mmio"; reg = <0x0 0x1c1a0000 0x0 0x200>; interrupts = <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>;};
3 - Rebuild everything
4 - Follow the instructions on how to use the virtio P9 located in the Fast Models Reference Manual 11.13
I hope this helps!
Regards,
Mauricio
apologies - it's my first time delving into FVPs into any detail, so I'd appreciate a few more pointers if you can spare the time ...
STEP 1 - are talking about the host linux, or the guest linux hosted via the FVP?
STEP 2 ...
I'm using instructions from https://git.morello-project.org/morello/docs/-/blob/morello/mainline/user-guide.rst
Given that it is bitbake based ... then I need to do something like?
devtool modify trusted-firmware-a
Add the appropriate DTS configuration to dtsi file(s) in the trusted-firmware-a tree, any pointers on which one(s)?
STEP 3
bitbake trusted-firmware-a
bitbake core-image-minimal
STEP 4 seems clear - is chmod 777 myHostLinuxDirectory
still required for the host linux directory that is pointed to by the root_path configuration parameter passed to the FVP?
On the FVP, after trying out these steps, I get the same error as before ...
Also using
find /proc/device-tree/ -type f -exec head {} + | grep virtio
to determine if the virtio_p9 is loaded, ... so far no luck ... despite a few attempts.
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
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)
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,
Many many thanks, that was very easy to follow first time. For the benefit of others - a minor thing, if you've executed 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