[U-Boot] [PATCH 08/21] tools: moveconfig: do not rely on type and default value given by users

Masahiro Yamada yamada.masahiro at socionext.com
Mon Jun 13 00:20:10 CEST 2016


2016-05-24 23:27 GMT+09:00 Joe Hershberger <joe.hershberger at gmail.com>:
> On Thu, May 19, 2016 at 1:51 AM, Masahiro Yamada
> <yamada.masahiro at socionext.com> wrote:
>> Commit 96464badc794 ("moveconfig: Always run savedefconfig on the
>> moved config") changed the work flow of this tool a lot from the
>> original intention when this tool was designed first.
>>
>> Since then, before running this tool, users must edit the Kconfig to
>> add the menu entries for the configs they are moving.  It means users
>> had already specified the type and the default value for each CONFIG
>> via the Kconfig entries.  Nevertheless, users are still required to
>> dictate the same type and the default value in each line of the input
>> file.  So, my idea here is to deprecate the latter.
>>
>> Before moving forward with it, there is one thing worth mentioning;
>> since the savedefconfig re-sync was introduced, there is a case this
>> tool can not handle correctly.
>>
>> Let's say we are moving CONFIG_FOO from board headers to Kconfig,
>> and we want to make it "default y" option.  First, we are supposed
>> to create an entry:
>>
>>   config FOO
>>           bool "foo"
>>           default y
>>
>> CONFIG_FOO=y will appear in the .config for every processed defconfig.
>> It will be duplicated to the include/autoconf.mk as well unless the
>> board explicitly #undef's it.  Therefore, the defconfig without
>> "#define CONFIG_FOO" or "#undef CONFIG_FOO" that should be converted
>> to "unset" would be misconverted to "=y".
>
> I solved this in a patch I sent long ago, but it was never applied.

Apology.
I rephrased this git-log.
I mentioned that you were already trying to fix this problem a year ago.




-- 
Best Regards
Masahiro Yamada


More information about the U-Boot mailing list