public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Masahiro Yamada <yamada.m@jp.panasonic.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] kbuild/makefile: allow building host tools separately
Date: Fri, 28 Mar 2014 15:36:34 +0900	[thread overview]
Message-ID: <20140328153634.DB49.AA925319@jp.panasonic.com> (raw)
In-Reply-To: <1395336190-17175-1-git-send-email-abrodkin@synopsys.com>

Hi Alexey,


> Sometimes it is required to build only host U-Boot tools without building
> U-Boot itself for either board.
> 
> For example:
>  * In "buildroot" "uboot-tools" could be built for host just to have an ability
>    to create uImage.
>  * Linux distributions ship "mkimage" utility as a separate substance.
> 
> This patch allows building host U-Boot tools separately from U-Boot itself and
> what is more important user only needs to have host compiler (gcc).
> 
> To build host tools just execute:
> =====
> make tools HOST_TOOLS_ONLY=yes
> =====



This may be the similar discussion to
http://u-boot.10912.n7.nabble.com/U-Boot-could-not-cross-compile-u-boot-tools-td174911.html
Providing a separate make target seems preferable.

Maybe like this?

To build host tools just execute:
=====
make tools-only
=====

And I am not happy about adding ifdef to everywhere.


So, how about a patch like this?




diff --git a/Makefile b/Makefile
index c744718..12e1075 100644
--- a/Makefile
+++ b/Makefile
@@ -409,7 +409,7 @@ timestamp_h := include/generated/timestamp_autogenerated.h
 
 no-dot-config-targets := clean clobber mrproper distclean \
                         help %docs check% coccicheck \
-                        ubootversion backup
+                        ubootversion backup tools-only
 
 config-targets := 0
 mixed-targets  := 0
@@ -1128,6 +1128,9 @@ checkarmreloc: u-boot
 env: scripts_basic
        $(Q)$(MAKE) $(build)=tools/$@
 
+tools-only: scripts_basic
+       $(Q)$(MAKE) $(build)=tools
+
 tools-all: export HOST_TOOLS_ALL=y
 tools-all: env tools ;
 





Best Regards
Masahiro Yamada

  reply	other threads:[~2014-03-28  6:36 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-20 17:23 [U-Boot] [PATCH] kbuild/makefile: allow building host tools separately Alexey Brodkin
2014-03-28  6:36 ` Masahiro Yamada [this message]
2014-03-28 21:58   ` Alexey Brodkin
2014-03-31  1:43     ` Masahiro Yamada
2014-03-31  5:52       ` Alexey Brodkin
2014-03-31  6:43         ` Masahiro Yamada

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140328153634.DB49.AA925319@jp.panasonic.com \
    --to=yamada.m@jp.panasonic.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox