[U-Boot] [PATCH] kwboot: Boot Marvell Kirkwood SoCs over a serial link.

Luka Perkov uboot at lukaperkov.net
Wed Apr 25 19:43:55 CEST 2012


Hi Daniel,

On Wed, Apr 25, 2012 at 02:34:07PM +0200, Wolfgang Denk wrote:
> In message <1335325799.8304.15.camel at ramone> you wrote:
> >
> > > Why not use something like:
> > > 
> > > BIN_FILES-$(CONFIG_KIRKWOOD) += kwboot$(SFX)
> > 
> > Huh?
> > 
> > I don't know u-boot's build system very well, but normally CONFIG items
> > are employed to keep the target lean. Where the best you could ask from
> > down-config'd host toolset build would be to not accidentally miss sth?
> > This is all host code.
> > 
> > Is building that conditionally really best current practice? If so,
> > yeah, we sure can change that.
> > 
> > But would appreciate a clarification.
> 
> It makes no sense to build this tool on systems that will have no use
> for it - say, on Power architecture.  It only costs build time.

This is what I was talking about:

diff --git a/tools/Makefile b/tools/Makefile
index 8993fdd..8097d95 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -72,6 +72,7 @@ BIN_FILES-$(CONFIG_SMDK5250) += mksmdk5250spl$(SFX)
 BIN_FILES-$(CONFIG_MX28) += mxsboot$(SFX)
 BIN_FILES-$(CONFIG_NETCONSOLE) += ncb$(SFX)
 BIN_FILES-$(CONFIG_SHA1_CHECK_UB_IMG) += ubsha1$(SFX)
+BIN_FILES-$(CONFIG_KIRKWOOD) += kwboot$(SFX)
 
 # Source files which exist outside the tools directory
 EXT_OBJ_FILES-$(CONFIG_BUILD_ENVCRC) += common/env_embedded.o
@@ -101,6 +102,7 @@ OBJ_FILES-$(CONFIG_NETCONSOLE) += ncb.o
 NOPED_OBJ_FILES-y += os_support.o
 OBJ_FILES-$(CONFIG_SHA1_CHECK_UB_IMG) += ubsha1.o
 NOPED_OBJ_FILES-y += ublimage.o
+OBJ_FILES-$(CONFIG_KIRKWOOD) += kwboot.o
 
 # Don't build by default
 #ifeq ($(ARCH),ppc)
@@ -234,6 +236,10 @@ $(obj)ncb$(SFX):	$(obj)ncb.o
 $(obj)ubsha1$(SFX):	$(obj)os_support.o $(obj)sha1.o $(obj)ubsha1.o
 	$(HOSTCC) $(HOSTCFLAGS) $(HOSTLDFLAGS) -o $@ $^
 
+$(obj)kwboot$(SFX): $(obj)kwboot.o
+	$(HOSTCC) $(HOSTCFLAGS) $(HOSTLDFLAGS) -o $@ $^
+	$(HOSTSTRIP) $@
+
 # Some of the tool objects need to be accessed from outside the tools directory
 $(obj)%.o: $(SRCTREE)/common/%.c
 	$(HOSTCC) -g $(HOSTCFLAGS_NOPED) -c -o $@ $<

That worked for me. Please test this, merge it and resend patch v2.

When sending patch v2 please put me in CC because I don't look at the
mailing list regularly...

Regards,
Luka


More information about the U-Boot mailing list