aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
Commit message (Collapse)AuthorAgeFilesLines
* localmodconfig: Use Kbuild files tooRichard Weinberger2015-10-131-1/+1
| | | | | | | | | | | | | | | | 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 <artafinde@gmail.com> Signed-off-by: Richard Weinberger <richard@nod.at> Signed-off-by: Steven Rostedt <rostedt@goodmis.org> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
* scripts/recordmcount.pl: There is no -m32 gcc option on Super-H anymoreMichael Karcher2015-02-201-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | commit 1caf6aaaa47471831d77c75f094d4e00ad1ec808 upstream. Compiling SH with gcc-4.8 fails due to the -m32 option not being supported. From http://buildd.debian-ports.org/status/fetch.php?pkg=linux&arch=sh4&ver=3.16.7-ckt4-1&stamp=1421425783 CC init/main.o gcc-4.8: error: unrecognized command line option '-m32' ld: cannot find init/.tmp_mc_main.o: No such file or directory objcopy: 'init/.tmp_mx_main.o': No such file rm: cannot remove 'init/.tmp_mx_main.o': No such file or directory rm: cannot remove 'init/.tmp_mc_main.o': No such file or directory Link: http://lkml.kernel.org/r/1421537778-29001-1-git-send-email-kernel@mkarcher.dialup.fu-berlin.de Link: http://lkml.kernel.org/r/54BCBDD4.10102@physik.fu-berlin.de Cc: Matt Fleming <matt@console-pimps.org> Reported-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> Signed-off-by: Michael Karcher <kernel@mkarcher.dialup.fu-berlin.de> Signed-off-by: Steven Rostedt <rostedt@goodmis.org> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
* recordmcount/MIPS: Fix possible incorrect mcount_loc table entries in modulesAlex Smith2014-07-111-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit 91ad11d7cc6f4472ebf177a6252fbf0fd100d798 upstream. On MIPS calls to _mcount in modules generate 2 instructions to load the _mcount address (and therefore 2 relocations). The mcount_loc table should only reference the first of these, so the second is filtered out by checking the relocation offset and ignoring ones that immediately follow the previous one seen. However if a module has an _mcount call at offset 0, the second relocation would not be filtered out due to old_r_offset == 0 being taken to mean that the current relocation is the first one seen, and both would end up in the mcount_loc table. This results in ftrace_make_nop() patching both (adjacent) instructions to branches over the _mcount call sequence like so: 0xffffffffc08a8000: 04 00 00 10 b 0xffffffffc08a8014 0xffffffffc08a8004: 04 00 00 10 b 0xffffffffc08a8018 0xffffffffc08a8008: 2d 08 e0 03 move at,ra ... The second branch is in the delay slot of the first, which is defined to be unpredictable - on the platform on which this bug was encountered, it triggers a reserved instruction exception. Fix by initializing old_r_offset to ~0 and using that instead of 0 to determine whether the current relocation is the first seen. Signed-off-by: Alex Smith <alex.smith@imgtec.com> Cc: linux-kernel@vger.kernel.org Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/7098/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
* powerpc: Add vr save/restore functionsAndreas Schwab2014-06-091-2/+6
| | | | | | | | | | | commit 8fe9c93e7453e67b8bd09f263ec1bb0783c733fc upstream. GCC 4.8 now generates out-of-line vr save/restore functions when optimizing for size. They are needed for the raid6 altivec support. Signed-off-by: Andreas Schwab <schwab@linux-m68k.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
* deb-pkg: Fix cross-building linux-headers packageBen Hutchings2014-04-091-5/+4
| | | | | | | | | | | | | | | | | | commit f8ce239dfc7ba9add41d9ecdc5e7810738f839fa upstream. builddeb generates a control file that says the linux-headers package can only be built for the build system primary architecture. This breaks cross-building configurations. We should use $debarch for this instead. Since $debarch is not yet set when generating the control file, set Architecture: any and use control file variables to fill in the description. Fixes: cd8d60a20a45 ('kbuild: create linux-headers package in deb-pkg') Reported-and-tested-by: "Niew, Sh." <shniew@gmail.com> Signed-off-by: Ben Hutchings <ben@decadent.org.uk> Signed-off-by: Michal Marek <mmarek@suse.cz>
* deb-pkg: Fix building for MIPS big-endian or ARM OABIBen Hutchings2014-04-091-2/+2
| | | | | | | | | | | | | | | | | | | | | commit c5e318f67eebbad491615a752c51dbfde7dc3d78 upstream. These commands will mysteriously fail: $ make ARCH=arm versatile_defconfig [...] $ make ARCH=arm deb-pkg [...] make[1]: *** [deb-pkg] Error 1 make: *** [deb-pkg] Error 2 The Debian architecture selection for these kernel architectures does 'grep FOO=y $KCONFIG_CONFIG && echo bar', and after 'set -e' this aborts the script if grep does not find the given config symbol. Fixes: 10f26fa64200 ('build, deb-pkg: select userland architecture based on UTS_MACHINE') Signed-off-by: Ben Hutchings <ben@decadent.org.uk> Signed-off-by: Michal Marek <mmarek@suse.cz>
* deb-pkg: use KCONFIG_CONFIG instead of .config file directlyAnisse Astier2014-04-091-6/+7
| | | | | | | | | | commit d20917670ee1fd4b090555e551faea04b014ca97 upstream. Signed-off-by: Anisse Astier <anisse@astier.eu> Reviewed-by: Ben Hutchings <ben@decadent.org.uk> Signed-off-by: Michal Marek <mmarek@suse.cz> [bwh: Backported to 3.2: adjust context] Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
* Modpost: fixed USB alias generation for ranges including 0x9 and 0xAJan Moskyto Matejka2014-04-021-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | commit 03b56329f9bb5a1cb73d7dc659d529a9a9bf3acc upstream. Commit afe2dab4f6 ("USB: add hex/bcd detection to usb modalias generation") changed the routine that generates alias ranges. Before that change, only digits 0-9 were supported; the commit tried to fix the case when the range includes higher values than 0x9. Unfortunately, the commit didn't fix the case when the range includes both 0x9 and 0xA, meaning that the final range must look like [x-9A-y] where x <= 0x9 and y >= 0xA -- instead the [x-9A-x] range was produced. Modprobe doesn't complain as it sees no difference between no-match and bad-pattern results of fnmatch(). Fixing this simple bug to fix the aliases. Also changing the hardcoded beginning of the range to uppercase as all the other letters are also uppercase in the device version numbers. Fortunately, this affects only the dvb-usb-dib0700 module, AFAIK. Signed-off-by: Jan Moskyto Matejka <mq@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
* kernel-doc: bugfix - multi-line macrosDaniel Santos2013-10-261-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit 654784284430bf2739985914b65e09c7c35a7273 upstream. Prior to this patch the following code breaks: /** * multiline_example - this breaks kernel-doc */ #define multiline_example( \ myparam) Producing this error: Error(somefile.h:983): cannot understand prototype: 'multiline_example( \ ' This patch fixes the issue by appending all lines ending in a blackslash (optionally followed by whitespace), removing the backslash and any whitespace after it prior to appending (just like the C pre-processor would). This fixes a break in kerel-doc introduced by the additions to rbtree.h. Signed-off-by: Daniel Santos <daniel.santos@pobox.com> Cc: Randy Dunlap <rdunlap@xenotime.net> Cc: Michal Marek <mmarek@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
* kbuild: make: fix if_changed when command contains backslashesSascha Hauer2012-10-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | commit c353acba28fb3fa1fd05fd6b85a9fc7938330f9c upstream. The call if_changed mechanism does not work when the command contains backslashes. This basically is an issue with lzo and bzip2 compressed kernels. The compressed binaries do not contain the uncompressed image size, so these use size_append to append the size. This results in backslashes in the executed command. With this if_changed always detects a change in the command and rebuilds the compressed image even if nothing has changed. Fix this by escaping backslashes in make-cmd Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Jan Luebbe <jlu@pengutronix.de> Cc: Sam Ravnborg <sam@ravnborg.org> Cc: Bernhard Walle <bernhard@bwalle.de> Cc: Michal Marek <mmarek@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
* kbuild: Fix gcc -x syntaxJean Delvare2012-10-176-13/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | commit b1e0d8b70fa31821ebca3965f2ef8619d7c5e316 upstream. The correct syntax for gcc -x is "gcc -x assembler", not "gcc -xassembler". Even though the latter happens to work, the former is what is documented in the manual page and thus what gcc wrappers such as icecream do expect. This isn't a cosmetic change. The missing space prevents icecream from recognizing compilation tasks it can't handle, leading to silent kernel miscompilations. Besides me, credits go to Michael Matz and Dirk Mueller for investigating the miscompilation issue and tracking it down to this incorrect -x parameter syntax. Signed-off-by: Jean Delvare <jdelvare@suse.de> Acked-by: Ingo Molnar <mingo@kernel.org> Cc: Bernhard Walle <bernhard@bwalle.de> Cc: Michal Marek <mmarek@suse.cz> Cc: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: Michal Marek <mmarek@suse.cz> [bwh: Backported to 3.2: drop unneeded change to arch/x86/Makefile] Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
* scripts/Kbuild.include: Fix portability problem of "echo -e"Bernhard Walle2012-10-171-1/+1
| | | | | | | | | | | | | | | | | | | | commit 875de98623fa2b29f0cb19915fe3292ab6daa1cb upstream. "echo -e" is a GNU extension. When cross-compiling the kernel on a BSD-like operating system (Mac OS X in my case), this doesn't work. One could install a GNU version of echo, put that in the $PATH before the system echo and use "/usr/bin/env echo", but the solution with printf is simpler. Since it is no disadvantage on Linux, I hope that gets accepted even if cross-compiling the Linux kernel on another Unix operating system is quite a rare use case. Signed-off-by: Bernhard Walle <bernhard@bwalle.de> Andreas Bießmann <andreas@biessmann.de> Signed-off-by: Michal Marek <mmarek@suse.cz> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
* localmodconfig: Fix localyesconfig to set to 'y' not 'm'Yuta Ando2012-10-171-0/+2
| | | | | | | | | | | | | | | | | | commit 4eae518d4b01b0cbf2f0d8edb5a6f3d6245ee8fb upstream. The kbuild target 'localyesconfig' has been same as 'localmodconfig' since the commit 50bce3e "kconfig/streamline_config.pl: merge local{mod,yes}config". The commit expects this script generates different configure depending on target, but it was not yet implemented. So I added code that sets to 'yes' when target is 'localyesconfig'. Link: http://lkml.kernel.org/r/1349101470-12243-1-git-send-email-yuta.and@gmail.com Cc: linux-kbuild@vger.kernel.org Signed-off-by: Yuta Ando <yuta.and@gmail.com> Signed-off-by: Steven Rostedt <rostedt@rostedt.homelinux.com> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
* kbuild: Do not package /boot and /lib in make tar-pkgMichal Marek2012-10-171-1/+1
| | | | | | | | | | | | | | | commit fe04ddf7c2910362f3817c8156e41cbd6c0ee35d upstream. There were reports of users destroying their Fedora installs by a kernel tarball that replaces the /lib -> /usr/lib symlink. Let's remove the toplevel directories from the tarball to prevent this from happening. Reported-by: Andi Kleen <andi@firstfloor.org> Suggested-by: Ben Hutchings <ben@decadent.org.uk> Signed-off-by: Michal Marek <mmarek@suse.cz> [bwh: Fold in commit 3ce9e53e788881da0d5f3912f80e0dd6b501f304 to avoid conflicts] Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
* kbuild: do not check for ancient modutils toolsLucas De Marchi2012-07-251-6/+0
| | | | | | | | | | | | | | | | | | | | | commit 620c231c7a7f48745094727bb612f6321cfc8844 upstream. scripts/depmod.sh checks for the output of '-V' expecting that it has module-init-tools in it. It's a hack to prevent users from using modutils instead of module-init-tools, that only works with 2.4.x kernels. This however prints an annoying warning for kmod tool, that is currently replacing module-init-tools. Rather than putting another check for kmod's version, just remove it since users of 2.4.x kernel are unlikely to upgrade to 3.x, and if they do, let depmod fail in that case because they should know what they are doing. Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi> Acked-by: WANG Cong <amwang@redhat.com> Acked-By: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Michal Marek <mmarek@suse.cz> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
* x86, realmode: 16-bit real-mode code support for relocs toolH. Peter Anvin2012-05-311-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit 6520fe5564acf07ade7b18a1272db1184835c487 upstream. A new option is added to the relocs tool called '--realmode'. This option causes the generation of 16-bit segment relocations and 32-bit linear relocations for the real-mode code. When the real-mode code is moved to the low-memory during kernel initialization, these relocation entries can be used to relocate the code properly. In the assembly code 16-bit segment relocations must be relative to the 'real_mode_seg' absolute symbol. Linear relocations must be relative to a symbol prefixed with 'pa_'. 16-bit segment relocation is used to load cs:ip in 16-bit code. Linear relocations are used in the 32-bit code for relocatable data references. They are declared in the linker script of the real-mode code. The relocs tool is moved to arch/x86/tools/relocs.c, and added new target archscripts that can be used to build scripts needed building an architecture. be compiled before building the arch/x86 tree. [ hpa: accelerating this because it detects invalid absolute relocations, a serious bug in binutils 2.22.52.0.x which currently produces bad kernels. ] Signed-off-by: H. Peter Anvin <hpa@linux.intel.com> Link: http://lkml.kernel.org/r/1336501366-28617-2-git-send-email-jarkko.sakkinen@intel.com Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@intel.com> Signed-off-by: H. Peter Anvin <hpa@linux.intel.com> Cc: <stable@vger.kernel.org> [bwh: Backported to 3.2: - Adjust context (no archheaders; no insn_sanity) - Expand put_unaligned_le32()] Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
* Fix modpost failures in fedora 17David Miller2012-05-111-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit e88aa7bbbe3046a125ea1936b16bb921cc9c6349 upstream. The symbol table on x86-64 starts to have entries that have names like: _GLOBAL__sub_I_65535_0___mod_x86cpu_device_table They are of type STT_FUNCTION and this one had a length of 18. This matched the device ID validation logic and it barfed because the length did not meet the device type's criteria. -------------------- FATAL: arch/x86/crypto/aesni-intel: sizeof(struct x86cpu_device_id)=16 is not a modulo of the size of section __mod_x86cpu_device_table=18. Fix definition of struct x86cpu_device_id in mod_devicetable.h -------------------- These are some kind of compiler tool internal stuff being emitted and not something we want to inspect in modpost's device ID table validation code. So skip the symbol if it is not of type STT_OBJECT. Signed-off-by: David S. Miller <davem@davemloft.net> Acked-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Michal Marek <mmarek@suse.cz> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
* modpost: Fix modpost license checking of vmlinux.oFrank Rowand2012-04-132-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | commit 258f742635360175564e9470eb060ff4d4b984e7 upstream. Commit f02e8a6596b7 ("module: Sort exported symbols") sorts symbols placing each of them in its own elf section. This sorting and merging into the canonical sections are done by the linker. Unfortunately modpost to generate Module.symvers file parses vmlinux.o (which is not linked yet) and all modules object files (which aren't linked yet). These aren't sanitized by the linker yet. That breaks modpost that can't detect license properly for modules. This patch makes modpost aware of the new exported symbols structure. [ This above is a slightly corrected version of the explanation of the problem, copied from commit 62a2635610db ("modpost: Fix modpost's license checking V3"). That commit fixed the problem for module object files, but not for vmlinux.o. This patch fixes modpost for vmlinux.o. ] Signed-off-by: Frank Rowand <frank.rowand@am.sony.com> Signed-off-by: Alessio Igor Bogani <abogani@kernel.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* modpost: fix ALL_INIT_DATA_SECTIONSJan Beulich2012-04-131-1/+1
| | | | | | | | | | | commit 9aaf440f8fabcebf9ea79a62ccf4c212e6544b49 upstream. This was lacking a comma between two supposed to be separate strings. Signed-off-by: Jan Beulich <jbeulich@suse.com> Signed-off-by: Michal Marek <mmarek@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* builddeb: Don't create files in /tmp with predictable namesBen Hutchings2012-02-291-6/+6
| | | | | | | | | | | | | commit 6c635224602d760c1208ada337562f40d8ae93a5 upstream. The current use of /tmp for file lists is insecure. Put them under $objtree/debian instead. Signed-off-by: Ben Hutchings <ben@decadent.org.uk> Acked-by: maximilian attems <max@stro.at> Signed-off-by: Michal Marek <mmarek@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* recordmcount: Fix handling of elf64 big-endian objects.David Daney2012-01-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | commit 2e885057b7f75035f0b85e02f737891482815a81 upstream. In ELF64, the sh_flags field is 64-bits wide. recordmcount was erroneously treating it as a 32-bit wide field. For little endian objects this works because the flags of interest (SHF_EXECINSTR) reside in the lower 32 bits of the word, and you get the same result with either a 32-bit or 64-bit read. Big endian objects on the other hand do not work at all with this error. The fix: Correctly treat sh_flags as 64-bits wide in elf64 objects. The symptom I observed was that my __start_mcount_loc..__stop_mcount_loc was empty even though ftrace function tracing was enabled. Link: http://lkml.kernel.org/r/1324345362-12230-1-git-send-email-ddaney.cavm@gmail.com Signed-off-by: David Daney <david.daney@cavium.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* kconfig/streamline-config.pl: Fix parsing Makefile with variablesSteven Rostedt2012-01-251-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit 364212fddaaa60c5a64f67a0f5624ad996ecc8a0 upstream. Thomas Lange reported that when he did a 'make localmodconfig', his config was missing the brcmsmac driver, even though he had the module loaded. Looking into this, I found the file: drivers/net/wireless/brcm80211/brcmsmac/Makefile had the following in the Makefile: MODULEPFX := brcmsmac obj-$(CONFIG_BRCMSMAC) += $(MODULEPFX).o The way streamline-config.pl works, is parsing all the obj-$(CONFIG_FOO) += foo.o lines to find that CONFIG_FOO belongs to the module foo.ko. But in this case, the brcmsmac.o was not used, but a variable in its place. By changing streamline-config.pl to remember defined variables in Makefiles and substituting them when they are used in the obj-X lines, allows Thomas (and others) to have their brcmsmac module stay configured when it is loaded and running "make localmodconfig". Reported-by: Thomas Lange <thomas-lange2@gmx.de> Tested-by: Thomas Lange <thomas-lange2@gmx.de> Cc: Arend van Spriel <arend@broadcom.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* kconfig/streamline-config.pl: Simplify backslash line concatinationSteven Rostedt2012-01-251-13/+12
| | | | | | | | | | | | commit d060d963e88f3e990cec2fe5214de49de9a49eca upstream. Simplify the way lines ending with backslashes (continuation) in Makefiles is parsed. This is needed to implement a necessary fix. Tested-by: Thomas Lange <thomas-lange2@gmx.de> Signed-off-by: Steven Rostedt <rostedt@goodmis.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* kconfig: adapt update-po-config to new UML layoutPaul Bolle2011-12-181-3/+2
| | | | | | | | | | | | | | Commit 5c48b108 ("um: take arch/um/sys-x86 to arch/x86/um") broke the make target update-po-config, as its symlink trick (again) fails. (Previous breakage was fixed with commit bdc69ca4 ("kconfig: change update-po-config to reflect new layout of arch/um").) The new UML layout allows to drop the symlick trick entirely. And if, one day, another architecture supports UML too, that should now work without again breaking this make target. Signed-off-by: Paul Bolle <pebolle@tiscali.nl> Signed-off-by: Michal Marek <mmarek@suse.cz>
* Merge branch 'misc' of ↵Linus Torvalds2011-11-063-2/+78
|\ | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild * 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild: script/checkpatch.pl: warn about deprecated use of EXTRA_{A,C,CPP,LD}FLAGS tags, powerpc: Update tags.sh to support _GLOBAL symbols scripts: add extract-vmlinux
| * script/checkpatch.pl: warn about deprecated use of EXTRA_{A,C,CPP,LD}FLAGSArnaud Lacombe2011-08-311-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Usage of these flags has been deprecated for nearly 4 years by: commit f77bf01425b11947eeb3b5b54685212c302741b8 Author: Sam Ravnborg <sam@neptun.(none)> Date: Mon Oct 15 22:25:06 2007 +0200 kbuild: introduce ccflags-y, asflags-y and ldflags-y Moreover, these flags (at least EXTRA_CFLAGS) have been documented for command line use. By default, gmake(1) do not override command line setting, so this is likely to result in build failure or unexpected behavior. Warn about their introduction in Makefile or Kbuild files. Cc: Sam Ravnborg <sam@ravnborg.org> Cc: Andy Whitcroft <apw@canonical.com> Signed-off-by: Arnaud Lacombe <lacombar@gmail.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
| * tags, powerpc: Update tags.sh to support _GLOBAL symbolsIan Munsie2011-08-311-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On PowerPC we use _GLOBAL throughout the assembly to define symbols, but currently these symbols are missing from the tags generated with ARCH=powerpc make tags. This patch modifies the tags.sh script to recognise _GLOBAL(.*) so that these symbols will be in the tags. This is almost (but not quite) PowerPC specific and this change should not affect anyone else: $ git grep -E '^_GLOBAL\(([^)]*)\).*' |sed 's/^\([^/]*\/[^/]*\)\/.*$/\1/'|uniq -c 627 arch/powerpc 2 arch/um Signed-off-by: Ian Munsie <imunsie@au1.ibm.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
| * scripts: add extract-vmlinuxCorentin Chary2011-08-311-0/+62
| | | | | | | | | | | | | | | | | | | | | | | | This script can be used to extract vmlinux from a compressed kernel image (bzImage, etc..). It's inspired from (a subset of) extract-ikconfig. It's something a lot of people have been looking for (mainly people with xen < 4 that doesn't support bzImages at all). Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Michal Marek <mmarek@suse.cz>
* | Merge branch 'kconfig' of ↵Linus Torvalds2011-11-069-112/+173
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild * 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild: scripts/kconfig/nconf: add KEY_HOME / KEY_END for dialog_inputbox scripts/kconfig/nconf: fix editing long strings scripts/kconfig/nconf: dynamically alloc dialog_input_result scripts/kconfig/nconf: fix memmove's length arg scripts/kconfig/nconf: fix typo: unknow => unknown kconfig: fix set but not used variables kconfig: handle SIGINT in menuconfig kconfig: fix __enabled_ macros definition for invisible and un-selected symbols kconfig: factor code in menu_get_ext_help() kbuild: Fix help text not displayed in choice option. kconfig/nconf: nuke unreferenced `nohelp_text' kconfig/streamline_config.pl: merge local{mod,yes}config kconfig/streamline_config.pl: use options to determine operating mode kconfig/streamline_config.pl: directly access LSMOD from the environment
| * | scripts/kconfig/nconf: add KEY_HOME / KEY_END for dialog_inputboxCheng Renquan2011-09-091-0/+8
| | | | | | | | | | | | | | | | | | | | | to make it easier to locate begin/end when editing long strings; Signed-off-by: Cheng Renquan <crquan@gmail.com> Acked By: Nir Tzachar <nir.tzachar@gmail.com>
| * | scripts/kconfig/nconf: fix editing long stringsCheng Renquan2011-09-091-6/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The original dialog_inputbox doesn't work with longer than prompt_width strings, here fixed it in this way: 1) add variable cursor_form_win to record cursor of form_win, keep its value always between [0, prompt_width-1]; reuse the original cursor_position as cursor of the string result, use (cursor_position-cursor_form_win) as begin offset to show part of the string in form_win; Signed-off-by: Cheng Renquan <crquan@gmail.com> Cc: Arnaud Lacombe <lacombar@gmail.com> Cc: Nir Tzachar <nir.tzachar@gmail.com>
| * | scripts/kconfig/nconf: dynamically alloc dialog_input_resultCheng Renquan2011-09-093-17/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To support unlimited length string config items; No check for realloc return value keeps code simple, and to be consistent with other existing unchecked malloc in kconfig. Signed-off-by: Cheng Renquan <crquan@gmail.com> Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
| * | scripts/kconfig/nconf: fix memmove's length argCheng Renquan2011-09-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In case KEY_BACKSPACE / KEY_DC to delete a char, it memmove only (len-cursor_position+1) bytes; the default case is to insert a char, it should also memmove exactly (len-cursor_position+1) bytes; the original use of (len+1) is wrong and may access following memory that doesn't belong to result, may cause SegFault in theory; case KEY_BACKSPACE: if (cursor_position > 0) { memmove(&result[cursor_position-1], &result[cursor_position], len-cursor_position+1); cursor_position--; } break; case KEY_DC: if (cursor_position >= 0 && cursor_position < len) { memmove(&result[cursor_position], &result[cursor_position+1], len-cursor_position+1); } break; default: if ((isgraph(res) || isspace(res)) && len-2 < result_len) { /* insert the char at the proper position */ memmove(&result[cursor_position+1], &result[cursor_position], len-cursor_position+1); result[cursor_position] = res; cursor_position++; } Signed-off-by: Cheng Renquan <crquan@gmail.com> Acked-by: Nir Tzachar <nir.tzachar@gmail.com>
| * | scripts/kconfig/nconf: fix typo: unknow => unknownCheng Renquan2011-09-091-1/+1
| | | | | | | | | | | | | | | Signed-off-by: Cheng Renquan <crquan@gmail.com> Acked-by: Arnaud Lacombe <lacombar@gmail.com>
| * | Merge branch 'kconfig/for-next' of git://github.com/lacombar/linux-2.6 into ↵Michal Marek2011-08-313-49/+89
| |\ \ | | | | | | | | | | | | kbuild/kconfig
| | * | kconfig: fix set but not used variablesLucas De Marchi2011-08-291-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some variables were being set but never used, which was triggering warnings in GCC >= 4.6. Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi> Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
| | * | kconfig: handle SIGINT in menuconfigDavidlohr Bueso2011-08-291-34/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I recently got bitten in the ass when pressing Ctrl-C and lost all my current configuration changes. This patch captures SIGINT and allows the user to save any changes. Some code refactoring was made in order to handle the exit behavior. Signed-off-by: Davidlohr Bueso <dave@gnu.org> Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
| | * | kconfig: fix __enabled_ macros definition for invisible and un-selected symbolsArnaud Lacombe2011-08-291-13/+36
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | __enabled_<sym-name> are only generated on visible or selected entries, do not reflect the purpose of its introduction. Fix this by always generating these entries for named symbol. Reported-by: Rabin Vincent <rabin@rab.in> Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
| * | Merge branch 'master/kconfig-localmodconfig' of ↵Michal Marek2011-08-192-29/+21
| |\ \ | | | | | | | | | | | | git://github.com/lacombar/linux-2.6 into kbuild/kconfig
| | * | kconfig/streamline_config.pl: merge local{mod,yes}configArnaud Lacombe2011-08-081-17/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The two targets `localmodconfig' and `localyesconfig' only differs from the sed(1) ran on the result of `streamline_config.pl' to convert symbols set to `modules' to `yes'. This conversion can be made directly from the perl script, and thus avoid duplicating the command to generate the configuration. Cc: Steven Rostedt <rostedt@goodmis.org> Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
| | * | kconfig/streamline_config.pl: use options to determine operating modeArnaud Lacombe2011-08-082-3/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The options introduced are --localmodconfig (default) and --localyesconfig. They match the Makefile target behavior. Cc: Steven Rostedt <rostedt@goodmis.org> Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
| | * | kconfig/streamline_config.pl: directly access LSMOD from the environmentArnaud Lacombe2011-08-082-12/+8
| | |/ | | | | | | | | | | | | Cc: Steven Rostedt <rostedt@goodmis.org> Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
| * | kconfig: factor code in menu_get_ext_help()Arnaud Lacombe2011-08-081-6/+4
| | | | | | | | | | | | | | | | | | Cc: Srinivas Kandagatla <srinivas.kandagatla@st.com> Signed-off-by: Arnaud Lacombe <lacombar@gmail.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
| * | kbuild: Fix help text not displayed in choice option.Srinivas Kandagatla2011-08-081-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Help text under choice menu is never displayed because it does not have symbol name associated with it, however many kconfigs have help text under choice, assuming that it will be displayed when user selects help. for example in Kconfig if we have: choice prompt "Choice" ---help--- HELP TEXT ... config A bool "A" config B bool "B" endchoice Without this patch "HELP TEXT" is not displayed when user selects help option when "Choice" is highlighted from menuconfig or xconfig or gconfig. This patch changes the logic in menu_get_ext_help to display help for cases which dont have symbol names like choice. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@st.com> Reviewed-by: Stuart Menefy <stuart.menefy@st.com> Reviewed-by: Arnaud Lacombe <lacombar@gmail.com> Cc: stable@kernel.org Signed-off-by: Michal Marek <mmarek@suse.cz>
| * | kconfig/nconf: nuke unreferenced `nohelp_text'Arnaud Lacombe2011-08-081-2/+0
| |/ | | | | | | | | | | | | | | After commit 5416857867c9cc94aba641898c567d9707de30f1, nohelp_text' is no longer referenced, nuke it. Signed-off-by: Arnaud Lacombe <lacombar@gmail.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
* | Merge branch 'kbuild' of ↵Linus Torvalds2011-11-0610-327/+399
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild * 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild: Kbuild: append missing-syscalls to the default target list genksyms: Regenerate lexer and parser genksyms: Do not expand internal types genksyms: Minor parser cleanup Makefile: remove a duplicated line fixdep: fix extraneous dependencies scripts/Makefile.build: do not reference EXTRA_CFLAGS as CFLAGS replacement kbuild: prevent make from deleting _shipped files kbuild: Do not delete empty files in make distclean
| * | genksyms: Regenerate lexer and parserMichal Marek2011-10-113-306/+358
| | |
| * | genksyms: Do not expand internal typesMichal Marek2011-10-114-2/+20
| | | | | | | | | | | | | | | | | | | | | Consider structures, unions and enums defined in the source file as internal and do not expand them. This way, changes to e.g. struct serial_private in drivers/tty/serial/8250_pci.c will not affect the checksum of the pciserial_* exports.
| * | genksyms: Minor parser cleanupMichal Marek2011-10-111-18/+15
| | | | | | | | | | | | | | | Move the identical logic for recording a struct/union/enum definition to a function.
| * | fixdep: fix extraneous dependenciesPeter Foley2011-09-091-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The introduction of include/linux/kconfig.h created 3 extraneous dependencies: include/config/.h include/config/h.h include/config/foo.h Fix this by excluding kconfig.h from fixdep calculations. Signed-off-by: Peter Foley <pefoley2@verizon.net> Signed-off-by: Michal Marek <mmarek@suse.cz>