From 6bcd13fcc4d0c5eb3c7ced0ce6bc827e193415eb Mon Sep 17 00:00:00 2001 From: Jason Lowe-Power Date: Thu, 4 Apr 2019 18:36:23 -0700 Subject: configs: Add full path for learning_gem5 binaries Change-Id: Ie48429d65e322136109a223ed404937989aae494 Signed-off-by: Jason Lowe-Power Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/17868 Reviewed-by: Nikos Nikoleris Reviewed-by: Anthony Gutierrez --- configs/learning_gem5/part1/simple.py | 7 +++++-- configs/learning_gem5/part1/two_level.py | 5 ++++- 2 files changed, 9 insertions(+), 3 deletions(-) (limited to 'configs/learning_gem5/part1') diff --git a/configs/learning_gem5/part1/simple.py b/configs/learning_gem5/part1/simple.py index c624de0aa..2947b7d11 100644 --- a/configs/learning_gem5/part1/simple.py +++ b/configs/learning_gem5/part1/simple.py @@ -89,8 +89,11 @@ system.system_port = system.membus.slave # get ISA for the binary to run. isa = str(m5.defines.buildEnv['TARGET_ISA']).lower() -# Run 'hello' and use the compiled ISA to find the binary -binary = 'tests/test-progs/hello/bin/' + isa + '/linux/hello' +# Default to running 'hello', use the compiled ISA to find the binary +# grab the specific path to the binary +thispath = os.path.dirname(os.path.realpath(__file__)) +binary = os.path.join(thispath, '../../../', + 'tests/test-progs/hello/bin/', isa, 'linux/hello') # Create a process for a simple "Hello World" application process = Process() diff --git a/configs/learning_gem5/part1/two_level.py b/configs/learning_gem5/part1/two_level.py index b6f8781d2..dcf565a9a 100644 --- a/configs/learning_gem5/part1/two_level.py +++ b/configs/learning_gem5/part1/two_level.py @@ -67,7 +67,10 @@ SimpleOpts.set_usage("usage: %prog [options] ") isa = str(m5.defines.buildEnv['TARGET_ISA']).lower() # Default to running 'hello', use the compiled ISA to find the binary -binary = 'tests/test-progs/hello/bin/' + isa + '/linux/hello' +# grab the specific path to the binary +thispath = os.path.dirname(os.path.realpath(__file__)) +binary = os.path.join(thispath, '../../../', + 'tests/test-progs/hello/bin/', isa, 'linux/hello') # Check if there was a binary passed in via the command line and error if # there are too many arguments -- cgit v1.2.3