aboutsummaryrefslogtreecommitdiffstats
path: root/scripts (follow)
AgeCommit message (Collapse)AuthorFilesLines
2008-01-28kbuild: use simpler section mismatch warnings in modpostSam Ravnborg1-40/+16
The typical layout is now: WARNING: vmlinux.o(.text+0x372ec): Section mismatch: reference to .devinit.text:pci_scan_one_pbm in 'psycho_scan_bus' This is first step towards more readable warnings. Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-01-28kbuild: introduce new option to enhance section mismatch analysisSam Ravnborg1-2/+7
Setting the option DEBUG_SECTION_MISMATCH will report additional section mismatch'es but this should in the end makes it possible to get rid of all of them. See help text in lib/Kconfig.debug for details. Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-01-28Use separate sections for __dev/__cpu/__mem code/dataSam Ravnborg1-15/+39
Introducing separate sections for __dev* (HOTPLUG), __cpu* (HOTPLUG_CPU) and __mem* (MEMORY_HOTPLUG) allows us to do a much more reliable Section mismatch check in modpost. We are no longer dependent on the actual configuration of for example HOTPLUG. This has the effect that all users see much more Section mismatch warnings than before because they were almost all hidden when HOTPLUG was enabled. The advantage of this is that when building a piece of code then it is much more likely that the Section mismatch errors are spotted and the warnings will be felt less random of nature. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Cc: Greg KH <greg@kroah.com> Cc: Randy Dunlap <randy.dunlap@oracle.com> Cc: Adrian Bunk <bunk@kernel.org>
2008-01-28kbuild: check section names consistently in modpostSam Ravnborg1-86/+60
Now that match() is introduced use it consistently so we can share the section name definitions. Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-01-28kbuild: introduce blacklisting in modpostSam Ravnborg1-177/+128
Change the logic in modpost so we identify all the bad combinations of sections that refer to other sections. Compared to the previous approach we are much less dependent on knowledge of what additional sections the tool chain uses and thus we can keep the false positives low. The implmentation is changed to use a table based lookup and we now check all combinations in first pass so we no longer need separate passes for init and exit sections. Tested that the same warnings are generated for an allyesconfig build without CONFIG_HOTPLUG. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Cc: Randy Dunlap <randy.dunlap@oracle.com> Cc: Adrian Bunk <bunk@kernel.org>
2008-01-28kbuild: code refactoring in modpostSam Ravnborg1-105/+137
Split a too long function up in smaller bits to make prgram logic easier to follow. A few related changes done due to parameter changes. No functional changes. Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-01-28kbuild: try harder to find symbol names in modpostSam Ravnborg2-2/+19
The relocation record sometimes contained an address which was not an exactly match for a symbol. Implment some simple logic such that if there is a symbol within 20 bytes of the address contained in the relocation record then print the name of this symbol. With this change modpost could find symbol names for the remaining .init.text symbols in my allyesconfig build for x86_64. Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-01-28kbuild: fix so modpost can now check any .o fileSam Ravnborg1-1/+2
It is very convinient to say: scripts/mod/modpost mm/built-in.o to check if any section mismatch errors occured in mm/ (as an example). Fix it so this is possible again. Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-01-28kbuild: minor scripts/decodecode updateRandy Dunlap1-2/+15
Remove the tmp file when exiting. Noticed by Arjan van de Ven. Catch mktemp failure and exit with message. Trap kill or other signals and exit cleanly. Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-01-28kconfig: use environment optionRoman Zippel1-15/+0
Use the environment option to provide the ARCH symbol and the KERNELVERSION symbol. Signed-off-by: Roman Zippel <zippel@linux-m68k.org> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-01-28kconfig: environment symbol supportRoman Zippel8-35/+108
Add the possibility to import a value from the environment into kconfig via the option syntax. Beside flexibility this has the advantage providing proper dependencies. Documented the options syntax. Signed-off-by: Roman Zippel <zippel@linux-m68k.org> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-01-28kconfig: explicitly introduce expression listRoman Zippel5-20/+24
Rename E_CHOICE to E_LIST to explicitly add support for expression lists. Add a helper macro expr_list_for_each_sym to more easily iterate over the list. Signed-off-by: Roman Zippel <zippel@linux-m68k.org> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-01-28kconfig: gconfig: symbol fixEGRY Gabor1-1/+1
Gettext support for symbol names are unnecessary. Signed-off-by: Egry Gabor <gaboregry1@t-online.hu> Reviewed-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Cc: Roman Zippel <zippel@linux-m68k.org>
2008-01-28kconfig: gettext support for configEGRY Gabor1-15/+20
Gettext support for conf.c [Include locale.h by Kyle]. Signed-off-by: Egry Gabor <gaboregry1@t-online.hu> Reviewed-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Cc: Roman Zippel <zippel@linux-m68k.org> Cc: Kyle McMartin <kyle@mcmartin.ca>
2008-01-28kconfig: gettext support for lxdialogEGRY Gabor7-10/+22
Gettext support for lxdialog. Signed-off-by: Egry Gabor <gaboregry1@t-online.hu> Reviewed-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Cc: Roman Zippel <zippel@linux-m68k.org>
2008-01-28kconfig: gettext support for menuconfigEGRY Gabor1-25/+26
Full gettext support for menuconfig. Signed-off-by: Egry Gabor <gaboregry1@t-online.hu> Reviewed-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Cc: Roman Zippel <zippel@linux-m68k.org>
2008-01-28kconfig: gettext support for xconfigEGRY Gabor1-44/+49
Full gettext support for xconfig. Signed-off-by: Egry Gabor <gaboregry1@t-online.hu> Reviewed-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Cc: Roman Zippel <zippel@linux-m68k.org>
2008-01-28kconfig: macro fix in menu.cEGRY Gabor1-2/+2
This patch removes the indirect I18N support for config file. Signed-off-by: Egry Gabor <gaboregry1@t-online.hu> Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Cc: Roman Zippel <zippel@linux-m68k.org>
2008-01-28kconfig: gettext support for gconfigEGRY Gabor2-2/+6
Gettext support for menu and toolbar. Signed-off-by: Egry Gabor <gaboregry1@t-online.hu> Reviewed-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Cc: Roman Zippel <zippel@linux-m68k.org>
2008-01-28kconfig: missing macros in gconfigEGRY Gabor1-4/+8
This patch adds missing gettext macros. Signed-off-by: Egry Gabor <gaboregry1@t-online.hu> Reviewed-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Cc: Roman Zippel <zippel@linux-m68k.org>
2008-01-28kconfig: whitespace removingEGRY Gabor2-0/+10
This patch removes the unnecessary whitespaces from end of help lines of Kconfig files. Signed-off-by: Egry Gabor <gaboregry1@t-online.hu> Reviewed-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Cc: Roman Zippel <zippel@linux-m68k.org>
2008-01-28kconfig: update-po-config infoEGRY Gabor1-7/+11
This patch adds tracking messages. Signed-off-by: Egry Gabor <gaboregry1@t-online.hu> Reviewed-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Cc: Roman Zippel <zippel@linux-m68k.org>
2008-01-28kbuild: scripts/mkmakefile: dynamic determination of output directoryJan Beulich1-3/+7
Rather than fixing the output directory in the generated Makefile, determine it from the placement of Makefile. This allows moving the build tree around or accessing it through different mount paths. (The lastword definition is a compatibility one for make prior to 3.81; newer make will simply ignore it and use the [faster] built-in.) Signed-off-by: Jan Beulich <jbeulich@novell.com> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-01-28kbuild: clean up modpost.cSam Ravnborg1-96/+101
akpm complained about overly long lines in modpost.c and when started additional style issues were fixed: o Updated my copyright o Removed unneeded {} o Drop assignments in if () o Spaces around operators o Break long lines o locate * near variable not type o Fix a format specifier for sizeof() o Corrected placement of '{' and '}' o spaces to tabs (but use tabs only for indention) modpost.c is not checkpatch clean. Readability were favoured on top of checkpatch compliance. But checkpatch were used to find additional stuff to clean up. Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-01-28kconfig: use C89 random functions in conf.cLadislav Michl1-2/+2
rand and srand functions conform also to C89 in addition to POSIX.1-2001, which makes them a bit more portable (work also on MinGW host). Linux man page also says: "The versions of rand() and srand() in the Linux C Library use the same random number generator as random() and srandom()". * Use C89 conformant functions rand() and srand() Signed-off-by: Ladislav Michl <ladis@linux-mips.org> Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Cc: Roman Zippel <zippel@linux-m68k.org>
2008-01-28kconfig: fix whitespace and sort includes in conf.cLadislav Michl1-3/+3
Sort includes and remove leading whitespace. Signed-off-by: Ladislav Michl <ladis@linux-mips.org> Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Cc: Roman Zippel <zippel@linux-m68k.org
2008-01-28kconfig: delete unused FILE_ and SYMBOL_ flagsSam Ravnborg2-4/+0
The *_PRINTED flags were never used - so delete them. Do we need them later then we can re-add them. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Cc: Roman Zippel <zippel@linux-m68k.org>
2008-01-28kconfig: rename E_OR & friends to avoid name clashSam Ravnborg4-10/+10
We had macros named the same as a set of enumeration values. It is legal code but very confusing to read - so rename the macros from E_* to EXPR_* Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Cc: Roman Zippel <zippel@linux-m68k.org>
2008-01-28kconfig: allow overriding symbolsJan Engelhardt1-9/+5
Allow config variables in .config to override earlier ones in the same file. In other words, # CONFIG_SECURITY is not defined CONFIG_SECURITY=y will activate it. This makes it a bit easier to do cat original-config myconfig myconfig2 ... >.config; and run *config as expected. Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de> Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Cc: Roman Zippel <zippel@linux-m68k.org> Cc: Randy Dunlap <randy.dunlap@oracle.com>
2008-01-28kconfig: make kconfig MinGW friendlyLadislav Michl3-66/+32
Kconfig is powerfull tool. So powerfull that more and more software projects are using it for configuration. So instead of fixing some of them one by one, lets fix it in kernel and wait for sync. This work was originaly done for PTXdist - GPL licensed build system for userlands and cross-compilers, but it will not hurt kernel kconfig either. PTXdist menuconfig now works on Windows linked with PDCurses and compiled using MinGW - there is no termios and signals. * Do not include <sys/wait.h> and <signal.h> (comes from times when lxdialog was separate process) * Do not mess with termios directly and let curses tell screen size. Comment to commit c8dc68ad0fbd934e78e913b8a8d7b45945db4930 says check for screen size could be removed later, but because it didn't happen for more than year I left it here as well. * Save cursor position added by Sam Signed-off-by: Ladislav Michl <ladis@linux-mips.org> Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Cc: Roman Zippel <zippel@linux-m68k.org>
2008-01-28kbuild: fix false positive -dirty tag caused by make-kpkgTheodore Ts'o1-1/+2
make-kpkg modifies scripts/package/Makefile and deletes scripts/package/builddeb as part of its build process. Ignore these changes so the tree isn't marked as -dirty, when it is just an artifact of make-kpkg. (make-kpkg clean restores the files to their original state, and these helper scripts won't affect the final compiled kernel in any way.) Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-01-28kbuild: fix scripts/setlocalversion to avoid erroneous -dirty tagTheodore Ts'o1-0/+1
If git's index file is out of date, and some files have been touched such that their timestamp doesn't what is in the index, "git diff-index HEAD" may show that a particular file is dirty, when in fact it really isn't. Running "git update-index" will update the index to avoid these false positives. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-01-28kbuild: change CONFIG_LOCALVERSION_AUTO to use a git-describe-ish formatTheodore Ts'o1-1/+1
Change the automatic local version to have the form -nnnnn-gSHA1SUMID, where 'nnnnn' is the number of commits since the last tag (i.e., 2.6.21-rc7). This makes it much more likely that the package names created for the kernel will look "newer" to a package manager. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-01-28kbuild: eradicate bashisms in scripts/patch-kernelAndreas Mohr1-12/+10
Make the patch-kernel shell script sufficiently compatible with POSIX shells, i.e., remove bashisms from scripts/patch-kernel. This means that it now also works on dash 0.5.3-5 and still works on bash 3.1dfsg-8. Full changelog: - replaced non-standard "==" by standard "=" - replaced non-standard "source" statement by POSIX "dot" command - use leading ./ on mktemp filename to force the tempfile to a local directory, so that the search path is not used - replace bash syntax to remove leading dot by similar POSIX syntax - added missing (optional/not required) $ signs to shell variable names Signed-off-by: Andreas Mohr <andi@lisas.de> Acked-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-01-28kbuild: fix installing external modulesSam Ravnborg1-1/+1
Eric Sandeen <sandeen@redhat.com> reported: Installing external modules is supposed to put them in some path under /lib/modules/<version>/extra/subdir/, but this change: http://linux.bkbits.net:8080/linux-2.6/?PAGE=cset&REV=1.1982.9.23 makes them go under /lib/modules/<version>/extrasubdir (for example, make M=fs/ext3 modules_install puts ext3.ko in /lib/modules/<version>/extrafs/ext3.ko) This was the case only when specifying a trailing slash to M=.. Fixed by removing trailing slash if present so we correctly match dir part of target. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Cc: Eric Sandeen <sandeen@redhat.com>
2008-01-28kbuild: fixup genksyms usage/getoptMike Frysinger1-3/+7
The usage does not mention the "-a,--arch" or "-T,--dump-types" options, so add them. The calls to getopt() seem to mention options that no longer exist (some "k" and "p" thingy) but omits the "h" option which means using '-h' actually triggers the error code path, so update those as well. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-01-28kbuild: fix buglet in gcc-version.shSam Ravnborg1-1/+4
Greg Schafer <gschafer@zip.com.au> reported: ==== $make mrproper scripts/gcc-version.sh: [[: command not found This is on a very old host with an ancient bash as /bin/sh. But I have CONFIG_SHELL set and pointing to a modern bash. Something is wrong. This doesn't happen with 2.6.23 ==== Fixed using a more common string equality test. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Cc: Greg Schafer <gschafer@zip.com.au> Cc: Jesper Juhl <jesper.juhl@gmail.com>
2008-01-28Kbuild: Clarify the rpm-related make packaging targetsRobert P. J. Day1-3/+2
Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-01-28kbuild: support mercurial in setlocalversionAron Griffis1-0/+23
This represents mercurial changesets similarly to git. For untagged revisions, append the changeset id. If there are uncommitted changes, append -dirty. For example, -hgc60016ba6237-dirty Signed-off-by: Aron Griffis <aron@hp.com> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-01-28kconfig: use getopt() in conf.c for handling command line argumentsAndres Salomon1-13/+11
Switch from doing our own parsing of command line arguments to using getopt(3) to do it. Aside from simplifying things, this allows us to specify multiple arguments; the old code could only accept two arguments (input_mode and kconfig name). Note some subtle changes: - The argument '-?' is no longer supported. - '-h' is not treated as an error, so output goes to stdout, and we exit with '0'. - There is no compatibility checking amongst arguments; the last option will simply override earlier options. For example, 'conf -n -y foo' is perfectly valid now (input_mode will be set_yes). Previously, that would have been an error ("can't find file -y"). Signed-off-by: Andres Salomon <dilinger@debian.org> Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Cc: Roman Zippel <zippel@linux-m68k.org>
2008-01-28kbuild: fix a buffer overflow in modpostAndi Kleen1-1/+2
When passing an file name > 1k the stack could be overflowed. Not really a security issue, but still better plugged. Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-01-28kbuild: fix format string warnings in modpostAndi Kleen1-3/+4
Fix wrong format strings in modpost exposed by the previous patch. Including one missing argument -- some random data was printed instead. Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-01-28kbuild: declare the modpost error functions as printf likeAndi Kleen1-3/+5
This way gcc can warn for wrong format strings Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-01-28kconfig: if ncurses-devel is missing then say soSam Ravnborg2-13/+17
With this patch when ncurses-devel (or whatever it is named) is missing trying to run menuconfig will result in this: $ make menuconfig HOSTCC scripts/kconfig/conf.o HOSTCC scripts/kconfig/kxgettext.o *** Unable to find the ncurses libraries or the *** required header files. *** 'make menuconfig' requires the ncurses libraries. *** *** Install ncurses (ncurses-devel) and try again. *** make[1]: *** [scripts/kconfig/dochecklxdialog] Error 1 make: *** [menuconfig] Error 2 Much better than before where we just listed some build errors. The other *config targets will work indepenednt on ncurses being present or not. Includes improvements suggested by: Frans Pop <elendil@planet.nl> Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Cc: Frans Pop <elendil@planet.nl>
2008-01-28kbuild: implement modules.orderTejun Heo2-1/+22
When multiple built-in modules (especially drivers) provide the same capability, they're prioritized by link order specified by the order listed in Makefile. This implicit ordering is lost for loadable modules. When driver modules are loaded by udev, what comes first in modules.alias file is selected. However, the order in this file is indeterministic (depends on filesystem listing order of installed modules). This causes confusion. The solution is two-parted. This patch updates kbuild such that it generates and installs modules.order which contains the name of modules ordered according to Makefile. The second part is update to depmod such that it generates output files according to this file. Note that both obj-y and obj-m subdirs can contain modules and ordering information between those two are lost from beginning. Currently obj-y subdirs are put before obj-m subdirs. Sam Ravnborg cleaned up Makefile modifications and suggested using awk to remove duplicate lines from modules.order instead of using separate C program. Signed-off-by: Tejun Heo <htejun@gmail.com> Acked-by: Greg Kroah-Hartman <gregkh@suse.de> Cc: Bill Nottingham <notting@redhat.com> Cc: Rusty Russell <rusty@rustcorp.com.au> Cc: Kay Sievers <kay.sievers@vrfy.org> Cc: Jon Masters <jonathan@jonmasters.org> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-01-28kernel-doc: new P directive for DOC: sectionsJohannes Berg1-1/+39
The !P directive includes the contents of a DOC: section given by title, e.g. !Pfilename Title of the section Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-01-28kernel-doc: use no-doc optionJohannes Berg1-1/+3
When asked by a template to include all functions from a file, it will also include DOC: sections wreaking havoc in the generated docbook file. This patch makes it use the new -no-doc-sections flag for kernel-doc to avoid this. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-01-28kernel-doc: process functions, not DOC:Johannes Berg1-2/+12
This flag is necessary for the next patch for docproc to output only the functions and not DOC: sections when a function list is requested. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-01-28kernel-doc: single DOC: selectionJohannes Berg1-20/+43
Currently, DOC: sections are always output even if only a single function is requested, fix this and also make it possible to just output a single DOC: section by giving its title as the function name to output. Also fixes docbook XML well-formedness for sections with examples. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-01-28kernel-doc: init kernel versionJohannes Berg1-1/+1
The kernel-doc script triggers a perl warning when invoked without KERNELVERSION in the environment, rather make it use the string "unknown kernel version" instead. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>