]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
tools: buildman: Honor output directory when generating boards.cfg
authorBin Meng <bmeng.cn@gmail.com>
Mon, 28 Oct 2019 14:24:59 +0000 (07:24 -0700)
committerTom Rini <trini@konsulko.com>
Tue, 29 Oct 2019 20:17:36 +0000 (16:17 -0400)
buildman always generates boards.cfg in the U-Boot source tree.
When '-o' is given, we should generate boards.cfg to the given
output directory.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
tools/buildman/control.py

index fcf531c5f143e8062b941e35a0669f8d9b7034d8..9787b8674761646dc36c4e365ef361a441c0f27c 100644 (file)
@@ -201,14 +201,14 @@ def DoBuildman(options, args, toolchains=None, make_func=None, boards=None,
 
     # Work out what subset of the boards we are building
     if not boards:
-        board_file = os.path.join(options.git, 'boards.cfg')
-        status = subprocess.call([os.path.join(options.git,
-                                                'tools/genboardscfg.py')])
+        board_file = os.path.join(options.output_dir, 'boards.cfg')
+        genboardscfg = os.path.join(options.git, 'tools/genboardscfg.py')
+        status = subprocess.call([genboardscfg, '-o', board_file])
         if status != 0:
-                sys.exit("Failed to generate boards.cfg")
+            sys.exit("Failed to generate boards.cfg")
 
         boards = board.Boards()
-        boards.ReadBoards(os.path.join(options.git, 'boards.cfg'))
+        boards.ReadBoards(board_file)
 
     exclude = []
     if options.exclude: