diff mbox

[U-Boot,1/5] check-config: fix wrong comment about how to build whitelist

Message ID 1474862702-16580-2-git-send-email-yamada.masahiro@socionext.com
State Accepted
Commit 7b76daab477264644b8c2dad78ccc9602c250251
Delegated to: Tom Rini
Headers show

Commit Message

Masahiro Yamada Sept. 26, 2016, 4:04 a.m. UTC
The command suggested in this comment block is wrong; it would not
rip off CONFIG options that had already been converted to Kconfig.

Instead, we should use the scripts/build-whitelist.sh tool.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---

 scripts/check-config.sh | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

Comments

Simon Glass Sept. 27, 2016, 12:34 a.m. UTC | #1
Hi Masahiro,

On 25 September 2016 at 22:04, Masahiro Yamada
<yamada.masahiro@socionext.com> wrote:
> The command suggested in this comment block is wrong; it would not
> rip off CONFIG options that had already been converted to Kconfig.
>
> Instead, we should use the scripts/build-whitelist.sh tool.
>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> ---
>
>  scripts/check-config.sh | 9 ++-------
>  1 file changed, 2 insertions(+), 7 deletions(-)
>
> diff --git a/scripts/check-config.sh b/scripts/check-config.sh
> index 28c8fe9..6618dfb 100755
> --- a/scripts/check-config.sh
> +++ b/scripts/check-config.sh
> @@ -5,13 +5,8 @@
>  # Check that the u-boot.cfg file provided does not introduce any new
>  # ad-hoc CONFIG options
>  #
> -# You can generate the list of current ad-hoc CONFIG options (those which are
> -# not in Kconfig) with this command:
> -#
> -# export LC_ALL=C LC_COLLATE=C
> -# git grep CONFIG_ |tr ' \t' '\n\n' |sed -n 's/^\(CONFIG_[A-Z0-9_]*\).*/\1/p' \
> -#      |sort |uniq >scripts/config_whitelist.txt;
> -# unset LC_ALL LC_COLLATE
> +# Use scripts/build-whitelist.sh to generate the list of current ad-hoc
> +# CONFIG options (those which are not in Kconfig).

For me the LC setup is needed. Does it work correctly without it for
you? I found that the sorting was wrong.

>
>  # Usage
>  #    check-config.sh <path to u-boot.cfg> <path to whitelist file> <source dir>
> --
> 1.9.1
>

Regards,
Simon
Masahiro Yamada Sept. 27, 2016, 1:13 a.m. UTC | #2
Hi Simon,

2016-09-27 9:34 GMT+09:00 Simon Glass <sjg@chromium.org>:
> Hi Masahiro,
>
> On 25 September 2016 at 22:04, Masahiro Yamada
> <yamada.masahiro@socionext.com> wrote:
>> The command suggested in this comment block is wrong; it would not
>> rip off CONFIG options that had already been converted to Kconfig.
>>
>> Instead, we should use the scripts/build-whitelist.sh tool.
>>
>> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
>> ---
>>
>>  scripts/check-config.sh | 9 ++-------
>>  1 file changed, 2 insertions(+), 7 deletions(-)
>>
>> diff --git a/scripts/check-config.sh b/scripts/check-config.sh
>> index 28c8fe9..6618dfb 100755
>> --- a/scripts/check-config.sh
>> +++ b/scripts/check-config.sh
>> @@ -5,13 +5,8 @@
>>  # Check that the u-boot.cfg file provided does not introduce any new
>>  # ad-hoc CONFIG options
>>  #
>> -# You can generate the list of current ad-hoc CONFIG options (those which are
>> -# not in Kconfig) with this command:
>> -#
>> -# export LC_ALL=C LC_COLLATE=C
>> -# git grep CONFIG_ |tr ' \t' '\n\n' |sed -n 's/^\(CONFIG_[A-Z0-9_]*\).*/\1/p' \
>> -#      |sort |uniq >scripts/config_whitelist.txt;
>> -# unset LC_ALL LC_COLLATE
>> +# Use scripts/build-whitelist.sh to generate the list of current ad-hoc
>> +# CONFIG options (those which are not in Kconfig).
>
> For me the LC setup is needed. Does it work correctly without it for
> you? I found that the sorting was wrong.


I am not quite sure about this, but it worked for me.



I can see

export LC_ALL=C
export LC_COLLATE=C

in both check-config.sh and build-whitelist.sh


