Merge zizzer.eecs.umich.edu:/bk/newmem
[gem5.git] / configs / test / SysPaths.py
1 from m5 import *
2
3 import os.path
4 import sys
5
6 # Edit the following list to include the possible paths to the binary
7 # and disk image directories. The first directory on the list that
8 # exists will be selected.
9 SYSTEMDIR_PATH = ['/n/poolfs/z/dist/m5/system']
10
11 SYSTEMDIR = None
12 for d in SYSTEMDIR_PATH:
13 if os.path.exists(d):
14 SYSTEMDIR = d
15 break
16
17 if not SYSTEMDIR:
18 print >>sys.stderr, "Can't find a path to system files."
19 sys.exit(1)
20
21 BINDIR = SYSTEMDIR + '/binaries'
22 DISKDIR = SYSTEMDIR + '/disks'
23
24 def disk(file):
25 return os.path.join(DISKDIR, file)
26
27 def binary(file):
28 return os.path.join(BINDIR, file)
29
30 def script(file):
31 return os.path.join(SYSTEMDIR, 'boot', file)
32