summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configs/test/SysPaths.py60
-rw-r--r--src/arch/alpha/system.cc1
-rw-r--r--src/arch/alpha/system.hh1
-rw-r--r--src/base/timebuf.hh3
-rw-r--r--src/dev/ns_gige.cc3
-rw-r--r--src/dev/ns_gige.hh3
-rw-r--r--src/dev/platform.hh1
-rw-r--r--src/kern/linux/events.cc3
-rw-r--r--src/kern/linux/events.hh3
-rw-r--r--src/kern/linux/printk.cc3
-rw-r--r--src/kern/linux/printk.hh3
-rw-r--r--src/kern/system_events.hh3
-rw-r--r--src/sim/main.cc4
-rw-r--r--src/sim/serialize.cc3
-rw-r--r--src/sim/serialize.hh3
15 files changed, 61 insertions, 36 deletions
diff --git a/configs/test/SysPaths.py b/configs/test/SysPaths.py
index c7c7db4e7..9acfedc8b 100644
--- a/configs/test/SysPaths.py
+++ b/configs/test/SysPaths.py
@@ -1,32 +1,42 @@
-from m5 import *
-
-import os.path
-import sys
-
-# Edit the following list to include the possible paths to the binary
-# and disk image directories. The first directory on the list that
-# exists will be selected.
-SYSTEMDIR_PATH = ['/n/poolfs/z/dist/m5/system']
-
-SYSTEMDIR = None
-for d in SYSTEMDIR_PATH:
- if os.path.exists(d):
- SYSTEMDIR = d
- break
-
-if not SYSTEMDIR:
- print >>sys.stderr, "Can't find a path to system files."
- sys.exit(1)
-
-BINDIR = SYSTEMDIR + '/binaries'
-DISKDIR = SYSTEMDIR + '/disks'
+import os, sys
+from os.path import isdir, join as joinpath
+from os import environ as env
+
+systemdir = None
+bindir = None
+diskdir = None
+scriptdir = None
+
+def load_defaults():
+ global systemdir, bindir, diskdir, scriptdir
+ if not systemdir:
+ try:
+ path = env['M5_PATH'].split(':')
+ except KeyError:
+ path = [ '/dist/m5/system' ]
+
+ for systemdir in path:
+ if os.path.isdir(systemdir):
+ break
+ else:
+ raise ImportError, "Can't find a path to system files."
+
+ if not bindir:
+ bindir = joinpath(systemdir, 'binaries')
+ if not diskdir:
+ diskdir = joinpath(systemdir, 'disks')
+ if not scriptdir:
+ scriptdir = joinpath(systemdir, 'boot')
def disk(file):
- return os.path.join(DISKDIR, file)
+ load_defaults()
+ return joinpath(diskdir, file)
def binary(file):
- return os.path.join(BINDIR, file)
+ load_defaults()
+ return joinpath(bindir, file)
def script(file):
- return os.path.join(SYSTEMDIR, 'boot', file)
+ load_defaults()
+ return joinpath(scriptdir, file)
diff --git a/src/arch/alpha/system.cc b/src/arch/alpha/system.cc
index 3aaba7d58..dce7365aa 100644
--- a/src/arch/alpha/system.cc
+++ b/src/arch/alpha/system.cc
@@ -26,6 +26,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* Authors: Ali Saidi
+ * Nathan Binkert
*/
#include "arch/alpha/ev5.hh"
diff --git a/src/arch/alpha/system.hh b/src/arch/alpha/system.hh
index b26a5e301..0f4f64581 100644
--- a/src/arch/alpha/system.hh
+++ b/src/arch/alpha/system.hh
@@ -26,6 +26,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* Authors: Ali Saidi
+ * Nathan Binkert
*/
#ifndef __ARCH_ALPHA_SYSTEM_HH__
diff --git a/src/base/timebuf.hh b/src/base/timebuf.hh
index 6a326d25a..160a97034 100644
--- a/src/base/timebuf.hh
+++ b/src/base/timebuf.hh
@@ -25,7 +25,8 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * Authors: Kevin Lim
+ * Authors: Nathan Binkert
+ * Kevin Lim
*/
#ifndef __BASE_TIMEBUF_HH__
diff --git a/src/dev/ns_gige.cc b/src/dev/ns_gige.cc
index decffaf73..360fe8c9b 100644
--- a/src/dev/ns_gige.cc
+++ b/src/dev/ns_gige.cc
@@ -25,7 +25,8 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * Authors: Lisa Hsu
+ * Authors: Nathan Binkert
+ * Lisa Hsu
*/
/** @file
diff --git a/src/dev/ns_gige.hh b/src/dev/ns_gige.hh
index 2de11c951..2f47026f3 100644
--- a/src/dev/ns_gige.hh
+++ b/src/dev/ns_gige.hh
@@ -25,7 +25,8 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * Authors: Lisa Hsu
+ * Authors: Nathan Binkert
+ * Lisa Hsu
*/
/** @file
diff --git a/src/dev/platform.hh b/src/dev/platform.hh
index bfc229748..0e6f4ba4a 100644
--- a/src/dev/platform.hh
+++ b/src/dev/platform.hh
@@ -26,6 +26,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* Authors: Andrew Schultz
+ * Nathan Binkert
*/
/**
diff --git a/src/kern/linux/events.cc b/src/kern/linux/events.cc
index 5ff7e26db..289ece5ce 100644
--- a/src/kern/linux/events.cc
+++ b/src/kern/linux/events.cc
@@ -25,7 +25,8 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * Authors: Ali Saidi
+ * Authors: Nathan Binkert
+ * Ali Saidi
*/
#include "arch/arguments.hh"
diff --git a/src/kern/linux/events.hh b/src/kern/linux/events.hh
index 65f794a9c..b0510c18f 100644
--- a/src/kern/linux/events.hh
+++ b/src/kern/linux/events.hh
@@ -25,7 +25,8 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * Authors: Ali Saidi
+ * Authors: Nathan Binkert
+ * Ali Saidi
*/
#ifndef __KERN_LINUX_EVENTS_HH__
diff --git a/src/kern/linux/printk.cc b/src/kern/linux/printk.cc
index e39a15982..004d1be2f 100644
--- a/src/kern/linux/printk.cc
+++ b/src/kern/linux/printk.cc
@@ -25,7 +25,8 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * Authors: Ali Saidi
+ * Authors: Nathan Binkert
+ * Ali Saidi
*/
#include <sys/types.h>
diff --git a/src/kern/linux/printk.hh b/src/kern/linux/printk.hh
index f9203717a..5ddf0a018 100644
--- a/src/kern/linux/printk.hh
+++ b/src/kern/linux/printk.hh
@@ -25,7 +25,8 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * Authors: Ali Saidi
+ * Authors: Nathan Binkert
+ * Ali Saidi
*/
#ifndef __PRINTK_HH__
diff --git a/src/kern/system_events.hh b/src/kern/system_events.hh
index ccd6bd9a4..93b5eb528 100644
--- a/src/kern/system_events.hh
+++ b/src/kern/system_events.hh
@@ -25,7 +25,8 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * Authors: Lisa Hsu
+ * Authors: Nathan Binkert
+ * Lisa Hsu
* Ali Saidi
*/
diff --git a/src/sim/main.cc b/src/sim/main.cc
index 7a0fbfa61..5a99e15b4 100644
--- a/src/sim/main.cc
+++ b/src/sim/main.cc
@@ -135,7 +135,9 @@ showBriefHelp(ostream &out)
" script is executed (just like the -i option to the\n"
" Python interpreter).\n\n"
" -h Prints this help\n\n"
-" <configfile> config file name (ends in .py)\n\n",
+" <configfile> config file name which ends in .py. (Normally you can\n"
+" run <configfile> --help to get help on that config files\n"
+" parameters.\n\n",
prog);
}
diff --git a/src/sim/serialize.cc b/src/sim/serialize.cc
index 07e3b8a56..0e3139116 100644
--- a/src/sim/serialize.cc
+++ b/src/sim/serialize.cc
@@ -25,7 +25,8 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * Authors: Erik Hallnor
+ * Authors: Nathan Binkert
+ * Erik Hallnor
* Steve Reinhardt
*/
diff --git a/src/sim/serialize.hh b/src/sim/serialize.hh
index 1bcb235e6..64ed6142f 100644
--- a/src/sim/serialize.hh
+++ b/src/sim/serialize.hh
@@ -25,7 +25,8 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * Authors: Erik Hallnor
+ * Authors: Nathan Binkert
+ * Erik Hallnor
* Steve Reinhardt
*/