blob: b146eb86e498089373ec0c14aaefcdb38920177d [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--------------------------------------------------
25Additional options to the assembler.
26
27KCFLAGS
28--------------------------------------------------
29Additional options to the C compiler.
30
31KBUILD_VERBOSE
32--------------------------------------------------
Randy Dunlapdf291fa2009-01-08 10:59:34 -080033Set the kbuild verbosity. Can be assigned same values as "V=...".
Sam Ravnborgacc08b52008-12-29 13:45:52 +010034See make help for the full list.
35Setting "V=..." takes precedence over KBUILD_VERBOSE.
36
37KBUILD_EXTMOD
38--------------------------------------------------
39Set the directory to look for the kernel source when building external
40modules.
41The directory can be specified in several ways:
421) Use "M=..." on the command line
432) Environmnet variable KBUILD_EXTMOD
443) Environmnet variable SUBDIRS
45The possibilities are listed in the order they take precedence.
46Using "M=..." will always override the others.
47
48KBUILD_OUTPUT
49--------------------------------------------------
50Specify the output directory when building the kernel.
51The output directory can also be specificed using "O=...".
Randy Dunlapdf291fa2009-01-08 10:59:34 -080052Setting "O=..." takes precedence over KBUILD_OUTPUT.
Sam Ravnborgacc08b52008-12-29 13:45:52 +010053
Asbjoern Sloth Toennesen55f88ec2010-12-12 17:39:40 +000054KBUILD_DEBARCH
55--------------------------------------------------
56For the deb-pkg target, allows overriding the normal heuristics deployed by
57deb-pkg. Normally deb-pkg attempts to guess the right architecture based on
58the UTS_MACHINE variable, and on some architectures also the kernel config.
59The value of KBUILD_DEBARCH is assumed (not checked) to be a valid Debian
60architecture.
61
Sam Ravnborgacc08b52008-12-29 13:45:52 +010062ARCH
63--------------------------------------------------
64Set ARCH to the architecture to be built.
65In most cases the name of the architecture is the same as the
66directory name found in the arch/ directory.
Randy Dunlapdf291fa2009-01-08 10:59:34 -080067But some architectures such as x86 and sparc have aliases.
Sam Ravnborgacc08b52008-12-29 13:45:52 +010068x86: i386 for 32 bit, x86_64 for 64 bit
69sparc: sparc for 32 bit, sparc64 for 64 bit
70
71CROSS_COMPILE
72--------------------------------------------------
73Specify an optional fixed part of the binutils filename.
74CROSS_COMPILE can be a part of the filename or the full path.
75
Kirill Smelkove8d400a2010-02-17 11:45:33 +030076CROSS_COMPILE is also used for ccache in some setups.
Sam Ravnborgacc08b52008-12-29 13:45:52 +010077
78CF
79--------------------------------------------------
80Additional options for sparse.
81CF is often used on the command-line like this:
82
83 make CF=-Wbitwise C=2
84
85INSTALL_PATH
86--------------------------------------------------
87INSTALL_PATH specifies where to place the updated kernel and system map
Randy Dunlapdf291fa2009-01-08 10:59:34 -080088images. Default is /boot, but you can set it to other values.
Sam Ravnborgacc08b52008-12-29 13:45:52 +010089
Sam Ravnborgcaa27b62009-07-20 21:37:11 +020090INSTALLKERNEL
91--------------------------------------------------
92Install script called when using "make install".
93The default name is "installkernel".
94
95The script will be called with the following arguments:
96 $1 - kernel version
97 $2 - kernel image file
98 $3 - kernel map file
99 $4 - default install path (use root directory if blank)
100
101The implmentation of "make install" is architecture specific
102and it may differ from the above.
103
104INSTALLKERNEL is provided to enable the possibility to
105specify a custom installer when cross compiling a kernel.
Sam Ravnborgacc08b52008-12-29 13:45:52 +0100106
107MODLIB
108--------------------------------------------------
109Specify where to install modules.
110The default value is:
111
112 $(INSTALL_MOD_PATH)/lib/modules/$(KERNELRELEASE)
113
114The value can be overridden in which case the default value is ignored.
115
116INSTALL_MOD_PATH
117--------------------------------------------------
118INSTALL_MOD_PATH specifies a prefix to MODLIB for module directory
119relocations required by build roots. This is not defined in the
120makefile but the argument can be passed to make if needed.
121
122INSTALL_MOD_STRIP
123--------------------------------------------------
124INSTALL_MOD_STRIP, if defined, will cause modules to be
125stripped after they are installed. If INSTALL_MOD_STRIP is '1', then
126the default option --strip-debug will be used. Otherwise,
127INSTALL_MOD_STRIP will used as the options to the strip command.
128
129INSTALL_FW_PATH
130--------------------------------------------------
Randy Dunlapdf291fa2009-01-08 10:59:34 -0800131INSTALL_FW_PATH specifies where to install the firmware blobs.
Sam Ravnborgacc08b52008-12-29 13:45:52 +0100132The default value is:
133
134 $(INSTALL_MOD_PATH)/lib/firmware
135
136The value can be overridden in which case the default value is ignored.
137
138INSTALL_HDR_PATH
139--------------------------------------------------
Randy Dunlapdf291fa2009-01-08 10:59:34 -0800140INSTALL_HDR_PATH specifies where to install user space headers when
Sam Ravnborgacc08b52008-12-29 13:45:52 +0100141executing "make headers_*".
142The default value is:
143
144 $(objtree)/usr
145
146$(objtree) is the directory where output files are saved.
147The output directory is often set using "O=..." on the commandline.
148
149The value can be overridden in which case the default value is ignored.
150
151KBUILD_MODPOST_WARN
152--------------------------------------------------
Randy Dunlapdf291fa2009-01-08 10:59:34 -0800153KBUILD_MODPOST_WARN can be set to avoid errors in case of undefined
154symbols in the final module linking stage. It changes such errors
155into warnings.
Sam Ravnborgacc08b52008-12-29 13:45:52 +0100156
Randy Dunlapdf291fa2009-01-08 10:59:34 -0800157KBUILD_MODPOST_NOFINAL
Sam Ravnborgacc08b52008-12-29 13:45:52 +0100158--------------------------------------------------
159KBUILD_MODPOST_NOFINAL can be set to skip the final link of modules.
Randy Dunlapdf291fa2009-01-08 10:59:34 -0800160This is solely useful to speed up test compiles.
Sam Ravnborgacc08b52008-12-29 13:45:52 +0100161
162KBUILD_EXTRA_SYMBOLS
163--------------------------------------------------
Randy Dunlapdf291fa2009-01-08 10:59:34 -0800164For modules that use symbols from other modules.
Sam Ravnborgacc08b52008-12-29 13:45:52 +0100165See more details in modules.txt.
Jike Song4f628242009-01-05 14:57:03 +0800166
167ALLSOURCE_ARCHS
168--------------------------------------------------
Randy Dunlapdf291fa2009-01-08 10:59:34 -0800169For tags/TAGS/cscope targets, you can specify more than one arch
170to be included in the databases, separated by blank space. E.g.:
Jike Song4f628242009-01-05 14:57:03 +0800171
172 $ make ALLSOURCE_ARCHS="x86 mips arm" tags
John Kacurbc75cc62010-03-02 16:57:52 +0100173
174To get all available archs you can also specify all. E.g.:
175
176 $ make ALLSOURCE_ARCHS=all tags