Ciro Santilli has submitted this change. ( https://gem5-review.googlesource.com/c/public/gem5/+/27867 )

Change subject: configs: make --disk-images optional in fs.py
......................................................................

configs: make --disk-images optional in fs.py

The main applications are to run baremetal programs and initramfs Linux
kernel.

Before this patch, disks() calls in makeArmSystem would throw:

IOError: Can't find file 'linux-aarch32-ael.img' on M5_PATH.

In order to achieve this, this commit also removes the default hardcoded
disk image basenames.

For example, before this commit, running without a --disk-image in X86
would automatically search for an image with basename x86root.img in
M5_PATH, which means we would either have to ignore any disk image error,
or else running without disk images would fail.

After this commit, you would have to pass --disk-image x86root.img to
achieve the old behaviour.

Change-Id: I0ae8c4b3b93d0074fd4fca0d5ed52181c50b6c04
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/27867
Tested-by: Gem5 Cloud Project GCB service account <345032938...@cloudbuild.gserviceaccount.com>
Tested-by: kokoro <noreply+kok...@google.com>
Reviewed-by: Giacomo Travaglini <giacomo.travagl...@arm.com>
Reviewed-by: Jason Lowe-Power <power...@gmail.com>
Reviewed-by: Gabe Black <gabebl...@google.com>
Maintainer: Jason Lowe-Power <power...@gmail.com>
---
M configs/common/Benchmarks.py
M configs/common/FSConfig.py
2 files changed, 2 insertions(+), 17 deletions(-)

Approvals:
Jason Lowe-Power: Looks good to me, but someone else must approve; Looks good to me, approved
  Gabe Black: Looks good to me, approved
  Giacomo Travaglini: Looks good to me, but someone else must approve
  kokoro: Regressions pass
  Gem5 Cloud Project GCB service account: Regressions pass



diff --git a/configs/common/Benchmarks.py b/configs/common/Benchmarks.py
index 4c905e3..8477d77 100644
--- a/configs/common/Benchmarks.py
+++ b/configs/common/Benchmarks.py
@@ -55,16 +55,8 @@
     def disks(self):
         if self.disknames:
             return [disk(diskname) for diskname in self.disknames]
-        elif buildEnv['TARGET_ISA'] == 'x86':
-            return [env.get('LINUX_IMAGE', disk('x86root.img'))]
-        elif buildEnv['TARGET_ISA'] == 'arm':
-            return [env.get('LINUX_IMAGE', disk('linux-aarch32-ael.img'))]
-        elif buildEnv['TARGET_ISA'] == 'sparc':
-            return [env.get('LINUX_IMAGE', disk('disk.s10hw2'))]
         else:
-            print("Don't know what default disk image to use for %s ISA" %
-                buildEnv['TARGET_ISA'])
-            exit(1)
+            return []

     def rootdev(self):
         if self.root:
diff --git a/configs/common/FSConfig.py b/configs/common/FSConfig.py
index 376ae1a..a424a30 100644
--- a/configs/common/FSConfig.py
+++ b/configs/common/FSConfig.py
@@ -205,13 +205,6 @@
     self.realview = platform_class()
     self._bootmem = self.realview.bootmem

-    if isinstance(self.realview, VExpress_EMM64):
-        if os.path.split(mdesc.disks()[0])[-1] == 'linux-aarch32-ael.img':
-            print("Selected 64-bit ARM architecture, updating default "
-                  "disk image...")
-            mdesc.diskname = 'linaro-minimal-aarch64.img'
-
-
     # Attach any PCI devices this platform supports
     self.realview.attachPciDevices()

@@ -278,7 +271,7 @@
         # the error message below. The disk can have any name now and
         # doesn't need to include 'android' substring.
         if (mdesc.disks() and
- os.path.split(mdesc.disks()[0])[-1]).lower().count('android'): + os.path.split(mdesc.disks()[0])[-1].lower().count('android')):
             if 'android' not in mdesc.os_type():
                 fatal("It looks like you are trying to boot an Android " \
                       "platform.  To boot Android, you must specify " \

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/27867
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: I0ae8c4b3b93d0074fd4fca0d5ed52181c50b6c04
Gerrit-Change-Number: 27867
Gerrit-PatchSet: 2
Gerrit-Owner: Ciro Santilli <ciro.santi...@arm.com>
Gerrit-Reviewer: Bobby R. Bruce <bbr...@ucdavis.edu>
Gerrit-Reviewer: Ciro Santilli <ciro.santi...@arm.com>
Gerrit-Reviewer: Gabe Black <gabebl...@google.com>
Gerrit-Reviewer: Gem5 Cloud Project GCB service account <345032938...@cloudbuild.gserviceaccount.com>
Gerrit-Reviewer: Giacomo Travaglini <giacomo.travagl...@arm.com>
Gerrit-Reviewer: Jason Lowe-Power <power...@gmail.com>
Gerrit-Reviewer: Matthew Poremba <matthew.pore...@amd.com>
Gerrit-Reviewer: kokoro <noreply+kok...@google.com>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to