14 Aug, 2018
1 commit
-
This function is unused since commit 104daea149c4 ("kconfig: reference
environment variables directly and remove 'option env='").Signed-off-by: Masahiro Yamada
Acked-by: Sam Ravnborg
25 Jul, 2018
1 commit
-
file_write_dep() is called only from conf_write_autoconf().
Move it from util.c to confdata.c to make it static.
Also, rename it to conf_write_dep() since it should belong to
the group of conf_write* functions.Signed-off-by: Masahiro Yamada
29 May, 2018
1 commit
-
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', 'srctree' etc. to evaluate the compiler capability
in Kconfig.Adding '$' for symbol references is grammatically inconsistent.
Looking at the code, the symbols prefixed with 'S' are expanded by:
- conf_expand_value()
This is used to expand 'arch/$ARCH/defconfig' and 'defconfig_list'
- sym_expand_string_value()
This is used to expand strings in 'source' and 'mainmenu'All of them are fixed values independent of user configuration. So,
they can be changed into the direct expansion instead of symbols.This change makes the code much cleaner. The bounce symbols 'SRCARCH',
'ARCH', 'SUBARCH', 'KERNELVERSION' are gone.sym_init() hard-coding 'UNAME_RELEASE' is also gone. 'UNAME_RELEASE'
should be replaced with an environment variable.ARCH_DEFCONFIG is a normal symbol, so it should be simply referenced
without '$' prefix.The new syntax is addicted by Make. The variable reference needs
parentheses, like $(FOO), but you can omit them for single-letter
variables, like $F. Yet, in Makefiles, people tend to use the
parenthetical form for consistency / clarification.At this moment, only the environment variable is supported, but I will
extend the concept of 'variable' later on.The variables are expanded in the lexer so we can simplify the token
handling on the parser side.For example, the following code works.
[Example code]
config MY_TOOLCHAIN_LIST
string
default "My tools: CC=$(CC), AS=$(AS), CPP=$(CPP)"[Result]
$ make -s alldefconfig && tail -n 1 .config
CONFIG_MY_TOOLCHAIN_LIST="My tools: CC=gcc, AS=as, CPP=gcc -E"Signed-off-by: Masahiro Yamada
Reviewed-by: Kees Cook
28 May, 2018
1 commit
-
The localization support is broken and appears unused.
There is no google hits on the update-po-config target.
And there is no recent (5 years) activity related to the localization.So lets just drop this as it is no longer used.
Suggested-by: Ulf Magnusson
Suggested-by: Masahiro Yamada
Signed-off-by: Sam Ravnborg
Signed-off-by: Masahiro Yamada
26 Mar, 2018
1 commit
-
Tracking the line number by hand is error-prone since you need to
increment it in every \n matching pattern.If '%option yylineno' is set, flex defines 'yylineno' to contain the
current line number and automatically updates it each time it reads a
\n character. This is much more convenient although the lexer does
not initializes yylineno, so you need to set it to 1 each time you
start reading a new file, and restore it you go back to the previous
file.I tested this with DEBUG_PARSE, and confirmed the same dump message
was produced.I removed the perf-report option. Otherwise, I see the following
message:
%option yylineno entails a performance penalty ONLY on rules that
can match newline charactersSigned-off-by: Masahiro Yamada
01 Mar, 2018
1 commit
-
We already have xmalloc(), xcalloc(), and xrealloc((). Add xstrdup()
as well to save tedious error handling.Signed-off-by: Masahiro Yamada
10 Feb, 2018
1 commit
-
We already have xmalloc(), xcalloc(). Add xrealloc() as well
to save tedious error handling.Signed-off-by: Masahiro Yamada
21 Jan, 2018
1 commit
-
menu_end_entry() is empty and completely unused as far as I can tell:
$ git log -G menu_end_entry --oneline
a02f057 [PATCH] kconfig: improve error handling in the parser
1da177e Linux-2.6.12-rc2Last one is the initial Git commit, where menu_end_entry() is empty as
well. I couldn't find anything that redefined it on Google either.It might be a debugging helper for setting a breakpoint after each
config, menuconfig, and comment is parsed. IMO it hurts more than it
helps in that case by making the parsing code look more complicated at a
glance than it really is, and I suspect it doesn't get used much.Tested by running the Kconfiglib test suite, which indirectly verifies
that the .config files generated by the C implementation for each
defconfig file in the kernel stays the same.Signed-off-by: Ulf Magnusson
Signed-off-by: Masahiro Yamada
20 Aug, 2017
1 commit
-
It turns out that gperf-3.1 changed types in the generated code in ways
that aren't even trivially detectable without having to generate a test-file.It's just not worth using tools and libraries from clowns that don't
understand or care about compatibility. So get rid of gperf.Signed-off-by: Linus Torvalds
25 Feb, 2015
3 commits
-
Signed-off-by: Michal Marek
-
Signed-off-by: Michal Marek
-
This was originally meant for dlopen()ing a potential kconfig shared
library. The unused dlopen code has already been removed in commit
5a6f8d2b (kconfig: nuke LKC_DIRECT_LINK cruft), so let's remove the
rest. The lkc_proto.h change was made with the following sed script:sed -r 's/^P\(([^,]*), *([^,]*), *(.*)\);/\2 \1\3;/'
Plus some manual adjustments.
Signed-off-by: Michal Marek
08 Apr, 2014
1 commit
-
"make allnoconfig" exists to ease testing of minimal configurations.
Documentation/SubmitChecklist includes a note to test with allnoconfig.
This helps catch missing dependencies on common-but-not-required
functionality, which might otherwise go unnoticed.However, allnoconfig still leaves many symbols enabled, because they're
hidden behind CONFIG_EMBEDDED or CONFIG_EXPERT. For instance, allnoconfig
still has CONFIG_PRINTK and CONFIG_BLOCK enabled, so drivers don't
typically get build-tested with those disabled.To address this, introduce a new Kconfig option "allnoconfig_y", used on
symbols which only exist to hide other symbols. Set it on CONFIG_EMBEDDED
(which then selects CONFIG_EXPERT). allnoconfig will then disable all the
symbols hidden behind those.Signed-off-by: Josh Triplett
Tested-by: Paul E. McKenney
Cc: Michal Marek
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
25 Jun, 2013
1 commit
-
Because of choice-in-a-choice constructs, it can happen that not all
symbols are assigned a value during randconfig, leading in rare cases
to this situation:---8 2. B (B)
3. C (C)
choice[1-3]: 2
E/F
> 1. E (E) (NEW)
2. F (F) (NEW)
choice[1-2]: aborted!Console input/output is redirected. Run 'make oldconfig' to update
configuration.Fix this by looping in randconfig for as long as some symbol gets assigned
a value.Note: this was spotted with the USB EHCI Debug Device Gadget (USB_G_DBGP),
which uses this choice-in-a-choice construct, and exhibits this problem.
The example above is just a stripped-down minimalist test-case.Signed-off-by: "Yann E. MORIN"
16 Jun, 2013
1 commit
-
The defconfig and Kconfig combination below, which is based on 3.10-rc4
Kconfigs, resulted in several options getting set to "m" instead of "y".defconfig.choice:
---8
[yann.morin.1998@free.fr: add the resulting .config to commit log,
remove unneeded USB_GADGET from the defconfig]
Tested-by: "Yann E. MORIN"
Reviewed-by: "Yann E. MORIN"
Signed-off-by: Yann E. MORIN
20 Nov, 2012
3 commits
-
(and get them out of the noise in the audit work)
Signed-off-by: Alan Cox
Signed-off-by: Michal Marek -
Currently, the CONFIG_ prefix is hard-coded in the kconfig frontends
executables. This means that two projects that use kconfig with
different prefixes can not share the same kconfig frontends.Instead of hard-coding the prefix in the frontends, get it from the
environment, and revert back to hard-coded value if not found.Signed-off-by: "Yann E. MORIN"
Signed-off-by: Michal Marek -
Currently, we get the CONFIG_ prefix via the CONFIG_ macro, which means
the CONFIG_ prefix is hard-coded at compile time. This goes against
having a run-time defined CONFIG_ prefix.Add a function that returns the CONFIG_ prefix to use (but keep the
current hard-coded behavior, to be changed in a later patch).To avoid touching all the code that uses the CONFIG_ macro, we just
undef it, and define it to be a call to the function.Signed-off-by: "Yann E. MORIN"
Signed-off-by: Michal Marek
15 Jan, 2012
1 commit
-
Reinhard Tartler discovered a corner case of calling xfwrite() where the
length of the string is zero.Arnaud Lacombe suggested to use assertion for the corner case, as
fwrite(3) is currently used:1) in comment printers. Empty comment are not allowed.
2) in a callback passed to expr_print(), where the string printed is
either NULL OR non-empty.
3) in the lexer, auto-generated, and unused.I feel using assertion is a good solution:
1) It cleanly takes care of the above-mentioned corner case.
2) It can be easily disabled by defining NDEBUG.
3) It asserts xfwrite() is simply a wrapper for fwrite().Reported-by: Reinhard Tartler
Signed-off-by: Arnaud Lacombe
Signed-off-by: Jean Sacren
Signed-off-by: Michal Marek
30 Jul, 2011
1 commit
-
* 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6: (25 commits)
kconfig: Introduce IS_ENABLED(), IS_BUILTIN() and IS_MODULE()
xconfig: Abort close if configuration cannot be saved
kconfig: fix missing "0x" prefix from S_HEX symbol in autoconf.h
kconfig/nconf: remove useless conditionnal
kconfig/nconf: prevent segfault on empty menu
kconfig/nconf: use the generic menu_get_ext_help()
nconfig: Avoid Wunused-but-set warning
kconfig/conf: mark xfgets() private
kconfig: remove pending prototypes for kconfig_load()
kconfig/conf: add command line options' description
kconfig/conf: reduce the scope of `defconfig_file'
kconfig: use calloc() for expr allocation
kconfig: introduce specialized printer
kconfig: do not overwrite symbol direct dependency in assignment
kconfig/gconf: silent missing prototype warnings
kconfig/gconf: kill deadcode
kconfig: nuke LKC_DIRECT_LINK cruft
kconfig: nuke reference to SWIG
kconfig: add missing inclusion
kconfig: add missing inclusion
...Fix up conflicts in scripts/kconfig/Makefile
04 Jul, 2011
1 commit
02 Jul, 2011
2 commits
-
This function has not much reason to be public. In the mean time, convert
declaration from K&R C to ISO C.Signed-off-by: Arnaud Lacombe
-
Commit 5a6f8d2bd9e3392569ed6f29ea4d7210652f929b removed `kconfig_load()',
however, it missed an hidden prototypes in `lkc.h'. Fix this.Signed-off-by: Arnaud Lacombe
01 Jul, 2011
1 commit
-
Make conf_write_symbol() grammar agnostic to be able to use it from different
code path. These path pass a printer callback which will print a symbol's name
and its value in different format.conf_write_symbol()'s job become mostly only to prepare a string for the
printer. This avoid to have to pass specialized flag to generic
functionsSigned-off-by: Arnaud Lacombe
[mmarek: rebased on top of de12518 (kconfig: autogenerated config_is_xxx
macro)]
Signed-off-by: Michal Marek
10 Jun, 2011
1 commit
-
Signed-off-by: Arnaud Lacombe
07 Jun, 2011
1 commit
-
This interface is not (and has never been ?) used by any frontend, just get rid
of it.Signed-off-by: Arnaud Lacombe
11 Jan, 2011
1 commit
-
* 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6:
nconf: handle comment entries within choice/endchoice
kconfig: fix warning
kconfig: Make expr_copy() take a const argument
kconfig: simplify select-with-unmet-direct-dependency warning
kconfig: add more S_INT and S_HEX consistency checks
kconfig: fix `zconfdebug' extern declaration
kconfig/conf: merge duplicate switch's case
kconfig: fix typos
kbuild/gconf: add dummy inline for bind_textdomain_codeset()
kbuild/nconf: fix spaces damage
kconfig: nuke second argument of conf_write_symbol()
kconfig: do not define AUTOCONF_INCLUDED
kconfig: the day kconfig warns about "select"-abuse has come
15 Dec, 2010
2 commits
-
This symbol is only exist if YYDEBUG is defined.
Signed-off-by: Arnaud Lacombe
Signed-off-by: Michal Marek -
This symbols is used by gconf.
Signed-off-by: Arnaud Lacombe
Signed-off-by: Michal Marek
22 Nov, 2010
1 commit
-
This option is aimed to add the possibility to control a menu's visibility
without adding dependency to the expression to all the submenu.Signed-off-by: Arnaud Lacombe
Acked-by: Mauro Carvalho Chehab
Tested-by: Mauro Carvalho Chehab
Signed-off-by: Mauro Carvalho Chehab
20 Sep, 2010
3 commits
-
Signed-off-by: Arnaud Lacombe
Reviewed-by: Sam Ravnborg
Reviewed-by: Michal Marek -
Signed-off-by: Arnaud Lacombe
Reviewed-by: Sam Ravnborg
Reviewed-by: Michal Marek -
Signed-off-by: Arnaud Lacombe
Reviewed-by: Sam Ravnborg
Reviewed-by: Michal Marek
13 Aug, 2010
2 commits
-
This fix facilitates fgets() either it returns on success or on error or
when end of file occurs.Signed-off-by: Jean Sacren
Signed-off-by: Michal Marek -
This fix facilitates fwrite() in both confdata.c and expr.c, either it
succeeds in writing, or an error occurs, or the end of file is reached.Signed-off-by: Jean Sacren
Signed-off-by: Michal Marek
03 Aug, 2010
2 commits
-
savedefconfig will save a minimal config to a file
named "defconfig".The config symbols are saved in the same order as
they appear in the menu structure so it should
be possible to map them to the relevant menus
if desired.The implementation was tested against several minimal
configs for arm which was created using brute-force.There was one regression related to default numbers
which had their valid range further limited by another symbol.Sample:
config FOO
int "foo"
default 4config BAR
int "bar"
range 0 FOOIf FOO is set to 3 then BAR cannot take a value higher than 3.
But the current implementation will set BAR equal to 4.This is seldomly used and the final configuration is OK,
and the fix was non-trivial.
So it was documented in the code and left as is.Signed-off-by: Sam Ravnborg
Acked-by: Uwe Kleine-König
Signed-off-by: Michal Marek -
Move logic to determine default for a choice to
a separate function.
No functional changes.Signed-off-by: Sam Ravnborg
Signed-off-by: Michal Marek
02 Feb, 2010
2 commits
-
This patch was inspired by the kernel projects page, where an ncurses
replacement for menuconfig was mentioned (by Sam Ravnborg).Building on menuconfig, this patch implements a more modern look
interface using ncurses and ncurses' satellite libraries (menu, panel,
form). The implementation does not depend on lxdialog, which is
currently distributed with the kernel.Signed-off-by: Nir Tzachar
Signed-off-by: Michal Marek -
Help text for certain config options is very extensive (the text
includes the names of all other options the option in question depends
on). Long lines are not wrapped, making it impossible to see the list
without scrolling horizontally.This patch adds some logic which wraps help screen lines at word
boundaries to prevent truncating.Tested by running
ARCH=powerpc make menuconfig O=/tmp/build
which shows that the long lines are now wrapped, and
ARCH=powerpc make xconfig O=/tmp/build
to demonstrate that it still compiles and operates as expected.
Signed-off-by: Vadim Bendebury
Signed-off-by: Michal Marek
10 Jun, 2009
1 commit
-
Regardless of KCONFIG_AUTOCONFIG, the filename written as a Make target
into "include/config/auto.conf.cmd" was always the default one.Of course this doesn't make it work for the Kernel kbuild system, since
there the filename is hardcoded at several places in the Makefiles.Signed-off-by: Markus Heidelberg
Signed-off-by: Sam Ravnborg