blob: d9c655433ec64d50f2437ce00327cd29abf102bf [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
31KCFLAGS
32--------------------------------------------------
Sam Ravnborg65881692010-07-28 17:33:09 +020033Additional options to the C compiler (for built-in and modules).
34
35CFLAGS_MODULE
36--------------------------------------------------
37Addtional module specific options to use for $(CC).
38
39LDFLAGS_MODULE
40--------------------------------------------------
41Additional options used for $(LD) when linking modules.
Sam Ravnborgacc08b52008-12-29 13:45:52 +010042
43KBUILD_VERBOSE
44--------------------------------------------------
Randy Dunlapdf291fa2009-01-08 10:59:34 -080045Set the kbuild verbosity. Can be assigned same values as "V=...".
Sam Ravnborgacc08b52008-12-29 13:45:52 +010046See make help for the full list.
47Setting "V=..." takes precedence over KBUILD_VERBOSE.
48
49KBUILD_EXTMOD
50--------------------------------------------------
51Set the directory to look for the kernel source when building external
52modules.
53The directory can be specified in several ways:
541) Use "M=..." on the command line
552) Environmnet variable KBUILD_EXTMOD
563) Environmnet variable SUBDIRS
57The possibilities are listed in the order they take precedence.
58Using "M=..." will always override the others.
59
60KBUILD_OUTPUT
61--------------------------------------------------
62Specify the output directory when building the kernel.
63The output directory can also be specificed using "O=...".
Randy Dunlapdf291fa2009-01-08 10:59:34 -080064Setting "O=..." takes precedence over KBUILD_OUTPUT.
Sam Ravnborgacc08b52008-12-29 13:45:52 +010065
66ARCH
67--------------------------------------------------
68Set ARCH to the architecture to be built.
69In most cases the name of the architecture is the same as the
70directory name found in the arch/ directory.
Randy Dunlapdf291fa2009-01-08 10:59:34 -080071But some architectures such as x86 and sparc have aliases.
Sam Ravnborgacc08b52008-12-29 13:45:52 +010072x86: i386 for 32 bit, x86_64 for 64 bit
73sparc: sparc for 32 bit, sparc64 for 64 bit
74
75CROSS_COMPILE
76--------------------------------------------------
77Specify an optional fixed part of the binutils filename.
78CROSS_COMPILE can be a part of the filename or the full path.
79
Kirill Smelkove8d400a2010-02-17 11:45:33 +030080CROSS_COMPILE is also used for ccache in some setups.
Sam Ravnborgacc08b52008-12-29 13:45:52 +010081
82CF
83--------------------------------------------------
84Additional options for sparse.
85CF is often used on the command-line like this:
86
87 make CF=-Wbitwise C=2
88
89INSTALL_PATH
90--------------------------------------------------
91INSTALL_PATH specifies where to place the updated kernel and system map
Randy Dunlapdf291fa2009-01-08 10:59:34 -080092images. Default is /boot, but you can set it to other values.
Sam Ravnborgacc08b52008-12-29 13:45:52 +010093
Sam Ravnborgcaa27b62009-07-20 21:37:11 +020094INSTALLKERNEL
95--------------------------------------------------
96Install script called when using "make install".
97The default name is "installkernel".
98
99The script will be called with the following arguments:
100 $1 - kernel version
101 $2 - kernel image file
102 $3 - kernel map file
103 $4 - default install path (use root directory if blank)
104
105The implmentation of "make install" is architecture specific
106and it may differ from the above.
107
108INSTALLKERNEL is provided to enable the possibility to
109specify a custom installer when cross compiling a kernel.
Sam Ravnborgacc08b52008-12-29 13:45:52 +0100110
111MODLIB
112--------------------------------------------------
113Specify where to install modules.
114The default value is:
115
116 $(INSTALL_MOD_PATH)/lib/modules/$(KERNELRELEASE)
117
118The value can be overridden in which case the default value is ignored.
119
120INSTALL_MOD_PATH
121--------------------------------------------------
122INSTALL_MOD_PATH specifies a prefix to MODLIB for module directory
123relocations required by build roots. This is not defined in the
124makefile but the argument can be passed to make if needed.
125
126INSTALL_MOD_STRIP
127--------------------------------------------------
128INSTALL_MOD_STRIP, if defined, will cause modules to be
129stripped after they are installed. If INSTALL_MOD_STRIP is '1', then
130the default option --strip-debug will be used. Otherwise,
131INSTALL_MOD_STRIP will used as the options to the strip command.
132
133INSTALL_FW_PATH
134--------------------------------------------------
Randy Dunlapdf291fa2009-01-08 10:59:34 -0800135INSTALL_FW_PATH specifies where to install the firmware blobs.
Sam Ravnborgacc08b52008-12-29 13:45:52 +0100136The default value is:
137
138 $(INSTALL_MOD_PATH)/lib/firmware
139
140The value can be overridden in which case the default value is ignored.
141
142INSTALL_HDR_PATH
143--------------------------------------------------
Randy Dunlapdf291fa2009-01-08 10:59:34 -0800144INSTALL_HDR_PATH specifies where to install user space headers when
Sam Ravnborgacc08b52008-12-29 13:45:52 +0100145executing "make headers_*".
146The default value is:
147
148 $(objtree)/usr
149
150$(objtree) is the directory where output files are saved.
151The output directory is often set using "O=..." on the commandline.
152
153The value can be overridden in which case the default value is ignored.
154
155KBUILD_MODPOST_WARN
156--------------------------------------------------
Randy Dunlapdf291fa2009-01-08 10:59:34 -0800157KBUILD_MODPOST_WARN can be set to avoid errors in case of undefined
158symbols in the final module linking stage. It changes such errors
159into warnings.
Sam Ravnborgacc08b52008-12-29 13:45:52 +0100160
Randy Dunlapdf291fa2009-01-08 10:59:34 -0800161KBUILD_MODPOST_NOFINAL
Sam Ravnborgacc08b52008-12-29 13:45:52 +0100162--------------------------------------------------
163KBUILD_MODPOST_NOFINAL can be set to skip the final link of modules.
Randy Dunlapdf291fa2009-01-08 10:59:34 -0800164This is solely useful to speed up test compiles.
Sam Ravnborgacc08b52008-12-29 13:45:52 +0100165
166KBUILD_EXTRA_SYMBOLS
167--------------------------------------------------
Randy Dunlapdf291fa2009-01-08 10:59:34 -0800168For modules that use symbols from other modules.
Sam Ravnborgacc08b52008-12-29 13:45:52 +0100169See more details in modules.txt.
Jike Song4f628242009-01-05 14:57:03 +0800170
171ALLSOURCE_ARCHS
172--------------------------------------------------
Randy Dunlapdf291fa2009-01-08 10:59:34 -0800173For tags/TAGS/cscope targets, you can specify more than one arch
174to be included in the databases, separated by blank space. E.g.:
Jike Song4f628242009-01-05 14:57:03 +0800175
176 $ make ALLSOURCE_ARCHS="x86 mips arm" tags
John Kacurbc75cc62010-03-02 16:57:52 +0100177
178To get all available archs you can also specify all. E.g.:
179
180 $ make ALLSOURCE_ARCHS=all tags