Commit | Line | Data |
---|---|---|
bc081dd6 MM |
1 | Output files |
2 | ||
3 | modules.order | |
4 | -------------------------------------------------- | |
5 | This file records the order in which modules appear in Makefiles. This | |
6 | is used by modprobe to deterministically resolve aliases that match | |
7 | multiple modules. | |
8 | ||
9 | modules.builtin | |
10 | -------------------------------------------------- | |
11 | This file lists all modules that are built into the kernel. This is used | |
12 | by modprobe to not fail when trying to load something builtin. | |
13 | ||
14 | ||
acc08b51 SR |
15 | Environment variables |
16 | ||
17 | KCPPFLAGS | |
18 | -------------------------------------------------- | |
19 | Additional options to pass when preprocessing. The preprocessing options | |
df291fa9 | 20 | will be used in all cases where kbuild does preprocessing including |
acc08b51 SR |
21 | building C files and assembler files. |
22 | ||
23 | KAFLAGS | |
24 | -------------------------------------------------- | |
6588169d SR |
25 | Additional options to the assembler (for built-in and modules). |
26 | ||
27 | AFLAGS_MODULE | |
28 | -------------------------------------------------- | |
25985edc | 29 | Additional module specific options to use for $(AS). |
acc08b51 | 30 | |
80c00ba9 SR |
31 | AFLAGS_KERNEL |
32 | -------------------------------------------------- | |
25985edc | 33 | Additional options for $(AS) when used for assembler |
80c00ba9 | 34 | code for code that is compiled as built-in. |
acc08b51 SR |
35 | |
36 | KCFLAGS | |
37 | -------------------------------------------------- | |
6588169d SR |
38 | Additional options to the C compiler (for built-in and modules). |
39 | ||
80c00ba9 SR |
40 | CFLAGS_KERNEL |
41 | -------------------------------------------------- | |
25985edc | 42 | Additional options for $(CC) when used to compile |
80c00ba9 SR |
43 | code that is compiled as built-in. |
44 | ||
6588169d SR |
45 | CFLAGS_MODULE |
46 | -------------------------------------------------- | |
25985edc | 47 | Additional module specific options to use for $(CC). |
6588169d SR |
48 | |
49 | LDFLAGS_MODULE | |
50 | -------------------------------------------------- | |
51 | Additional options used for $(LD) when linking modules. | |
acc08b51 | 52 | |
f92d19e0 LA |
53 | HOSTCFLAGS |
54 | -------------------------------------------------- | |
55 | Additional flags to be passed to $(HOSTCC) when building host programs. | |
56 | ||
57 | HOSTCXXFLAGS | |
58 | -------------------------------------------------- | |
59 | Additional flags to be passed to $(HOSTCXX) when building host programs. | |
60 | ||
61 | HOSTLDFLAGS | |
62 | -------------------------------------------------- | |
63 | Additional flags to be passed when linking host programs. | |
64 | ||
65 | HOSTLDLIBS | |
66 | -------------------------------------------------- | |
67 | Additional libraries to link against when building host programs. | |
68 | ||
00e0793f RD |
69 | KBUILD_KCONFIG |
70 | -------------------------------------------------- | |
71 | Set the top-level Kconfig file to the value of this environment | |
72 | variable. The default name is "Kconfig". | |
73 | ||
acc08b51 SR |
74 | KBUILD_VERBOSE |
75 | -------------------------------------------------- | |
df291fa9 | 76 | Set the kbuild verbosity. Can be assigned same values as "V=...". |
acc08b51 SR |
77 | See make help for the full list. |
78 | Setting "V=..." takes precedence over KBUILD_VERBOSE. | |
79 | ||
80 | KBUILD_EXTMOD | |
81 | -------------------------------------------------- | |
82 | Set the directory to look for the kernel source when building external | |
83 | modules. | |
84 | The directory can be specified in several ways: | |
85 | 1) Use "M=..." on the command line | |
c95940f2 NK |
86 | 2) Environment variable KBUILD_EXTMOD |
87 | 3) Environment variable SUBDIRS | |
acc08b51 SR |
88 | The possibilities are listed in the order they take precedence. |
89 | Using "M=..." will always override the others. | |
90 | ||
91 | KBUILD_OUTPUT | |
92 | -------------------------------------------------- | |
93 | Specify the output directory when building the kernel. | |
c95940f2 | 94 | The output directory can also be specified using "O=...". |
df291fa9 | 95 | Setting "O=..." takes precedence over KBUILD_OUTPUT. |
acc08b51 | 96 | |
55f88ecc AST |
97 | KBUILD_DEBARCH |
98 | -------------------------------------------------- | |
99 | For the deb-pkg target, allows overriding the normal heuristics deployed by | |
100 | deb-pkg. Normally deb-pkg attempts to guess the right architecture based on | |
101 | the UTS_MACHINE variable, and on some architectures also the kernel config. | |
102 | The value of KBUILD_DEBARCH is assumed (not checked) to be a valid Debian | |
103 | architecture. | |
104 | ||
acc08b51 SR |
105 | ARCH |
106 | -------------------------------------------------- | |
107 | Set ARCH to the architecture to be built. | |
108 | In most cases the name of the architecture is the same as the | |
109 | directory name found in the arch/ directory. | |
df291fa9 | 110 | But some architectures such as x86 and sparc have aliases. |
acc08b51 | 111 | x86: i386 for 32 bit, x86_64 for 64 bit |
09b15653 | 112 | sh: sh for 32 bit, sh64 for 64 bit |
5ba80096 | 113 | sparc: sparc32 for 32 bit, sparc64 for 64 bit |
acc08b51 SR |
114 | |
115 | CROSS_COMPILE | |
116 | -------------------------------------------------- | |
117 | Specify an optional fixed part of the binutils filename. | |
118 | CROSS_COMPILE can be a part of the filename or the full path. | |
119 | ||
e8d400a9 | 120 | CROSS_COMPILE is also used for ccache in some setups. |
acc08b51 SR |
121 | |
122 | CF | |
123 | -------------------------------------------------- | |
124 | Additional options for sparse. | |
125 | CF is often used on the command-line like this: | |
126 | ||
127 | make CF=-Wbitwise C=2 | |
128 | ||
129 | INSTALL_PATH | |
130 | -------------------------------------------------- | |
131 | INSTALL_PATH specifies where to place the updated kernel and system map | |
df291fa9 | 132 | images. Default is /boot, but you can set it to other values. |
acc08b51 | 133 | |
caa27b66 SR |
134 | INSTALLKERNEL |
135 | -------------------------------------------------- | |
136 | Install script called when using "make install". | |
137 | The default name is "installkernel". | |
138 | ||
139 | The script will be called with the following arguments: | |
140 | $1 - kernel version | |
141 | $2 - kernel image file | |
142 | $3 - kernel map file | |
143 | $4 - default install path (use root directory if blank) | |
144 | ||
c95940f2 | 145 | The implementation of "make install" is architecture specific |
caa27b66 SR |
146 | and it may differ from the above. |
147 | ||
148 | INSTALLKERNEL is provided to enable the possibility to | |
149 | specify a custom installer when cross compiling a kernel. | |
acc08b51 SR |
150 | |
151 | MODLIB | |
152 | -------------------------------------------------- | |
153 | Specify where to install modules. | |
154 | The default value is: | |
155 | ||
156 | $(INSTALL_MOD_PATH)/lib/modules/$(KERNELRELEASE) | |
157 | ||
158 | The value can be overridden in which case the default value is ignored. | |
159 | ||
160 | INSTALL_MOD_PATH | |
161 | -------------------------------------------------- | |
162 | INSTALL_MOD_PATH specifies a prefix to MODLIB for module directory | |
163 | relocations required by build roots. This is not defined in the | |
164 | makefile but the argument can be passed to make if needed. | |
165 | ||
166 | INSTALL_MOD_STRIP | |
167 | -------------------------------------------------- | |
168 | INSTALL_MOD_STRIP, if defined, will cause modules to be | |
169 | stripped after they are installed. If INSTALL_MOD_STRIP is '1', then | |
170 | the default option --strip-debug will be used. Otherwise, | |
177b241d | 171 | INSTALL_MOD_STRIP value will be used as the options to the strip command. |
acc08b51 | 172 | |
acc08b51 SR |
173 | INSTALL_HDR_PATH |
174 | -------------------------------------------------- | |
df291fa9 | 175 | INSTALL_HDR_PATH specifies where to install user space headers when |
acc08b51 SR |
176 | executing "make headers_*". |
177 | The default value is: | |
178 | ||
179 | $(objtree)/usr | |
180 | ||
181 | $(objtree) is the directory where output files are saved. | |
182 | The output directory is often set using "O=..." on the commandline. | |
183 | ||
184 | The value can be overridden in which case the default value is ignored. | |
185 | ||
af1eb291 DW |
186 | KBUILD_SIGN_PIN |
187 | -------------------------------------------------- | |
188 | This variable allows a passphrase or PIN to be passed to the sign-file | |
189 | utility when signing kernel modules, if the private key requires such. | |
190 | ||
acc08b51 SR |
191 | KBUILD_MODPOST_WARN |
192 | -------------------------------------------------- | |
df291fa9 RD |
193 | KBUILD_MODPOST_WARN can be set to avoid errors in case of undefined |
194 | symbols in the final module linking stage. It changes such errors | |
195 | into warnings. | |
acc08b51 | 196 | |
df291fa9 | 197 | KBUILD_MODPOST_NOFINAL |
acc08b51 SR |
198 | -------------------------------------------------- |
199 | KBUILD_MODPOST_NOFINAL can be set to skip the final link of modules. | |
df291fa9 | 200 | This is solely useful to speed up test compiles. |
acc08b51 SR |
201 | |
202 | KBUILD_EXTRA_SYMBOLS | |
203 | -------------------------------------------------- | |
df291fa9 | 204 | For modules that use symbols from other modules. |
acc08b51 | 205 | See more details in modules.txt. |
4f628248 JS |
206 | |
207 | ALLSOURCE_ARCHS | |
208 | -------------------------------------------------- | |
df291fa9 RD |
209 | For tags/TAGS/cscope targets, you can specify more than one arch |
210 | to be included in the databases, separated by blank space. E.g.: | |
4f628248 JS |
211 | |
212 | $ make ALLSOURCE_ARCHS="x86 mips arm" tags | |
bc75cc6b JK |
213 | |
214 | To get all available archs you can also specify all. E.g.: | |
215 | ||
216 | $ make ALLSOURCE_ARCHS=all tags | |
4a5838ad BP |
217 | |
218 | KBUILD_ENABLE_EXTRA_GCC_CHECKS | |
219 | -------------------------------------------------- | |
220 | If enabled over the make command line with "W=1", it turns on additional | |
221 | gcc -W... options for more extensive build-time checking. | |
53e6892c MM |
222 | |
223 | KBUILD_BUILD_TIMESTAMP | |
224 | -------------------------------------------------- | |
225 | Setting this to a date string overrides the timestamp used in the | |
a8b8017c MM |
226 | UTS_VERSION definition (uname -v in the running kernel). The value has to |
227 | be a string that can be passed to date -d. The default value | |
53e6892c MM |
228 | is the output of the date command at one point during build. |
229 | ||
230 | KBUILD_BUILD_USER, KBUILD_BUILD_HOST | |
231 | -------------------------------------------------- | |
232 | These two variables allow to override the user@host string displayed during | |
233 | boot and in /proc/version. The default value is the output of the commands | |
234 | whoami and host, respectively. | |
d27579a2 SR |
235 | |
236 | KBUILD_LDS | |
237 | -------------------------------------------------- | |
238 | The linker script with full path. Assigned by the top-level Makefile. | |
239 | ||
240 | KBUILD_VMLINUX_INIT | |
241 | -------------------------------------------------- | |
242 | All object files for the init (first) part of vmlinux. | |
243 | Files specified with KBUILD_VMLINUX_INIT are linked first. | |
244 | ||
245 | KBUILD_VMLINUX_MAIN | |
246 | -------------------------------------------------- | |
247 | All object files for the main part of vmlinux. | |
3a166fc2 NP |
248 | |
249 | KBUILD_VMLINUX_LIBS | |
250 | -------------------------------------------------- | |
251 | All .a "lib" files for vmlinux. | |
252 | KBUILD_VMLINUX_INIT, KBUILD_VMLINUX_MAIN, and KBUILD_VMLINUX_LIBS together | |
253 | specify all the object files used to link vmlinux. |