Daniel Carvalho has submitted this change and it was merged. ( https://gem5-review.googlesource.com/c/public/gem5/+/11850 )

Change subject: configs: Remove default kernel value from system creation
......................................................................

configs: Remove default kernel value from system creation

Kernel was being set using a placeholder and then assigned the
correct value. This would generate the following error if the
placeholder file did not exist:
'IOError: Can't find file <placeholder> on path'

This patch follows the same directions of commit
12eca7ac04ae1ba559bf322b5c625513929d369d and removes the default
values, forcing the user to properly configure the kernel.

Change-Id: I0eb45d12eda6b6efe9a3fe118996b640844a7b34
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/11850
Reviewed-by: Jason Lowe-Power <[email protected]>
Reviewed-by: Andreas Sandberg <[email protected]>
Maintainer: Andreas Sandberg <[email protected]>
---
M configs/common/FSConfig.py
M configs/example/fs.py
2 files changed, 8 insertions(+), 4 deletions(-)

Approvals:
  Jason Lowe-Power: Looks good to me, approved
  Andreas Sandberg: Looks good to me, approved; Looks good to me, approved



diff --git a/configs/common/FSConfig.py b/configs/common/FSConfig.py
index 8b67c85..2c90922 100644
--- a/configs/common/FSConfig.py
+++ b/configs/common/FSConfig.py
@@ -131,7 +131,6 @@
     self.intrctrl = IntrControl()
     self.mem_mode = mem_mode
     self.terminal = Terminal()
-    self.kernel = binary('vmlinux')
     self.pal = binary('ts_osfpal')
     self.console = binary('console')
     if not cmdline:
@@ -429,7 +428,6 @@
     self.intrctrl = IntrControl()
     self.mem_mode = mem_mode
     self.terminal = Terminal()
-    self.kernel = binary('mips/vmlinux')
     self.console = binary('mips/console')
     if not cmdline:
         cmdline = 'root=/dev/hda1 console=ttyS0'
@@ -657,7 +655,6 @@
     if not cmdline:
cmdline = 'earlyprintk=ttyS0 console=ttyS0 lpj=7999923 root=/dev/hda1'
     self.boot_osflags = fillInCmdline(mdesc, cmdline)
-    self.kernel = binary('x86_64-vmlinux-2.6.22.9')
     return self


diff --git a/configs/example/fs.py b/configs/example/fs.py
index 695744e..9c5ef17 100644
--- a/configs/example/fs.py
+++ b/configs/example/fs.py
@@ -125,6 +125,9 @@

     if options.kernel is not None:
         test_sys.kernel = binary(options.kernel)
+    else:
+ print("Error: a kernel must be provided to run in full system mode")
+        sys.exit(1)

     if options.script is not None:
         test_sys.readfile = options.script
@@ -231,7 +234,8 @@

     cmdline = cmd_line_template()
     if buildEnv['TARGET_ISA'] == 'alpha':
- drive_sys = makeLinuxAlphaSystem(drive_mem_mode, bm[1], cmdline=cmdline)
+        drive_sys = makeLinuxAlphaSystem(drive_mem_mode, bm[1],
+                                         cmdline=cmdline)
     elif buildEnv['TARGET_ISA'] == 'mips':
drive_sys = makeLinuxMipsSystem(drive_mem_mode, bm[1], cmdline=cmdline)
     elif buildEnv['TARGET_ISA'] == 'sparc':
@@ -265,6 +269,9 @@
     drive_sys.cpu.connectAllPorts(drive_sys.membus)
     if options.kernel is not None:
         drive_sys.kernel = binary(options.kernel)
+    else:
+ print("Error: a kernel must be provided to run in full system mode")
+        sys.exit(1)

     if CpuConfig.is_kvm_cpu(DriveCPUClass):
         drive_sys.kvm_vm = KvmVM()

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

Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-Change-Id: I0eb45d12eda6b6efe9a3fe118996b640844a7b34
Gerrit-Change-Number: 11850
Gerrit-PatchSet: 6
Gerrit-Owner: Daniel Carvalho <[email protected]>
Gerrit-Reviewer: Andreas Sandberg <[email protected]>
Gerrit-Reviewer: Daniel Carvalho <[email protected]>
Gerrit-Reviewer: Jason Lowe-Power <[email protected]>
Gerrit-CC: Ryan Gambord <[email protected]>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to