[U-Boot] [PATCH] use CONFIG_CMD_HOST to enable the host command

Joe Hershberger joe.hershberger at gmail.com
Mon Apr 27 20:33:09 CEST 2015


Hi Sjoerd,

On Sun, Apr 26, 2015 at 3:29 PM, Sjoerd Simons
<sjoerd.simons at collabora.co.uk> wrote:
> Rather then building the host command depending on the configured board
> (CONFIG_SANDBOX being defined), use the more common way of enabling it
> via the board configuration.
>
> Fixes building of the env target for sandbox as config_distro_bootcmd
> failed to sanity check the configuration but couldn't find the
> pre-conditions for the host command previously.
>
> Signed-off-by: Sjoerd Simons <sjoerd.simons at collabora.co.uk>
> ---

This fixed the problem building the env target for me. Thanks!

Tested-by: Joe Hershberger <joe.hershberger at ni.com>

> Patch is against the u-boot-x86/sandbox branch
>
>  common/Makefile                 | 2 +-
>  include/config_distro_bootcmd.h | 6 +++---
>  include/configs/sandbox.h       | 2 ++
>  3 files changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/common/Makefile b/common/Makefile
> index 978c33b..40a3ec7 100644
> --- a/common/Makefile
> +++ b/common/Makefile
> @@ -152,7 +152,7 @@ obj-$(CONFIG_CMD_PXE) += cmd_pxe.o
>  obj-$(CONFIG_CMD_READ) += cmd_read.o
>  obj-$(CONFIG_CMD_REGINFO) += cmd_reginfo.o
>  obj-$(CONFIG_CMD_REISER) += cmd_reiser.o
> -obj-$(CONFIG_SANDBOX) += cmd_host.o
> +obj-$(CONFIG_CMD_HOST) += cmd_host.o
>  obj-$(CONFIG_CMD_SATA) += cmd_sata.o
>  obj-$(CONFIG_CMD_SF) += cmd_sf.o
>  obj-$(CONFIG_CMD_SCSI) += cmd_scsi.o
> diff --git a/include/config_distro_bootcmd.h b/include/config_distro_bootcmd.h
> index 3a360ca4..26ef4ca 100644
> --- a/include/config_distro_bootcmd.h
> +++ b/include/config_distro_bootcmd.h
> @@ -48,16 +48,16 @@
>  #define BOOTENV_DEV_NAME_BLKDEV(devtypeu, devtypel, instance) \
>         #devtypel #instance " "
>
> -#ifdef CONFIG_SANDBOX
> +#ifdef CONFIG_CMD_HOST
>  #define BOOTENV_SHARED_HOST    BOOTENV_SHARED_BLKDEV(host)
>  #define BOOTENV_DEV_HOST       BOOTENV_DEV_BLKDEV
>  #define BOOTENV_DEV_NAME_HOST  BOOTENV_DEV_NAME_BLKDEV
>  #else
>  #define BOOTENV_SHARED_HOST
>  #define BOOTENV_DEV_HOST \
> -       BOOT_TARGET_DEVICES_references_HOST_without_CONFIG_SANDBOX
> +       BOOT_TARGET_DEVICES_references_HOST_without_CONFIG_CMD_HOST
>  #define BOOTENV_DEV_NAME_HOST \
> -       BOOT_TARGET_DEVICES_references_HOST_without_CONFIG_SANDBOX
> +       BOOT_TARGET_DEVICES_references_HOST_without_CONFIG_CMD_HOST
>  #endif
>
>  #ifdef CONFIG_CMD_MMC
> diff --git a/include/configs/sandbox.h b/include/configs/sandbox.h
> index 3bf45a2..9394dd3 100644
> --- a/include/configs/sandbox.h
> +++ b/include/configs/sandbox.h
> @@ -26,6 +26,8 @@
>  /* Number of bits in a C 'long' on this architecture */
>  #define CONFIG_SANDBOX_BITS_PER_LONG   64
>
> +#define CONFIG_CMD_HOST

You are adding a new config, so you should add it to Kconfig instead of here.

> +
>  #define CONFIG_OF_LIBFDT
>  #define CONFIG_LMB
>  #define CONFIG_CMD_FDT

Thanks,
-Joe


More information about the U-Boot mailing list