Alistair Delva has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/51387 )

Change subject: WIP: ARM: Support multiple disks in starter_fs.py
......................................................................

WIP: ARM: Support multiple disks in starter_fs.py

Change-Id: Ie5a1140c525f1c88fb80c68e39629d963e28e3c5
---
M configs/example/arm/starter_fs.py
1 file changed, 21 insertions(+), 10 deletions(-)



diff --git a/configs/example/arm/starter_fs.py b/configs/example/arm/starter_fs.py
index 7195af4..1e400c9 100644
--- a/configs/example/arm/starter_fs.py
+++ b/configs/example/arm/starter_fs.py
@@ -109,13 +109,15 @@
     # Add the PCI devices we need for this system. The base system
     # doesn't have any PCI devices by default since they are assumed
     # to be added by the configuration scripts needing them.
-    system.pci_devices = [
-        # Create a VirtIO block device for the system's boot
-        # disk. Attach the disk image using gem5's Copy-on-Write
-        # functionality to avoid writing changes to the stored copy of
-        # the disk image.
- PciVirtIO(vio=VirtIOBlock(image=create_cow_image(args.disk_image))),
-    ]
+
+    # Create a VirtIO block devices for the system's boot disks. Attach
+    # the disk image using gem5's Copy-on-Write functionality to avoid
+    # writing changes to the stored copy of the disk image.
+    pci_devices = []
+    for disk in args.disk_image:
+        device = PciVirtIO(vio=VirtIOBlock(image=create_cow_image(disk))))
+        pci_devices.append(device)
+    system.pci_devices = pci_devices

     # Attach the PCI devices to the system. The helper method in the
     # system assigns a unique PCI bus ID to each of the devices and
@@ -203,9 +205,9 @@
                         help="Linux kernel")
     parser.add_argument("--initrd", type=str, default=None,
                         help="initrd/initramfs file to load")
-    parser.add_argument("--disk-image", type=str,
-                        default=default_disk,
-                        help="Disk to instantiate")
+    parser.add_argument("--disk-image", action="append", type=str,
+                        default=[],
+                        help="Disks to instantiate")
     parser.add_argument("--root-device", type=str,
                         default=default_root_device,
help="OS device name for root partition (default: {})"

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/51387
To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: Ie5a1140c525f1c88fb80c68e39629d963e28e3c5
Gerrit-Change-Number: 51387
Gerrit-PatchSet: 1
Gerrit-Owner: Alistair Delva <[email protected]>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Reply via email to