That's why?
Simon Glass Oct. 5, 2016, 4:50 p.m. UTC | #3
On 26 September 2016 at 19:13, Masahiro Yamada
<yamada.masahiro@socionext.com> wrote:
> Hi Simon,
>
> 2016-09-27 9:34 GMT+09:00 Simon Glass <sjg@chromium.org>:
>> Hi Masahiro,
>>
>> On 25 September 2016 at 22:04, Masahiro Yamada
>> <yamada.masahiro@socionext.com> wrote:
>>> The command suggested in this comment block is wrong; it would not
>>> rip off CONFIG options that had already been converted to Kconfig.
>>>
>>> Instead, we should use the scripts/build-whitelist.sh tool.
>>>
>>> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
>>> ---
>>>
>>>  scripts/check-config.sh | 9 ++-------
>>>  1 file changed, 2 insertions(+), 7 deletions(-)
>>>
>>> diff --git a/scripts/check-config.sh b/scripts/check-config.sh
>>> index 28c8fe9..6618dfb 100755
>>> --- a/scripts/check-config.sh
>>> +++ b/scripts/check-config.sh
>>> @@ -5,13 +5,8 @@
>>>  # Check that the u-boot.cfg file provided does not introduce any new
>>>  # ad-hoc CONFIG options
>>>  #
>>> -# You can generate the list of current ad-hoc CONFIG options (those which are
>>> -# not in Kconfig) with this command:
>>> -#
>>> -# export LC_ALL=C LC_COLLATE=C
>>> -# git grep CONFIG_ |tr ' \t' '\n\n' |sed -n 's/^\(CONFIG_[A-Z0-9_]*\).*/\1/p' \
>>> -#      |sort |uniq >scripts/config_whitelist.txt;
>>> -# unset LC_ALL LC_COLLATE
>>> +# Use scripts/build-whitelist.sh to generate the list of current ad-hoc
>>> +# CONFIG options (those which are not in Kconfig).
>>
>> For me the LC setup is needed. Does it work correctly without it for
>> you? I found that the sorting was wrong.
>
>
> I am not quite sure about this, but it worked for me.
>
>
>
> I can see
>
> export LC_ALL=C
> export LC_COLLATE=C
>
> in both check-config.sh and build-whitelist.sh
>
>
> That's why?

OK thanks. I must have fixed it and forgotten about it.

Reviewed-by: Simon Glass <sjg@chromium.org>

BTW, what do you think about updating moveconfig.py to remove things
from the whitelist as well?

Regards,
Simon
Masahiro Yamada Oct. 6, 2016, 1:41 a.m. UTC | #4
2016-10-06 1:50 GMT+09:00 Simon Glass <sjg@chromium.org>:
> BTW, what do you think about updating moveconfig.py to remove things
> from the whitelist as well?


Yeah, I was also thinking of this.
Tom Rini Oct. 8, 2016, 5:07 p.m. UTC | #5
On Mon, Sep 26, 2016 at 01:04:58PM +0900, Masahiro Yamada wrote:

> The command suggested in this comment block is wrong; it would not
> rip off CONFIG options that had already been converted to Kconfig.
> 
> Instead, we should use the scripts/build-whitelist.sh tool.
> 
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> Reviewed-by: Simon Glass <sjg@chromium.org>

Applied to u-boot/master, thanks!
diff mbox

Patch

diff --git a/scripts/check-config.sh b/scripts/check-config.sh
index 28c8fe9..6618dfb 100755
--- a/scripts/check-config.sh
+++ b/scripts/check-config.sh
@@ -5,13 +5,8 @@ 
 # Check that the u-boot.cfg file provided does not introduce any new
 # ad-hoc CONFIG options
 #
-# You can generate the list of current ad-hoc CONFIG options (those which are
-# not in Kconfig) with this command:
-#
-# export LC_ALL=C LC_COLLATE=C
-# git grep CONFIG_ |tr ' \t' '\n\n' |sed -n 's/^\(CONFIG_[A-Z0-9_]*\).*/\1/p' \
-#	|sort |uniq >scripts/config_whitelist.txt;
-# unset LC_ALL LC_COLLATE
+# Use scripts/build-whitelist.sh to generate the list of current ad-hoc
+# CONFIG options (those which are not in Kconfig).
 
 # Usage
 #    check-config.sh <path to u-boot.cfg> <path to whitelist file> <source dir>