i have build x86 system in /home/gem5/X86
and put full system files into /home/gem5/dist

typed following command:

build/X86/gem5.opt configs/example/fs.py
--disk-image=/home/gem5/dist/disks/linux-x86.img
--kernel=/home/gem5/dist/binaries/x86_64-vmlinux-2.6.22.9

this is the output:

root@ubuntu:/home/farshid/gem5# build/X86/gem5.opt configs/example/fs.py
--disk-image=/home/gem5/dist/disks/linux-x86.img
--kernel=/home/gem5/dist/binaries/x86_64-vmlinux-2.6.22.9
gem5 Simulator System.  http://gem5.org
gem5 is copyrighted software; use the --copyright option for details.

gem5 compiled Mar 28 2014 00:39:53
gem5 started Apr 20 2014 08:24:57
gem5 executing on ubuntu
command line: build/X86/gem5.opt configs/example/fs.py
--disk-image=/home/gem5/dist/disks/linux-x86.img
--kernel=/home/gem5/dist/binaries/x86_64-vmlinux-2.6.22.9
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/farshid/gem5/src/python/m5/main.py", line 388, in main
    exec filecode in scope
  File "configs/example/fs.py", line 300, in <module>
    test_sys = build_test_system(np)
  File "configs/example/fs.py", line 83, in build_test_system
    options.ruby)
  File "/home/farshid/gem5/configs/common/FSConfig.py", line 488, in
makeLinuxX86System
    makeX86System(mem_mode, numCPUs, mdesc, self, Ruby)
  File "/home/farshid/gem5/configs/common/FSConfig.py", line 416, in
makeX86System
    disk0.childImage(mdesc.disk())
  File "/home/farshid/gem5/configs/common/Benchmarks.py", line 53, in disk
    return disk(self.diskname)
  File "/home/farshid/gem5/configs/common/SysPaths.py", line 37, in disk
    system()
  File "/home/farshid/gem5/configs/common/SysPaths.py", line 59, in system
    raise ImportError, "Can't find a path to system! files."
ImportError: Can't find a path to system! files.




and this is what i have in sysPath.py:

# Copyright (c) 2006 The Regents of The University of Michigan
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met: redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer;
# redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution;
# neither the name of the copyright holders nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (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

import os, sys
from os.path import isdir, join as joinpath
from os import environ as env

config_path = os.path.dirname(os.path.abspath(__file__))
config_root = os.path.dirname(config_path)

def disk(file):
    system()
    return joinpath(disk.dir, file)

def binary(file):
    system()
    return joinpath(binary.dir, file)

def script(file):
    system()
    return joinpath(script.dir, file)

def system():
    if not system.dir:
        try:
                path = env['M5_PATH'].split(':')
        except KeyError:
                path = [ '/dist/m5/system', '$gem5/dist' ]

        for system.dir in path:
            if os.path.isdir(system.dir):
                break
        else:
            raise ImportError, "Can't find a path to system files."

    if not binary.dir:
        binary.dir = joinpath(system.dir, 'binaries')
    if not disk.dir:
        disk.dir = joinpath(system.dir, 'disks')
    if not script.dir:
        script.dir = joinpath(config_root, 'boot')

system.dir = None
binary.dir = None
disk.dir = None
script.dir = None


please someone tells me what's wrong with this?

thanks and
best regards
Farshid Hajhashemi





-- 
Farshid Hajhashemi
MS.c Student of Computer Architecture At University of Isfahan
Senior Digital Designer At Kara Telephone
Contact:
      Mail:
       hajhash...@eng.ui.ac.ir
       hajhash...@kara.net
       farshidhajhash...@gmail.com
_______________________________________________
gem5-users mailing list
gem5-users@gem5.org
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

Reply via email to