summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Warren <swarren@nvidia.com>2014-07-31 11:43:09 -0600
committerStephen Warren <swarren@nvidia.com>2014-08-01 13:38:13 -0600
commit22003584b1e3242f027f075b2023c0051689adac (patch)
tree8c456b046d6a2b18b5764e1dbade6d0305a40702
parentf8d4cbf77009413cf0caf38558e00bf3f81d895c (diff)
downloadtegra-uboot-flasher-scripts-22003584b1e3242f027f075b2023c0051689adac.tar.gz
Adapt to new U-Boot build commands
U-Boot commit 51148790f26e "kconfig: switch to Kconfig" changed the commands required to configure U-Boot. Adapt the flasher build script to those changes, in a way that automatically works with either old or new U-Boot source trees. Cc: Masahiro Yamada <yamada.m@jp.panasonic.com> Signed-off-by: Stephen Warren <swarren@nvidia.com> -- v2: Check for the modified "make help" output rather than a file added by commit 51148790f26e. Hopefully this will be more independant from changes to U-Boot's implementation details.
-rwxr-xr-xbuild12
1 files changed, 11 insertions, 1 deletions
diff --git a/build b/build
index af863dd..b58112e 100755
--- a/build
+++ b/build
@@ -186,7 +186,17 @@ def build_uboot_one_board(boardname):
out_board_dir = gen_out_board_dir(boardname)
mkdir(out_board_dir)
- run(uboot_dir, 'make O=' + build_uboot_dir + ' ' + boardname + '_config')
+ # U-Boot commit 51148790f26e "kconfig: switch to Kconfig" changed the
+ # build commands from "make ${board}_config; make" to
+ # "make ${board}_defconfig; make". That commit also introduced some new
+ # text into the "make help" output. Check for that text here in order to
+ # tell how to compile U-Boot:-/
+ ret = subprocess.call('make help 2>/dev/null | grep -q "Configuration targets"', shell=True, cwd=uboot_dir)
+ if ret:
+ config_target_suffix = '_config'
+ else:
+ config_target_suffix = '_defconfig'
+ run(uboot_dir, 'make O=' + build_uboot_dir + ' ' + boardname + config_target_suffix)
run(uboot_dir, 'make O=' + build_uboot_dir + ' -s ' + makejobs)
import_uboot_one_board(boardname, build_uboot_dir)