]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
tools: moveconfig: check directory location before compilers
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Thu, 19 May 2016 06:51:52 +0000 (15:51 +0900)
committerMasahiro Yamada <yamada.masahiro@socionext.com>
Sun, 12 Jun 2016 22:46:28 +0000 (07:46 +0900)
We must ensure this tool is run from the top of source directory
before calling update_cross_compile().  Otherwise, the following
exception is thrown:

Traceback (most recent call last):
  File "./moveconfig.py", line 918, in <module>
    main()
  File "./moveconfig.py", line 908, in main
    update_cross_compile()
  File "./moveconfig.py", line 292, in update_cross_compile
    for arch in os.listdir('arch'):
OSError: [Errno 2] No such file or directory: 'arch'

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
tools/moveconfig.py

index 1332bd283029c7534fcfc4a6d144846026d21afc..ce8245a9f5ff95b0f50673810034dfed8a29a429 100755 (executable)
@@ -905,10 +905,10 @@ def main():
 
     config_attrs = parse_recipe(args[0])
 
-    update_cross_compile()
-
     check_top_directory()
 
+    update_cross_compile()
+
     if not options.cleanup_headers_only:
         move_config(config_attrs, options)