blob: 68e32bb6bd807df797dd52204af2b973d021e0a6 [file] [log] [blame]
Michal Marekbc081dd2009-12-07 16:38:33 +01001Output files
2
3modules.order
4--------------------------------------------------
5This file records the order in which modules appear in Makefiles. This
6is used by modprobe to deterministically resolve aliases that match
7multiple modules.
8
9modules.builtin
10--------------------------------------------------
11This file lists all modules that are built into the kernel. This is used
12by modprobe to not fail when trying to load something builtin.
13
14
Sam Ravnborgacc08b52008-12-29 13:45:52 +010015Environment variables
16
17KCPPFLAGS
18--------------------------------------------------
19Additional options to pass when preprocessing. The preprocessing options
Randy Dunlapdf291fa2009-01-08 10:59:34 -080020will be used in all cases where kbuild does preprocessing including
Sam Ravnborgacc08b52008-12-29 13:45:52 +010021building C files and assembler files.
22
23KAFLAGS
24--------------------------------------------------
Sam Ravnborg65881692010-07-28 17:33:09 +020025Additional options to the assembler (for built-in and modules).
26
27AFLAGS_MODULE
28--------------------------------------------------
Lucas De Marchi25985ed2011-03-30 22:57:33 -030029Additional module specific options to use for $(AS).
Sam Ravnborgacc08b52008-12-29 13:45:52 +010030
Sam Ravnborg80c00ba2010-07-28 19:11:27 +020031AFLAGS_KERNEL
32--------------------------------------------------
Lucas De Marchi25985ed2011-03-30 22:57:33 -030033Additional options for $(AS) when used for assembler
Sam Ravnborg80c00ba2010-07-28 19:11:27 +020034code for code that is compiled as built-in.
Sam Ravnborgacc08b52008-12-29 13:45:52 +010035
36KCFLAGS
37--------------------------------------------------
Sam Ravnborg65881692010-07-28 17:33:09 +020038Additional options to the C compiler (for built-in and modules).
39
Sam Ravnborg80c00ba2010-07-28 19:11:27 +020040CFLAGS_KERNEL
41--------------------------------------------------
Lucas De Marchi25985ed2011-03-30 22:57:33 -030042Additional options for $(CC) when used to compile
Sam Ravnborg80c00ba2010-07-28 19:11:27 +020043code that is compiled as built-in.
44
Sam Ravnborg65881692010-07-28 17:33:09 +020045CFLAGS_MODULE
46--------------------------------------------------
Lucas De Marchi25985ed2011-03-30 22:57:33 -030047Additional module specific options to use for $(CC).
Sam Ravnborg65881692010-07-28 17:33:09 +020048
49LDFLAGS_MODULE
50--------------------------------------------------
51Additional options used for $(LD) when linking modules.
Sam Ravnborgacc08b52008-12-29 13:45:52 +010052
53KBUILD_VERBOSE
54--------------------------------------------------
Randy Dunlapdf291fa2009-01-08 10:59:34 -080055Set the kbuild verbosity. Can be assigned same values as "V=...".
Sam Ravnborgacc08b52008-12-29 13:45:52 +010056See make help for the full list.
57Setting "V=..." takes precedence over KBUILD_VERBOSE.
58
59KBUILD_EXTMOD
60--------------------------------------------------
61Set the directory to look for the kernel source when building external
62modules.
63The directory can be specified in several ways:
641) Use "M=..." on the command line
Nicolas Kaiserc95940f2010-08-05 11:23:11 -0700652) Environment variable KBUILD_EXTMOD
663) Environment variable SUBDIRS
Sam Ravnborgacc08b52008-12-29 13:45:52 +010067The possibilities are listed in the order they take precedence.
68Using "M=..." will always override the others.
69
70KBUILD_OUTPUT
71--------------------------------------------------
72Specify the output directory when building the kernel.
Nicolas Kaiserc95940f2010-08-05 11:23:11 -070073The output directory can also be specified using "O=...".
Randy Dunlapdf291fa2009-01-08 10:59:34 -080074Setting "O=..." takes precedence over KBUILD_OUTPUT.
Sam Ravnborgacc08b52008-12-29 13:45:52 +010075
Asbjoern Sloth Toennesen55f88ec2010-12-12 17:39:40 +000076KBUILD_DEBARCH
77--------------------------------------------------
78For the deb-pkg target, allows overriding the normal heuristics deployed by
79deb-pkg. Normally deb-pkg attempts to guess the right architecture based on
80the UTS_MACHINE variable, and on some architectures also the kernel config.
81The value of KBUILD_DEBARCH is assumed (not checked) to be a valid Debian
82architecture.
83
Sam Ravnborgacc08b52008-12-29 13:45:52 +010084ARCH
85--------------------------------------------------
86Set ARCH to the architecture to be built.
87In most cases the name of the architecture is the same as the
88directory name found in the arch/ directory.
Randy Dunlapdf291fa2009-01-08 10:59:34 -080089But some architectures such as x86 and sparc have aliases.
Sam Ravnborgacc08b52008-12-29 13:45:52 +010090x86: i386 for 32 bit, x86_64 for 64 bit
91sparc: sparc for 32 bit, sparc64 for 64 bit
92
93CROSS_COMPILE
94--------------------------------------------------
95Specify an optional fixed part of the binutils filename.
96CROSS_COMPILE can be a part of the filename or the full path.
97
Kirill Smelkove8d400a2010-02-17 11:45:33 +030098CROSS_COMPILE is also used for ccache in some setups.
Sam Ravnborgacc08b52008-12-29 13:45:52 +010099
100CF
101--------------------------------------------------
102Additional options for sparse.
103CF is often used on the command-line like this:
104
105 make CF=-Wbitwise C=2
106
107INSTALL_PATH
108--------------------------------------------------
109INSTALL_PATH specifies where to place the updated kernel and system map
Randy Dunlapdf291fa2009-01-08 10:59:34 -0800110images. Default is /boot, but you can set it to other values.
Sam Ravnborgacc08b52008-12-29 13:45:52 +0100111
Sam Ravnborgcaa27b62009-07-20 21:37:11 +0200112INSTALLKERNEL
113--------------------------------------------------
114Install script called when using "make install".
115The default name is "installkernel".
116
117The script will be called with the following arguments:
118 $1 - kernel version
119 $2 - kernel image file
120 $3 - kernel map file
121 $4 - default install path (use root directory if blank)
122
Nicolas Kaiserc95940f2010-08-05 11:23:11 -0700123The implementation of "make install" is architecture specific
Sam Ravnborgcaa27b62009-07-20 21:37:11 +0200124and it may differ from the above.
125
126INSTALLKERNEL is provided to enable the possibility to
127specify a custom installer when cross compiling a kernel.
Sam Ravnborgacc08b52008-12-29 13:45:52 +0100128
129MODLIB
130--------------------------------------------------
131Specify where to install modules.
132The default value is:
133
134 $(INSTALL_MOD_PATH)/lib/modules/$(KERNELRELEASE)
135
136The value can be overridden in which case the default value is ignored.
137
138INSTALL_MOD_PATH
139--------------------------------------------------
140INSTALL_MOD_PATH specifies a prefix to MODLIB for module directory
141relocations required by build roots. This is not defined in the
142makefile but the argument can be passed to make if needed.
143
144INSTALL_MOD_STRIP
145--------------------------------------------------
146INSTALL_MOD_STRIP, if defined, will cause modules to be
147stripped after they are installed. If INSTALL_MOD_STRIP is '1', then
148the default option --strip-debug will be used. Otherwise,
Gilles Espinasse177b2412011-01-09 08:59:49 +0100149INSTALL_MOD_STRIP value will be used as the options to the strip command.
Sam Ravnborgacc08b52008-12-29 13:45:52 +0100150
151INSTALL_FW_PATH
152--------------------------------------------------
Randy Dunlapdf291fa2009-01-08 10:59:34 -0800153INSTALL_FW_PATH specifies where to install the firmware blobs.
Sam Ravnborgacc08b52008-12-29 13:45:52 +0100154The default value is:
155
156 $(INSTALL_MOD_PATH)/lib/firmware
157
158The value can be overridden in which case the default value is ignored.
159
160INSTALL_HDR_PATH
161--------------------------------------------------
Randy Dunlapdf291fa2009-01-08 10:59:34 -0800162INSTALL_HDR_PATH specifies where to install user space headers when
Sam Ravnborgacc08b52008-12-29 13:45:52 +0100163executing "make headers_*".
164The default value is:
165
166 $(objtree)/usr
167
168$(objtree) is the directory where output files are saved.
169The output directory is often set using "O=..." on the commandline.
170
171The value can be overridden in which case the default value is ignored.
172
173KBUILD_MODPOST_WARN
174--------------------------------------------------
Randy Dunlapdf291fa2009-01-08 10:59:34 -0800175KBUILD_MODPOST_WARN can be set to avoid errors in case of undefined
176symbols in the final module linking stage. It changes such errors
177into warnings.
Sam Ravnborgacc08b52008-12-29 13:45:52 +0100178
Randy Dunlapdf291fa2009-01-08 10:59:34 -0800179KBUILD_MODPOST_NOFINAL
Sam Ravnborgacc08b52008-12-29 13:45:52 +0100180--------------------------------------------------
181KBUILD_MODPOST_NOFINAL can be set to skip the final link of modules.
Randy Dunlapdf291fa2009-01-08 10:59:34 -0800182This is solely useful to speed up test compiles.
Sam Ravnborgacc08b52008-12-29 13:45:52 +0100183
184KBUILD_EXTRA_SYMBOLS
185--------------------------------------------------
Randy Dunlapdf291fa2009-01-08 10:59:34 -0800186For modules that use symbols from other modules.
Sam Ravnborgacc08b52008-12-29 13:45:52 +0100187See more details in modules.txt.
Jike Song4f628242009-01-05 14:57:03 +0800188
189ALLSOURCE_ARCHS
190--------------------------------------------------
Randy Dunlapdf291fa2009-01-08 10:59:34 -0800191For tags/TAGS/cscope targets, you can specify more than one arch
192to be included in the databases, separated by blank space. E.g.:
Jike Song4f628242009-01-05 14:57:03 +0800193
194 $ make ALLSOURCE_ARCHS="x86 mips arm" tags
John Kacurbc75cc62010-03-02 16:57:52 +0100195
196To get all available archs you can also specify all. E.g.:
197
198 $ make ALLSOURCE_ARCHS=all tags
Borislav Petkov4a5838a2011-03-01 09:35:29 +0100199
200KBUILD_ENABLE_EXTRA_GCC_CHECKS
201--------------------------------------------------
202If enabled over the make command line with "W=1", it turns on additional
203gcc -W... options for more extensive build-time checking.
Michal Marek53e68922011-04-05 14:32:30 +0200204
205KBUILD_BUILD_TIMESTAMP
206--------------------------------------------------
207Setting this to a date string overrides the timestamp used in the
Michal Mareka8b80172011-03-31 23:16:42 +0200208UTS_VERSION definition (uname -v in the running kernel). The value has to
209be a string that can be passed to date -d. The default value
Michal Marek53e68922011-04-05 14:32:30 +0200210is the output of the date command at one point during build.
211
212KBUILD_BUILD_USER, KBUILD_BUILD_HOST
213--------------------------------------------------
214These two variables allow to override the user@host string displayed during
215boot and in /proc/version. The default value is the output of the commands
216whoami and host, respectively.