All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] Kbuild: allow building tools without board configuration
@ 2014-03-31  8:33 Masahiro Yamada
  2014-03-31 10:07 ` Alexey Brodkin
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Masahiro Yamada @ 2014-03-31  8:33 UTC (permalink / raw)
  To: u-boot

Prior to Kbuild, U-Boot could build under tools/ directory
withour configuring for a specific board.

That feature was lost when switching to Kbuild.

This patch revives it again by adding a make target "tools-only".

Usage:
  $ make tools-only

Neither board configuration nor cross compiler are required to
build host tools.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Suggested-by: Alexey Brodkin <Alexey.Brodkin@synopsys.com>
Cc: Alexey Brodkin <Alexey.Brodkin@synopsys.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Tom Rini <trini@ti.com>
---
 Makefile | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index e5f5a8c..43391eb 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 $(version_h) $(timestamp_h)
+	$(Q)$(MAKE) $(build)=tools
+
 tools-all: export HOST_TOOLS_ALL=y
 tools-all: env tools ;
 
-- 
1.8.3.2

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

* [U-Boot] [PATCH] Kbuild: allow building tools without board configuration
  2014-03-31  8:33 [U-Boot] [PATCH] Kbuild: allow building tools without board configuration Masahiro Yamada
@ 2014-03-31 10:07 ` Alexey Brodkin
  2014-03-31 15:16 ` Tom Rini
  2014-03-31 15:47 ` [U-Boot] " Tom Rini
  2 siblings, 0 replies; 8+ messages in thread
From: Alexey Brodkin @ 2014-03-31 10:07 UTC (permalink / raw)
  To: u-boot

On Mon, 2014-03-31 at 17:33 +0900, Masahiro Yamada wrote:
> Prior to Kbuild, U-Boot could build under tools/ directory
> withour configuring for a specific board.
> 
> That feature was lost when switching to Kbuild.
> 
> This patch revives it again by adding a make target "tools-only".
> 
> Usage:
>   $ make tools-only
> 
> Neither board configuration nor cross compiler are required to
> build host tools.
> 
> Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
> Suggested-by: Alexey Brodkin <Alexey.Brodkin@synopsys.com>
> Cc: Alexey Brodkin <Alexey.Brodkin@synopsys.com>
> Cc: Simon Glass <sjg@chromium.org>
> Cc: Tom Rini <trini@ti.com>

Works as expected for me.

Acked-by: Alexey Brodkin <abrodkin@synopsys.com>

-Alexey

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

* [U-Boot] [PATCH] Kbuild: allow building tools without board configuration
  2014-03-31  8:33 [U-Boot] [PATCH] Kbuild: allow building tools without board configuration Masahiro Yamada
  2014-03-31 10:07 ` Alexey Brodkin
@ 2014-03-31 15:16 ` Tom Rini
  2014-03-31 15:24   ` Alexey Brodkin
  2014-03-31 15:47 ` [U-Boot] " Tom Rini
  2 siblings, 1 reply; 8+ messages in thread
From: Tom Rini @ 2014-03-31 15:16 UTC (permalink / raw)
  To: u-boot

On Mon, Mar 31, 2014 at 05:33:51PM +0900, Masahiro Yamada wrote:

> Prior to Kbuild, U-Boot could build under tools/ directory
> withour configuring for a specific board.
> 
> That feature was lost when switching to Kbuild.
> 
> This patch revives it again by adding a make target "tools-only".
> 
> Usage:
>   $ make tools-only
> 
> Neither board configuration nor cross compiler are required to
> build host tools.
> 
> Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
> Suggested-by: Alexey Brodkin <Alexey.Brodkin@synopsys.com>
> Cc: Alexey Brodkin <Alexey.Brodkin@synopsys.com>
> Cc: Simon Glass <sjg@chromium.org>
> Cc: Tom Rini <trini@ti.com>

Problem is that we make enabling the signature code (which adds more
deps on the host) based on the config, and this was intentional.   So
I'm not sure if we want to do this exactly, at least right now.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20140331/935261f4/attachment.pgp>

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

