[PATCH 3/5] imd: provide dummy imd_command_setenv

Lucas Stach l.stach at pengutronix.de
Wed Dec 10 01:05:07 PST 2014


Am Dienstag, den 09.12.2014, 12:05 +0100 schrieb Lucas Stach:
> If CONFIG_CMD_IMD is not set there is no imd_command_setenv in the
> barebox binary that can be linked to. Although the whole imd infrastructure
> will be removed by the linker later in the build process as soon as it
> figures out that nothing inside barebox is using it, we still have to
> provide a dummy function to keep the build going.
> 
> Fixes:
> In function `imd_command': undefined reference to `imd_command_setenv'

> Signed-off-by: Lucas Stach <l.stach at pengutronix.de>

Please don't apply this patch, it seems to cause some breakage.

Regards,
Lucas
> ---
>  include/image-metadata.h | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/include/image-metadata.h b/include/image-metadata.h
> index 34dae5ce3454..00aae6c98449 100644
> --- a/include/image-metadata.h
> +++ b/include/image-metadata.h
> @@ -112,6 +112,13 @@ static inline void imd_used(const void *unused)
>  #define IMD_USED(_name) \
>  	imd_used(&__barebox_imd_##_name)
>  
> +#ifndef CONFIG_CMD_IMD
> +int imd_command_setenv(const char *variable_name, const char *value)
> +{
> +	return -ENOSYS;
> +}
> +#endif
> +
>  #endif /* __BAREBOX__ */
>  
>  #endif /* __INCLUDE_IMAGE_METADTA_H */

-- 
Pengutronix e.K.             | Lucas Stach                 |
Industrial Linux Solutions   | http://www.pengutronix.de/  |




More information about the barebox mailing list