diff mbox

[U-Boot] matrix vision: fix MVBLM7, MVSMR build error

Message ID 20111104164356.5ab650e3a7af28de76f55526@freescale.com
State Changes Requested
Delegated to: Wolfgang Denk
Headers show

Commit Message

Kim Phillips Nov. 4, 2011, 9:43 p.m. UTC
when a mkimage binary isn't present in the default system PATH, we
get this error:

$ ./MAKEALL MVBLM7
Configuring for MVBLM7 board...
make[1]: mkimage: Command not found
make[1]: *** [libmvblm7.o] Error 127
make: *** [board/matrix_vision/mvblm7/libmvblm7.o] Error 2
powerpc-linux-gnu-size: './u-boot': No such file

fix by referencing u-boot's built-in mkimage instead.

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
---
 board/matrix_vision/mvblm7/Makefile |    2 +-
 board/matrix_vision/mvsmr/Makefile  |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Comments

Wolfgang Denk Nov. 5, 2011, 12:19 a.m. UTC | #1
Dear Kim Phillips,

In message <20111104164356.5ab650e3a7af28de76f55526@freescale.com> you wrote:
> when a mkimage binary isn't present in the default system PATH, we
> get this error:

Yes - so what?

When the cross compiler is not in your path, you will get errors, and
so you will when make is missing, or the shell...

Sorry, but we really don't need that.

Best regards,

Wolfgang Denk
Andre Schwarz Nov. 5, 2011, 12:02 p.m. UTC | #2
Kim Phillips <kim.phillips@freescale.com> hat am 4. November 2011 um 22:43
geschrieben:

> when a mkimage binary isn't present in the default system PATH, we
> get this error:
>
> $ ./MAKEALL MVBLM7
> Configuring for MVBLM7 board...
> make[1]: mkimage: Command not found
> make[1]: *** [libmvblm7.o] Error 127
> make: *** [board/matrix_vision/mvblm7/libmvblm7.o] Error 2
> powerpc-linux-gnu-size: './u-boot': No such file
>
> fix by referencing u-boot's built-in mkimage instead.
>
> Signed-off-by: Kim Phillips <kim.phillips@freescale.com> 
Acked-by: Andre Schwarz <andre.schwarz@matrix-vision.de> 
 

> ---
>  board/matrix_vision/mvblm7/Makefile |    2 +-
>  board/matrix_vision/mvsmr/Makefile  |    2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/board/matrix_vision/mvblm7/Makefile
> b/board/matrix_vision/mvblm7/Makefile
> index 81761ca..48a602c 100644
> --- a/board/matrix_vision/mvblm7/Makefile
> +++ b/board/matrix_vision/mvblm7/Makefile
> @@ -32,7 +32,7 @@ SOBJS        := $(addprefix $(obj),$(SOBJS))

>  $(LIB):        $(obj).depend $(OBJS)
>          $(call cmd_link_o_target, $(OBJS))
> -        @mkimage -T script -C none -n M7_script -d bootscript
> $(obj)bootscript.img
> +        @$(OBJTREE)/tools/mkimage -T script -C none -n M7_script -d
> bootscript $(obj)bootscript.img

>  #########################################################################

> diff --git a/board/matrix_vision/mvsmr/Makefile
> b/board/matrix_vision/mvsmr/Makefile
> index 37b9bac..bb77eff 100644
> --- a/board/matrix_vision/mvsmr/Makefile
> +++ b/board/matrix_vision/mvsmr/Makefile
> @@ -36,7 +36,7 @@ SOBJS   := $(addprefix $(obj),$(SOBJS))

>  $(LIB): $(obj).depend $(OBJS)
>                  $(call cmd_link_o_target, $(OBJS))
> -        @mkimage -T script -C none -n mvSMR_Script -d bootscript
> $(obj)bootscript.img
> +        @$(OBJTREE)/tools/mkimage -T script -C none -n mvSMR_Script -d
> bootscript $(obj)bootscript.img

>  #########################################################################

