[U-Boot] [PATCH 04/11] kconfig: add basic Kconfig files

Scott Wood scottwood at freescale.com
Thu May 1 20:21:08 CEST 2014


On Thu, 2014-04-24 at 14:04 +0900, Masahiro Yamada wrote:
> +config KCONFIG_OBJDIR
> +	string
> +	option env="KCONFIG_OBJDIR"
> +
> +config BUILD_MODE
> +	string
> +	default "SPL" if $KCONFIG_OBJDIR="spl/"
> +	default "TPL" if $KCONFIG_OBJDIR="tpl/"
> +	default "Main"

Why does this need to be a string?

> +menu "General setup"
> +
> +config SPL_BUILD
> +	bool
> +	depends on BUILD_MODE="SPL" || BUILD_MODE="TPL"
> +	default y
> +
> +config TPL_BUILD
> +	bool
> +	depends on BUILD_MODE="TPL"
> +	default y

You could get rid of BUILD_MODE and just have:

config SPL_BUILD
	bool
	default y if $KCONFIG_OBJDIR="spl/"

config TPL_BUILD
	bool
	default y if $KCONFIG_OBJDIR="tpl/"
	select SPL_BUILD

-Scott




More information about the U-Boot mailing list