SysPaths.py revision 2566
1from m5 import *
2
3import os.path
4import 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.
9SYSTEMDIR_PATH = ['/n/poolfs/z/dist/m5/system']
10
11SYSTEMDIR = None
12for d in SYSTEMDIR_PATH:
13    if os.path.exists(d):
14        SYSTEMDIR = d
15        break
16
17if not SYSTEMDIR:
18    print >>sys.stderr, "Can't find a path to system files."
19    sys.exit(1)
20
21BINDIR = SYSTEMDIR + '/binaries'
22DISKDIR = SYSTEMDIR + '/disks'
23
24def disk(file):
25    return '%s/%s' % (DISKDIR, file)
26
27def binary(file):
28    return '%s/%s' % (BINDIR, file)
29
30def script(file):
31    return '%s/%s' % ('/z/saidi/work/m5.newmem/configs/boot', file)
32
33