fvp: setting up Virtio 9P shared directory
The FVP has an internal Virtio 9P device which enables to create a
shared directory between the host and the system running in the FVP.
By appending a new configuration into /etc/fstab the 'shared' directory
will be mounted to /mnt on startup.
Change-Id: I2c80194f7059b27a956b545d558b1f9666aceeac
Signed-off-by: Imre Kis <imre.kis@arm.com>
diff --git a/fvp.mk b/fvp.mk
index ffed69c..93f3973 100644
--- a/fvp.mk
+++ b/fvp.mk
@@ -47,6 +47,8 @@
OUT_PATH ?= $(ROOT)/out
GRUB_BIN ?= $(OUT_PATH)/bootaa64.efi
BOOT_IMG ?= $(OUT_PATH)/boot-fat.uefi.img
+OVERLAY_DIR ?= ${BUILD_PATH}/fvp/overlay
+SHARED_DIR ?= $(ROOT)/shared
################################################################################
# Targets
@@ -175,12 +177,23 @@
@rm -f $(GRUB_BIN)
@rm -f $(GRUB_PATH)/configure
+################################################################################
+# Buildroot
+################################################################################
+BR2_ROOTFS_OVERLAY=$(OVERLAY_DIR)
+
+################################################################################
+# Shared directory
+################################################################################
+.PHONY: shared_directory
+shared_directory:
+ mkdir -p $(SHARED_DIR)
################################################################################
# Boot Image
################################################################################
.PHONY: boot-img
-boot-img: linux grub buildroot dtb
+boot-img: linux grub buildroot dtb shared_directory
rm -f $(BOOT_IMG)
mformat -i $(BOOT_IMG) -n 64 -h 255 -T 131072 -v "BOOT IMG" -C ::
mcopy -i $(BOOT_IMG) $(LINUX_PATH)/arch/arm64/boot/Image ::
@@ -235,6 +248,7 @@
-C bp.secure_memory=1 \
-C bp.ve_sysregs.exit_on_shutdown=1 \
-C bp.virtioblockdevice.image_path=$(BOOT_IMG) \
+ -C bp.virtiop9device.root_path=$(SHARED_DIR) \
-C cache_state_modelled=0 \
-C cluster0.NUM_CORES=4 \
-C cluster1.NUM_CORES=4 \