spl: dfu: compilation fixes for spl-dfu
PATCH 1/1 spl: dfu: compilation fixes for spl-dfu
This patch fixes the compilation error common/cli_hush.c:3349: undefined reference to 'realloc_simple'
The dfu uses run_command(), it is part of cli_hush.c but defining CONFIG_HUSH_PARSER for spl-dfu causes this compilation error.
--- common/cli.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
common/cli.c +1 -1
@@ -28,7 +28,7 @@ DECLARE_GLOBAL_DATA_PTR;*/ int run_command (const char *cmd,int flag) { -#ifndef CONFIG_HUSH_PARSER +#if defined(CONFIG_SPL_DFU_SUPPORT ) || !defined(CONFIG_HUSH_PARSER )/* * cli_run_command can return 0 or 1 for success, so clean up * its result.
Signature · 1 line
1.9.1
PATCH 1/1 spl: dfu: compilation fixes for spl-dfu
Hi Ravi,
Quoted 17 lines
This patch fixes the compilation error
common/cli_hush.c:3349: undefined reference to 'realloc_simple'The dfu uses
run_command(), it is part ofcli_hush.cbut definingCONFIG_HUSH_PARSERfor spl-dfu causes this compilation error.Signed-off-by Ravi Babu <[email protected]>--- common/cli.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)common/cli.c +0
-0
common/cli.c DECLARE_GLOBAL_DATA_PTR; · line 31
Quoted 5 lines
common/cli.c +1
-1@@ -28,7 +28,7 @@ DECLARE_GLOBAL_DATA_PTR;*/ int run_command (const char *cmd,int flag) { -#ifndef CONFIG_HUSH_PARSER +#if defined(CONFIG_SPL_DFU_SUPPORT ) || !defined(CONFIG_HUSH_PARSER )
I must admit that this seems odd to me....since we should avoided adding (SPL DFU) dependency to common parser code.
Maybe some kconfig tweaks would help?
common/cli.c DECLARE_GLOBAL_DATA_PTR; · line 34
Quoted 3 lines
common/cli.c +0
-0/* * cli_run_command can return 0 or 1 for success, so clean up * its result.
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
B
PATCH 1/1 spl: dfu: compilation fixes for spl-dfu
Hi Lukasz
Quoted 11 lines
Quoted 8 lines
common/cli.c +0
-0@@ -28,7 +28,7 @@ DECLARE_GLOBAL_DATA_PTR;*/ int run_command(const char *cmd, int flag) { -#ifndef
CONFIG_HUSH_PARSER
+#ifdefined(CONFIG_SPL_DFU_SUPPORT)|| !defined(CONFIG_HUSH_PARSER)I must admit that this seems odd to me....since we should avoided adding (SPL DFU) dependency to common parser code.
Yes, I agree, or use CONFIG_SPL_BUILD.
Quoted 1 line
Maybe some kconfig tweaks would help?
You Mean, unselect CONFIG_HUSH_PARSER when SPL_DFU_SUPPORT enabled?
Regards
Ravi