summaryrefslogtreecommitdiff
path: root/Documentation/kbuild
AgeCommit message (Collapse)Author
2009-12-12kbuild: generate modules.builtinMichal Marek
To make it easier for module-init-tools and scripts like mkinitrd to distinguish builtin and missing modules, install a modules.builtin file listing all builtin modules. This is done by generating an additional config file (tristate.conf) with tristate options set to uppercase 'Y' or 'M'. If we source that config file, the builtin modules appear in obj-Y. Signed-off-by: Michal Marek <mmarek@suse.cz>
2009-12-12kbuild: move autoconf.h to include/generatedSam Ravnborg
Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Michal Marek <mmarek@suse.cz>
2009-09-20kbuild: introduce ld-optionSam Ravnborg
ld-option is used to check if $(LD) supports a specific option. Based on patch from Andi Kleen. Cc: Andi Kleen <ak@linux.intel.com> Signed-off-by: Sam Ravnborg <sam@ravnborg.org> First use is to check if option -X is supported (upcoming patch). Theis is ne
2009-09-20kbuild: rename ld-option to cc-ldoptionSam Ravnborg
ld-option is misnamed as it test options to gcc, not to ld. Renamed it to reflect this. Cc: Andi Kleen <andi@firstfloor.org> Cc: Roland McGrath <roland@redhat.com> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2009-09-20kbuild: use INSTALLKERNEL to select customized installkernel scriptSam Ravnborg
Replace the use of CROSS_COMPILE to select a customized installkernel script with the possibility to set INSTALLKERNEL to select a custom installkernel script when running make: make INSTALLKERNEL=arm-installkernel install With this patch we are now more consistent across different architectures - they did not all support use of CROSS_COMPILE. The use of CROSS_COMPILE was a hack as this really belongs to gcc/binutils and the installkernel script does not change just because we change toolchain. The use of CROSS_COMPILE caused troubles with an upcoming patch that saves CROSS_COMPILE when a kernel is built - it would no longer be installable. [Thanks to Peter Z. for this hint] This patch undos what Ian did in commit: 0f8e2d62fa04441cd12c08ce521e84e5bd3f8a46 ("use ${CROSS_COMPILE}installkernel in arch/*/boot/install.sh") The patch has been lightly tested on x86 only - but all changes looks obvious. Acked-by: Peter Zijlstra <peterz@infradead.org> Acked-by: Mike Frysinger <vapier@gentoo.org> [blackfin] Acked-by: Russell King <linux@arm.linux.org.uk> [arm] Acked-by: Paul Mundt <lethal@linux-sh.org> [sh] Acked-by: "H. Peter Anvin" <hpa@zytor.com> [x86] Cc: Ian Campbell <icampbell@arcom.com> Cc: Tony Luck <tony.luck@intel.com> [ia64] Cc: Fenghua Yu <fenghua.yu@intel.com> [ia64] Cc: Hirokazu Takata <takata@linux-m32r.org> [m32r] Cc: Geert Uytterhoeven <geert@linux-m68k.org> [m68k] Cc: Kyle McMartin <kyle@mcmartin.ca> [parisc] Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> [powerpc] Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> [s390] Cc: Thomas Gleixner <tglx@linutronix.de> [x86] Cc: Ingo Molnar <mingo@redhat.com> [x86] Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2009-06-09kconfig: resort the documentation of the environment variablesMarkus Heidelberg
All the KCONFIG_ environment variables were previously located in a section "Environment variables in 'menuconfig'", but neither are they restricted to 'menuconfig' nor are they all used by 'menuconfig'. Introduce the following three sections for these variables: * Environment variables for '*config' * Environment variables for '{allyes/allmod/allno/rand}config' * Environment variables for 'silentoldconfig' Furthermore this puts MENUCONFIG_MODE next to MENUCONFIG_COLOR into a common section "User interface options for 'menuconfig'". Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2009-06-09kbuild/Documentation: Incorrect makefile syntax in exampleDavid VomLehn
There is an error in the make syntax for one of the kbuild examples Signed-off-by: David VomLehn <dvomlehn@cisco.com> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2009-04-19kbuild: introduce subdir-ccflags-ySam Ravnborg
Following patch introduce support for setting options to gcc that has effect for current directory and all subdirectories. The typical use case are an architecture or a subsystem that decide to cover all files with -Werror. Today alpha, mips and sparc uses -Werror in almost all their Makefile- with subdir-ccflag-y it is now simpler to do so as only the top-level directories needs to be covered. Likewise if we decide to cover a full subsystem such as net/ with -Werror this is done by adding a single line to net/Makefile. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Cc: Ingo Molnar <mingo@redhat.com> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: Thomas Gleixner <tglx@linutronix.de>
2009-04-11kbuild: introduce destination-y for exported headersSam Ravnborg
xtensa and arm have asked for a possibility to export headers and locate them in a specific directory when exported. Introduce destiantion-y to support this. This patch in additiona adds some limited documentation for the variables used for exported headers. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Cc: Oskar Schirmer <os@emlix.com> Cc: Mikael Starvik <mikael.starvik@axis.com>
2009-01-14kbuild: fix kbuild.txt typosRandy Dunlap
Fix typos in the new kbuild.txt file. Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2009-01-07kbuild: fix typos (s/bin_shipped/bin.o_shipped/) in DocumentationWolfram Sang
The text always mentions ...bin.o_shipped, just the example makefiles actually use ...bin_shipped. It was corrected in one place some time ago, these ones seem to have been forgotten. Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2009-01-07kbuild: reintroduce ALLSOURCE_ARCHS support for tags/cscopeJike Song
This patch reintroduce the ALLSOURCE_ARCHS support for tags/TAGS/ cscope targets. The Kbuild previously has this feature, but after moving the targets into scripts/tags.sh, ALLSOURCE_ARCHS disappears. It's something like this: $ make ALLSOURCE_ARCHS="x86 mips arm" tags cscope Signed-off-by: Jike Song <albcamus@gmail.com> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2009-01-02kbuild: document environment variablesSam Ravnborg
Add kbuild.txt to Documentation/kbuild More stuff can be added later - at least we have som of the varous environment variables documented now. Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2009-01-02kbuild: make *config usage docsRandy Dunlap
Create a kconfig user assistance guide, with a few tips and hints about using menuconfig, xconfig, and gconfig. Mostly contains user interface, environment variables, and search topics, along with mini.config/custom.config usage. Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-12-03kbuild: introduce $(kecho) convenience echoMike Frysinger
There is a bunch of places in the build system where we do 'echo' to show some nice status lines. This means we still get output when running in silent mode. So declare a new KECHO variable that only does 'echo' when we are in a suitable verbose build mode. Signed-off-by: Mike Frysinger <vapier@gentoo.org> [sam: added Documentation] Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-05-04kconfig-language.txt: remove bogus hintAdrian Bunk
For the use case the hint describe a simple dependency is enough. Signed-off-by: Adrian Bunk <bunk@kernel.org> Acked-by: Randy Dunlap <randy.dunlap@oracle.com>
2008-04-28kconifg: 'select' considered less evilMatthew Wilcox
While select should be used with care, it is not actually evil. Signed-off-by: Matthew Wilcox <willy@linux.intel.com> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-04-25kbuild: Add new Kbuild variable KBUILD_EXTRA_SYMBOLSRichard Hacker
This patch adds a new (Kbuild) Makefile variable KBUILD_EXTRA_SYMBOLS. The space separated list of file names assigned to KBUILD_EXTRA_SYMBOLS is used when calling scripts/mod/modpost during stage 2 of the Kbuild process for non-kernel-tree modules. Signed-off-by: Richard Hacker <lerichi@gmx.net> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-01-28kconfig: document use of HAVE_*Sam Ravnborg
It has been discussed on lkml several times but we need it documented as this is new stuff. Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-01-28kconfig: environment symbol supportRoman Zippel
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: add hints/tips/tricks to Documentation/kbuild/kconfig-language.txtRandy Dunlap
Add a section on kconfig hints: how to do <something> in Kconfig files. Fix a few typos/spellos. Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-10-22kbuild: cc-cross-prefix spellingGeert Uytterhoeven
Spelling fixes for cc-cross-prefix documentation Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-10-19kconfig: update kconfig-language textRandy Dunlap
Add kconfig-language docs for mainmenu, def_bool, and def_tristate. Remove "requires" as a synonym of "depends on" since it was removed from the parser in commit 247537b9a270b52cc0375adcb0fb2605a160cba5. Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-10-19kbuild: introduce cc-cross-prefixSam Ravnborg
cc-cross-prefix is useful for the architecture that like to provide a default CROSS_COMPILE value, but may have several to select between. Sample usage: ifneq ($(SUBARCH),$(ARCH)) ifeq ($(CROSS_COMPILE),) CROSS_COMPILE := $(call cc-cross-prefix, m68k-linux-gnu- m68k-linux-) endif endif Actual usage by the different archs will taken care of later. Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-10-15kbuild: introduce ccflags-y, asflags-y and ldflags-ySam Ravnborg
Introduce ccflags-y, asflags-y and ldflags-y so we soon can deprecate use of EXTRA_CFLAGS, EXTRA_AFLAGS and EXTRA_LDFLAGS. This patch does not touch any in-tree users - thats next round. Lets get this committed first and then fix the users of the soon to be deprecated variants next. The rationale behind this change is to introduce support for makefile fragments like: ccflags-$(CONFIG_WHATEVER_DEBUG) := -DDEBUG As a replacement for the uglier: ifeq ($(CONFIG_WHATEVER_DEBUG),y) EXTRA_CFLAGS := -DDEBUG endif Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-10-15kbuild: enable 'make CPPFLAGS=...' to add additional options to CPPSam Ravnborg
The variable CPPFLAGS is a wellknown variable and the usage by kbuild may result in unexpected behaviour. This patch replace use of CPPFLAGS with KBUILD_CPPFLAGS all over the tree and enabling one to use: make CPPFLAGS=... to specify additional CPP commandline options. Patch was tested on following architectures: alpha, arm, i386, x86_64, mips, sparc, sparc64, ia64, m68k, s390 Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-10-15kbuild: enable 'make AFLAGS=...' to add additional options to ASSam Ravnborg
The variable AFLAGS is a wellknown variable and the usage by kbuild may result in unexpected behaviour. On top of that several people over time has asked for a way to pass in additional flags to gcc. This patch replace use of AFLAGS with KBUILD_AFLAGS all over the tree. Patch was tested on following architectures: alpha, arm, i386, x86_64, mips, sparc, sparc64, ia64, m68k, s390 Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-10-14kbuild: enable 'make CFLAGS=...' to add additional options to CCSam Ravnborg
The variable CFLAGS is a wellknown variable and the usage by kbuild may result in unexpected behaviour. On top of that several people over time has asked for a way to pass in additional flags to gcc. This patch replace use of CFLAGS with KBUILD_CFLAGS all over the tree and enabling one to use: make CFLAGS=... to specify additional gcc commandline options. One usecase is when trying to find gcc bugs but other use cases has been requested too. Patch was tested on following architectures: alpha, arm, i386, x86_64, mips, sparc, sparc64, ia64, m68k Test was simple to do a defconfig build, apply the patch and check that nothing got rebuild. Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-10-12kbuild: kill EXTRA_ARFLAGSSam Ravnborg
EXTRA_ARFLAGS have never been used so no need to carry around on this. A google search did not reveal any external module using this either. Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-10-12kbuild: fix documentation in makefiles.txtSam Ravnborg
Small error had sneaked in with respect to use of LDFLAGS_$@. LDFLAGS_$@ is not valid in normal kbuild files so do not say so. Fix a reference bug too. Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-08-11docs: note about select in kconfig-language.txtJarek Poplawski
A warning note from Sam Ravnborg about kconfig's select evilness, dependencies and the future (slightly corrected). Signed-off-by: Jarek Poplawski <jarkao2@o2.pl> Cc: Sam Ravnborg <sam@ravnborg.org> Cc: Roman Zippel <zippel@linux-m68k.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-16kbuild: document cc-fullversionSam Ravnborg
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-05-02kbuild: small documentation fix in Documentation/kbuild/modules.txtAnton Blanchard
The Makefile fragment in Documentation/kbuild/modules.txt looks to be missing some braces. Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-02-17kbuild: more doc. cleanupsRandy Dunlap
Fix typos/spellos in kbuild/makefiles.txt. Signed-off-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Adrian Bunk <bunk@stusta.de>
2006-12-12kconfig: Standardize "depends" -> "depends on" in Kconfig filesRobert P. J. Day
Standardize the miniscule percentage of occurrences of "depends" in Kconfig files to "depends on", and update kconfig-language.txt to reflect that. Signed-off-by: Robert P. J. Day <rpjday@mindspring.com> Signed-off-by: Adrian Bunk <bunk@stusta.de>
2006-11-30Fix typos in /Documentation : MiscMatt LaPlante
This patch fixes typos in various Documentation txts. The patch addresses some misc words. Signed-off-by: Matt LaPlante <kernel1@cyberdogtech.com> Acked-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Adrian Bunk <bunk@stusta.de>
2006-10-04[PATCH] docs: small kbuild cleanupDaniel Walker
While reading this I noticed that the contents of this document list section "3.8 Command line dependency" but it doesn't exist in the document. Signed-off-by: Daniel Walker <dwalker@mvista.com> Cc: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-03Fix typos in Documentation/: 'S'Matt LaPlante
This patch fixes typos in various Documentation txts. The patch addresses some words starting with the letter 'S'. Signed-off-by: Matt LaPlante <kernel1@cyberdogtech.com> Acked-by: Alan Cox <alan@redhat.com> Acked-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Adrian Bunk <bunk@stusta.de>
2006-10-01kbuild: trivial documentation fixesRobert P. J. Day
Signed-off-by: "Robert P. J. Day" <rpjday@mindspring.com> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2006-09-26[PATCH] x86: Detect CFI support in the assembler at runtimeAndi Kleen
... instead of using a CONFIG option. The config option still controls if the resulting executable actually has unwind information. This is useful to prevent compilation errors when users select CONFIG_STACK_UNWIND on old binutils and also allows to use CFI in the future for non kernel debugging applications. Cc: jbeulich@novell.com Cc: sam@ravnborg.org Signed-off-by: Andi Kleen <ak@suse.de>
2006-09-25kbuild: fixup Documentation/kbuild/modules.txtRobert P. J. Day
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2006-09-25kbuild: fix for some typos in Documentation/makefiles.txtBryce Harrington
I noticed a few typos while reading makefiles.txt to learn about the kbuild system. Attached is a patch against 2.6.18 to fix them. Remove trailing whitespace while we are there.. Signed-off-by: Bryce Harrington <bryce@osdl.org> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2006-09-25kbuild: linguistic fixes for Documentation/kbuild/makefiles.txtJan Engelhardt
I have done a look-through through Documentation/kbuild/ and my corrections (proposed) are attached. Cc'ed are original author Michael (responsible for comitting changes to these files?), Sam (kbuild maintainer), Adrian (-trivial maintainer). Signed-off-by: Jan Engelhardt <jengelh@gmx.de> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2006-09-25kbuild: linguistic fixes for Documentation/kbuild/modules.txtJan Engelhardt
I have done a look-through through Documentation/kbuild/ and my corrections (proposed) are attached. Cc'ed are original author Michael (responsible for comitting changes to these files?), Sam (kbuild maintainer), Adrian (-trivial maintainer). Signed-off-by: Jan Engelhardt <jengelh@gmx.de> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2006-09-25kconfig: linguistic fixes for Documentation/kbuild/kconfig-language.txtJan Engelhardt
I have done a look-through through Documentation/kbuild/ and my corrections (proposed) are attached. Cc'ed are original author Michael (responsible for comitting changes to these files?), Sam (kbuild maintainer), Adrian (-trivial maintainer). Signed-off-by: Jan Engelhardt <jengelh@gmx.de> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2006-07-31[PATCH] vDSO hash-style fixRoland McGrath
The latest toolchains can produce a new ELF section in DSOs and dynamically-linked executables. The new section ".gnu.hash" replaces ".hash", and allows for more efficient runtime symbol lookups by the dynamic linker. The new ld option --hash-style={sysv|gnu|both} controls whether to produce the old ".hash", the new ".gnu.hash", or both. In some new systems such as Fedora Core 6, gcc by default passes --hash-style=gnu to the linker, so that a standard invocation of "gcc -shared" results in producing a DSO with only ".gnu.hash". The new ".gnu.hash" sections need to be dealt with the same way as ".hash" sections in all respects; only the dynamic linker cares about their contents. To work with older dynamic linkers (i.e. preexisting releases of glibc), a binary must have the old ".hash" section. The --hash-style=both option produces binaries that a new dynamic linker can use more efficiently, but an old dynamic linker can still handle. The new section runs afoul of the custom linker scripts used to build vDSO images for the kernel. On ia64, the failure mode for this is a boot-time panic because the vDSO's PT_IA_64_UNWIND segment winds up ill-formed. This patch addresses the problem in two ways. First, it mentions ".gnu.hash" in all the linker scripts alongside ".hash". This produces correct vDSO images with --hash-style=sysv (or old tools), with --hash-style=gnu, or with --hash-style=both. Second, it passes the --hash-style=sysv option when building the vDSO images, so that ".gnu.hash" is not actually produced. This is the most conservative choice for compatibility with any old userland. There is some concern that some ancient glibc builds (though not any known old production system) might choke on --hash-style=both binaries. The optimizations provided by the new style of hash section do not really matter for a DSO with a tiny number of symbols, as the vDSO has. If someone wants to use =gnu or =both for their vDSO builds and worry less about that compatibility, just change the option and the linker script changes will make any choice work fine. Signed-off-by: Roland McGrath <roland@redhat.com> Cc: "Luck, Tony" <tony.luck@intel.com> Cc: Kyle McMartin <kyle@mcmartin.ca> Cc: Paul Mackerras <paulus@samba.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Jeff Dike <jdike@addtoit.com> Cc: Andi Kleen <ak@muc.de> Cc: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-24kbuild: add option for stripping modules while installing themTheodore Ts'o
Add option for stripping modules while installing them. This function adds support for stripping modules while they are being installed. CONFIG_DEBUG_KERNEL (which will probably become more popular as developers use kdump) causes the size of the installed modules to grow by a factor of 9 or so. Some kernel package systems solve this problem by stripping the debug information from /lib/modules after running "make modules_install", but that may not work for people who are installing directly into /lib/modules --- root partitions that were sized to handle 16 megs worth of modules may not be quite so happy with 145 megs of modules, so the "make modules_install" never succeeds. This patch allows such users to request modules_install to strip the modules as they are installed. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2006-04-04kbuild: fix garbled text in modules.txtBrian Gerst
Signed-off-by: Brian Gerst <bgerst@didntduck.org> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2006-03-10kbuild: in makefile.txt note that Makefile is preferred name for kbuild filesSam Ravnborg
As noted by Roland Dreier <rdreier@cisco.com> makefiles.txt told one to use the name 'Kbuild' as preferred name for kbuild files. This is not yet true so let makefiles.txt reflect reality. Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2006-02-19kbuild: make cc-version available in kbuild filesSam Ravnborg
Move $(CC) support functions to Kbuild.include so they are available in the kbuild files. In addition the following was done: o as-option documented in Documentation/kbuild/makefiles.txt o Moved documentation to new section to match new scope of functions o added cc-ifversion used to conditionally select a text string dependent on actual $(CC) version o documented cc-ifversion o change so Kbuild.include is read before the kbuild file Signed-off-by: Sam Ravnborg <sam@ravnborg.org>