linux-tegra.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [flasher PATCH V2] Adapt to new U-Boot build commands
@ 2014-08-01 19:40 Stephen Warren
       [not found] ` <1406922035-30281-1-git-send-email-swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Stephen Warren @ 2014-08-01 19:40 UTC (permalink / raw)
  To: swarren-3lzwWm7+Weoh9ZMKESR00Q
  Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA, Stephen Warren,
	Masahiro Yamada

From: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>

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-NAum8xwdG0+S7A1Ibl2khg@public.gmane.org>
Signed-off-by: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
--
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.
---
 build | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/build b/build
index af863dd3b395..b58112e12be2 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)
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [flasher PATCH V2] Adapt to new U-Boot build commands
       [not found] ` <1406922035-30281-1-git-send-email-swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
@ 2014-08-04 16:52   ` Stephen Warren
  0 siblings, 0 replies; 2+ messages in thread
From: Stephen Warren @ 2014-08-04 16:52 UTC (permalink / raw)
  Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA, Stephen Warren,
	Masahiro Yamada

On 08/01/2014 01:40 PM, Stephen Warren wrote:
> From: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
>
> 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.

I have applied this.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-08-04 16:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-01 19:40 [flasher PATCH V2] Adapt to new U-Boot build commands Stephen Warren
     [not found] ` <1406922035-30281-1-git-send-email-swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2014-08-04 16:52   ` Stephen Warren

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).