[U-Boot] [PATCH 01/12] kbuild, mxs: use short logs for MXS images

Marek Vasut marex at denx.de
Tue Mar 11 12:52:11 CET 2014


On Tuesday, March 11, 2014 at 03:05:11 AM, Masahiro Yamada wrote:
> Signed-off-by: Masahiro Yamada <yamada.m at jp.panasonic.com>
> Cc: Marek Vasut <marex at denx.de>
> Cc: Fabio Estevam <fabio.estevam at freescale.com>
> Cc: Otavio Salvador <otavio at ossystems.com.br>
> Cc: Lauri Hintsala <lauri.hintsala at bluegiga.com>

You can drop Lauri from CC , I think this address is dead.

> ---
> 
> Hi MXS board maitainers,
> 
> I think this commit is probably correct.
> (I mean, it still generates correct "u-boot.sb" image)
> 
> But I could not corfirm it by binary comparison.
> 
> Every build generates a different u-boot.sb
> even if no source file is changed.

Note sure about that:

marex at bfu:/tmp/u-boot$ make -j9 u-boot.sb
  CHK     include/config/uboot.release
  CHK     include/generated/timestamp_autogenerated.h
  UPD     include/generated/timestamp_autogenerated.h
  UPD     include/config/uboot.release
  CHK     include/generated/version_autogenerated.h
  UPD     include/generated/version_autogenerated.h
  HOSTCC  tools/dumpimage.o
  HOSTCC  tools/image-host.o
  HOSTCC  tools/mkenvimage.o
  HOSTCC  tools/mkimage.o
  HOSTLD  tools/envcrc
  HOSTLD  tools/mkenvimage
  HOSTLD  tools/dumpimage
  HOSTLD  tools/mkimage
  AS      arch/arm/cpu/arm926ejs/start.o
  CC      arch/arm/lib/board.o
  CC      drivers/video/cfb_console.o
  LD      arch/arm/lib/built-in.o
  CC      lib/display_options.o
  CC      common/main.o
  CC      common/cmd_version.o
  AS      spl/arch/arm/cpu/arm926ejs/mxs/start.o
  LD      lib/built-in.o
  CC      spl/lib/display_options.o
  LD      spl/lib/built-in.o
  LD      spl/u-boot-spl
  OBJCOPY spl/u-boot-spl.bin
  LD      common/built-in.o
  LD      drivers/video/built-in.o
  LD      drivers/built-in.o
  LD      u-boot
  OBJCOPY u-boot.bin
  MXSIMAGE  u-boot.sb
marex at bfu:/tmp/u-boot$ sha1sum u-boot.bin 
a31b6fb66fab4a0f05634987585140ffe463452e  u-boot.bin
marex at bfu:/tmp/u-boot$ make -j9 u-boot.sb
  CHK     include/config/uboot.release
  CHK     include/generated/timestamp_autogenerated.h
  UPD     include/generated/timestamp_autogenerated.h
  CHK     include/generated/version_autogenerated.h
  HOSTCC  tools/dumpimage.o
  HOSTCC  tools/image-host.o
  HOSTCC  tools/mkenvimage.o
  HOSTCC  tools/mkimage.o
  HOSTLD  tools/envcrc
  HOSTLD  tools/mkenvimage
  HOSTLD  tools/dumpimage
  HOSTLD  tools/mkimage
  AS      arch/arm/cpu/arm926ejs/start.o
  CC      arch/arm/lib/board.o
  CC      drivers/video/cfb_console.o
  LD      arch/arm/lib/built-in.o
  CC      lib/display_options.o
  CC      common/main.o
  CC      common/cmd_version.o
  AS      spl/arch/arm/cpu/arm926ejs/mxs/start.o
  CC      spl/lib/display_options.o
  LD      lib/built-in.o
  LD      spl/lib/built-in.o
  LD      spl/u-boot-spl
  OBJCOPY spl/u-boot-spl.bin
  LD      common/built-in.o
  LD      drivers/video/built-in.o
  LD      drivers/built-in.o
  LD      u-boot
  OBJCOPY u-boot.bin
  MXSIMAGE  u-boot.sb
marex at bfu:/tmp/u-boot$ sha1sum u-boot.bin 
b5d5feab4a6974fe00272d3a3408300d8c8a473d  u-boot.bin

Given that u-boot.bin and spl/u-boot-spl.bin are packed into u-boot.sb , this is 
why you always see a different u-boot.sb .

> I wish someone could do run test this patch.

The patch is good, I have just a minor rant below, otherwise add my:

Acked-by: Marek Vasut <marex at denx.de>

btw. you can check if the image was not corrupted by issuing:

$ mkimage -l u-boot.sb

;-)

[...]

> diff --git a/arch/arm/cpu/arm926ejs/mxs/Makefile
> b/arch/arm/cpu/arm926ejs/mxs/Makefile index 152546e..1eee661 100644
> --- a/arch/arm/cpu/arm926ejs/mxs/Makefile
> +++ b/arch/arm/cpu/arm926ejs/mxs/Makefile
> @@ -14,11 +14,12 @@ obj-y	+= spl_boot.o spl_lradc_init.o spl_mem_init.o
> spl_power_init.o endif
> 
>  # Specify the target for use in elftosb call
> -MKIMAGE_TARGET-$(CONFIG_MX23) = mx23
> -MKIMAGE_TARGET-$(CONFIG_MX28) = mx28
> +MKIMAGE_TARGET-$(CONFIG_MX23) = mxsimage.mx23.cfg
> +MKIMAGE_TARGET-$(CONFIG_MX28) = mxsimage.mx28.cfg
> 
> -$(OBJTREE)/mxsimage.cfg:
> $(SRCTREE)/$(CPUDIR)/$(SOC)/mxsimage.$(MKIMAGE_TARGET-y).cfg -	sed
> "s at OBJTREE@$(OBJTREE)@g" $^ > $@
> +quiet_cmd_mkimage_mxs = UIMAGE  $@

Why don't we use 'MKIMAGE' here to be consistent ? Or 'MXSIMAGE' if we want to 
differentiate ?

> +cmd_mkimage_mxs = $(objtree)/tools/mkimage -n $< -T mxsimage $@ \
> +	$(if $(KBUILD_VERBOSE:1=), >/dev/null)

Invokation seems OK to me. Getting rid of the 'sed' call is really to my liking 
here :)

Thank you!


More information about the U-Boot mailing list