* [U-Boot] [PATCH] Kbuild: allow building tools without board configuration
  2014-03-31 15:16 ` Tom Rini
@ 2014-03-31 15:24   ` Alexey Brodkin
  2014-03-31 15:31     ` Tom Rini
  0 siblings, 1 reply; 8+ messages in thread
From: Alexey Brodkin @ 2014-03-31 15:24 UTC (permalink / raw)
  To: u-boot

Hi Tom,

On Mon, 2014-03-31 at 11:16 -0400, Tom Rini wrote:
> On Mon, Mar 31, 2014 at 05:33:51PM +0900, Masahiro Yamada wrote:
> 
> > Prior to Kbuild, U-Boot could build under tools/ directory
> > withour configuring for a specific board.
> > 
> > That feature was lost when switching to Kbuild.
> > 
> > This patch revives it again by adding a make target "tools-only".
> > 
> > Usage:
> >   $ make tools-only
> > 
> > Neither board configuration nor cross compiler are required to
> > build host tools.
> > 
> > Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
> > Suggested-by: Alexey Brodkin <Alexey.Brodkin@synopsys.com>
> > Cc: Alexey Brodkin <Alexey.Brodkin@synopsys.com>
> > Cc: Simon Glass <sjg@chromium.org>
> > Cc: Tom Rini <trini@ti.com>
> 
> Problem is that we make enabling the signature code (which adds more
> deps on the host) based on the config, and this was intentional.   So
> I'm not sure if we want to do this exactly, at least right now.

Could you please add a bit more clarifications for your comment.

I don't quite understand why do I need to have any info from a board
configuration when building "mkimage" utility.

Maybe I'm missing something.

And the problem is without proposed patch it's virtually impossible (or
I don't know how) to build "mkimage" without configuring the real board.

For example what Linux distros will do to build generic "mkimage" tool?

And I think it is very important to resolve before U-Boot v2014.04 gets
released.

-Alexey 

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

* [U-Boot] [PATCH] Kbuild: allow building tools without board configuration
  2014-03-31 15:24   ` Alexey Brodkin
@ 2014-03-31 15:31     ` Tom Rini
  2014-03-31 15:39       ` Alexey Brodkin
  0 siblings, 1 reply; 8+ messages in thread
From: Tom Rini @ 2014-03-31 15:31 UTC (permalink / raw)
  To: u-boot

On Mon, Mar 31, 2014 at 03:24:19PM +0000, Alexey Brodkin wrote:
> Hi Tom,
> 
> On Mon, 2014-03-31 at 11:16 -0400, Tom Rini wrote:
> > On Mon, Mar 31, 2014 at 05:33:51PM +0900, Masahiro Yamada wrote:
> > 
> > > Prior to Kbuild, U-Boot could build under tools/ directory
> > > withour configuring for a specific board.
> > > 
> > > That feature was lost when switching to Kbuild.
> > > 
> > > This patch revives it again by adding a make target "tools-only".
> > > 
> > > Usage:
> > >   $ make tools-only
> > > 
> > > Neither board configuration nor cross compiler are required to
> > > build host tools.
> > > 
> > > Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
> > > Suggested-by: Alexey Brodkin <Alexey.Brodkin@synopsys.com>
> > > Cc: Alexey Brodkin <Alexey.Brodkin@synopsys.com>
> > > Cc: Simon Glass <sjg@chromium.org>
> > > Cc: Tom Rini <trini@ti.com>
> > 
> > Problem is that we make enabling the signature code (which adds more
> > deps on the host) based on the config, and this was intentional.   So
> > I'm not sure if we want to do this exactly, at least right now.
> 
> Could you please add a bit more clarifications for your comment.
> 
> I don't quite understand why do I need to have any info from a board
> configuration when building "mkimage" utility.
> 
> Maybe I'm missing something.
> 
> And the problem is without proposed patch it's virtually impossible (or
> I don't know how) to build "mkimage" without configuring the real board.
> 
> For example what Linux distros will do to build generic "mkimage" tool?

So, if you check out tools/mkimage.c you can see that if
CONFIG_FIT_SIGNATURE is set we add options for doing rsa/etc signatures
on parts of a FIT image (see doc/uImage.FIT/signature.txt).  But then
you need to have crypto libraries on the host available for linking.
When not set we capture the relevant flags and print out a message to
stderr.  Since generic distros today hate FIT images even more than
legacy images, I'm not overly concerned about that, today.