> --
> 1.7.7.2
>
>
Kim Phillips Nov. 8, 2011, 12:46 a.m. UTC | #3
On Sat, 5 Nov 2011 01:19:02 +0100
Wolfgang Denk <wd@denx.de> wrote:

> Dear Kim Phillips,
> 
> In message <20111104164356.5ab650e3a7af28de76f55526@freescale.com> you wrote:
> > when a mkimage binary isn't present in the default system PATH, we
> > get this error:
> 
> Yes - so what?

it's an unforced error and thus should be avoided.

> When the cross compiler is not in your path, you will get errors, and

well that's a little more obvious.

> so you will when make is missing, or the shell...

modern distros include those basics by default - mkimage, however,
is not.

> Sorry, but we really don't need that.

u-boot is the original source of mkimage - if linux itself does
this, and and it eliminates a pointless barrier to a successful
build, then why not?  It makes u-boot easier to use.

Kim
Wolfgang Denk Dec. 5, 2011, 8:56 p.m. UTC | #4
Dear Kim Phillips,

In message <20111104164356.5ab650e3a7af28de76f55526@freescale.com> you wrote:
> when a mkimage binary isn't present in the default system PATH, we
> get this error:
> 
> $ ./MAKEALL MVBLM7
> Configuring for MVBLM7 board...
> make[1]: mkimage: Command not found
> make[1]: *** [libmvblm7.o] Error 127
> make: *** [board/matrix_vision/mvblm7/libmvblm7.o] Error 2
> powerpc-linux-gnu-size: './u-boot': No such file
> 
> fix by referencing u-boot's built-in mkimage instead.
> 
> Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
> ---
>  board/matrix_vision/mvblm7/Makefile |    2 +-
>  board/matrix_vision/mvsmr/Makefile  |    2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/board/matrix_vision/mvblm7/Makefile b/board/matrix_vision/mvblm7/Makefile
> index 81761ca..48a602c 100644
> --- a/board/matrix_vision/mvblm7/Makefile
> +++ b/board/matrix_vision/mvblm7/Makefile
> @@ -32,7 +32,7 @@ SOBJS	:= $(addprefix $(obj),$(SOBJS))
>  
>  $(LIB):	$(obj).depend $(OBJS)
>  	$(call cmd_link_o_target, $(OBJS))
> -	@mkimage -T script -C none -n M7_script -d bootscript $(obj)bootscript.img
> +	@$(OBJTREE)/tools/mkimage -T script -C none -n M7_script -d bootscript $(obj)bootscript.img

If we do that, should then $(OBJTREE)/tools/mkimage not be listed as
dependency for this step?

Best regards,

Wolfgang Denk
diff mbox

Patch

diff --git a/board/matrix_vision/mvblm7/Makefile b/board/matrix_vision/mvblm7/Makefile
index 81761ca..48a602c 100644
--- a/board/matrix_vision/mvblm7/Makefile
+++ b/board/matrix_vision/mvblm7/Makefile
@@ -32,7 +32,7 @@  SOBJS	:= $(addprefix $(obj),$(SOBJS))
 
 $(LIB):	$(obj).depend $(OBJS)
 	$(call cmd_link_o_target, $(OBJS))
-	@mkimage -T script -C none -n M7_script -d bootscript $(obj)bootscript.img
+	@$(OBJTREE)/tools/mkimage -T script -C none -n M7_script -d bootscript $(obj)bootscript.img
 
 #########################################################################
 
diff --git a/board/matrix_vision/mvsmr/Makefile b/board/matrix_vision/mvsmr/Makefile
index 37b9bac..bb77eff 100644
--- a/board/matrix_vision/mvsmr/Makefile
+++ b/board/matrix_vision/mvsmr/Makefile
@@ -36,7 +36,7 @@  SOBJS   := $(addprefix $(obj),$(SOBJS))
 
 $(LIB): $(obj).depend $(OBJS)
 	        $(call cmd_link_o_target, $(OBJS))
-	@mkimage -T script -C none -n mvSMR_Script -d bootscript $(obj)bootscript.img
+	@$(OBJTREE)/tools/mkimage -T script -C none -n mvSMR_Script -d bootscript $(obj)bootscript.img
 
 #########################################################################