14 Sep, 2015
1 commit
-
commit c0ddc8c745b7f89c50385fd7aa03c78dc543fa7a upstream.
In kbuild it is allowed to define objects in files named "Makefile"
and "Kbuild".
Currently localmodconfig reads objects only from "Makefile"s and misses
modules like nouveau.Link: http://lkml.kernel.org/r/1437948415-16290-1-git-send-email-richard@nod.at
Reported-and-tested-by: Leonidas Spyropoulos
Signed-off-by: Richard Weinberger
Signed-off-by: Steven Rostedt
Signed-off-by: Greg Kroah-Hartman
09 Apr, 2015
1 commit
-
Add an -s option to the various frontends and pass it when make -s is
used. Also, use $(kecho) instead of @echo in the Makefile.Signed-off-by: Michal Marek
08 Apr, 2015
1 commit
-
Use a single rule for targets handled directly by the conf program.
Signed-off-by: Michal Marek
24 Mar, 2015
6 commits
-
"scripts/kconfig/merge_config.sh && make oldconfig" works well
enough for merging local config fragments, but Kbuild currently has
the entry points only for "kvmconfig" and "tinyconfig".This commit provides the generic target for mergeconfig, so we can
manage our own config fragments easily:
put "foo.config" in arch/$(SRCARCH)/configs/ or kernel/configs/,
and then run "make foo.config".Now "make kvmconfig" is just a shorthand of "make kvm_guest.config".
Likewise, "make tinyconfig" is equivalent to
"make allnoconfig tiny.config".Signed-off-by: Masahiro Yamada
Reviewed-by: Josh Triplett
Reviewed-by: Darren Hart
Signed-off-by: Michal Marek -
The variable "MAKE" is used to store the command name that has
invoked the Makefile. (Actually, it is already set to "make"
if you run this script from a Makefile.)In this script, however, it is used to determine if Make should be
run or not. It is not what we usually expect.Signed-off-by: Masahiro Yamada
Reviewed-by: Josh Triplett
Reviewed-by: Darren Hart
Signed-off-by: Michal Marek -
It is true that we do not want to move the code too far to the
right, but something like below is not preferred:if [ "x$PREV_VAL" != "x$NEW_VAL" ] ; then
echo Value of $CFG is redefined by fragment $MERGE_FILE:
echo Previous value: $PREV_VAL
echo New value: $NEW_VAL
echo
elif [ "$WARNREDUN" = "true" ]; then
echo Value of $CFG is redundant by fragment $MERGE_FILE:
fiTo fix this, call "continue" if the "grep" command fails to find the
given CONFIG.Signed-off-by: Masahiro Yamada
Reviewed-by: Josh Triplett
Reviewed-by: Darren Hart
Signed-off-by: Michal Marek -
Kbuild always runs in $(objtree). Actually, $(objtree) is always
set to "." by the top-level Makefile.We can omit "-O $(objtree)" and "$(objtree)/".
Signed-off-by: Masahiro Yamada
Reviewed-by: Josh Triplett
Reviewed-by: Darren Hart
Signed-off-by: Michal Marek -
Currently, "make tinyconfig" does not work with "-j" option.
$ make mrproper
$ make -j8 tinyconfig
HOSTCC scripts/basic/fixdep
HOSTCC scripts/kconfig/conf.o
SHIPPED scripts/kconfig/zconf.tab.c
SHIPPED scripts/kconfig/zconf.lex.c
SHIPPED scripts/kconfig/zconf.hash.c
HOSTCC scripts/kconfig/zconf.tab.o
HOSTLD scripts/kconfig/conf
scripts/kconfig/conf --allnoconfig Kconfig
#
# configuration written to .config
#
scripts/kconfig/Makefile:122: *** You need an existing .config
for this target. Stop.
make: *** [tinyconfig] Error 2As shown above, "allnoconfig" has created the .config file before
mergeconfig is called, but Make still raises a false alarm because
of some sort of race condition.We can fix this issue by moving the error check to the shell script.
Anyway, scripts/kconfig/merge_config.sh always requires an existing
.config as a base file. It is reasonable to check its existence in
the shell script.Signed-off-by: Masahiro Yamada
Reviewed-by: Josh Triplett
Reviewed-by: Darren Hart
Signed-off-by: Michal Marek -
If "make kvmconfig" is run with "-j" option, a warning message,
"jobserver unavailable: using -j1. Add `+' to parent make rule.",
is displayed.$ make -s defconfig
*** Default configuration is based on 'x86_64_defconfig'
#
# configuration written to .config
#
$ make -j8 kvmconfig
Using ./.config as base
Merging ./arch/x86/configs/kvm_guest.config
[ snip ]
#
# merged configuration written to ./.config (needs make)
#
make[2]: warning: jobserver unavailable: using -j1. Add `+' to
parent make rule.
scripts/kconfig/conf --oldconfig Kconfig
[ snip ]
#
# configuration written to .config
#Signed-off-by: Masahiro Yamada
Reviewed-by: Josh Triplett
Reviewed-by: Darren Hart
Signed-off-by: Michal Marek
25 Feb, 2015
4 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
-
Signed-off-by: Masahiro Yamada
Signed-off-by: Michal Marek
27 Jan, 2015
1 commit
-
Although on some systems va_end is a no-op, it is good practice
to use va_end, especially since the manual states:"Each invocation of va_start() must be matched by a corresponding
invocation of va_end() in the same function."Signed-off-by: Colin Ian King
Signed-off-by: Michal Marek
08 Jan, 2015
1 commit
-
Two or more arguments are always expected. Show usage and exit if
given less.Signed-off-by: Olof Johansson
Signed-off-by: Michal Marek
21 Dec, 2014
1 commit
-
Pull kbuild updates from Michal Marek:
"Here are the kbuild changes for v3.19-rc1:- Cleanups and deduplication in the main Makefile and
scripts/Makefile.*
- Sort the output of *config targets in make help
- Old is always removed to avoid a surprise during
bisecting
- Warning fix in kconfig"* 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
kbuild: remove redundant -rR flag of hdr-inst
kbuild: Fix make help- on powerpc
kbuild: Automatically remove stale file
kconfig: Fix warning "‘jump’ may be used uninitialized"
Makefile: sort list of defconfig targets in make help output
kbuild: Remove duplicate $(cmd) definition in Makefile.clean
kbuild: collect shorthands into scripts/Kbuild.include
20 Dec, 2014
1 commit
-
Pull perf fixes and cleanups from Ingo Molnar:
"A kernel fix plus mostly tooling fixes, but also some tooling
restructuring and cleanups"* 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (39 commits)
perf: Fix building warning on ARM 32
perf symbols: Fix use after free in filename__read_build_id
perf evlist: Use roundup_pow_of_two
tools: Adopt roundup_pow_of_two
perf tools: Make the mmap length autotuning more robust
tools: Adopt rounddown_pow_of_two and deps
tools: Adopt fls_long and deps
tools: Move bitops.h from tools/perf/util to tools/
tools: Introduce asm-generic/bitops.h
tools lib: Move asm-generic/bitops/find.h code to tools/include and tools/lib
tools: Whitespace prep patches for moving bitops.h
tools: Move code originally from asm-generic/atomic.h into tools/include/asm-generic/
tools: Move code originally from linux/log2.h to tools/include/linux/
tools: Move __ffs implementation to tools/include/asm-generic/bitops/__ffs.h
perf evlist: Do not use hard coded value for a mmap_pages default
perf trace: Let the perf_evlist__mmap autosize the number of pages to use
perf evlist: Improve the strerror_mmap method
perf evlist: Clarify sterror_mmap variable names
perf evlist: Fixup brown paper bag on "hint" for --mmap-pages cmdline arg
perf trace: Provide a better explanation when mmap fails
...
09 Dec, 2014
1 commit
-
The calloc() and xcalloc() functions takes @nmemb first and then @size. Fix all w/
pattern "calloc\s*(\s*sizeof".Signed-off-by: Arjun Sreedharan
Cc: "Yann E. MORIN"
Cc: Ingo Molnar
Cc: Paul Mackerras
Cc: Peter Zijlstra
Link: http://lkml.kernel.org/r/1417866043-1877-1-git-send-email-arjun024@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo
28 Nov, 2014
1 commit
-
Warning:
In file included from scripts/kconfig/zconf.tab.c:2537:0:
scripts/kconfig/menu.c: In function ‘get_symbol_str’:
scripts/kconfig/menu.c:590:18: warning: ‘jump’ may be used uninitialized in this function [-Wmaybe-uninitialized]
jump->offset = strlen(r->s);Simplifies the test logic because (head && local) means (jump != 0)
and makes GCC happy when checking if the jump pointer was initialized.Signed-off-by: Peter Kümmel
Signed-off-by: Michal Marek
20 Nov, 2014
1 commit
-
There's no such thing as "list_struct".
Signed-off-by: Andrey Utkin
Acked-by: Steven Rostedt
Acked-by: Mauro Carvalho Chehab
Acked-by: Paul E. McKenney
Acked-by: Alex Deucher
Signed-off-by: Jiri Kosina
14 Oct, 2014
1 commit
-
Pull kbuild changes from Michal Marek:
- fix for handling dependencies of *-objs targets by Masahiro Yamada
- lots of cleanups in the kbuild machinery, also by Masahiro
- fixes for the kconfig build to use an UTF-8 capable ncurses library
if possible and to build on not-so-standard installs
- some more minor fixes* 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
kbuild: Do not reference *-n variables in the Makefile
kbuild: simplify build, clean, modbuiltin shorthands
kbuild: arm: Do not define "comma" twice
kbuild: remove obj-n and lib-n handling
kbuild: remove unnecessary variable initializaions
kbuild: remove unnecessary "obj- := dummy.o" trick
kbuild: handle C=... and M=... after entering into build directory
kbuild: use $(Q) for sub-make target
kbuild: fake the "Entering directory ..." message more simply
kconfig/lxdialog: get ncurses CFLAGS with pkg-config
kconfig: nconfig: fix multi-byte UTF handling
kconfig: lxdialog: fix spelling
kbuild: Make scripts executable
kbuild: remove redundant clean-files from scripts/kconfig/Makefile
kbuild: refactor script/kconfig/Makefile
kbuild: handle the dependency of multi-objs hostprogs appropriately
kbuild: handle multi-objs dependency appropriately
23 Sep, 2014
1 commit
-
This makes "make menuconfig" also work on systems where ncurses is not
installed in a standard location (such as on NixOS).This patch changes ccflags() so that it tries pkg-config first, and only
if pkg-config fails does it go back to the fallback/manual checks. This
is the same algorithm that ldflags() already uses.Signed-off-by: Bjørn Forsman
Signed-off-by: Michal Marek
22 Aug, 2014
2 commits
-
Currently, Kconfig descriptions that use multi-byte UTF-8 characters
(such as MTD_NAND_CAFE) will have their menu entries dropped from the
'make nconfig' ncurses menu, and all subsequent entries in the same
window will be omitted. This seems to be due to the ncurses 'menu'
library, which does not traditionally handle UTF-8 >8-bit characters
properly.The ncursesw library ('w' is for "wide") is written to handle these
UTF-8 characters, and is practically a drop-in replacement at the source
level. Use it by default, if available.Link: https://bugzilla.kernel.org/show_bug.cgi?id=43067
Signed-off-by: Brian Norris
Cc: "Yann E. MORIN"
Cc: Martin Walch
Acked-by: Sam Ravnborg
Signed-off-by: Michal Marek -
Signed-off-by: Brian Norris
Cc: "Yann E. MORIN"
Signed-off-by: Michal Marek
20 Aug, 2014
1 commit
-
The Makefiles call the respective interpreter explicitly, but this makes
it easier to use the scripts manually.Signed-off-by: Michal Marek
19 Aug, 2014
2 commits
-
Now mconf, qconf, gconf, nconf are always added to hostprogs-y.
Files added to hostprogs-y are removed by "make clean".Signed-off-by: Masahiro Yamada
Signed-off-by: Michal Marek -
Now it is harmless to add all host programs to hostprogs-y.
Signed-off-by: Masahiro Yamada
Signed-off-by: Michal Marek
09 Aug, 2014
2 commits
-
Since commit 5d2acfc7b974bbd3858b4dd3f2cdc6362dd8843a ("kconfig: make
allnoconfig disable options behind EMBEDDED and EXPERT") in 3.15-rc1,
"make allnoconfig" disables every possible config option.However, a few configuration options (CC_OPTIMIZE_FOR_SIZE,
OPTIMIZE_INLINING) produce a smaller kernel when turned on, and a few
choices exist (compression, highmem, allocator) for which a non-default
option produces a smaller kernel.Add a "tinyconfig" option, which starts from allnoconfig and then sets
these options to configure the tiniest possible kernel. This provides a
better baseline for embedded systems or efforts to reduce kernel size.Signed-off-by: Josh Triplett
-
The new mergeconfig helper makes it easier to add other partial
configurations similar to kvmconfig. Architecture-independent portions
of those partial configurations should go in
kernel/configs/${name}.config, and architecture-dependent portions
should go in arch/${arch}/configs/${name}.config.Based on a patch by Luis R. Rodriguez .
Originally-Signed-off-by: Luis R. RodriguezModified to make the helper name more general than just virtualization,
support architecture-dependent and architecture-independent partial
configurations, move the helper and kvmconfig to
scripts/kconfig/Makefile, and factor out more of the common file path.Signed-off-by: Josh Triplett
13 Jun, 2014
1 commit
-
Pull kbuild misc updates from Michal Marek:
"This is the non-critical part of kbuild for v3.16-rc1:
- make deb-pkg can do s390x and arm64
- new patterns in scripts/tags.sh
- scripts/tags.sh skips userspace tools' sources (which sometimes
have copies of kernel structures) and symlinks
- improvements to the objdiff tool
- two new coccinelle patches
- other minor fixes"* 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
scripts: objdiff: support directories for the augument of record command
scripts: objdiff: fix a comment
scripts: objdiff: change the extension of disassembly from .o to .dis
scripts: objdiff: improve path flexibility for record command
scripts: objdiff: remove unnecessary code
scripts: objdiff: direct error messages to stderr
scripts: objdiff: get the path to .tmp_objdiff more simply
deb-pkg: Add automatic support for s390x architecture
coccicheck: Add unneeded return variable test
kbuild: Fix a typo in documentation
kbuild: trivial - use tabs for code indent where possible
kbuild: trivial - remove trailing empty lines
coccinelle: Check for missing NULL terminators in of_device_id tables
scripts/tags.sh: ignore symlink'ed source files
scripts/tags.sh: add regular expression replacement pattern for memcg
builddeb: add arm64 in the supported architectures
builddeb: use $OBJCOPY variable instead of objcopy
scripts/tags.sh: ignore code of user space tools
scripts/tags.sh: add pattern for DEFINE_HASHTABLE
.gitignore: ignore Module.symvers in all directories
10 Jun, 2014
3 commits
-
Signed-off-by: Masahiro Yamada
Signed-off-by: Michal Marek -
The directory include/config is used only for
silentoldconfig, localmodconfig, localyesconfig.Signed-off-by: Masahiro Yamada
Signed-off-by: Michal Marek -
Signed-off-by: Masahiro Yamada
30 Apr, 2014
1 commit
-
Signed-off-by: Masahiro Yamada
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
21 Dec, 2013
1 commit
-
Currently localmodconfig will miss dependencies from the default option.
For example:config FOO
default y if BAR || ZOOIf FOO is needed for a module and is set to '=m', and so are BAR or ZOO,
localmodconfig will not see that BOO or ZOO are also needed for the foo
module, and will incorrectly disable them.Link: http://lkml.kernel.org/r/20131218175137.162937350@goodmis.org
Signed-off-by: Steven Rostedt
09 Oct, 2013
4 commits
-
Currently the qconf program invoked by 'make xconfig' stores GUI
settings in the file ~/.config/Unknown\ Organization.conf. This name
is apparently generated by the QSettings class when no organisation
or application name are specified.This is obviously not a sensible filename (nor does it seem sensible
that these QSettings parameters are optional!). Pass the names
'kernel.org' and 'qconf', resuling in the filename
~/.config/kernel.org/qconf.conf.Signed-off-by: Ben Hutchings
Reviewed-by: "Yann E. MORIN"
Tested-by: "Yann E. MORIN"
Signed-off-by: "Yann E. MORIN" -
The struct gstr has a capacity that may differ from the actual string length.
However, a string manipulation in the function search_conf made the assumption
that it is the same, which led to messing up some search results, especially
when the content of the gstr in use had not yet reached at least 63 chars.Signed-off-by: Martin Walch
Acked-by: Wang YanQing
Acked-by: Benjamin Poirier
Reviewed-by: "Yann E. MORIN"
Signed-off-by: "Yann E. MORIN" -
The definition ws [ \n\t] is not used anywhere. Drop it to avoid confusion.
As it is a dead definition, any changes in the resulting code generated by
flex would be surprising (actually testing this showed that there are really
no changes). So, there is no need to touch the existing zconf.lex.c_shipped.Signed-off-by: Martin Walch
Reviewed-by: "Yann E. MORIN"
Signed-off-by: "Yann E. MORIN: -
Each symbol must have exactly one type assigned. However, if a symbol happens
to have two different types assigned at runtime, a warning is printed and the
first type is preserved while the second type is being ignored.The warning message says
type of redefined from to
which may be misleading as it may create the impression that the second type
replaces the first type.This patch clarifies this by changing the warning to
ignoring type redefinition of from to
Signed-off-by: Martin Walch
Acked-by: Wang YanQing
Reviewed-by: "Yann E. MORIN"
Signed-off-by: "Yann E. MORIN"