> 
> And I think it is very important to resolve before U-Boot v2014.04 gets
> released.

I agree, yes.

> 
> -Alexey 
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20140331/e4714c64/attachment.pgp>

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

* [U-Boot] [PATCH] Kbuild: allow building tools without board configuration
  2014-03-31 15:31     ` Tom Rini
@ 2014-03-31 15:39       ` Alexey Brodkin
  2014-03-31 15:47         ` Tom Rini
  0 siblings, 1 reply; 8+ messages in thread
From: Alexey Brodkin @ 2014-03-31 15:39 UTC (permalink / raw)
  To: u-boot

On Mon, 2014-03-31 at 11:31 -0400, Tom Rini wrote:
> On Mon, Mar 31, 2014 at 03:24:19PM +0000, Alexey Brodkin wrote:
> > Hi Tom,
> > 
> > On Mon, 2014-03-31 at 11:16 -0400, Tom Rini wrote:
> > > On Mon, Mar 31, 2014 at 05:33:51PM +0900, Masahiro Yamada wrote:
> > > 
> > > > Prior to Kbuild, U-Boot could build under tools/ directory
> > > > withour configuring for a specific board.
> > > > 
> > > > That feature was lost when switching to Kbuild.
> > > > 
> > > > This patch revives it again by adding a make target "tools-only".
> > > > 
> > > > Usage:
> > > >   $ make tools-only
> > > > 
> > > > Neither board configuration nor cross compiler are required to
> > > > build host tools.
> > > > 
> > > > Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
> > > > Suggested-by: Alexey Brodkin <Alexey.Brodkin@synopsys.com>
> > > > Cc: Alexey Brodkin <Alexey.Brodkin@synopsys.com>
> > > > Cc: Simon Glass <sjg@chromium.org>
> > > > Cc: Tom Rini <trini@ti.com>
> > > 
> > > Problem is that we make enabling the signature code (which adds more
> > > deps on the host) based on the config, and this was intentional.   So
> > > I'm not sure if we want to do this exactly, at least right now.
> > 
> > Could you please add a bit more clarifications for your comment.
> > 
> > I don't quite understand why do I need to have any info from a board
> > configuration when building "mkimage" utility.
> > 
> > Maybe I'm missing something.
> > 
> > And the problem is without proposed patch it's virtually impossible (or
> > I don't know how) to build "mkimage" without configuring the real board.
> > 
> > For example what Linux distros will do to build generic "mkimage" tool?
> 
> So, if you check out tools/mkimage.c you can see that if
> CONFIG_FIT_SIGNATURE is set we add options for doing rsa/etc signatures
> on parts of a FIT image (see doc/uImage.FIT/signature.txt).  But then
> you need to have crypto libraries on the host available for linking.
> When not set we capture the relevant flags and print out a message to
> stderr.  Since generic distros today hate FIT images even more than
> legacy images, I'm not overly concerned about that, today.

So why don't we accept proposed patch so at least there will be a simple
way to build generic "mkimage" people usually need?

If needed we may do more changes in the patch. For example we may add
warning message saying that FIT images won't be supported by this
"generic" "mkimage" etc.

-Alexey

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

* [U-Boot] [PATCH] Kbuild: allow building tools without board configuration
  2014-03-31 15:39       ` Alexey Brodkin
