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