summaryrefslogtreecommitdiff
path: root/tegra-uboot-flasher
diff options
context:
space:
mode:
Diffstat (limited to 'tegra-uboot-flasher')
-rwxr-xr-xtegra-uboot-flasher15
1 files changed, 12 insertions, 3 deletions
diff --git a/tegra-uboot-flasher b/tegra-uboot-flasher
index 5f68d40..8c6a21c 100755
--- a/tegra-uboot-flasher
+++ b/tegra-uboot-flasher
@@ -182,7 +182,6 @@ def func_flash():
gen_flashcmd = gen_flashcmds[flash_type]
if args.work_dir:
- workdir = os.path.abspath(args.work_dir)
mkdir(workdir)
else:
workdir = tempfile.mkdtemp()
@@ -326,14 +325,24 @@ if args.debug: print args
scripts_dir = os.path.dirname(os.path.abspath(__file__))
scripts_parent_dir = os.path.dirname(scripts_dir)
+path_args = (
+ 'bootloader',
+ 'data_dir',
+ 'flash_image',
+ 'work_dir',
+)
+for path_arg in path_args:
+ if args.__dict__.has_key(path_arg) and args.__dict__[path_arg]:
+ args.__dict__[path_arg] = os.path.abspath(args.__dict__[path_arg])
+
if not args.force_no_out_dir:
- out_tools_dir = os.path.abspath(os.path.join(scripts_parent_dir, '_out_tools'))
+ out_tools_dir = os.path.join(scripts_parent_dir, '_out_tools')
if os.path.exists(out_tools_dir):
if args.debug: print 'Detected build tree; adding ' + out_tools_dir + ' to $PATH'
os.environ['PATH'] = out_tools_dir + ':' + os.environ['PATH']
if not args.data_dir and not args.force_no_out_dir:
- out_data_dir = os.path.abspath(os.path.join(scripts_parent_dir, '_out'))
+ out_data_dir = os.path.join(scripts_parent_dir, '_out')
if os.path.exists(out_data_dir):
if args.debug: print 'Detected build tree; using ' + out_data_dir + ' as data dir'
args.data_dir = out_data_dir