[U-Boot] [PATCH v5 06/15] kconfig: switch to Kconfig
Masahiro Yamada
yamada.m at jp.panasonic.com
Sun Jul 27 10:42:22 CEST 2014
Hi Simon,
On Sat, 26 Jul 2014 00:52:23 +0100
Simon Glass <sjg at chromium.org> wrote:
> > +# We want to include arch/$(ARCH)/config.mk only when include/config/auto.conf
> > +# is up-to-date. When we switch to a different board configuration, the old CONFIG
> > +# macros are still remaining in include/config/auto.conf. Without the following
> > +# check, wrong config.mk would be included leading to nasty warnings/errors.
>
> > +autoconf_is_update := $(if $(wildcard $(KCONFIG_CONFIG)),$(shell find \
>
> autoconf_is_current?
Renamed in v6.
> > +# We are migrating from board headers to Kconfig little by little.
> > +# In the interim, we use both of
> > +# - include/config/auto.conf (generated by Kconfig)
> > +# - include/autoconf.mk (used in the U-Boot conventional configuration)
> > +# The following rule creates autoconf.mk
> > +# include/config/auto.conf is grepped in order to avoid duplication of the
> > +# same CONFIG macros
> > +quiet_cmd_autoconf = GEN $@
> > + cmd_autoconf = \
> > + $(CPP) $(c_flags) -DDO_DEPS_ONLY -dM $(srctree)/include/common.h > $@.tmp && { \
> > + sed -n -f $(srctree)/tools/scripts/define2mk.sed $@.tmp | \
> > + while read line; do \
> > + if ! grep -q "$${line%=*}=" $(obj)/config/auto.conf; then \
> > + echo "$$line"; \
> > + fi \
> > + done > $@; \
>
> This seems quite inefficient. Would something using 'sort | uniq'
> work? Or 'sort | comm -3' ?
>
I think somthing like sort | comm will work.
But I did not touch this part in v6.
Please be free to send a follow-up patch to improve it.
Anyway, this code is temporary.
I think the best thing is to remove it asap.
> > +
> > +The commands "make config", "make menuconfig", etc. are used to create
> > +or modify .config file, which stores configs for Normal boot image.
>
> modify the .config file
Fixed in v6.
> > +
> > +We need to create .spl, spl/.config, tpl/.config for boards where SPL/TPL
> > +is supported. One possible solution for that is to have multiple defconfig
> > +files per board, but it would produce duplication among defconfigs.
> > +The approach chosen here is to expand the feature and support conditional
> > +definition in defconfig: The each line in defconfig has the form of:
>
> s/The/Then/ ?
Deleted 'The' in v6.
> > +
> > +This is the reverse operation of "make defconfig".
> > +If neither CONFIG_SPL nor CONFIG_TPL is defined in the .config file,
> > +it works as "make savedefconfig" in Linux Kernel: create the minimal set
> > +of config based on the .config and save it into "defconfig" file.
> > +
> > +If CONFIG_SPL or CONFIG_TPL is defined, the common lines among .config,
> > +spl/.config, tpl/.config are coalesced together and output "defconfig"
>
> Does this mean 'output to "defconfig"' ?
Yes.
Fixed in v6.
My English is not good very much.
Your close check is really appreciated. :-)
Best Regards
Masahiro Yamada
More information about the U-Boot
mailing list