diff options
author | Ciro Santilli <ciro.santilli@arm.com> | 2019-10-29 16:00:24 +0000 |
---|---|---|
committer | Giacomo Travaglini <giacomo.travaglini@arm.com> | 2020-01-31 12:41:49 +0000 |
commit | a6d98140ca4afb23817a8d9ff24f8a001128b146 (patch) | |
tree | 11b3d8e28965441a47fc769b871674974cbe1879 /tests | |
parent | a29aaa364b70a227ea0784f64e4082e08ce233a1 (diff) | |
download | gem5-a6d98140ca4afb23817a8d9ff24f8a001128b146.tar.xz |
configs: fs.py can take multiple disk images on most ISAs
All ISAs except SPARC can now take multiple disk images by passing
the --disk-image option multiple times.
Before this patch, several ISAs automatically mounted a secondary disk
called "linux-bigswap2.img", which had to be in M5_PATH even if the end
user did not want more than one disk. This was the case for for example
for X86 but not ARM.
This change was done to:
* allow ARM to have a second disk image in fs.py, which was not possible,
and allow other ISAs like X86 and ARM to take any number of disk images
* provide a simpler, more intuitive CLI interface that does not require
magic disk images to be present in M5_PATH to work for ISAs such as X86.
Linux does not need that secondary image to boot correctly, so it is
more friendly to support a minimal setup that requires the least amount
of binaries to boot, and let supply the second image manually only if
they need it.
* make fs.py --disk-image work more similarly across all ISAs
SPARC was left with a single disk only because its setup was a bit more
complex and would require further testing.
Change-Id: I8b6e08ae6daf0a5b6cd1d57d285a9677f01eb7ad
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/23671
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/configs/arm_generic.py | 2 | ||||
-rw-r--r-- | tests/configs/pc-simple-timing-ruby.py | 2 | ||||
-rw-r--r-- | tests/configs/x86_generic.py | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/tests/configs/arm_generic.py b/tests/configs/arm_generic.py index c074f99cf..dd75b50a4 100644 --- a/tests/configs/arm_generic.py +++ b/tests/configs/arm_generic.py @@ -98,7 +98,7 @@ class LinuxArmSystemBuilder(object): "VExpress_GEM5_V1": gem5_kernel, } - sc = SysConfig(None, self.mem_size, disk_image, "/dev/sda") + sc = SysConfig(None, self.mem_size, [disk_image], "/dev/sda") system = FSConfig.makeArmSystem(self.mem_mode, self.machine_type, self.num_cpus, sc, False, ruby=self.use_ruby) diff --git a/tests/configs/pc-simple-timing-ruby.py b/tests/configs/pc-simple-timing-ruby.py index ffac06266..7c7bf3369 100644 --- a/tests/configs/pc-simple-timing-ruby.py +++ b/tests/configs/pc-simple-timing-ruby.py @@ -51,7 +51,7 @@ options.l2_assoc=2 options.num_cpus = 2 #the system -mdesc = SysConfig(disk = 'linux-x86.img') +mdesc = SysConfig(disks = ['linux-x86.img']) system = FSConfig.makeLinuxX86System('timing', options.num_cpus, mdesc=mdesc, Ruby=True) system.kernel = SysPaths.binary('x86_64-vmlinux-2.6.22.9') diff --git a/tests/configs/x86_generic.py b/tests/configs/x86_generic.py index e280fc59c..5ae8e3052 100644 --- a/tests/configs/x86_generic.py +++ b/tests/configs/x86_generic.py @@ -56,7 +56,7 @@ class LinuxX86SystemBuilder(object): pass def create_system(self): - mdesc = SysConfig(disk = 'linux-x86.img') + mdesc = SysConfig(disks = ['linux-x86.img']) system = FSConfig.makeLinuxX86System(self.mem_mode, numCPUs=self.num_cpus, mdesc=mdesc) |