[U-Boot] [PATCH] spl: dfu: compilation fixes for spl-dfu

Lukasz Majewski lukma at denx.de
Wed Apr 19 10:53:55 UTC 2017


Hi Ravi,

Please add u-boot mailing list to CC, when sending patches.

> This patch fixes the compilation error
> common/cli_hush.c:3349: undefined reference to 'realloc_simple'
> 
> The dfu does not depend on HUSH_PARSER.
> The dfu, fastboot uses run_command(), it is
> part of cli.c and use cli_simple_run_command().
> 
> Signed-off-by: Ravi Babu <ravibabu at ti.com>
> ---
>  common/Makefile | 1 -
>  common/cli.c    | 2 +-
>  2 files changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/common/Makefile b/common/Makefile
> index bcd2486..dc5cb1d 100644
> --- a/common/Makefile
> +++ b/common/Makefile
> @@ -90,7 +90,6 @@ endif # !CONFIG_SPL_BUILD
>  
>  ifdef CONFIG_SPL_BUILD
>  obj-$(CONFIG_SPL_DFU_SUPPORT) += dfu.o
> -obj-$(CONFIG_SPL_DFU_SUPPORT) += cli_hush.o
>  obj-$(CONFIG_SPL_HASH_SUPPORT) += hash.o
>  obj-$(CONFIG_ENV_IS_IN_FLASH) += env_flash.o
>  obj-$(CONFIG_SPL_YMODEM_SUPPORT) += xyzModem.o
> diff --git a/common/cli.c b/common/cli.c
> index a433ef2..3dd4c2b 100644
> --- a/common/cli.c
> +++ b/common/cli.c
> @@ -28,7 +28,7 @@ DECLARE_GLOBAL_DATA_PTR;
>   */
>  int run_command(const char *cmd, int flag)
>  {
> -#ifndef CONFIG_HUSH_PARSER
> +#if defined(CONFIG_SPL_BUILD) || !defined(CONFIG_HUSH_PARSER)
>  	/*
>  	 * cli_run_command can return 0 or 1 for success, so clean up
>  	 * its result.

So for the initial support of the DFU in SPL you did not needed the
HUSH parser.

What is the motivation to enable it now? Enabling the HUSH in SPL
should make the binary even bigger - hence it is counterintuitive. 


Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de


More information about the U-Boot mailing list