[ANNOUNCE] Kconfiglib GUI menuconfig

2019-05-04 Thread Ulf Magnusson
Hello, Kconfiglib (https://github.com/ulfalizer/Kconfiglib) now has a Tkinter-based guiconfig.py in addition to the curses-based menuconfig.py. It has been tested on Linux, Windows, and macOS. See https://github.com/ulfalizer/Kconfiglib#menuconfig-interfaces for a screenshot (with show-all mode o

Re: [ANN] init-kconfig - easy way to embrace Linux's kconfig

2018-10-05 Thread Ulf Magnusson
On Thu, Oct 4, 2018 at 10:03 PM Luis Chamberlain wrote: > > Every now and then a project is born, and they decide to use Linux's > kconfig to enable configuration of their project. As it stands we *know* > kconfig is now used in at least over 12 different projects [0]. I myself > added kconfig to

[ANNOUNCE] Kconfiglib menuconfig and documentation generation updates

2018-09-27 Thread Ulf Magnusson
Hello, Here's two small Kconfiglib (https://github.com/ulfalizer/kconfiglib) updates. First, I've made it a lot easier to try out the menuconfig implementation on the kernel. This will work now, in the kernel root: $ git clone https://github.com/ulfalizer/Kconfiglib.git $ git am Kconfiglib/m

Re: [PATCH v4 03/31] kconfig: reference environment variables directly and remove 'option env='

2018-05-26 Thread Ulf Magnusson
On Thu, May 24, 2018 at 6:45 AM, Masahiro Yamada wrote: > 2018-05-21 20:06 GMT+09:00 Ulf Magnusson : > >>> >>> static char *__expand_string(const char **str, bool (*is_end)(const char *)) >>> { >>> const char *in, *prev_in, *p; >>>

Re: [ANNOUNCE] Kconfiglib menuconfig implementation

2018-05-22 Thread Ulf Magnusson
On Mon, May 21, 2018 at 5:47 AM, Randy Dunlap wrote: > On 05/20/2018 08:33 PM, Ulf Magnusson wrote: >> On Mon, May 21, 2018 at 4:45 AM, Randy Dunlap wrote: >>> On 05/19/2018 09:47 PM, Ulf Magnusson wrote: >>>> On Sun, May 20, 2018 at 6:03 AM, Randy Dunlap >>

Re: [PATCH v4 07/31] kconfig: add built-in function support

2018-05-21 Thread Ulf Magnusson
On Tue, May 22, 2018 at 6:50 AM, Ulf Magnusson wrote: > On Tue, May 22, 2018 at 5:11 AM, Masahiro Yamada > wrote: >> 2018-05-22 0:10 GMT+09:00 Ulf Magnusson : >>> On Mon, May 21, 2018 at 4:32 PM, Ulf Magnusson wrote: >>>> On Mon, May 21, 2018 at 4:23 PM, Ulf Ma

Re: [PATCH v4 07/31] kconfig: add built-in function support

2018-05-21 Thread Ulf Magnusson
On Tue, May 22, 2018 at 5:11 AM, Masahiro Yamada wrote: > 2018-05-22 0:10 GMT+09:00 Ulf Magnusson : >> On Mon, May 21, 2018 at 4:32 PM, Ulf Magnusson wrote: >>> On Mon, May 21, 2018 at 4:23 PM, Ulf Magnusson wrote: >>>> On Sun, May 20, 2018 at 4:50 PM, Sam R

Re: [PATCH v4 07/31] kconfig: add built-in function support

2018-05-21 Thread Ulf Magnusson
On Mon, May 21, 2018 at 4:32 PM, Ulf Magnusson wrote: > On Mon, May 21, 2018 at 4:23 PM, Ulf Magnusson wrote: >> On Sun, May 20, 2018 at 4:50 PM, Sam Ravnborg wrote: >>> Will the following be equal: >>> >>> $(foo,abc,$(x),$(y)) >>> $

Re: [PATCH v4 07/31] kconfig: add built-in function support

2018-05-21 Thread Ulf Magnusson
On Mon, May 21, 2018 at 4:23 PM, Ulf Magnusson wrote: > On Sun, May 20, 2018 at 4:50 PM, Sam Ravnborg wrote: >> Will the following be equal: >> >> $(foo,abc,$(x),$(y)) >> $(foo, abc, $(x), $(y)) >> >> make is rather annoying as space

Re: [PATCH v4 07/31] kconfig: add built-in function support

2018-05-21 Thread Ulf Magnusson
On Sun, May 20, 2018 at 4:50 PM, Sam Ravnborg wrote: > Will the following be equal: > > $(foo,abc,$(x),$(y)) > $(foo, abc, $(x), $(y)) > > make is rather annoying as space is significant, but there seems no good > reason > for kconfig to inheritate this. > So unless there are good

Re: [PATCH v4 03/31] kconfig: reference environment variables directly and remove 'option env='

2018-05-21 Thread Ulf Magnusson
On Mon, May 21, 2018 at 1:06 PM, Ulf Magnusson wrote: > On Mon, May 21, 2018 at 6:43 AM, Masahiro Yamada > wrote: >> Hi. >> >> >> >> 2018-05-21 0:46 GMT+09:00 Ulf Magnusson : >> >>> s/environments/environment variables/ >> >>

Re: [PATCH v4 03/31] kconfig: reference environment variables directly and remove 'option env='

2018-05-21 Thread Ulf Magnusson
On Mon, May 21, 2018 at 6:43 AM, Masahiro Yamada wrote: > Hi. > > > > 2018-05-21 0:46 GMT+09:00 Ulf Magnusson : > >> s/environments/environment variables/ > > Will fix. > > >> >>> +* They will be written out to include/config/auto.conf.

Re: [ANNOUNCE] Kconfiglib menuconfig implementation

2018-05-20 Thread Ulf Magnusson
On Mon, May 21, 2018 at 4:45 AM, Randy Dunlap wrote: > On 05/19/2018 09:47 PM, Ulf Magnusson wrote: >> On Sun, May 20, 2018 at 6:03 AM, Randy Dunlap wrote: >>> On 05/19/2018 08:45 PM, Randy Dunlap wrote: >>>> On 05/08/2018 09:59 AM, Ulf Magnusson wrote: >&

Re: [PATCH v4 03/31] kconfig: reference environment variables directly and remove 'option env='

2018-05-20 Thread Ulf Magnusson
On Thu, May 17, 2018 at 8:16 AM, Masahiro Yamada wrote: > To get access to environment variables, Kconfig needs to define a > symbol using "option env=" syntax. It is tedious to add a symbol entry > for each environment variable given that we need to define much more > such as 'CC', 'AS', 'srctre

Re: [ANNOUNCE] Kconfiglib menuconfig implementation

2018-05-20 Thread Ulf Magnusson
On Sun, May 20, 2018 at 6:03 AM, Randy Dunlap wrote: > On 05/19/2018 08:45 PM, Randy Dunlap wrote: >> On 05/08/2018 09:59 AM, Ulf Magnusson wrote: >>> Hello, >>> >>> I've added incremental search for jumping directly to a symbol now. >>> Regul

Re: [ANNOUNCE] Kconfiglib menuconfig implementation

2018-05-19 Thread Ulf Magnusson
On Sun, May 20, 2018 at 5:45 AM, Randy Dunlap wrote: > On 05/08/2018 09:59 AM, Ulf Magnusson wrote: >> Hello, >> >> I've added incremental search for jumping directly to a symbol now. >> Regular expressions are supported as well. >>

Re: [ANNOUNCE] Kconfiglib menuconfig implementation

2018-05-19 Thread Ulf Magnusson
On Sun, May 20, 2018 at 6:24 AM, Ulf Magnusson wrote: > On Sun, May 20, 2018 at 5:51 AM, Randy Dunlap wrote: >> On 05/19/2018 08:45 PM, Randy Dunlap wrote: >>> On 05/08/2018 09:59 AM, Ulf Magnusson wrote: >>>> Hello, >>>> >>>> I've ad

Re: [ANNOUNCE] Kconfiglib menuconfig implementation

2018-05-19 Thread Ulf Magnusson
On Sun, May 20, 2018 at 6:47 AM, Ulf Magnusson wrote: > On Sun, May 20, 2018 at 6:03 AM, Randy Dunlap wrote: >> On 05/19/2018 08:45 PM, Randy Dunlap wrote: >>> On 05/08/2018 09:59 AM, Ulf Magnusson wrote: >>>> Hello, >>>> >>>> I've ad

Re: [ANNOUNCE] Kconfiglib menuconfig implementation

2018-05-19 Thread Ulf Magnusson
On Sun, May 20, 2018 at 6:03 AM, Randy Dunlap wrote: > On 05/19/2018 08:45 PM, Randy Dunlap wrote: >> On 05/08/2018 09:59 AM, Ulf Magnusson wrote: >>> Hello, >>> >>> I've added incremental search for jumping directly to a symbol now. >>> Regul

Re: [ANNOUNCE] Kconfiglib menuconfig implementation

2018-05-19 Thread Ulf Magnusson
On Sun, May 20, 2018 at 5:51 AM, Randy Dunlap wrote: > On 05/19/2018 08:45 PM, Randy Dunlap wrote: >> On 05/08/2018 09:59 AM, Ulf Magnusson wrote: >>> Hello, >>> >>> I've added incremental search for jumping directly to a symbol now. >>> Regul

Re: [ANNOUNCE] Kconfiglib menuconfig implementation

2018-05-14 Thread Ulf Magnusson
On Mon, May 14, 2018 at 6:58 PM, Pavel Machek wrote: > Hi! > >> > config CAN_PEAK_PCIEFD >> > depends on PCI >> > tristate "PEAK-System PCAN-PCIe FD cards" >> > ---help--- >> > This driver adds support for the PEAK-System PCI Express FD >> > CAN-FD cards

Re: [ANNOUNCE] Kconfiglib menuconfig implementation

2018-05-10 Thread Ulf Magnusson
On Tue, May 8, 2018 at 6:59 PM, Ulf Magnusson wrote: > Hello, > > I've added incremental search for jumping directly to a symbol now. > Regular expressions are supported as well. > > Some screenshots below: > > https://raw.githubusercontent.com/ulfalizer/Kconfiglib

Re: [ANNOUNCE] Kconfiglib menuconfig implementation

2018-05-08 Thread Ulf Magnusson
Hello, I've added incremental search for jumping directly to a symbol now. Regular expressions are supported as well. Some screenshots below: https://raw.githubusercontent.com/ulfalizer/Kconfiglib/screenshots/screenshots/ss10.png https://raw.githubusercontent.com/ulfalizer/Kconfiglib/screenshots

Re: [ANNOUNCE] Kconfiglib menuconfig implementation

2018-05-03 Thread Ulf Magnusson
On Thu, May 3, 2018 at 10:28 PM, Randy Dunlap wrote: > Hi, > > (with new kconfiglib.py and menuconfig.py) > > Thanks for the fixes. > > If I use "LC_CTYPE=C.UTF-8" then I get the down arrows in the bottom colored > bar. Without that, I get an upside-down T (that is 193, 0xc1, line drawing > chara

Re: [ANNOUNCE] Kconfiglib menuconfig implementation

2018-05-03 Thread Ulf Magnusson
On Thu, May 3, 2018 at 10:31 PM, Randy Dunlap wrote: > One minor nit (bikeshed?): I'm not crazy about "make scriptconfig". :) > > thanks, > -- > ~Randy To be honest, I just do ARCH=x86 SRCARCH=x86 KERNELVERSION=`make kernelversion` \ Kconfiglib/menuconfig.py Should probably add a

Re: [ANNOUNCE] Kconfiglib menuconfig implementation

2018-05-02 Thread Ulf Magnusson
On Tue, May 1, 2018 at 8:52 PM, Randy Dunlap wrote: > On 05/01/2018 11:13 AM, Randy Dunlap wrote: >> On 05/01/2018 10:56 AM, Randy Dunlap wrote: >>> On 04/30/2018 05:57 PM, Ulf Magnusson wrote: >>>> Hello, >>>> >>>> Kconfiglib (https://gi

Re: [ANNOUNCE] Kconfiglib menuconfig implementation

2018-05-01 Thread Ulf Magnusson
On Tue, May 1, 2018 at 9:47 PM, Ulf Magnusson wrote: > On Tue, May 1, 2018 at 9:12 PM, Ulf Magnusson wrote: >> On Tue, May 1, 2018 at 7:56 PM, Randy Dunlap wrote: >>> On 04/30/2018 05:57 PM, Ulf Magnusson wrote: >>>> Hello, >>>> >>>> Kconfi

Re: [ANNOUNCE] Kconfiglib menuconfig implementation

2018-05-01 Thread Ulf Magnusson
On Tue, May 1, 2018 at 9:12 PM, Ulf Magnusson wrote: > On Tue, May 1, 2018 at 7:56 PM, Randy Dunlap wrote: >> On 04/30/2018 05:57 PM, Ulf Magnusson wrote: >>> Hello, >>> >>> Kconfiglib (https://github.com/ulfalizer/Kconfiglib) now has a >>> termi

Re: [ANNOUNCE] Kconfiglib menuconfig implementation

2018-05-01 Thread Ulf Magnusson
On Tue, May 1, 2018 at 8:52 PM, Randy Dunlap wrote: > On 05/01/2018 11:13 AM, Randy Dunlap wrote: >> On 05/01/2018 10:56 AM, Randy Dunlap wrote: >>> On 04/30/2018 05:57 PM, Ulf Magnusson wrote: >>>> Hello, >>>> >>>> Kconfiglib (https://gi

Re: [ANNOUNCE] Kconfiglib menuconfig implementation

2018-05-01 Thread Ulf Magnusson
On Tue, May 1, 2018 at 7:56 PM, Randy Dunlap wrote: > On 04/30/2018 05:57 PM, Ulf Magnusson wrote: >> Hello, >> >> Kconfiglib (https://github.com/ulfalizer/Kconfiglib) now has a >> terminal menuconfig implementation, implemented in plain curses >> (which

[ANNOUNCE] Kconfiglib menuconfig implementation

2018-04-30 Thread Ulf Magnusson
Hello, Kconfiglib (https://github.com/ulfalizer/Kconfiglib) now has a terminal menuconfig implementation, implemented in plain curses (which is in the Python standard library). The interface should feel familiar to people used to mconf. It has some features that mconf lacks: - Seamless resizin

Re: [PATCH 17/30] Documentation: kconfig: document a new Kconfig macro language

2018-04-18 Thread Ulf Magnusson
On Tue, Apr 17, 2018 at 5:07 PM, Masahiro Yamada wrote: > 2018-04-15 17:08 GMT+09:00 Ulf Magnusson : >> On Fri, Apr 13, 2018 at 7:06 AM, Masahiro Yamada >> wrote: >>> Add a document for the macro language introduced to Kconfig. >>> >>> The motivation o

Re: [PATCH 17/30] Documentation: kconfig: document a new Kconfig macro language

2018-04-15 Thread Ulf Magnusson
On Fri, Apr 13, 2018 at 7:06 AM, Masahiro Yamada wrote: > Add a document for the macro language introduced to Kconfig. > > The motivation of this work is to move the compiler option tests to > Kconfig from Makefile. A number of kernel features require the > compiler support. Enabling such featur

Re: [PATCH 08/30] kconfig: add built-in function support

2018-04-15 Thread Ulf Magnusson
On Fri, Apr 13, 2018 at 7:06 AM, Masahiro Yamada wrote: > This commit adds a new concept 'function' to do more text processing > in Kconfig. > > A function call looks like this: > > $(function arg1, arg2, arg3, ...) > > This commit adds the basic infrastructure to expand functions. > Change the

Re: [PATCH 20/30] kconfig: add basic helper macros to scripts/Kconfig.include

2018-04-15 Thread Ulf Magnusson
ewed-by: Kees Cook > Reviewed-by: Ulf Magnusson > --- > > Changes in v3: > - Move helpers to scripts/Kconfig.include > > Changes in v2: None > > Kconfig | 2 ++ > MAINTAINERS | 1 + > scripts/Kconfig.include | 17 + > 3

Re: [PATCH v2 09/21] kconfig: add 'macro' keyword to support user-defined function

2018-03-31 Thread Ulf Magnusson
On Sun, Apr 1, 2018 at 8:05 AM, Ulf Magnusson wrote: > On Tue, Mar 27, 2018 at 7:29 AM, Masahiro Yamada > wrote: >> Now, we got a basic ability to test compiler capability in Kconfig. >> >> config CC_HAS_STACKPROTECTOR >> def_bool $(shell (($CC -Werror -fsta

Re: [PATCH v2 10/21] kconfig: add 'success' and 'cc-option' macros

2018-03-31 Thread Ulf Magnusson
is supported, n otherwise > +macro cc-option $(success $CC -Werror $(1) -c -x c /dev/null -o /dev/null) > + > config CONSTRUCTORS > bool > depends on !UML > -- > 2.7.4 > Reviewed-by: Ulf Magnusson Some other tests (e.g. scripts/*-stack-protector.sh) also pass

Re: [PATCH v2 09/21] kconfig: add 'macro' keyword to support user-defined function

2018-03-31 Thread Ulf Magnusson
On Tue, Mar 27, 2018 at 7:29 AM, Masahiro Yamada wrote: > Now, we got a basic ability to test compiler capability in Kconfig. > > config CC_HAS_STACKPROTECTOR > def_bool $(shell (($CC -Werror -fstack-protector -c -x c /dev/null -o > /dev/null) && echo y) || echo n) > > This works, but it

Re: [PATCH v2 08/21] kconfig: replace $UNAME_RELEASE with function call

2018-03-31 Thread Ulf Magnusson
On Tue, Mar 27, 2018 at 7:29 AM, Masahiro Yamada wrote: > Now that 'shell' function is supported, this can be self-contained in > Kconfig. > > Signed-off-by: Masahiro Yamada Reviewed-by: Ulf Magnusson

Re: [PATCH v2 07/21] kconfig: add function support and implement 'shell' function

2018-03-31 Thread Ulf Magnusson
On Tue, Mar 27, 2018 at 7:29 AM, Masahiro Yamada wrote: > This commit adds a new concept 'function' to do more text processing > in Kconfig. > > A function call looks like this: > > $(function arg1, arg2, arg3, ...) > > (Actually, this syntax was inspired by make.) > > Real examples will look li

Re: [PATCH v2 06/21] kconfig: remove string expansion for mainmenu after yyparse()

2018-03-31 Thread Ulf Magnusson
main menus during parsing") can go away. > > Signed-off-by: Masahiro Yamada Reviewed-by: Ulf Magnusson

Re: [PATCH v2 05/21] kconfig: remove string expansion in file_lookup()

2018-03-31 Thread Ulf Magnusson
up: > if (!strcmp(name, file->name)) { > > Signed-off-by: Masahiro Yamada s/environments/environment variables/ Reviewed-by: Ulf Magnusson

Re: [PATCH v2 04/21] kconfig: reference environments directly and remove 'option env=' syntax

2018-03-31 Thread Ulf Magnusson
On Sun, Apr 1, 2018 at 4:27 AM, Ulf Magnusson wrote: > > AFAICS, we only need the following functionality: > > 1. Record referenced environment variables along with their value > > 2. Go through all the recorded environment variables and write > dependency information

Re: [PATCH v2 04/21] kconfig: reference environments directly and remove 'option env=' syntax

2018-03-31 Thread Ulf Magnusson
Here's a more in-depth review: On Tue, Mar 27, 2018 at 7:29 AM, Masahiro Yamada wrote: > To get an environment value, Kconfig needs to define a symbol using > "option env=" syntax. It is tedious to add a config entry for each > environment given that we need more environments such as 'CC', 'AS',

Re: [PATCH v2 04/21] kconfig: reference environments directly and remove 'option env=' syntax

2018-03-29 Thread Ulf Magnusson
On Thu, Mar 29, 2018 at 4:56 AM, Ulf Magnusson wrote: > On Thu, Mar 29, 2018 at 4:19 AM, Ulf Magnusson wrote: >> I've been kinda busy lately, so that's why I disappeared. >> >> I'll try to go over this patchset in more detail over the weekend. >> &g

Re: [PATCH v2 04/21] kconfig: reference environments directly and remove 'option env=' syntax

2018-03-28 Thread Ulf Magnusson
On Thu, Mar 29, 2018 at 4:19 AM, Ulf Magnusson wrote: > I've been kinda busy lately, so that's why I disappeared. > > I'll try to go over this patchset in more detail over the weekend. > > On Tue, Mar 27, 2018 at 7:29 AM, Masahiro Yamada > wrote: >> To get

Re: [PATCH v2 07/21] kconfig: add function support and implement 'shell' function

2018-03-28 Thread Ulf Magnusson
On Tue, Mar 27, 2018 at 7:29 AM, Masahiro Yamada wrote: > This commit adds a new concept 'function' to do more text processing > in Kconfig. > > A function call looks like this: > > $(function arg1, arg2, arg3, ...) > > (Actually, this syntax was inspired by make.) > > Real examples will look li

Re: [PATCH v2 04/21] kconfig: reference environments directly and remove 'option env=' syntax

2018-03-28 Thread Ulf Magnusson
I've been kinda busy lately, so that's why I disappeared. I'll try to go over this patchset in more detail over the weekend. On Tue, Mar 27, 2018 at 7:29 AM, Masahiro Yamada wrote: > To get an environment value, Kconfig needs to define a symbol using > "option env=" syntax. It is tedious to add

Re: [PATCH 0/3] Improve and extend checkpatch.pl Kconfig help text checks

2018-03-05 Thread Ulf Magnusson
On Sat, Feb 24, 2018 at 2:53 PM, Masahiro Yamada wrote: > 2018-02-23 10:30 GMT+09:00 Ulf Magnusson : >> On Fri, Feb 16, 2018 at 10:14 PM, Joe Perches wrote: >>> On Fri, 2018-02-16 at 21:22 +0100, Ulf Magnusson wrote: >>>> Hello, >>>> >>>> Th

Re: [PATCH] scripts/kconfig: replace single character strcat() appends

2018-03-03 Thread Ulf Magnusson
On Sat, Mar 3, 2018 at 7:14 PM, Ulf Magnusson wrote: > On Sat, Mar 3, 2018 at 12:12 AM, Joey Pabalinas > wrote: >> On Fri, Mar 02, 2018 at 02:44:53PM +0100, Ulf Magnusson wrote: >>> Not sure this is an improvement. Zeroing the bytes after the initial >>> null te

Re: [PATCH] scripts/kconfig: replace single character strcat() appends

2018-03-03 Thread Ulf Magnusson
On Sat, Mar 3, 2018 at 12:12 AM, Joey Pabalinas wrote: > On Fri, Mar 02, 2018 at 02:44:53PM +0100, Ulf Magnusson wrote: >> Not sure this is an improvement. Zeroing the bytes after the initial >> null terminator is redundant, and the explicit '\0' makes it clearer to >&

Re: [PATCH v2 09/11] kconfig: unittest: test randconfig for choice in choice

2018-03-03 Thread Ulf Magnusson
On Fri, Mar 2, 2018 at 10:29 PM, Luis R. Rodriguez wrote: > > > On Fri, Mar 2, 2018, 3:14 AM Ulf Magnusson wrote: >> >> On Fri, Mar 2, 2018 at 5:31 AM, Masahiro Yamada >> > This is complicated usage, but it is still used in the real world; >> > drivers/usb

Re: [PATCH] scripts/kconfig: replace single character strcat() appends

2018-03-02 Thread Ulf Magnusson
On Thu, Mar 01, 2018 at 09:44:24PM -1000, Joey Pabalinas wrote: > Convert strcat() calls which only append single characters > to the end of res into simpler (and most likely cheaper) > single assignment statements. > > Signed-off-by: Joey Pabalinas > > 1 file changed, 9 insertions(+), 10 delet

Re: [PATCH v2 09/11] kconfig: unittest: test randconfig for choice in choice

2018-03-02 Thread Ulf Magnusson
ts/rand_nested_choice/expected_stdout1 > b/scripts/kconfig/tests/rand_nested_choice/expected_stdout1 > new file mode 100644 > index 000..37ab295 > --- /dev/null > +++ b/scripts/kconfig/tests/rand_nested_choice/expected_stdout1 > @@ -0,0 +1,4 @@ > +# CONFIG_A is not set > +CONFIG_B=y > +CONFIG_C=y > +# CONFIG_D is not set > diff --git a/scripts/kconfig/tests/rand_nested_choice/expected_stdout2 > b/scripts/kconfig/tests/rand_nested_choice/expected_stdout2 > new file mode 100644 > index 000..849ff47 > --- /dev/null > +++ b/scripts/kconfig/tests/rand_nested_choice/expected_stdout2 > @@ -0,0 +1,5 @@ > +# CONFIG_A is not set > +CONFIG_B=y > +# CONFIG_C is not set > +CONFIG_D=y > +CONFIG_E=y > -- > 2.7.4 > Reviewed-by: Ulf Magnusson Cheers, Ulf

Re: [PATCH v2 08/11] kconfig: unittest: test defconfig when two choices interact

2018-03-02 Thread Ulf Magnusson
> +Related Linux commit: fbe98bb9ed3dae23e320c6b113e35f129538d14a > +""" > + > + > +def test(conf): > +assert conf.defconfig('defconfig') == 0 > +assert conf.config_contains('expected_config') > diff --git a/scripts/kconfig/tests/inter_c

Re: [PATCH] kconfig: fix line number in recursive inclusion error message

2018-03-02 Thread Ulf Magnusson
'%s:%d'\n", > - iter->name, iter->lineno-1); > + iter = current_file; > + do { > iter = iter->parent; > - } > -

Re: [PATCH 00/23] kconfig: move compiler capability tests to Kconfig

2018-03-02 Thread Ulf Magnusson
On Fri, Mar 02, 2018 at 10:03:26AM +0100, Ulf Magnusson wrote: > On Fri, Mar 02, 2018 at 02:50:39PM +0900, Masahiro Yamada wrote: > > 2018-02-22 6:39 GMT+09:00 Ulf Magnusson : > > > On Wed, Feb 21, 2018 at 09:57:03PM +0900, Masahiro Yamada wrote: > > >> 2018-02-21

Re: [PATCH 00/23] kconfig: move compiler capability tests to Kconfig

2018-03-02 Thread Ulf Magnusson
On Fri, Mar 02, 2018 at 02:50:39PM +0900, Masahiro Yamada wrote: > 2018-02-22 6:39 GMT+09:00 Ulf Magnusson : > > On Wed, Feb 21, 2018 at 09:57:03PM +0900, Masahiro Yamada wrote: > >> 2018-02-21 19:52 GMT+09:00 Arnd Bergmann : > >> > On Wed, Feb 21, 2018 at 11:20 AM,

Re: [PATCH 04/23] kconfig: set SYMBOL_AUTO to the symbol marked with defconfig_list

2018-03-01 Thread Ulf Magnusson
onfig/menu.c >> @@ -212,6 +212,7 @@ void menu_add_option(int token, char *arg) >> sym_defconfig_list = current_entry->sym; >> else if (sym_defconfig_list != current_entry->sym) >> zconf_error("trying to redefine defconfig symbol"); >> + sym_defconfig_list->flags |= SYMBOL_AUTO; >> break; >> case T_OPT_ENV: >> prop_add_env(arg); >> -- >> 2.7.4 >> >> -- >> To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in >> the body of a message to majord...@vger.kernel.org >> More majordomo info at http://vger.kernel.org/majordomo-info.html > > > > -- > Best Regards > Masahiro Yamada Seems reasonable to me. Reviewed-by: Ulf Magnusson Cheers, Ulf

Re: [PATCH] kconfig: remove redundant streamline_config.pl prerequisite

2018-03-01 Thread Ulf Magnusson
On Thu, Mar 1, 2018 at 3:39 PM, Masahiro Yamada wrote: > 2018-03-01 20:18 GMT+09:00 Ulf Magnusson : >> The local{yes,mod}config targets currently have streamline_config.pl as >> a prerequisite. This is redundant, because streamline_config.pl is a >> checked-in file

Re: [PATCH v3 2/2] kconfig: rename silentoldconfig to syncconfig

2018-03-01 Thread Ulf Magnusson
onfig: > @@ -583,7 +583,7 @@ int main(int ac, char **av) > } > break; > case savedefconfig: > - case silentoldconfig: > + case syncconfig: > case oldaskconfig: > case oldconfig: > case listnewconfig: > @@ -667,7 +667,7 @@ int main(int ac, char **av) > /* fall through */ > case oldconfig: > case listnewconfig: > - case silentoldconfig: > + case syncconfig: > /* Update until a loop caused no more changes */ > do { > conf_cnt = 0; > @@ -680,7 +680,7 @@ int main(int ac, char **av) > } > > if (sync_kconfig) { > - /* silentoldconfig is used during the build so we shall > update autoconf. > + /* syncconfig is used during the build so we shall update > autoconf. > * All other commands are only used to generate a config. > */ > if (conf_get_changed() && conf_write(NULL)) { > -- > 2.7.4 > Reviewed-by: Ulf Magnusson Cheers, Ulf

[PATCH] kconfig: remove redundant streamline_config.pl prerequisite

2018-03-01 Thread Ulf Magnusson
: Ulf Magnusson --- scripts/kconfig/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile index 1f74336d4e23..58be52cb464d 100644 --- a/scripts/kconfig/Makefile +++ b/scripts/kconfig/Makefile @@ -77,9 +77,9

Re: [PATCH v2 6/6] kconfig: rename silentoldconfig to syncconfig

2018-02-27 Thread Ulf Magnusson
On Wed, Feb 28, 2018 at 6:41 AM, Ulf Magnusson wrote: > On Wed, Feb 28, 2018 at 09:15:26AM +0900, Masahiro Yamada wrote: >> As commit cedd55d49dee ("kconfig: Remove silentoldconfig from help >> and docs; fix kconfig/conf's help") mentioned, 'silentoldconfig&

Re: [PATCH v2 6/6] kconfig: rename silentoldconfig to syncconfig

2018-02-27 Thread Ulf Magnusson
On Wed, Feb 28, 2018 at 09:15:26AM +0900, Masahiro Yamada wrote: > As commit cedd55d49dee ("kconfig: Remove silentoldconfig from help > and docs; fix kconfig/conf's help") mentioned, 'silentoldconfig' is a > historical misnomer. That commit removed it from help and docs since > it is an internal i

Re: [PATCH v2 5/6] kconfig: invoke oldconfig instead of silentoldconfig from local*config

2018-02-27 Thread Ulf Magnusson
fig $(Kconfig); \ Ditto here. > fi > $(Q)rm -f .tmp.config > > -- > 2.7.4 > I'm not an expert on the Makefiles, but seems reasonable to me. Reviewed-by: Ulf Magnusson Cheers, Ulf

Re: [PATCH 0/3] Improve and extend checkpatch.pl Kconfig help text checks

2018-02-22 Thread Ulf Magnusson
On Fri, Feb 16, 2018 at 10:14 PM, Joe Perches wrote: > On Fri, 2018-02-16 at 21:22 +0100, Ulf Magnusson wrote: >> Hello, >> >> This patchset contains some improvements for the Kconfig help text check in >> scripts/checkconfig.pl: > > Seems sensible enough to

Re: [PATCH v2 20/20] x86/PCI: VMD: Fix malformed Kconfig default

2018-02-22 Thread Ulf Magnusson
On Fri, Feb 23, 2018 at 12:00 AM, Bjorn Helgaas wrote: > On Tue, Feb 06, 2018 at 11:11:06PM +0100, Ulf Magnusson wrote: >> 'default N' should be 'default n', though they happen to have the same >> effect here, due to undefined symbols (N in this case) eva

Re: [PATCH 00/23] kconfig: move compiler capability tests to Kconfig

2018-02-21 Thread Ulf Magnusson
:38 AM, Masahiro Yamada > >>> wrote: > >>>> 2018-02-20 0:18 GMT+09:00 Ulf Magnusson : > >> > >> Let me clarify my concern. > >> > >> When we test the compiler flag, is there a case > >> where a particular flag depends on -m{

Re: [PATCH 11/23] kconfig: add 'shell-stdout' function

2018-02-21 Thread Ulf Magnusson
On Wed, Feb 21, 2018 at 01:59:59PM +0900, Masahiro Yamada wrote: > 2018-02-20 3:01 GMT+09:00 Linus Torvalds : > > On Mon, Feb 19, 2018 at 9:44 AM, Linus Torvalds > > wrote: > >> > >> I do like your "success"/"stdout" more than "shell"/"shell-stdout", > >> because with that naming I don't get the f

Re: [PATCH] kconfig: Print reverse dependencies in groups

2018-02-21 Thread Ulf Magnusson
On Wed, Feb 21, 2018 at 12:17 PM, Petr Vorel wrote: > Hi Masahiro, > >> > Signed-off-by: Masahiro Yamada >> Acked-by: Petr Vorel > Well, I'm not really the one to ack anything here, so please: > Reviewed-by: Petr Vorel > > Kind regards, > Petr Looks go

Re: [PATCH] kconfig: Don't leak choice names during parsing

2018-02-20 Thread Ulf Magnusson
CE, NULL, NULL); > + free($2); > printd(DEBUG_PARSE, "%s:%d:choice\n", zconf_curname(), > zconf_lineno()); > }; > > -- > 2.7.4 > Reviewed-by: Ulf Magnusson Only place I've seen named choices in practice is in the esp-idf project. Not sure what they're using them for. They were handy for writing tests too. :P Cheers, Ulf

Re: [PATCH 07/23] kconfig: add function support and implement 'shell' function

2018-02-19 Thread Ulf Magnusson
On Mon, Feb 19, 2018 at 09:06:55PM +0100, Ulf Magnusson wrote: > On Mon, Feb 19, 2018 at 6:50 PM, Ulf Magnusson wrote: > > On Tue, Feb 20, 2018 at 12:57:13AM +0900, Masahiro Yamada wrote: > >> 2018-02-18 1:16 GMT+09:00 Ulf Magnusson : > >> > On Sat, Feb 17, 2018

Re: [PATCH 07/23] kconfig: add function support and implement 'shell' function

2018-02-19 Thread Ulf Magnusson
On Mon, Feb 19, 2018 at 6:50 PM, Ulf Magnusson wrote: > On Tue, Feb 20, 2018 at 12:57:13AM +0900, Masahiro Yamada wrote: >> 2018-02-18 1:16 GMT+09:00 Ulf Magnusson : >> > On Sat, Feb 17, 2018 at 03:38:35AM +0900, Masahiro Yamada wrote: >> >> This commit adds a new

Re: [PATCH 11/23] kconfig: add 'shell-stdout' function

2018-02-19 Thread Ulf Magnusson
On Mon, Feb 19, 2018 at 10:01:49AM -0800, Linus Torvalds wrote: > On Mon, Feb 19, 2018 at 9:44 AM, Linus Torvalds > wrote: > > > > I do like your "success"/"stdout" more than "shell"/"shell-stdout", > > because with that naming I don't get the feeling that one should > > subsume the other. > > Hm

Re: [PATCH 07/23] kconfig: add function support and implement 'shell' function

2018-02-19 Thread Ulf Magnusson
On Tue, Feb 20, 2018 at 12:57:13AM +0900, Masahiro Yamada wrote: > 2018-02-18 1:16 GMT+09:00 Ulf Magnusson : > > On Sat, Feb 17, 2018 at 03:38:35AM +0900, Masahiro Yamada wrote: > >> This commit adds a new concept 'function' to Kconfig. A function call > >>

Re: [PATCH 10/20] lib/Kconfig: Remove leftover select of GENERIC_IO

2018-02-19 Thread Ulf Magnusson
On Mon, Feb 19, 2018 at 4:48 PM, Rob Herring wrote: > On Sun, Feb 4, 2018 at 7:21 PM, Ulf Magnusson wrote: >> GENERIC_IO was removed by commit 9de8da47742b ("kconfig: kill off >> GENERIC_IO option"), but HAS_IOMEM still selects it. >> >> Remove th

Re: [PATCH 00/23] kconfig: move compiler capability tests to Kconfig

2018-02-19 Thread Ulf Magnusson
Hello, On Sun, Feb 18, 2018 at 11:13 PM, Sam Ravnborg wrote: > Hi Masahiro. > > On Sat, Feb 17, 2018 at 03:38:28AM +0900, Masahiro Yamada wrote: >> I brushed up the implementation in this version. >> >> In the previous RFC, CC_HAS_ was described by using 'option shell=', >> like this: >> >> confi

Re: [PATCH 11/23] kconfig: add 'shell-stdout' function

2018-02-18 Thread Ulf Magnusson
On Fri, Feb 16, 2018 at 11:17:52AM -0800, Linus Torvalds wrote: > On Fri, Feb 16, 2018 at 10:38 AM, Masahiro Yamada > wrote: > > This is the second built-in function, which retrieves the first line > > of stdout from the given shell command. > > This is the only part I really don't much like in y

Re: [PATCH v2] Makefile: Fix lying comment re. silentoldconfig

2018-02-18 Thread Ulf Magnusson
On Mon, Feb 19, 2018 at 12:37 AM, Masahiro Yamada wrote: > 2018-02-13 16:58 GMT+09:00 Ulf Magnusson : >> The comment above the silentoldconfig invocation is outdated. >> 'make oldconfig' updates just .config and doesn't touch the >> include/config/ tree. &g

Re: [PATCH 06/23] kconfig: reference environments directly and remove 'option env=' syntax

2018-02-18 Thread Ulf Magnusson
On Sat, Feb 17, 2018 at 03:38:34AM +0900, Masahiro Yamada wrote: > To get an environment value, Kconfig needs to define a symbol using > "option env=" syntax. It is tedious to add a config entry for each > environment given that we need more environments such as 'CC', 'AS', > 'srctree' etc. to eva

Re: [PATCH 07/23] kconfig: add function support and implement 'shell' function

2018-02-17 Thread Ulf Magnusson
On Sat, Feb 17, 2018 at 03:38:35AM +0900, Masahiro Yamada wrote: > This commit adds a new concept 'function' to Kconfig. A function call > resembles a variable reference with arguments, and looks like this: > > $(function arg1, arg2, arg3, ...) > > (Actually, this syntax was inspired by Makefi

Re: [PATCH 08/23] kconfig: add 'macro' keyword to support user-defined function

2018-02-16 Thread Ulf Magnusson
On Fri, Feb 16, 2018 at 11:44:25PM -0500, Nicolas Pitre wrote: > On Sat, 17 Feb 2018, Ulf Magnusson wrote: > > > On Sat, Feb 17, 2018 at 3:30 AM, Nicolas Pitre wrote: > > > On Sat, 17 Feb 2018, Ulf Magnusson wrote: > > > > > >> On Fri, Feb 16, 201

Re: [PATCH 08/23] kconfig: add 'macro' keyword to support user-defined function

2018-02-16 Thread Ulf Magnusson
On Sat, Feb 17, 2018 at 3:30 AM, Nicolas Pitre wrote: > On Sat, 17 Feb 2018, Ulf Magnusson wrote: > >> On Fri, Feb 16, 2018 at 02:49:31PM -0500, Nicolas Pitre wrote: >> > On Sat, 17 Feb 2018, Masahiro Yamada wrote: >> > >> > > Now, we got a basic abil

Re: [PATCH 08/23] kconfig: add 'macro' keyword to support user-defined function

2018-02-16 Thread Ulf Magnusson
On Fri, Feb 16, 2018 at 02:49:31PM -0500, Nicolas Pitre wrote: > On Sat, 17 Feb 2018, Masahiro Yamada wrote: > > > Now, we got a basic ability to test compiler capability in Kconfig. > > > > config CC_HAS_STACKPROTECTOR > > bool > > default $(shell $CC -Werror -fstack-protector -c

[PATCH 2/3] checkpatch: kconfig: check help texts for menuconfig and choice

2018-02-16 Thread Ulf Magnusson
#x27;if', 'endif', 'menu', 'endmenu', 'endchoice', and 'source' as ending a symbol/choice definition. Signed-off-by: Ulf Magnusson --- scripts/checkpatch.pl | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/s

[PATCH 3/3] checkpatch: kconfig: prefer 'help' over '---help---'

2018-02-16 Thread Ulf Magnusson
---help---'. Since commit c2264564df3d ("kconfig: warn of unhandled characters in Kconfig commands"), '---help---' is a proper keyword and can only appear in that form. Prior to that commit, '---help---' working was more of a syntactic quirk. Signed-off-by: Ulf Magnuss

[PATCH 1/3] checkpatch: kconfig: recognize more prompts when checking help texts

2018-02-16 Thread Ulf Magnusson
The check for a missing or short help text only considers symbols with a prompt, but doesn't recognize any of the following as a prompt: bool 'foo' tristate 'foo' prompt "foo" prompt 'foo' Make the check recog

[PATCH 0/3] Improve and extend checkpatch.pl Kconfig help text checks

2018-02-16 Thread Ulf Magnusson
heckpatch may be able to mechanically convert to the typical style using --fix or --fix-inplace. Kconfig.test_help_check has style problems, please review. NOTE: If any of the errors are false positives, please report them to the maintain

[PATCH] video: fbdev: kconfig: Add help text to FB_I810_I2C

2018-02-13 Thread Ulf Magnusson
The FB_I810_I2C symbol previously had a blank help text, which was removed in e9829ac4e5fd ("video: fbdev: kconfig: Remove blank help text"). Give it a proper help text, derived from commit 74f6ae84b23 ("[PATCH] i810fb: Add > i2c/DDC support"). Signed-off-by: Ulf Magnusson

Re: Linux 4.16-rc1: regression bisected, Debian kernel package tool make-kpkg stalls indefinitely during kernel build due to commit "kconfig: remove check_stdin()"

2018-02-13 Thread Ulf Magnusson
On Tue, Feb 13, 2018 at 1:35 PM, Ulf Magnusson wrote: > On Tue, Feb 13, 2018 at 12:33:24PM +0100, Ulf Magnusson wrote: >> On Tue, Feb 13, 2018 at 11:00:49AM +0100, Sander Eikelenboom wrote: >> > On 13/02/18 05:09, Masahiro Yamada wrote: >> > > 2018-02-13

Re: Linux 4.16-rc1: regression bisected, Debian kernel package tool make-kpkg stalls indefinitely during kernel build due to commit "kconfig: remove check_stdin()"

2018-02-13 Thread Ulf Magnusson
On Tue, Feb 13, 2018 at 12:33:24PM +0100, Ulf Magnusson wrote: > On Tue, Feb 13, 2018 at 11:00:49AM +0100, Sander Eikelenboom wrote: > > On 13/02/18 05:09, Masahiro Yamada wrote: > > > 2018-02-13 12:00 GMT+09:00 Woody Suwalski : > > >> Sander Eikelenb

Re: Linux 4.16-rc1: regression bisected, Debian kernel package tool make-kpkg stalls indefinitely during kernel build due to commit "kconfig: remove check_stdin()"

2018-02-13 Thread Ulf Magnusson
rm -f .config; touch .config > >>>$ yes "" | make silentoldconfig > stdout > >>>make[1]: *** [silentoldconfig] Error 1 > >>>make: *** [silentoldconfig] Error 2 > >>>$ tail -n 4 stdout > >>>

Re: [RFC PATCH 4/7] kconfig: support new special property shell=

2018-02-13 Thread Ulf Magnusson
On Tue, Feb 13, 2018 at 01:10:34AM +0900, Masahiro Yamada wrote: > 2018-02-13 0:46 GMT+09:00 Kees Cook : > > On Mon, Feb 12, 2018 at 2:44 AM, Masahiro Yamada > > wrote: > >> Linus said: > >> > >>> But yes, I also reacted to your earlier " It can't silently rewrite it > >>> to _REGULAR because the

[PATCH v2] Makefile: Fix lying comment re. silentoldconfig

2018-02-12 Thread Ulf Magnusson
hat though, since include/config/auto.conf would still be out of date re. .config if the operation fails. Cop out and leave the prerequisite in for now. Signed-off-by: Ulf Magnusson --- Changes in v2: include/config/auto.conf depends on .config, not the other way around, so swap them in some places

[PATCH] Makefile: Fix lying comment re. silentoldconfig

2018-02-12 Thread Ulf Magnusson
hat though, since .config would still be out of date re. include/config/auto.conf if the operation fails. Cop out and leave the prerequisite in for now though. Signed-off-by: Ulf Magnusson --- Makefile | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Makefile b/Ma

Re: [RFC PATCH 4/7] kconfig: support new special property shell=

2018-02-12 Thread Ulf Magnusson
On Mon, Feb 12, 2018 at 4:22 PM, Masahiro Yamada wrote: > 2018-02-12 23:53 GMT+09:00 Ulf Magnusson : >> On Mon, Feb 12, 2018 at 3:21 PM, Masahiro Yamada >> wrote: >>> 'syncconfig' in a more proper name >> >> Wonder if --update-config-files-for-buil

Re: [RFC PATCH 4/7] kconfig: support new special property shell=

2018-02-12 Thread Ulf Magnusson
what kind of stuff it deals with. :P Cheers, Ulf On Mon, Feb 12, 2018 at 3:21 PM, Masahiro Yamada wrote: > 2018-02-12 21:54 GMT+09:00 Ulf Magnusson : >> On Sun, Feb 11, 2018 at 09:42:09PM +0100, Ulf Magnusson wrote: >>> On Sun, Feb 11, 2018 at 9:29 PM, Ulf Magnusson wrote: >

Re: [RFC PATCH 4/7] kconfig: support new special property shell=

2018-02-12 Thread Ulf Magnusson
On Mon, Feb 12, 2018 at 3:23 PM, Masahiro Yamada wrote: > 2018-02-12 23:21 GMT+09:00 Masahiro Yamada : >> 2018-02-12 21:54 GMT+09:00 Ulf Magnusson : >>> On Sun, Feb 11, 2018 at 09:42:09PM +0100, Ulf Magnusson wrote: >>>> On Sun, Feb 11, 2018 at 9:29 PM, Ulf Magnusson

Re: [RFC PATCH 4/7] kconfig: support new special property shell=

2018-02-12 Thread Ulf Magnusson
On Mon, Feb 12, 2018 at 3:21 PM, Masahiro Yamada wrote: > 2018-02-12 21:54 GMT+09:00 Ulf Magnusson : >> On Sun, Feb 11, 2018 at 09:42:09PM +0100, Ulf Magnusson wrote: >>> On Sun, Feb 11, 2018 at 9:29 PM, Ulf Magnusson wrote: >>> > On Sun, Feb 11, 2018 at 6:56 PM, Ke

Re: [RFC PATCH 4/7] kconfig: support new special property shell=

2018-02-12 Thread Ulf Magnusson
On Mon, Feb 12, 2018 at 2:53 PM, Masahiro Yamada wrote: > 2018-02-12 20:44 GMT+09:00 Ulf Magnusson : > >>> >>> I think Linus's comment was dismissed here. >>> >>> >>> Linus said: >>> >>>> But yes, I also reacted to your

  1   2   3   4   >