]>
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 | -------------------------------------------------- | |
29 | Addtional module specific options to use for $(AS). | |
acc08b51 | 30 | |
80c00ba9 SR |
31 | AFLAGS_KERNEL |
32 | -------------------------------------------------- | |
33 | Addtional options for $(AS) when used for assembler | |
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 | -------------------------------------------------- | |
42 | Addtional options for $(CC) when used to compile | |
43 | code that is compiled as built-in. | |
44 | ||
6588169d SR |
45 | CFLAGS_MODULE |
46 | -------------------------------------------------- | |
47 | Addtional module specific options to use for $(CC). | |
48 | ||
49 | LDFLAGS_MODULE | |
50 | -------------------------------------------------- | |
51 | Additional options used for $(LD) when linking modules. | |
acc08b51 SR |
52 | |
53 | KBUILD_VERBOSE | |
54 | -------------------------------------------------- | |
df291fa9 | 55 | Set the kbuild verbosity. Can be assigned same values as "V=...". |
acc08b51 SR |
56 | See make help for the full list. |
57 | Setting "V=..." takes precedence over KBUILD_VERBOSE. | |
58 | ||
59 | KBUILD_EXTMOD | |
60 | -------------------------------------------------- | |
61 | Set the directory to look for the kernel source when building external | |
62 | modules. | |
63 | The directory can be specified in several ways: | |
64 | 1) Use "M=..." on the command line | |
c95940f2 NK |
65 | 2) Environment variable KBUILD_EXTMOD |
66 | 3) Environment variable SUBDIRS | |
acc08b51 SR |
67 | The possibilities are listed in the order they take precedence. |
68 | Using "M=..." will always override the others. | |
69 | ||
70 | KBUILD_OUTPUT | |
71 | -------------------------------------------------- | |
72 | Specify the output directory when building the kernel. | |
c95940f2 | 73 | The output directory can also be specified using "O=...". |
df291fa9 | 74 | Setting "O=..." takes precedence over KBUILD_OUTPUT. |
acc08b51 | 75 | |
55f88ecc AST |
76 | KBUILD_DEBARCH |
77 | -------------------------------------------------- | |
78 | For the deb-pkg target, allows overriding the normal heuristics deployed by | |
79 | deb-pkg. Normally deb-pkg attempts to guess the right architecture based on | |
80 | the UTS_MACHINE variable, and on some architectures also the kernel config. | |
81 | The value of KBUILD_DEBARCH is assumed (not checked) to be a valid Debian | |
82 | architecture. | |
83 | ||
acc08b51 SR |
84 | ARCH |
85 | -------------------------------------------------- | |
86 | Set ARCH to the architecture to be built. | |
87 | In most cases the name of the architecture is the same as the | |
88 | directory name found in the arch/ directory. | |
df291fa9 | 89 | But some architectures such as x86 and sparc have aliases. |
acc08b51 SR |
90 | x86: i386 for 32 bit, x86_64 for 64 bit |
91 | sparc: sparc for 32 bit, sparc64 for 64 bit | |
92 | ||
93 | CROSS_COMPILE | |
94 | -------------------------------------------------- | |
95 | Specify an optional fixed part of the binutils filename. | |
96 | CROSS_COMPILE can be a part of the filename or the full path. | |
97 | ||
e8d400a9 | 98 | CROSS_COMPILE is also used for ccache in some setups. |
acc08b51 SR |
99 | |
100 | CF | |
101 | -------------------------------------------------- | |
102 | Additional options for sparse. | |
103 | CF is often used on the command-line like this: | |
104 | ||
105 | make CF=-Wbitwise C=2 | |
106 | ||
107 | INSTALL_PATH | |
108 | -------------------------------------------------- | |
109 | INSTALL_PATH specifies where to place the updated kernel and system map | |
df291fa9 | 110 | images. Default is /boot, but you can set it to other values. |
acc08b51 | 111 | |
caa27b66 SR |
112 | INSTALLKERNEL |
113 | -------------------------------------------------- | |
114 | Install script called when using "make install". | |
115 | The default name is "installkernel". | |
116 | ||
117 | The 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 | ||
c95940f2 | 123 | The implementation of "make install" is architecture specific |
caa27b66 SR |
124 | and it may differ from the above. |
125 | ||
126 | INSTALLKERNEL is provided to enable the possibility to | |
127 | specify a custom installer when cross compiling a kernel. | |
acc08b51 SR |
128 | |
129 | MODLIB | |
130 | -------------------------------------------------- | |
131 | Specify where to install modules. | |
132 | The default value is: | |
133 | ||
134 | $(INSTALL_MOD_PATH)/lib/modules/$(KERNELRELEASE) | |
135 | ||
136 | The value can be overridden in which case the default value is ignored. | |
137 | ||
138 | INSTALL_MOD_PATH | |
139 | -------------------------------------------------- | |
140 | INSTALL_MOD_PATH specifies a prefix to MODLIB for module directory | |
141 | relocations required by build roots. This is not defined in the | |
142 | makefile but the argument can be passed to make if needed. | |
143 | ||
144 | INSTALL_MOD_STRIP | |
145 | -------------------------------------------------- | |
146 | INSTALL_MOD_STRIP, if defined, will cause modules to be | |
147 | stripped after they are installed. If INSTALL_MOD_STRIP is '1', then | |
148 | the default option --strip-debug will be used. Otherwise, | |
149 | INSTALL_MOD_STRIP will used as the options to the strip command. | |
150 | ||
151 | INSTALL_FW_PATH | |
152 | -------------------------------------------------- | |
df291fa9 | 153 | INSTALL_FW_PATH specifies where to install the firmware blobs. |
acc08b51 SR |
154 | The default value is: |
155 | ||
156 | $(INSTALL_MOD_PATH)/lib/firmware | |
157 | ||
158 | The value can be overridden in which case the default value is ignored. | |
159 | ||
160 | INSTALL_HDR_PATH | |
161 | -------------------------------------------------- | |
df291fa9 | 162 | INSTALL_HDR_PATH specifies where to install user space headers when |
acc08b51 SR |
163 | executing "make headers_*". |
164 | The default value is: | |
165 | ||
166 | $(objtree)/usr | |
167 | ||
168 | $(objtree) is the directory where output files are saved. | |
169 | The output directory is often set using "O=..." on the commandline. | |
170 | ||
171 | The value can be overridden in which case the default value is ignored. | |
172 | ||
173 | KBUILD_MODPOST_WARN | |
174 | -------------------------------------------------- | |
df291fa9 RD |
175 | KBUILD_MODPOST_WARN can be set to avoid errors in case of undefined |
176 | symbols in the final module linking stage. It changes such errors | |
177 | into warnings. | |
acc08b51 | 178 | |
df291fa9 | 179 | KBUILD_MODPOST_NOFINAL |
acc08b51 SR |
180 | -------------------------------------------------- |
181 | KBUILD_MODPOST_NOFINAL can be set to skip the final link of modules. | |
df291fa9 | 182 | This is solely useful to speed up test compiles. |
acc08b51 SR |
183 | |
184 | KBUILD_EXTRA_SYMBOLS | |
185 | -------------------------------------------------- | |
df291fa9 | 186 | For modules that use symbols from other modules. |
acc08b51 | 187 | See more details in modules.txt. |
4f628248 JS |
188 | |
189 | ALLSOURCE_ARCHS | |
190 | -------------------------------------------------- | |
df291fa9 RD |
191 | For tags/TAGS/cscope targets, you can specify more than one arch |
192 | to be included in the databases, separated by blank space. E.g.: | |
4f628248 JS |
193 | |
194 | $ make ALLSOURCE_ARCHS="x86 mips arm" tags | |
bc75cc6b JK |
195 | |
196 | To get all available archs you can also specify all. E.g.: | |
197 | ||
198 | $ make ALLSOURCE_ARCHS=all tags |