blob: bb3bf38f03dac1e055dc973ce65d49d14defbe42 [file] [log] [blame]
Sam Ravnborgacc08b52008-12-29 13:45:52 +01001Environment variables
2
3KCPPFLAGS
4--------------------------------------------------
5Additional options to pass when preprocessing. The preprocessing options
Randy Dunlapdf291fa2009-01-08 10:59:34 -08006will be used in all cases where kbuild does preprocessing including
Sam Ravnborgacc08b52008-12-29 13:45:52 +01007building C files and assembler files.
8
9KAFLAGS
10--------------------------------------------------
11Additional options to the assembler.
12
13KCFLAGS
14--------------------------------------------------
15Additional options to the C compiler.
16
17KBUILD_VERBOSE
18--------------------------------------------------
Randy Dunlapdf291fa2009-01-08 10:59:34 -080019Set the kbuild verbosity. Can be assigned same values as "V=...".
Sam Ravnborgacc08b52008-12-29 13:45:52 +010020See make help for the full list.
21Setting "V=..." takes precedence over KBUILD_VERBOSE.
22
23KBUILD_EXTMOD
24--------------------------------------------------
25Set the directory to look for the kernel source when building external
26modules.
27The directory can be specified in several ways:
281) Use "M=..." on the command line
292) Environmnet variable KBUILD_EXTMOD
303) Environmnet variable SUBDIRS
31The possibilities are listed in the order they take precedence.
32Using "M=..." will always override the others.
33
34KBUILD_OUTPUT
35--------------------------------------------------
36Specify the output directory when building the kernel.
37The output directory can also be specificed using "O=...".
Randy Dunlapdf291fa2009-01-08 10:59:34 -080038Setting "O=..." takes precedence over KBUILD_OUTPUT.
Sam Ravnborgacc08b52008-12-29 13:45:52 +010039
40ARCH
41--------------------------------------------------
42Set ARCH to the architecture to be built.
43In most cases the name of the architecture is the same as the
44directory name found in the arch/ directory.
Randy Dunlapdf291fa2009-01-08 10:59:34 -080045But some architectures such as x86 and sparc have aliases.
Sam Ravnborgacc08b52008-12-29 13:45:52 +010046x86: i386 for 32 bit, x86_64 for 64 bit
47sparc: sparc for 32 bit, sparc64 for 64 bit
48
49CROSS_COMPILE
50--------------------------------------------------
51Specify an optional fixed part of the binutils filename.
52CROSS_COMPILE can be a part of the filename or the full path.
53
54CROSS_COMPILE is also used for ccache is some setups.
55
56CF
57--------------------------------------------------
58Additional options for sparse.
59CF is often used on the command-line like this:
60
61 make CF=-Wbitwise C=2
62
63INSTALL_PATH
64--------------------------------------------------
65INSTALL_PATH specifies where to place the updated kernel and system map
Randy Dunlapdf291fa2009-01-08 10:59:34 -080066images. Default is /boot, but you can set it to other values.
Sam Ravnborgacc08b52008-12-29 13:45:52 +010067
Sam Ravnborgcaa27b62009-07-20 21:37:11 +020068INSTALLKERNEL
69--------------------------------------------------
70Install script called when using "make install".
71The default name is "installkernel".
72
73The script will be called with the following arguments:
74 $1 - kernel version
75 $2 - kernel image file
76 $3 - kernel map file
77 $4 - default install path (use root directory if blank)
78
79The implmentation of "make install" is architecture specific
80and it may differ from the above.
81
82INSTALLKERNEL is provided to enable the possibility to
83specify a custom installer when cross compiling a kernel.
Sam Ravnborgacc08b52008-12-29 13:45:52 +010084
85MODLIB
86--------------------------------------------------
87Specify where to install modules.
88The default value is:
89
90 $(INSTALL_MOD_PATH)/lib/modules/$(KERNELRELEASE)
91
92The value can be overridden in which case the default value is ignored.
93
94INSTALL_MOD_PATH
95--------------------------------------------------
96INSTALL_MOD_PATH specifies a prefix to MODLIB for module directory
97relocations required by build roots. This is not defined in the
98makefile but the argument can be passed to make if needed.
99
100INSTALL_MOD_STRIP
101--------------------------------------------------
102INSTALL_MOD_STRIP, if defined, will cause modules to be
103stripped after they are installed. If INSTALL_MOD_STRIP is '1', then
104the default option --strip-debug will be used. Otherwise,
105INSTALL_MOD_STRIP will used as the options to the strip command.
106
107INSTALL_FW_PATH
108--------------------------------------------------
Randy Dunlapdf291fa2009-01-08 10:59:34 -0800109INSTALL_FW_PATH specifies where to install the firmware blobs.
Sam Ravnborgacc08b52008-12-29 13:45:52 +0100110The default value is:
111
112 $(INSTALL_MOD_PATH)/lib/firmware
113
114The value can be overridden in which case the default value is ignored.
115
116INSTALL_HDR_PATH
117--------------------------------------------------
Randy Dunlapdf291fa2009-01-08 10:59:34 -0800118INSTALL_HDR_PATH specifies where to install user space headers when
Sam Ravnborgacc08b52008-12-29 13:45:52 +0100119executing "make headers_*".
120The default value is:
121
122 $(objtree)/usr
123
124$(objtree) is the directory where output files are saved.
125The output directory is often set using "O=..." on the commandline.
126
127The value can be overridden in which case the default value is ignored.
128
129KBUILD_MODPOST_WARN
130--------------------------------------------------
Randy Dunlapdf291fa2009-01-08 10:59:34 -0800131KBUILD_MODPOST_WARN can be set to avoid errors in case of undefined
132symbols in the final module linking stage. It changes such errors
133into warnings.
Sam Ravnborgacc08b52008-12-29 13:45:52 +0100134
Randy Dunlapdf291fa2009-01-08 10:59:34 -0800135KBUILD_MODPOST_NOFINAL
Sam Ravnborgacc08b52008-12-29 13:45:52 +0100136--------------------------------------------------
137KBUILD_MODPOST_NOFINAL can be set to skip the final link of modules.
Randy Dunlapdf291fa2009-01-08 10:59:34 -0800138This is solely useful to speed up test compiles.
Sam Ravnborgacc08b52008-12-29 13:45:52 +0100139
140KBUILD_EXTRA_SYMBOLS
141--------------------------------------------------
Randy Dunlapdf291fa2009-01-08 10:59:34 -0800142For modules that use symbols from other modules.
Sam Ravnborgacc08b52008-12-29 13:45:52 +0100143See more details in modules.txt.
Jike Song4f628242009-01-05 14:57:03 +0800144
145ALLSOURCE_ARCHS
146--------------------------------------------------
Randy Dunlapdf291fa2009-01-08 10:59:34 -0800147For tags/TAGS/cscope targets, you can specify more than one arch
148to be included in the databases, separated by blank space. E.g.:
Jike Song4f628242009-01-05 14:57:03 +0800149
150 $ make ALLSOURCE_ARCHS="x86 mips arm" tags