blob: e903f20077cf399e6db271b885f65608d588f8e4 [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--------------------------------------------------
29Addtional 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--------------------------------------------------
33Addtional options for $(AS) when used for assembler
34code for code that is compiled as built-in.
35
Sam Ravnborgacc08b52008-12-29 13:45:52 +010036KCFLAGS
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--------------------------------------------------
42Addtional options for $(CC) when used to compile
43code that is compiled as built-in.
44
Sam Ravnborg65881692010-07-28 17:33:09 +020045CFLAGS_MODULE
46--------------------------------------------------
47Addtional module specific options to use for $(CC).
48
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
652) Environmnet variable KBUILD_EXTMOD
663) Environmnet variable SUBDIRS
67The 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.
73The output directory can also be specificed using "O=...".
Randy Dunlapdf291fa2009-01-08 10:59:34 -080074Setting "O=..." takes precedence over KBUILD_OUTPUT.
Sam Ravnborgacc08b52008-12-29 13:45:52 +010075
76ARCH
77--------------------------------------------------
78Set ARCH to the architecture to be built.
79In most cases the name of the architecture is the same as the
80directory name found in the arch/ directory.
Randy Dunlapdf291fa2009-01-08 10:59:34 -080081But some architectures such as x86 and sparc have aliases.
Sam Ravnborgacc08b52008-12-29 13:45:52 +010082x86: i386 for 32 bit, x86_64 for 64 bit
83sparc: sparc for 32 bit, sparc64 for 64 bit
84
85CROSS_COMPILE
86--------------------------------------------------
87Specify an optional fixed part of the binutils filename.
88CROSS_COMPILE can be a part of the filename or the full path.
89
Kirill Smelkove8d400a2010-02-17 11:45:33 +030090CROSS_COMPILE is also used for ccache in some setups.
Sam Ravnborgacc08b52008-12-29 13:45:52 +010091
92CF
93--------------------------------------------------
94Additional options for sparse.
95CF is often used on the command-line like this:
96
97 make CF=-Wbitwise C=2
98
99INSTALL_PATH
100--------------------------------------------------
101INSTALL_PATH specifies where to place the updated kernel and system map
Randy Dunlapdf291fa2009-01-08 10:59:34 -0800102images. Default is /boot, but you can set it to other values.
Sam Ravnborgacc08b52008-12-29 13:45:52 +0100103
Sam Ravnborgcaa27b62009-07-20 21:37:11 +0200104INSTALLKERNEL
105--------------------------------------------------
106Install script called when using "make install".
107The default name is "installkernel".
108
109The script will be called with the following arguments:
110 $1 - kernel version
111 $2 - kernel image file
112 $3 - kernel map file
113 $4 - default install path (use root directory if blank)
114
115The implmentation of "make install" is architecture specific
116and it may differ from the above.
117
118INSTALLKERNEL is provided to enable the possibility to
119specify a custom installer when cross compiling a kernel.
Sam Ravnborgacc08b52008-12-29 13:45:52 +0100120
121MODLIB
122--------------------------------------------------
123Specify where to install modules.
124The default value is:
125
126 $(INSTALL_MOD_PATH)/lib/modules/$(KERNELRELEASE)
127
128The value can be overridden in which case the default value is ignored.
129
130INSTALL_MOD_PATH
131--------------------------------------------------
132INSTALL_MOD_PATH specifies a prefix to MODLIB for module directory
133relocations required by build roots. This is not defined in the
134makefile but the argument can be passed to make if needed.
135
136INSTALL_MOD_STRIP
137--------------------------------------------------
138INSTALL_MOD_STRIP, if defined, will cause modules to be
139stripped after they are installed. If INSTALL_MOD_STRIP is '1', then
140the default option --strip-debug will be used. Otherwise,
141INSTALL_MOD_STRIP will used as the options to the strip command.
142
143INSTALL_FW_PATH
144--------------------------------------------------
Randy Dunlapdf291fa2009-01-08 10:59:34 -0800145INSTALL_FW_PATH specifies where to install the firmware blobs.
Sam Ravnborgacc08b52008-12-29 13:45:52 +0100146The default value is:
147
148 $(INSTALL_MOD_PATH)/lib/firmware
149
150The value can be overridden in which case the default value is ignored.
151
152INSTALL_HDR_PATH
153--------------------------------------------------
Randy Dunlapdf291fa2009-01-08 10:59:34 -0800154INSTALL_HDR_PATH specifies where to install user space headers when
Sam Ravnborgacc08b52008-12-29 13:45:52 +0100155executing "make headers_*".
156The default value is:
157
158 $(objtree)/usr
159
160$(objtree) is the directory where output files are saved.
161The output directory is often set using "O=..." on the commandline.
162
163The value can be overridden in which case the default value is ignored.
164
165KBUILD_MODPOST_WARN
166--------------------------------------------------
Randy Dunlapdf291fa2009-01-08 10:59:34 -0800167KBUILD_MODPOST_WARN can be set to avoid errors in case of undefined
168symbols in the final module linking stage. It changes such errors
169into warnings.
Sam Ravnborgacc08b52008-12-29 13:45:52 +0100170
Randy Dunlapdf291fa2009-01-08 10:59:34 -0800171KBUILD_MODPOST_NOFINAL
Sam Ravnborgacc08b52008-12-29 13:45:52 +0100172--------------------------------------------------
173KBUILD_MODPOST_NOFINAL can be set to skip the final link of modules.
Randy Dunlapdf291fa2009-01-08 10:59:34 -0800174This is solely useful to speed up test compiles.
Sam Ravnborgacc08b52008-12-29 13:45:52 +0100175
176KBUILD_EXTRA_SYMBOLS
177--------------------------------------------------
Randy Dunlapdf291fa2009-01-08 10:59:34 -0800178For modules that use symbols from other modules.
Sam Ravnborgacc08b52008-12-29 13:45:52 +0100179See more details in modules.txt.
Jike Song4f628242009-01-05 14:57:03 +0800180
181ALLSOURCE_ARCHS
182--------------------------------------------------
Randy Dunlapdf291fa2009-01-08 10:59:34 -0800183For tags/TAGS/cscope targets, you can specify more than one arch
184to be included in the databases, separated by blank space. E.g.:
Jike Song4f628242009-01-05 14:57:03 +0800185
186 $ make ALLSOURCE_ARCHS="x86 mips arm" tags
John Kacurbc75cc62010-03-02 16:57:52 +0100187
188To get all available archs you can also specify all. E.g.:
189
190 $ make ALLSOURCE_ARCHS=all tags