[flasher PATCH] Adapt to new U-Boot build commands

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Stephen Warren <swarren@xxxxxxxxxx>

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@xxxxxxxxxxxxxxxx>
Signed-off-by: Stephen Warren <swarren@xxxxxxxxxx>
---
 build | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/build b/build
index af863dd3b395..e61cac8ea4c7 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 added file
+    # scripts/multiconfig.py, so we happen to have an easy way to check for
+    # the existence of that file to tell how to compile U-Boot:-/
+    new_build_commands_file = os.path.join(uboot_dir, "scripts/multiconfig.py")
+    if os.path.exists(new_build_commands_file):
+        config_target_suffix = '_defconfig'
+    else:
+        config_target_suffix = '_config'
+    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)
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-tegra" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [ARM Kernel]     [Linux ARM]     [Linux ARM MSM]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux