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

B, Ravi ravibabu at ti.com
Thu Apr 20 12:49:40 UTC 2017


Hi Lukasz

>>> 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. 

>The CONFIG_HUSH_PARSER is enabled in dra7xx_evm_defconfig by commit: adad96e: configs: Re-sync HUSH options Hence CONFIG_HUSH_PARSER included for both SPL and u-boot as well. 
>The cli.c is common for both SPL & u-boot.

Since by default HUSH_PARSER is defined for all *_evm_defconfigs, which affect for both SPL/U-Boot.
There is no way to select simple_cli() in run_command(). I feel this would be simple solution to use CONFIG_SPL_BUILD.
Even any Kconfig tweaks also would endup in similar way.

Let me know any alternate option.

Another point: 
The SPL_DFU_SUPPORT is depends on SPL_RAM_SUPPORT. I will send separate patch to add the dependency in Kconfig selection that SPL_DFU_SUPPORT is selected only if SPL_RAM_SUPPORT is selected.

Thanks & Regards
Ravi



More information about the U-Boot mailing list