@ 2014-03-31 15:47         ` Tom Rini
  0 siblings, 0 replies; 8+ messages in thread
From: Tom Rini @ 2014-03-31 15:47 UTC (permalink / raw)
  To: u-boot

On Mon, Mar 31, 2014 at 03:39:18PM +0000, Alexey Brodkin wrote:
> On Mon, 2014-03-31 at 11:31 -0400, Tom Rini wrote:
> > On Mon, Mar 31, 2014 at 03:24:19PM +0000, Alexey Brodkin wrote:
> > > Hi Tom,
> > > 
> > > On Mon, 2014-03-31 at 11:16 -0400, Tom Rini wrote:
> > > > On Mon, Mar 31, 2014 at 05:33:51PM +0900, Masahiro Yamada wrote:
> > > > 
> > > > > Prior to Kbuild, U-Boot could build under tools/ directory
> > > > > withour configuring for a specific board.
> > > > > 
> > > > > That feature was lost when switching to Kbuild.
> > > > > 
> > > > > This patch revives it again by adding a make target "tools-only".
> > > > > 
> > > > > Usage:
> > > > >   $ make tools-only
> > > > > 
> > > > > Neither board configuration nor cross compiler are required to
> > > > > build host tools.
> > > > > 
> > > > > Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
> > > > > Suggested-by: Alexey Brodkin <Alexey.Brodkin@synopsys.com>
> > > > > Cc: Alexey Brodkin <Alexey.Brodkin@synopsys.com>
> > > > > Cc: Simon Glass <sjg@chromium.org>
> > > > > Cc: Tom Rini <trini@ti.com>
> > > > 
> > > > Problem is that we make enabling the signature code (which adds more
> > > > deps on the host) based on the config, and this was intentional.   So
> > > > I'm not sure if we want to do this exactly, at least right now.
> > > 
> > > Could you please add a bit more clarifications for your comment.
> > > 
> > > I don't quite understand why do I need to have any info from a board
> > > configuration when building "mkimage" utility.
> > > 
> > > Maybe I'm missing something.
> > > 
> > > And the problem is without proposed patch it's virtually impossible (or
> > > I don't know how) to build "mkimage" without configuring the real board.
> > > 
> > > For example what Linux distros will do to build generic "mkimage" tool?
> > 
> > So, if you check out tools/mkimage.c you can see that if
> > CONFIG_FIT_SIGNATURE is set we add options for doing rsa/etc signatures
> > on parts of a FIT image (see doc/uImage.FIT/signature.txt).  But then
> > you need to have crypto libraries on the host available for linking.
> > When not set we capture the relevant flags and print out a message to
> > stderr.  Since generic distros today hate FIT images even more than
> > legacy images, I'm not overly concerned about that, today.
> 
> So why don't we accept proposed patch so at least there will be a simple
> way to build generic "mkimage" people usually need?
> 
> If needed we may do more changes in the patch. For example we may add
> warning message saying that FIT images won't be supported by this
> "generic" "mkimage" etc.

Yeah, OK, we are no different than before at least (just checked, a
sandbox mkimage is still fine) so I can accept this, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20140331/6c80ced0/attachment.pgp>

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

* [U-Boot] Kbuild: allow building tools without board configuration
  2014-03-31  8:33 [U-Boot] [PATCH] Kbuild: allow building tools without board configuration Masahiro Yamada
  2014-03-31 10:07 ` Alexey Brodkin
  2014-03-31 15:16 ` Tom Rini
@ 2014-03-31 15:47 ` Tom Rini
  2 siblings, 0 replies; 8+ messages in thread
From: Tom Rini @ 2014-03-31 15:47 UTC (permalink / raw)
  To: u-boot

On Mon, Mar 31, 2014 at 05:33:51PM +0900, Masahiro Yamada wrote:

> Prior to Kbuild, U-Boot could build under tools/ directory
> withour configuring for a specific board.
> 
> That feature was lost when switching to Kbuild.
> 
> This patch revives it again by adding a make target "tools-only".
> 
> Usage:
>   $ make tools-only
> 
> Neither board configuration nor cross compiler are required to
> build host tools.
> 
> Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
> Suggested-by: Alexey Brodkin <Alexey.Brodkin@synopsys.com>
> Cc: Alexey Brodkin <Alexey.Brodkin@synopsys.com>
> Cc: Simon Glass <sjg@chromium.org>
> Cc: Tom Rini <trini@ti.com>
> Acked-by: Alexey Brodkin <abrodkin@synopsys.com>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20140331/5de3688b/attachment.pgp>

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

end of thread, other threads:[~2014-03-31 15:47 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-31  8:33 [U-Boot] [PATCH] Kbuild: allow building tools without board configuration Masahiro Yamada
2014-03-31 10:07 ` Alexey Brodkin
2014-03-31 15:16 ` Tom Rini
2014-03-31 15:24   ` Alexey Brodkin
2014-03-31 15:31     ` Tom Rini
2014-03-31 15:39       ` Alexey Brodkin
2014-03-31 15:47         ` Tom Rini
2014-03-31 15:47 ` [U-Boot] " Tom Rini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.