summaryrefslogtreecommitdiffstats
path: root/scripts
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'misc' of ↵Linus Torvalds2013-09-074-24/+178
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild Pull misc kbuild updates from Michal Marek: "In the kbuild misc branch, I have: - make rpm-pkg updates, most importantly the rpm package now calls /sbin/installkernel - make deb-pkg: debuginfo split, correct kernel image path for parisc, mips and powerpc and a couple more minor fixes - New coccinelle check" * 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild: scripts/checkkconfigsymbols.sh: replace echo -e with printf Provide version number for Debian firmware package coccinelle: replace 0/1 with false/true in functions returning bool deb-pkg: add a hook argument to match debian hooks parameters deb-pkg: fix installed image path on parisc, mips and powerpc deb-pkg: split debug symbols in their own package deb-pkg: use KCONFIG_CONFIG instead of .config file directly rpm-pkg: add generation of kernel-devel rpm-pkg: install firmware files in kernel relative directory rpm-pkg: add %post section to create initramfs and grub hooks
| * scripts/checkkconfigsymbols.sh: replace echo -e with printfMax Filippov2013-08-281-2/+2
| | | | | | | | | | | | | | | | | | -e is a non-standard echo option, echo output is implementation-dependent when it is used. Replace echo -e with printf as suggested by POSIX echo manual. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
| * Provide version number for Debian firmware packageHeinrich Schuchardt2013-08-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | scripts/package/builddeb is used to create Debian packages. Currently the firmware package always gets the same version number irrespective of the Kernel version. The paths inside the firmware package depend on the Kernel version. With the patch supplied the Kernel version becomes part of the Debian firmware package number. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Cc: Ben Hutchings <ben@decadent.org.uk> Acked-by: maximilian attems <max@stro.at> Signed-off-by: Michal Marek <mmarek@suse.cz>
| * coccinelle: replace 0/1 with false/true in functions returning boolRasmus Villemoes2013-08-131-0/+58
| | | | | | | | | | | | | | | | | | This semantic patch replaces "return {0,1};" with "return {false,true};" in functions returning bool. Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk> Acked-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Michal Marek <mmarek@suse.cz>
| * deb-pkg: add a hook argument to match debian hooks parametersAnisse Astier2013-07-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | We now provide the installed image path to the kernel hooks. This should allow the package to better integrate with debian hooks, and should not be too disruptive of hooks supporting only one parameter. Signed-off-by: Anisse Astier <anisse@astier.eu> Reviewed-by: Ben Hutchings <ben@decadent.org.uk> Acked-by: maximilian attems <max@stro.at> Signed-off-by: Michal Marek <mmarek@suse.cz>
| * deb-pkg: fix installed image path on parisc, mips and powerpcAnisse Astier2013-07-241-7/+20
| | | | | | | | | | | | Signed-off-by: Anisse Astier <anisse@astier.eu> Reviewed-by: Ben Hutchings <ben@decadent.org.uk> Signed-off-by: Michal Marek <mmarek@suse.cz>
| * deb-pkg: split debug symbols in their own packageAnisse Astier2013-07-241-1/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This can reduce almost 3 times the size of the linux-image package, while keeping the debug symbols available for this particular build, in their own package. This mimics the way kernels are built in debian, ubuntu, or with make-kpkg, and comes at the price of a small slowdown in the building of packages. Signed-off-by: Anisse Astier <anisse@astier.eu> Cc: Ben Hutchings <ben@decadent.org.uk> Acked-by: maximilian attems <max@stro.at> Signed-off-by: Michal Marek <mmarek@suse.cz>
| * deb-pkg: use KCONFIG_CONFIG instead of .config file directlyAnisse Astier2013-07-241-6/+7
| | | | | | | | | | | | Signed-off-by: Anisse Astier <anisse@astier.eu> Reviewed-by: Ben Hutchings <ben@decadent.org.uk> Signed-off-by: Michal Marek <mmarek@suse.cz>
| * rpm-pkg: add generation of kernel-develMike Marciniszyn2013-07-231-2/+26
| | | | | | | | | | | | | | | | | | | | Change the spec file to generate a kernel-devel module allowing for compilation of external kernel modules. This patch requires a new minimum RPM level of 4.0.3. Signed-off-by: Mike Marciniszyn <mike.marciniszyn@intel.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
| * rpm-pkg: install firmware files in kernel relative directoryMike Marciniszyn2013-07-231-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | Prior to this patch, firmware files were being installed in /lib/firmware with a potential conflict with already installed kernels. firmware files are now installed in /lib/firmware/<release> and packaged with the rest of the modules. Signed-off-by: Mike Marciniszyn <mike.marciniszyn@intel.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
| * rpm-pkg: add %post section to create initramfs and grub hooksMike Marciniszyn2013-07-231-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | /sbin/installkernel is used to insure grub hooks are inserted and the initramfs is created on the target system. The invokation installkernel will work with any kernel as long as: - /sbin/installkernel exists - the kernel and sysem map files are readable Signed-off-by: Mike Marciniszyn <mike.marciniszyn@intel.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
* | Merge branch 'kbuild' of ↵Linus Torvalds2013-09-071-8/+0
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild Pull kbuild update from Michal Marek: "Only these two commits are in the kbuild branch this time: - Using filechk for include/config/kernel.release - Cleanup in scripts/sortextable.c" * 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild: kbuild: Do not overwrite include/config/kernel.release needlessly scripts: remove unused function in sortextable.c
| * | scripts: remove unused function in sortextable.cRamkumar Ramachandra2013-07-251-8/+0
| |/ | | | | | | | | | | Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com> Acked-by: David Daney <david.daney@cavium.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
* | Merge git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tileLinus Torvalds2013-09-061-0/+4
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pull Tile arch updates from Chris Metcalf: "These changes bring in a bunch of new functionality that has been maintained internally at Tilera over the last year, plus other stray bits of work that I've taken into the tile tree from other folks. The changes include some PCI root complex work, interrupt-driven console support, support for performing fast-path unaligned data fixups by kernel-based JIT code generation, CONFIG_PREEMPT support, vDSO support for gettimeofday(), a serial driver for the tilegx on-chip UART, KGDB support, more optimized string routines, support for ftrace and kprobes, improved ASLR, and many bug fixes. We also remove support for the old TILE64 chip, which is no longer buildable" * git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile: (85 commits) tile: refresh tile defconfig files tile: rework <asm/cmpxchg.h> tile PCI RC: make default consistent DMA mask 32-bit tile: add null check for kzalloc in tile/kernel/setup.c tile: make __write_once a synonym for __read_mostly tile: remove support for TILE64 tile: use asm-generic/bitops/builtin-*.h tile: eliminate no-op "noatomichash" boot argument tile: use standard tile_bundle_bits type in traps.c tile: simplify code referencing hypervisor API addresses tile: change <asm/system.h> to <asm/switch_to.h> in comments tile: mark pcibios_init() as __init tile: check for correct compiler earlier in asm-offsets.c tile: use standard 'generic-y' model for <asm/hw_irq.h> tile: use asm-generic version of <asm/local64.h> tile PCI RC: add comment about "PCI hole" problem tile: remove DEBUG_EXTRA_FLAGS kernel config option tile: add virt_to_kpte() API and clean up and document behavior tile: support FRAME_POINTER tile: support reporting Tilera hypervisor statistics ...
| * | tile: support ftrace on tilegxTony Lu2013-08-301-0/+4
| |/ | | | | | | | | | | | | | | This commit adds support for static ftrace, graph function support, and dynamic tracer support. Signed-off-by: Tony Lu <zlu@tilera.com> Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
* | Merge tag 'modules-next-for-linus' of ↵Linus Torvalds2013-09-041-0/+1
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux Pull module updates from Rusty Russell: "Minor fixes mainly, including a potential use-after-free on remove found by CONFIG_DEBUG_KOBJECT_RELEASE which may be theoretical" * tag 'modules-next-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux: module: Fix mod->mkobj.kobj potentially freed too early kernel/params.c: use scnprintf() instead of sprintf() kernel/module.c: use scnprintf() instead of sprintf() module/lsm: Have apparmor module parameters work with no args module: Add NOARG flag for ops with param_set_bool_enable_only() set function module: Add flag to allow mod params to have no arguments modules: add support for soft module dependencies scripts/mod/modpost.c: permit '.cranges' secton for sh64 architecture. module: fix sprintf format specifier in param_get_byte()
| * | scripts/mod/modpost.c: permit '.cranges' secton for sh64 architecture.Chen Gang2013-08-201-0/+1
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | Need permit '.cranges' section for sh64 architecture, or modpost will report warning: LD init/built-in.o WARNING: init/built-in.o (.cranges): unexpected non-allocatable section. Did you forget to use "ax"/"aw" in a .S file? Note that for example <linux/init.h> contains section definitions for use in .S files. Signed-off-by: Chen Gang <gang.chen@asianux.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* | PTR_RET is now PTR_ERR_OR_ZERO(): Replace most.Rusty Russell2013-07-151-5/+5
|/ | | | | | | | | | | | Sweep of the simple cases. Cc: netdev@vger.kernel.org Cc: linuxppc-dev@lists.ozlabs.org Cc: linux-arm-kernel@lists.infradead.org Cc: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Acked-by: David S. Miller <davem@davemloft.net> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* Merge branch 'misc' of ↵Linus Torvalds2013-07-1035-51/+173
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild Pull coccinelle updates from Michal Marek: "The misc branch is reserved for Coccinelle this time: - 'report' is the default mode - MAINTAINERS update for Coccinelle - documentation udate - use new option format for spatch(1) - J=<n> variable to mimic make -j for coccicheck - check for missing pci_free_consistent() calls There are some patches for rpm-pkg and deb-pkg waiting for the 3.12-rc1 merge window" * 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild: Coccinelle: Update information about the minimal version required Coccinelle: Update the options used to the new option scheme scripts: Coccinelle script for pci_free_consistent() Coccinelle: Update the documentation Coccinelle: Update section of MAINTAINERS coccicheck: span checks across CPUs scripts/coccinelle: check for field address argument to kfree Coccinelle: Update the Coccinelle section of MAINTAINERS Coccinelle: Make 'report' the default mode
| * Coccinelle: Update information about the minimal version requiredNicolas Palix2013-07-031-0/+5
| | | | | | | | | | | | | | | | | | | | The naming convention of options has changed one year ago. The options have been recently updated in the cocci file and in scripts/coccicheck. This patch also adds this information in the documentation. Signed-off-by: Nicolas Palix <nicolas.palix@imag.fr> Signed-off-by: Michal Marek <mmarek@suse.cz>
| * Coccinelle: Update the options used to the new option schemeNicolas Palix2013-07-0334-47/+47
| | | | | | | | | | | | | | | | | | | | | | | | spatch has changed its option scheme. E.g., --no_show_diff is now --no-show-diff This patch updates: - scripts/coccicheck - Semantic patches under scripts/coccinelle/ Signed-off-by: Nicolas Palix <nicolas.palix@imag.fr> Signed-off-by: Michal Marek <mmarek@suse.cz>
| * scripts: Coccinelle script for pci_free_consistent()strnape1@fel.cvut.cz2013-07-031-0/+52
| | | | | | | | | | | | | | | | Created coccinelle script for reporting missing pci_free_consistent() calls. Signed-off-by: Petr Strnad <strnape1@fel.cvut.cz> Signed-off-by: Nicolas Palix <nicolas.palix@imag.fr> Signed-off-by: Michal Marek <mmarek@suse.cz>
| * coccicheck: span checks across CPUsKees Cook2013-07-031-3/+28
| | | | | | | | | | | | | | | | | | This adds parallelism by default to the "coccicheck" target using spatch's "-max" and "-index" arguments. Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: Nicolas Palix <nicolas.palix@imag.fr> Signed-off-by: Michal Marek <mmarek@suse.cz>
| * scripts/coccinelle: check for field address argument to kfreeJulia Lawall2013-06-141-0/+32
| | | | | | | | | | | | | | The argument to kfree should not be the address of a structure field. Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Michal Marek <mmarek@suse.cz>
| * Coccinelle: Make 'report' the default modeNicolas Palix2013-06-141-3/+11
| | | | | | | | | | | | | | | | | | | | | | | | It appears that the 'report' mode is the one always provided by the semantic patches included in the kernel. It is thus more natural to select it by default. The 'chain' mode is however kept and the 'patch' mode is still the first tried in that case. Signed-off-by: Nicolas Palix <nicolas.palix@imag.fr> Signed-off-by: Michal Marek <mmarek@suse.cz>
* | Merge branch 'kconfig' of ↵Linus Torvalds2013-07-1018-100/+249
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild Pull kconfig updates from Michal Marek: - dependency solver fix for make defconfig - randconfig fixes, one of which had to be reverted again - more user-friendly sorting of search results - hex and range keywords support longs - fix for [mn]conf not to rely on particular behavior of the LINES and COLS variables - cleanup of magic constants in kconfig/lxdialog - [mn]conf formatting fixes - fix for scripts/config's help text in out-of-tree usage (under a different name) * 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild: kconfig: allow "hex" and "range" to support longs Revert "kconfig: fix randomising choice entries in presence of KCONFIG_ALLCONFIG" kconfig: fix randomising choice entries in presence of KCONFIG_ALLCONFIG kconfig: loop as long as we changed some symbols in randconfig kconfig/[mn]conf: make it explicit in the search box that a regexp is possible kconfig: sort found symbols by relevance kconfig/conf: print the seed used to initialise the RNG for randconfig kconfig/conf: accept a base-16 seed for randconfig kconfig/conf: fix randconfig setting multiple symbols in a choice scripts/config: replace hard-coded script name by a dynamic value mconf/nconf: mark empty menus/menuconfigs different from non-empty ones nconf: use function calls instead of ncurses' variables LINES and COLS mconf: use function calls instead of ncurses' variables LINES and COLS kconfig/lxdialog: handle newline characters in print_autowrap() kconfig/lxdialog: Use new mininimum resize definitions in conf_choice() kconfig/lxdialog: Add definitions for mininimum (re)size values kconfig: Fix defconfig when one choice menu selects options that another choice menu depends on
| * | kconfig: allow "hex" and "range" to support longsKees Cook2013-06-291-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The parsing routines for Kconfig files use strtol(), but store and render values as int. Switch types and formating to long to support a wider range of values. For example, 0x80000000 wasn't representable. Signed-off-by: Kees Cook <keescook@chromium.org> Tested-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
| * | Revert "kconfig: fix randomising choice entries in presence of ↵Yann E. MORIN2013-06-261-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | KCONFIG_ALLCONFIG" This reverts commit 8357b48549e17b3e4e402c7f977b65708922e60f. It breaks more stuff than it fixes. Reported-by: Fengguang Wu <fengguang.wu@intel.com> Reported-by: Sedat Dilek <sedat.dilek@gmail.com> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Fengguang Wu <fengguang.wu@intel.com> Cc: Sedat Dilek <sedat.dilek@gmail.com> Cc: Sam Ravnborg <sam@ravnborg.org> Cc: Stephen Rothwell <sfr@canb.auug.org.au> Cc: Alexandre Bounine <alexandre.bounine@idt.com> Cc: Matt Porter <mporter@kernel.crashing.org> Signed-off-by: Michal Marek <mmarek@suse.cz>
| * | kconfig: fix randomising choice entries in presence of KCONFIG_ALLCONFIGYann E. MORIN2013-06-241-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, randconfig does randomise choice entries, unless KCONFIG_ALLCONFIG is specified. For example, given those two files (Thomas' test-case): ---8<--- Config.test.in config OPTIONA bool "Option A" choice prompt "This is a choice" config CHOICE_OPTIONA bool "Choice Option A" config CHOICE_OPTIONB bool "Choice Option B" endchoice config OPTIONB bool "Option B" ---8<--- Config.test.in ---8<--- config.defaults CONFIG_OPTIONA=y ---8<--- config.defaults And running: ./scripts/kconfig/conf --randconfig Config.test.in does properly randomise the two choice symbols (and the two booleans). However, running: KCONFIG_ALLCONFIG=config.defaults \ ./scripts/kconfig/conf --randconfig Config.test.in does *not* reandomise the two choice entries, and only CHOICE_OPTIONA will ever be selected. (OPTIONA will always be set (expected), and OPTIONB will be be properly randomised (expected).) This patch defers setting that a choice has a value until a symbol for that choice is indeed set, so that choices are properly randomised when KCONFIG_ALLCONFIG is set, but not if a symbol for that choice is set. Reported-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Cc: Michal Marek <mmarek@suse.cz> Cc: Sam Ravnborg <sam@ravnborg.org> Cc: Sedat Dilek <sedat.dilek@gmail.com> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Stephen Rothwell <sfr@canb.auug.org.au> --- Changes v3 -> v4 - fix previous issue where some choices would not be set, which would cause silentoldconfig to ask for them and was then breaking this workflow (as reported by Arnd and Sedat): KCONFIG_ALLCONFIG=foo.defconfig make randconfig make silentoldconfig </dev/nullo which I have tested (3h28min!) with: touch defconfig for(( i=0; i<10000; i++ )); do KCONFIG_ALLCONFIG=$(pwd)/defconfig make randconfig >/dev/null 2>&1 make silentoldconfig </dev/null >/dev/null 2>&1 || break done which did not break at all. - change done in v3 (below) is already fixed by a previous patch Changes v2 -> v3 - ensure only one symbol is set in a choice Changes v1 -> v2: - further postpone setting that a choice has a value until one is indeed set - do not print symbols that are part of an invisible choice
| * | kconfig: loop as long as we changed some symbols in randconfigYann E. MORIN2013-06-243-6/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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<--- choice-in-choice.in choice bool "A/B/C" config A bool "A" config B bool "B" if B choice bool "E/F" config E bool "E" config F bool "F" endchoice endif # B config C bool "C" endchoice ---8<--- $ ./scripts/kconfig/conf --randconfig choice-in-choice.in [--SNIP--] $ ./scripts/kconfig/conf --silentoldconfig choice-in-choice.in </dev/null [--SNIP--] A/B/C 1. A (A) > 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" <yann.morin.1998@free.fr>
| * | kconfig/[mn]conf: make it explicit in the search box that a regexp is possibleYann E. MORIN2013-06-242-2/+2
| | | | | | | | | | | | | | | | | | | | | Reported-by: Jean Delvare <jdelvare@suse.de> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Jean Delvare <jdelvare@suse.de> Cc: Michal Marek <mmarek@suse.cz>
| * | kconfig: sort found symbols by relevanceYann E. MORIN2013-06-241-9/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When searching for symbols, return the symbols sorted by relevance. Sorting is done as thus: - first, symbols that match exactly - then, alphabetical sort Since the search can be a regexp, it is possible that more than one symbol matches exactly. In this case, we can't decide which to sort first, so we fallback to alphabeticall sort. Explain this (new!) sorting heuristic in the documentation. Reported-by: Jean Delvare <jdelvare@suse.de> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Jean Delvare <jdelvare@suse.de> Cc: Michal Marek <mmarek@suse.cz> Cc: Roland Eggner <edvx1@systemanalysen.net> Cc: Wang YanQing <udknight@gmail.com> -- Changes v1->v2: - drop the previous, complex heuristic in favour of a simpler heuristic that is both easier to understand, *and* to maintain (Jean) - explain sorting heuristic in the doc (Jean)
| * | kconfig/conf: print the seed used to initialise the RNG for randconfigYann E. MORIN2013-06-181-0/+1
| | | | | | | | | | | | | | | | | | ... so the user has a chance to reproduce a test-case. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
| * | kconfig/conf: accept a base-16 seed for randconfigYann E. MORIN2013-06-181-1/+1
| | | | | | | | | | | | Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
| * | kconfig/conf: fix randconfig setting multiple symbols in a choiceYann E. MORIN2013-06-181-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, randconfig may set more than one symbol in a given choice. Given this config file: config A bool "A" if A choice bool "B/C/D" config B bool "B" config C bool "C" config D bool "D" endchoice endif # A Then randconfig generates such .config files (case where A is not set is not shown below for brevity), and where only the right-most .config is valid: CONFIG_A=y CONFIG_A=y CONFIG_A=y CONFIG_B=y CONFIG_B=y CONFIG_B=y CONFIG_C=y # CONFIG_C is not set # CONFIG_C is not set # CONFIG_D is not set CONFIG_D=y # CONFIG_D is not set That is, in a randomised choice, the first symbol is always selected, and at most one other symbol may be selected. This is due to symbol randomised in a choice not being properly flagged as having a value. Fix that by flagging those symbols adequately: have a user-defined value, and be not valid (to force recalculation of the symbol). Note: if the choice is not conditional, then the randomisation is properly done. Reported-by: Matthieu CASTET <matthieu.castet@parrot.com> Signed-off-by: Matthieu CASTET <matthieu.castet@parrot.com> [yann.morin.1998@free.fr: independently re-done the same patch as Matthieu, as pointed out by Sedat] Cc: Arnaud Lacombe <lacombar@gmail.com> Cc: Sedat Dilek <sedat.dilek@gmail.com> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
| * | scripts/config: replace hard-coded script name by a dynamic valueClement Chauplannaz2013-06-181-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The script `config' prints its name in usage() function. It is currently hard-coded to value `config'. However, the script may be reused under a different name in contexts other than the Linux Kernel. Replace the hard-coded value `config' by the name of the script at runtime. Signed-off-by: Clement Chauplannaz <chauplac@gmail.com> Acked-by: Andi Kleen <ak@linux.intel.com> Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
| * | mconf/nconf: mark empty menus/menuconfigs different from non-empty onesDirk Gouders2013-06-184-13/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Submenus are sometimes empty and it would be nice if there is something that notifies us that we should not expect any content _before_ we enter a submenu. A new function menu_is_empty() was introduced and empty menus and menuconfigs are now marked by "----" as opposed to non-empty ones that are marked by "--->". This scheme was suggested by "Yann E. MORIN" <yann.morin.1998@free.fr>. Signed-off-by: Dirk Gouders <dirk@gouders.net> Tested-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
| * | nconf: use function calls instead of ncurses' variables LINES and COLSDirk Gouders2013-06-182-16/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | According to the documentation [1], LINES and COLS are initialized by initscr(); it does not say anything about the behavior when windows are resized. Do not rely on the current implementation of ncurses that updates these variables on resize, but use the propper function calls or macros to get window dimensions. The use of the variables in main() was OK, but for the sake of consistency it was modified to use the macro getmaxyx(). [1] ncurses(3X) Signed-off-by: Dirk Gouders <dirk@gouders.net> Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr> [yann.morin.1998@free.fr: declare 'lines' and 'columns' on a single line] Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
| * | mconf: use function calls instead of ncurses' variables LINES and COLSDirk Gouders2013-06-186-14/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | According to the documentation [1], LINES and COLS are initialized by initscr(); it does not say anything about the behavior when windows are resized. Do not rely on the current implementation of ncurses that updates these variables on resize, but use the propper function calls to get window dimensions. init_dialog() could make use of the variables, but for the sake of consistency we do not change it's current use of the macro getmaxyx(). [1] ncurses(3X) Signed-off-by: Dirk Gouders <dirk@gouders.net> Tested-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
| * | kconfig/lxdialog: handle newline characters in print_autowrap()Dirk Gouders2013-06-182-16/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When exiting menuconfig with unsaved changes, a dialog like the following is shown: Do you wish to save your new configuration ? <ESC><ESC> to continue. The author of the dialog text specified a newline after the '?', and probably expected it to be processed, so let print_autowrap() handle newlines propperly. Also, reword that dialog's second phrase with a real sentence. Signed-off-by: Dirk Gouders <dirk@gouders.net> Tested-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr> [yann.morin.1998@free.fr: very slightly tweak the commit message] Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
| * | kconfig/lxdialog: Use new mininimum resize definitions in conf_choice()Sedat Dilek2013-06-181-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a cleanup which uses the proper (new) definitions and does not change current behaviour. Signed-off-by: Sedat Dilek <sedat.dilek@gmail.com> Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Tested-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> --- Yann had some more ideas on improvements: "What would be nice is an improvement that scales the choice window to the number of entries in the choice. If there are a lot of choice entries, then the choice popup grows in height (but does not overflow the screen of course). So, instead of seeing only 6 entries, we'd see as much as possible in the current screen. Ditto for the width: the popup adapts to the longest prompt (but does not overflow the screen either, of course), so prompts are not truncated." NOTE: This patch requires [1]. [1] http://marc.info/?l=linux-kbuild&m=137128726917166&w=2
| * | kconfig/lxdialog: Add definitions for mininimum (re)size valuesSedat Dilek2013-06-167-9/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit c8dc68ad0fbd ("kconfig/lxdialog: support resize") added support for resizing, but forgot to collect all hardcoded values at one single place. Also add a definition for the check for a minimum screen/window size of 80x19. [ ChangeLog v3: * Rename MENU_{HEIGTH,WIDTH}_MIN -> MENUBOX_{HEIGTH,WIDTH}_MIN ChangeLog v2: * Rename WIN_{HEIGTH,WIDTH}_MIN -> WINDOW_{HEIGTH,WIDTH}_MIN * Mention the check for a minimum screen/window size in the changelog * Add a comment above the block of new definitions ] Signed-off-by: Sedat Dilek <sedat.dilek@gmail.com> Acked-by: Wang YanQing <udknight@gmail.com> Tested-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
| * | kconfig: Fix defconfig when one choice menu selects options that another ↵Arve Hjønnevåg2013-06-164-4/+25
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | choice menu depends on 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<--- CONFIG_MODULES=y CONFIG_USB_ZERO=y ---8<--- Kconfig.choice: ---8<--- menuconfig MODULES bool "Enable loadable module support" config CONFIGFS_FS tristate "Userspace-driven configuration filesystem" config OCFS2_FS tristate "OCFS2 file system support" depends on CONFIGFS_FS select CRC32 config USB_LIBCOMPOSITE tristate select CONFIGFS_FS choice tristate "USB Gadget Drivers" default USB_ETH config USB_ZERO tristate "Gadget Zero (DEVELOPMENT)" select USB_LIBCOMPOSITE config USB_ETH tristate "Ethernet Gadget (with CDC Ethernet support)" select USB_LIBCOMPOSITE endchoice config CRC32 tristate "CRC32/CRC32c functions" default y choice prompt "CRC32 implementation" depends on CRC32 default CRC32_SLICEBY8 config CRC32_SLICEBY8 bool "Slice by 8 bytes" endchoice ---8<--- $ scripts/kconfig/conf --defconfig=defconfig.choice Kconfig.choice would result in: .config: ---8<--- CONFIG_MODULES=y CONFIG_CONFIGFS_FS=m CONFIG_USB_LIBCOMPOSITE=m CONFIG_USB_ZERO=m CONFIG_CRC32=y CONFIG_CRC32_SLICEBY8=y ---8<--- when the expected result would be: .config: ---8<--- CONFIG_MODULES=y CONFIG_CONFIGFS_FS=y CONFIG_USB_LIBCOMPOSITE=y CONFIG_USB_ZERO=y CONFIG_CRC32=y CONFIG_CRC32_SLICEBY8=y ---8<--- Signed-off-by: Arve Hjønnevåg <arve@android.com> [yann.morin.1998@free.fr: add the resulting .config to commit log, remove unneeded USB_GADGET from the defconfig] Tested-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
* | Merge branch 'kbuild' of ↵Linus Torvalds2013-07-107-27/+33
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild Pull kbuild updates from Michal Marek: - fix for make headers_install argv explosion with too long path - scripts/setlocalversion does not call git update-index needlessly - fix for the src.rpm produced by make rpm-pkg. The new make image_name can be useful also for other packaging tools. - scripts/mod/devicetable-offsets.o is not rebuilt during each make run - make modules_install dependency fix - scripts/sortextable portability fix - fix for kbuild to generate the output directory for all object files in subdirs. - a couple of minor fixes * 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild: kbuild: create directory for dir/file.o tools/include: use stdint types for user-space byteshift headers Makefile: Fix install error with make -j option Fix a build warning in scripts/mod/file2alias.c improve modalias building scripts/mod: Spelling s/DEVICEVTABLE/DEVICETABLE/ kbuild: fix error when building from src rpm scripts/setlocalversion on write-protected source tree Makefile.lib: align DTB quiet_cmd kbuild: fix make headers_install when path is too long
| * | kbuild: create directory for dir/file.o张忠山2013-07-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When add a obj with dir to obj-y, like this obj-y += dir/file.o The $(obj)/dir not created, this patch fix this. When try to add a file(which in a subdir) to my board's obj-y, the build progress crashed. For example, I use at91rm9200ek board, and in kernel dir run: mkdir objtree make O=objtree at91rm9200_defconfig mkdir arch/arm/mach-at91/dir touch arch/arm/mach-at91/dir/file.c and edit arch/arm/mach-at91/dir/file.c to add some code. then edit arch/arm/mach-at91/Makefile, change the following line: obj-$(CONFIG_MACH_AT91RM9200EK) += board-rm9200ek.o to: obj-$(CONFIG_MACH_AT91RM9200EK) += board-rm9200ek.o dir/file.o Now build it: make O=objtree Then the error appears: ... CC arch/arm/mach-at91/board-rm9200dk.o CC arch/arm/mach-at91/board-rm9200ek.o CC arch/arm/mach-at91/dir/file.o linux-2.6/arch/arm/mach-at91/dir/file.c:5: fatal error: opening dependency file arch/arm/mach-at91/dir/.file.o.d: No such file or directory Check the objtree: LANG=en ls objtree/arch/arm/mach-at91/dir ls: cannot access objtree/arch/arm/mach-at91/dir: No such file or directory It's apparently that the target dir not created for file.o Check kbuild source code. It seems that kbuild create dirs for that in $(obj-dirs). But if the dir need not to create a built-in.o, It should never in $(obj-dirs). So I make this patch to make sure It in $(obj-dirs) this bug caused by commit f5fb976520a53f45f8bbf2e851f16b3b5558d485 Signed-off-by: 张忠山 <zzs0213@gmail.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
| * | Fix a build warning in scripts/mod/file2alias.cDaniel Tang2013-07-031-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On some systems, __used is already defined in sys/cdefs.h and causes a build warning: scripts/mod/file2alias.c:85:1: warning: "__used" redefined In file included from /usr/include/stdio.h:64, from scripts/mod/modpost.h:1, from scripts/mod/file2alias.c:13: /usr/include/sys/cdefs.h:146:1: warning: this is the location of the previous definition This adds an extra check before defining the __used macro to see if the macro was already defined elsewhere. Signed-off-by: Daniel Tang <dt.tangr@gmail.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
| * | improve modalias buildingJan Beulich2013-06-281-8/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For one, there's no point in the respective pieces to be rebuilt unconditionally on each and every rebuild. Second there's no need to invent a custom rule for generating the .s file from the .c source - we can simply use the generic rule here. And finally, $(obj) should be used to refer to files in the build tree (rather than spelling out the subdirectory). Signed-off-by: Jan Beulich <jbeulich@suse.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
| * | scripts/mod: Spelling s/DEVICEVTABLE/DEVICETABLE/Geert Uytterhoeven2013-06-281-2/+2
| | | | | | | | | | | | | | | Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Michal Marek <mmarek@suse.cz>
| * | kbuild: fix error when building from src rpmMike Marciniszyn2013-06-241-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The following issue can be reproduced with Linus' tree on an x86_64 server. >+ cp /home/user/rpmbuild-test/BUILDROOT/kernel-3.9.2.x86_64/boot/vmlinuz-3.9.2 >cp: missing destination file operand after >/home/user/rpmbuild-test/BUILDROOT/kernel-3.9.2-1.x86_64/boot/vmlinuz-3.9.2' >Try `cp --help' for more information. >error: Bad exit status from /var/tmp/rpm-tmp.R4o0iI (%install) Here are the commands to reproduce: make defconfig make rpm-pkg Use the resulting src rpm to build as follows: mkdir ~/rpmbuild-test cd ~/rpmbuild-test rpmbuild --rebuild --define "_topdir `pwd`" -vv ~/rpmbuild/SRPMS/kernel-3.10.0_rc1+-1.src.rpm The issue is because the %install script uses $KBUILD_IMAGE and it hasn't been set since it is only available in the kbuild system and not in the %install script. This patch adds a Makefile target to emit the image_name that can be used and modifies the mkspec to use the dynamic name in %install. Signed-off-by: Mike Marciniszyn <mike.marciniszyn@intel.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
| * | scripts/setlocalversion on write-protected source treeChristian Kujau2013-06-241-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I just stumbled across another[0] issue when scripts/setlocalversion operates on a write-protected source tree. Back then[0] the source tree was on an read-only NFS share, so "test -w" was introduced before "git update-index" was run. This time, the source tree is on read/write NFS share, but the permissions are world-readable and only a specific user (or root) can write. Thus, "test -w ." returns "0" and then runs "git update-index", producing the following message (on a dirty tree): fatal: Unable to create '/usr/local/src/linux-git/.git/index.lock': Permission denied While it says "fatal", compilation continues just fine. However, I don't think a kernel compilation should alter the source tree (or the .git directory) in any way and I don't see how removing "git update-index" could do any harm. The Mercurial and SVN routines in scripts/setlocalversion don't have any tree-modifying commands, AFAICS. So, maybe the patch below would be acceptable. [0] https://patchwork.kernel.org/patch/29718/ Signed-off-by: Christian Kujau <lists@nerdbynature.de> Cc: Nico Schottelius <nico-linuxsetlocalversion@schottelius.org> Signed-off-by: Michal Marek <mmarek@suse.cz>
OpenPOWER on IntegriCloud