Mauro Carvalho Chehab | cd238ef | 2019-06-12 14:52:48 -0300 | [diff] [blame] | 1 | ====== |
| 2 | Kbuild |
| 3 | ====== |
| 4 | |
| 5 | |
Michal Marek | bc081dd | 2009-12-07 16:38:33 +0100 | [diff] [blame] | 6 | Output files |
Mauro Carvalho Chehab | cd238ef | 2019-06-12 14:52:48 -0300 | [diff] [blame] | 7 | ============ |
Michal Marek | bc081dd | 2009-12-07 16:38:33 +0100 | [diff] [blame] | 8 | |
| 9 | modules.order |
Mauro Carvalho Chehab | cd238ef | 2019-06-12 14:52:48 -0300 | [diff] [blame] | 10 | ------------- |
Michal Marek | bc081dd | 2009-12-07 16:38:33 +0100 | [diff] [blame] | 11 | This file records the order in which modules appear in Makefiles. This |
| 12 | is used by modprobe to deterministically resolve aliases that match |
| 13 | multiple modules. |
| 14 | |
| 15 | modules.builtin |
Mauro Carvalho Chehab | cd238ef | 2019-06-12 14:52:48 -0300 | [diff] [blame] | 16 | --------------- |
Michal Marek | bc081dd | 2009-12-07 16:38:33 +0100 | [diff] [blame] | 17 | This file lists all modules that are built into the kernel. This is used |
| 18 | by modprobe to not fail when trying to load something builtin. |
| 19 | |
Alexey Gladkov | 898490c | 2019-04-29 18:11:14 +0200 | [diff] [blame] | 20 | modules.builtin.modinfo |
Mauro Carvalho Chehab | 1688694 | 2019-07-09 13:25:51 -0300 | [diff] [blame] | 21 | ----------------------- |
Alexey Gladkov | 898490c | 2019-04-29 18:11:14 +0200 | [diff] [blame] | 22 | This file contains modinfo from all modules that are built into the kernel. |
| 23 | Unlike modinfo of a separate module, all fields are prefixed with module name. |
| 24 | |
Michal Marek | bc081dd | 2009-12-07 16:38:33 +0100 | [diff] [blame] | 25 | |
Sam Ravnborg | acc08b5 | 2008-12-29 13:45:52 +0100 | [diff] [blame] | 26 | Environment variables |
Mauro Carvalho Chehab | cd238ef | 2019-06-12 14:52:48 -0300 | [diff] [blame] | 27 | ===================== |
Sam Ravnborg | acc08b5 | 2008-12-29 13:45:52 +0100 | [diff] [blame] | 28 | |
| 29 | KCPPFLAGS |
Mauro Carvalho Chehab | cd238ef | 2019-06-12 14:52:48 -0300 | [diff] [blame] | 30 | --------- |
Sam Ravnborg | acc08b5 | 2008-12-29 13:45:52 +0100 | [diff] [blame] | 31 | Additional options to pass when preprocessing. The preprocessing options |
Randy Dunlap | df291fa | 2009-01-08 10:59:34 -0800 | [diff] [blame] | 32 | will be used in all cases where kbuild does preprocessing including |
Sam Ravnborg | acc08b5 | 2008-12-29 13:45:52 +0100 | [diff] [blame] | 33 | building C files and assembler files. |
| 34 | |
| 35 | KAFLAGS |
Mauro Carvalho Chehab | cd238ef | 2019-06-12 14:52:48 -0300 | [diff] [blame] | 36 | ------- |
Sam Ravnborg | 6588169 | 2010-07-28 17:33:09 +0200 | [diff] [blame] | 37 | Additional options to the assembler (for built-in and modules). |
| 38 | |
| 39 | AFLAGS_MODULE |
Mauro Carvalho Chehab | cd238ef | 2019-06-12 14:52:48 -0300 | [diff] [blame] | 40 | ------------- |
Masahiro Yamada | 5ef8726 | 2019-07-13 11:45:58 +0900 | [diff] [blame] | 41 | Additional assembler options for modules. |
Sam Ravnborg | acc08b5 | 2008-12-29 13:45:52 +0100 | [diff] [blame] | 42 | |
Sam Ravnborg | 80c00ba | 2010-07-28 19:11:27 +0200 | [diff] [blame] | 43 | AFLAGS_KERNEL |
Mauro Carvalho Chehab | cd238ef | 2019-06-12 14:52:48 -0300 | [diff] [blame] | 44 | ------------- |
Masahiro Yamada | 5ef8726 | 2019-07-13 11:45:58 +0900 | [diff] [blame] | 45 | Additional assembler options for built-in. |
Sam Ravnborg | acc08b5 | 2008-12-29 13:45:52 +0100 | [diff] [blame] | 46 | |
| 47 | KCFLAGS |
Mauro Carvalho Chehab | cd238ef | 2019-06-12 14:52:48 -0300 | [diff] [blame] | 48 | ------- |
Sam Ravnborg | 6588169 | 2010-07-28 17:33:09 +0200 | [diff] [blame] | 49 | Additional options to the C compiler (for built-in and modules). |
| 50 | |
Miguel Ojeda | d07479b | 2021-07-03 17:23:16 +0200 | [diff] [blame] | 51 | KRUSTFLAGS |
| 52 | ---------- |
| 53 | Additional options to the Rust compiler (for built-in and modules). |
| 54 | |
Sam Ravnborg | 80c00ba | 2010-07-28 19:11:27 +0200 | [diff] [blame] | 55 | CFLAGS_KERNEL |
Mauro Carvalho Chehab | cd238ef | 2019-06-12 14:52:48 -0300 | [diff] [blame] | 56 | ------------- |
Lucas De Marchi | 25985ed | 2011-03-30 22:57:33 -0300 | [diff] [blame] | 57 | Additional options for $(CC) when used to compile |
Sam Ravnborg | 80c00ba | 2010-07-28 19:11:27 +0200 | [diff] [blame] | 58 | code that is compiled as built-in. |
| 59 | |
Sam Ravnborg | 6588169 | 2010-07-28 17:33:09 +0200 | [diff] [blame] | 60 | CFLAGS_MODULE |
Mauro Carvalho Chehab | cd238ef | 2019-06-12 14:52:48 -0300 | [diff] [blame] | 61 | ------------- |
Lucas De Marchi | 25985ed | 2011-03-30 22:57:33 -0300 | [diff] [blame] | 62 | Additional module specific options to use for $(CC). |
Sam Ravnborg | 6588169 | 2010-07-28 17:33:09 +0200 | [diff] [blame] | 63 | |
Miguel Ojeda | d07479b | 2021-07-03 17:23:16 +0200 | [diff] [blame] | 64 | RUSTFLAGS_KERNEL |
| 65 | ---------------- |
| 66 | Additional options for $(RUSTC) when used to compile |
| 67 | code that is compiled as built-in. |
| 68 | |
| 69 | RUSTFLAGS_MODULE |
| 70 | ---------------- |
| 71 | Additional module specific options to use for $(RUSTC). |
| 72 | |
Sam Ravnborg | 6588169 | 2010-07-28 17:33:09 +0200 | [diff] [blame] | 73 | LDFLAGS_MODULE |
Mauro Carvalho Chehab | cd238ef | 2019-06-12 14:52:48 -0300 | [diff] [blame] | 74 | -------------- |
Sam Ravnborg | 6588169 | 2010-07-28 17:33:09 +0200 | [diff] [blame] | 75 | Additional options used for $(LD) when linking modules. |
Sam Ravnborg | acc08b5 | 2008-12-29 13:45:52 +0100 | [diff] [blame] | 76 | |
Laura Abbott | f92d19e | 2018-07-09 17:46:02 -0700 | [diff] [blame] | 77 | HOSTCFLAGS |
Mauro Carvalho Chehab | cd238ef | 2019-06-12 14:52:48 -0300 | [diff] [blame] | 78 | ---------- |
Laura Abbott | f92d19e | 2018-07-09 17:46:02 -0700 | [diff] [blame] | 79 | Additional flags to be passed to $(HOSTCC) when building host programs. |
| 80 | |
| 81 | HOSTCXXFLAGS |
Mauro Carvalho Chehab | cd238ef | 2019-06-12 14:52:48 -0300 | [diff] [blame] | 82 | ------------ |
Laura Abbott | f92d19e | 2018-07-09 17:46:02 -0700 | [diff] [blame] | 83 | Additional flags to be passed to $(HOSTCXX) when building host programs. |
| 84 | |
Miguel Ojeda | d07479b | 2021-07-03 17:23:16 +0200 | [diff] [blame] | 85 | HOSTRUSTFLAGS |
| 86 | ------------- |
| 87 | Additional flags to be passed to $(HOSTRUSTC) when building host programs. |
| 88 | |
Laura Abbott | f92d19e | 2018-07-09 17:46:02 -0700 | [diff] [blame] | 89 | HOSTLDFLAGS |
Mauro Carvalho Chehab | cd238ef | 2019-06-12 14:52:48 -0300 | [diff] [blame] | 90 | ----------- |
Laura Abbott | f92d19e | 2018-07-09 17:46:02 -0700 | [diff] [blame] | 91 | Additional flags to be passed when linking host programs. |
| 92 | |
| 93 | HOSTLDLIBS |
Mauro Carvalho Chehab | cd238ef | 2019-06-12 14:52:48 -0300 | [diff] [blame] | 94 | ---------- |
Laura Abbott | f92d19e | 2018-07-09 17:46:02 -0700 | [diff] [blame] | 95 | Additional libraries to link against when building host programs. |
| 96 | |
Elliot Berman | f67695c9 | 2022-02-01 13:35:42 -0800 | [diff] [blame] | 97 | .. _userkbuildflags: |
| 98 | |
| 99 | USERCFLAGS |
| 100 | ---------- |
| 101 | Additional options used for $(CC) when compiling userprogs. |
| 102 | |
| 103 | USERLDFLAGS |
| 104 | ----------- |
| 105 | Additional options used for $(LD) when linking userprogs. userprogs are linked |
| 106 | with CC, so $(USERLDFLAGS) should include "-Wl," prefix as applicable. |
| 107 | |
Randy Dunlap | 00e0793 | 2018-07-04 19:47:39 -0700 | [diff] [blame] | 108 | KBUILD_KCONFIG |
Mauro Carvalho Chehab | cd238ef | 2019-06-12 14:52:48 -0300 | [diff] [blame] | 109 | -------------- |
Randy Dunlap | 00e0793 | 2018-07-04 19:47:39 -0700 | [diff] [blame] | 110 | Set the top-level Kconfig file to the value of this environment |
| 111 | variable. The default name is "Kconfig". |
| 112 | |
Sam Ravnborg | acc08b5 | 2008-12-29 13:45:52 +0100 | [diff] [blame] | 113 | KBUILD_VERBOSE |
Mauro Carvalho Chehab | cd238ef | 2019-06-12 14:52:48 -0300 | [diff] [blame] | 114 | -------------- |
Randy Dunlap | df291fa | 2009-01-08 10:59:34 -0800 | [diff] [blame] | 115 | Set the kbuild verbosity. Can be assigned same values as "V=...". |
Mauro Carvalho Chehab | cd238ef | 2019-06-12 14:52:48 -0300 | [diff] [blame] | 116 | |
Sam Ravnborg | acc08b5 | 2008-12-29 13:45:52 +0100 | [diff] [blame] | 117 | See make help for the full list. |
Mauro Carvalho Chehab | cd238ef | 2019-06-12 14:52:48 -0300 | [diff] [blame] | 118 | |
Sam Ravnborg | acc08b5 | 2008-12-29 13:45:52 +0100 | [diff] [blame] | 119 | Setting "V=..." takes precedence over KBUILD_VERBOSE. |
| 120 | |
| 121 | KBUILD_EXTMOD |
Mauro Carvalho Chehab | cd238ef | 2019-06-12 14:52:48 -0300 | [diff] [blame] | 122 | ------------- |
Sam Ravnborg | acc08b5 | 2008-12-29 13:45:52 +0100 | [diff] [blame] | 123 | Set the directory to look for the kernel source when building external |
| 124 | modules. |
Mauro Carvalho Chehab | cd238ef | 2019-06-12 14:52:48 -0300 | [diff] [blame] | 125 | |
Masahiro Yamada | 0126be3 | 2018-11-21 00:04:18 +0900 | [diff] [blame] | 126 | Setting "M=..." takes precedence over KBUILD_EXTMOD. |
Sam Ravnborg | acc08b5 | 2008-12-29 13:45:52 +0100 | [diff] [blame] | 127 | |
| 128 | KBUILD_OUTPUT |
Mauro Carvalho Chehab | cd238ef | 2019-06-12 14:52:48 -0300 | [diff] [blame] | 129 | ------------- |
Sam Ravnborg | acc08b5 | 2008-12-29 13:45:52 +0100 | [diff] [blame] | 130 | Specify the output directory when building the kernel. |
Mauro Carvalho Chehab | cd238ef | 2019-06-12 14:52:48 -0300 | [diff] [blame] | 131 | |
Nicolas Kaiser | c95940f | 2010-08-05 11:23:11 -0700 | [diff] [blame] | 132 | The output directory can also be specified using "O=...". |
Mauro Carvalho Chehab | cd238ef | 2019-06-12 14:52:48 -0300 | [diff] [blame] | 133 | |
Randy Dunlap | df291fa | 2009-01-08 10:59:34 -0800 | [diff] [blame] | 134 | Setting "O=..." takes precedence over KBUILD_OUTPUT. |
Sam Ravnborg | acc08b5 | 2008-12-29 13:45:52 +0100 | [diff] [blame] | 135 | |
Masahiro Yamada | e27128d | 2019-09-01 01:25:55 +0900 | [diff] [blame] | 136 | KBUILD_EXTRA_WARN |
| 137 | ----------------- |
| 138 | Specify the extra build checks. The same value can be assigned by passing |
| 139 | W=... from the command line. |
| 140 | |
| 141 | See `make help` for the list of the supported values. |
| 142 | |
| 143 | Setting "W=..." takes precedence over KBUILD_EXTRA_WARN. |
| 144 | |
Asbjoern Sloth Toennesen | 55f88ec | 2010-12-12 17:39:40 +0000 | [diff] [blame] | 145 | KBUILD_DEBARCH |
Mauro Carvalho Chehab | cd238ef | 2019-06-12 14:52:48 -0300 | [diff] [blame] | 146 | -------------- |
Asbjoern Sloth Toennesen | 55f88ec | 2010-12-12 17:39:40 +0000 | [diff] [blame] | 147 | For the deb-pkg target, allows overriding the normal heuristics deployed by |
| 148 | deb-pkg. Normally deb-pkg attempts to guess the right architecture based on |
| 149 | the UTS_MACHINE variable, and on some architectures also the kernel config. |
| 150 | The value of KBUILD_DEBARCH is assumed (not checked) to be a valid Debian |
| 151 | architecture. |
| 152 | |
Johannes Berg | 56b0f45 | 2023-06-09 10:46:41 +0200 | [diff] [blame] | 153 | KDOCFLAGS |
| 154 | --------- |
| 155 | Specify extra (warning/error) flags for kernel-doc checks during the build, |
| 156 | see scripts/kernel-doc for which flags are supported. Note that this doesn't |
| 157 | (currently) apply to documentation builds. |
| 158 | |
Sam Ravnborg | acc08b5 | 2008-12-29 13:45:52 +0100 | [diff] [blame] | 159 | ARCH |
Mauro Carvalho Chehab | cd238ef | 2019-06-12 14:52:48 -0300 | [diff] [blame] | 160 | ---- |
Sam Ravnborg | acc08b5 | 2008-12-29 13:45:52 +0100 | [diff] [blame] | 161 | Set ARCH to the architecture to be built. |
Mauro Carvalho Chehab | cd238ef | 2019-06-12 14:52:48 -0300 | [diff] [blame] | 162 | |
Sam Ravnborg | acc08b5 | 2008-12-29 13:45:52 +0100 | [diff] [blame] | 163 | In most cases the name of the architecture is the same as the |
| 164 | directory name found in the arch/ directory. |
Mauro Carvalho Chehab | cd238ef | 2019-06-12 14:52:48 -0300 | [diff] [blame] | 165 | |
Randy Dunlap | df291fa | 2009-01-08 10:59:34 -0800 | [diff] [blame] | 166 | But some architectures such as x86 and sparc have aliases. |
Mauro Carvalho Chehab | cd238ef | 2019-06-12 14:52:48 -0300 | [diff] [blame] | 167 | |
| 168 | - x86: i386 for 32 bit, x86_64 for 64 bit |
Randy Dunlap | e0838a9 | 2023-02-05 08:37:52 -0800 | [diff] [blame] | 169 | - parisc: parisc64 for 64 bit |
Mauro Carvalho Chehab | cd238ef | 2019-06-12 14:52:48 -0300 | [diff] [blame] | 170 | - sparc: sparc32 for 32 bit, sparc64 for 64 bit |
Sam Ravnborg | acc08b5 | 2008-12-29 13:45:52 +0100 | [diff] [blame] | 171 | |
| 172 | CROSS_COMPILE |
Mauro Carvalho Chehab | cd238ef | 2019-06-12 14:52:48 -0300 | [diff] [blame] | 173 | ------------- |
Sam Ravnborg | acc08b5 | 2008-12-29 13:45:52 +0100 | [diff] [blame] | 174 | Specify an optional fixed part of the binutils filename. |
| 175 | CROSS_COMPILE can be a part of the filename or the full path. |
| 176 | |
Kirill Smelkov | e8d400a | 2010-02-17 11:45:33 +0300 | [diff] [blame] | 177 | CROSS_COMPILE is also used for ccache in some setups. |
Sam Ravnborg | acc08b5 | 2008-12-29 13:45:52 +0100 | [diff] [blame] | 178 | |
| 179 | CF |
Mauro Carvalho Chehab | cd238ef | 2019-06-12 14:52:48 -0300 | [diff] [blame] | 180 | -- |
Sam Ravnborg | acc08b5 | 2008-12-29 13:45:52 +0100 | [diff] [blame] | 181 | Additional options for sparse. |
Mauro Carvalho Chehab | cd238ef | 2019-06-12 14:52:48 -0300 | [diff] [blame] | 182 | |
| 183 | CF is often used on the command-line like this:: |
Sam Ravnborg | acc08b5 | 2008-12-29 13:45:52 +0100 | [diff] [blame] | 184 | |
| 185 | make CF=-Wbitwise C=2 |
| 186 | |
| 187 | INSTALL_PATH |
Mauro Carvalho Chehab | cd238ef | 2019-06-12 14:52:48 -0300 | [diff] [blame] | 188 | ------------ |
Sam Ravnborg | acc08b5 | 2008-12-29 13:45:52 +0100 | [diff] [blame] | 189 | INSTALL_PATH specifies where to place the updated kernel and system map |
Randy Dunlap | df291fa | 2009-01-08 10:59:34 -0800 | [diff] [blame] | 190 | images. Default is /boot, but you can set it to other values. |
Sam Ravnborg | acc08b5 | 2008-12-29 13:45:52 +0100 | [diff] [blame] | 191 | |
Sam Ravnborg | caa27b6 | 2009-07-20 21:37:11 +0200 | [diff] [blame] | 192 | INSTALLKERNEL |
Mauro Carvalho Chehab | cd238ef | 2019-06-12 14:52:48 -0300 | [diff] [blame] | 193 | ------------- |
Sam Ravnborg | caa27b6 | 2009-07-20 21:37:11 +0200 | [diff] [blame] | 194 | Install script called when using "make install". |
| 195 | The default name is "installkernel". |
| 196 | |
| 197 | The script will be called with the following arguments: |
Mauro Carvalho Chehab | 1688694 | 2019-07-09 13:25:51 -0300 | [diff] [blame] | 198 | |
Mauro Carvalho Chehab | cd238ef | 2019-06-12 14:52:48 -0300 | [diff] [blame] | 199 | - $1 - kernel version |
| 200 | - $2 - kernel image file |
| 201 | - $3 - kernel map file |
| 202 | - $4 - default install path (use root directory if blank) |
Sam Ravnborg | caa27b6 | 2009-07-20 21:37:11 +0200 | [diff] [blame] | 203 | |
Nicolas Kaiser | c95940f | 2010-08-05 11:23:11 -0700 | [diff] [blame] | 204 | The implementation of "make install" is architecture specific |
Sam Ravnborg | caa27b6 | 2009-07-20 21:37:11 +0200 | [diff] [blame] | 205 | and it may differ from the above. |
| 206 | |
| 207 | INSTALLKERNEL is provided to enable the possibility to |
| 208 | specify a custom installer when cross compiling a kernel. |
Sam Ravnborg | acc08b5 | 2008-12-29 13:45:52 +0100 | [diff] [blame] | 209 | |
| 210 | MODLIB |
Mauro Carvalho Chehab | cd238ef | 2019-06-12 14:52:48 -0300 | [diff] [blame] | 211 | ------ |
Sam Ravnborg | acc08b5 | 2008-12-29 13:45:52 +0100 | [diff] [blame] | 212 | Specify where to install modules. |
Mauro Carvalho Chehab | cd238ef | 2019-06-12 14:52:48 -0300 | [diff] [blame] | 213 | The default value is:: |
Sam Ravnborg | acc08b5 | 2008-12-29 13:45:52 +0100 | [diff] [blame] | 214 | |
| 215 | $(INSTALL_MOD_PATH)/lib/modules/$(KERNELRELEASE) |
| 216 | |
| 217 | The value can be overridden in which case the default value is ignored. |
| 218 | |
| 219 | INSTALL_MOD_PATH |
Mauro Carvalho Chehab | cd238ef | 2019-06-12 14:52:48 -0300 | [diff] [blame] | 220 | ---------------- |
Sam Ravnborg | acc08b5 | 2008-12-29 13:45:52 +0100 | [diff] [blame] | 221 | INSTALL_MOD_PATH specifies a prefix to MODLIB for module directory |
| 222 | relocations required by build roots. This is not defined in the |
| 223 | makefile but the argument can be passed to make if needed. |
| 224 | |
| 225 | INSTALL_MOD_STRIP |
Mauro Carvalho Chehab | cd238ef | 2019-06-12 14:52:48 -0300 | [diff] [blame] | 226 | ----------------- |
Sam Ravnborg | acc08b5 | 2008-12-29 13:45:52 +0100 | [diff] [blame] | 227 | INSTALL_MOD_STRIP, if defined, will cause modules to be |
| 228 | stripped after they are installed. If INSTALL_MOD_STRIP is '1', then |
| 229 | the default option --strip-debug will be used. Otherwise, |
Gilles Espinasse | 177b241 | 2011-01-09 08:59:49 +0100 | [diff] [blame] | 230 | INSTALL_MOD_STRIP value will be used as the options to the strip command. |
Sam Ravnborg | acc08b5 | 2008-12-29 13:45:52 +0100 | [diff] [blame] | 231 | |
Sam Ravnborg | acc08b5 | 2008-12-29 13:45:52 +0100 | [diff] [blame] | 232 | INSTALL_HDR_PATH |
Mauro Carvalho Chehab | cd238ef | 2019-06-12 14:52:48 -0300 | [diff] [blame] | 233 | ---------------- |
Randy Dunlap | df291fa | 2009-01-08 10:59:34 -0800 | [diff] [blame] | 234 | INSTALL_HDR_PATH specifies where to install user space headers when |
Sam Ravnborg | acc08b5 | 2008-12-29 13:45:52 +0100 | [diff] [blame] | 235 | executing "make headers_*". |
Mauro Carvalho Chehab | cd238ef | 2019-06-12 14:52:48 -0300 | [diff] [blame] | 236 | |
| 237 | The default value is:: |
Sam Ravnborg | acc08b5 | 2008-12-29 13:45:52 +0100 | [diff] [blame] | 238 | |
| 239 | $(objtree)/usr |
| 240 | |
| 241 | $(objtree) is the directory where output files are saved. |
| 242 | The output directory is often set using "O=..." on the commandline. |
| 243 | |
| 244 | The value can be overridden in which case the default value is ignored. |
| 245 | |
Ricardo B. Marliere | 1b62728 | 2023-10-12 07:54:21 -0300 | [diff] [blame] | 246 | INSTALL_DTBS_PATH |
| 247 | ----------------- |
| 248 | INSTALL_DTBS_PATH specifies where to install device tree blobs for |
| 249 | relocations required by build roots. This is not defined in the |
| 250 | makefile but the argument can be passed to make if needed. |
| 251 | |
Linus Torvalds | 39ceda5 | 2019-07-12 16:03:16 -0700 | [diff] [blame] | 252 | KBUILD_ABS_SRCTREE |
| 253 | -------------------------------------------------- |
| 254 | Kbuild uses a relative path to point to the tree when possible. For instance, |
| 255 | when building in the source tree, the source tree path is '.' |
| 256 | |
| 257 | Setting this flag requests Kbuild to use absolute path to the source tree. |
| 258 | There are some useful cases to do so, like when generating tag files with |
| 259 | absolute path entries etc. |
| 260 | |
David Woodhouse | af1eb29 | 2015-07-20 21:16:28 +0100 | [diff] [blame] | 261 | KBUILD_SIGN_PIN |
Mauro Carvalho Chehab | cd238ef | 2019-06-12 14:52:48 -0300 | [diff] [blame] | 262 | --------------- |
David Woodhouse | af1eb29 | 2015-07-20 21:16:28 +0100 | [diff] [blame] | 263 | This variable allows a passphrase or PIN to be passed to the sign-file |
| 264 | utility when signing kernel modules, if the private key requires such. |
| 265 | |
Sam Ravnborg | acc08b5 | 2008-12-29 13:45:52 +0100 | [diff] [blame] | 266 | KBUILD_MODPOST_WARN |
Mauro Carvalho Chehab | cd238ef | 2019-06-12 14:52:48 -0300 | [diff] [blame] | 267 | ------------------- |
Randy Dunlap | df291fa | 2009-01-08 10:59:34 -0800 | [diff] [blame] | 268 | KBUILD_MODPOST_WARN can be set to avoid errors in case of undefined |
| 269 | symbols in the final module linking stage. It changes such errors |
| 270 | into warnings. |
Sam Ravnborg | acc08b5 | 2008-12-29 13:45:52 +0100 | [diff] [blame] | 271 | |
Randy Dunlap | df291fa | 2009-01-08 10:59:34 -0800 | [diff] [blame] | 272 | KBUILD_MODPOST_NOFINAL |
Mauro Carvalho Chehab | cd238ef | 2019-06-12 14:52:48 -0300 | [diff] [blame] | 273 | ---------------------- |
Sam Ravnborg | acc08b5 | 2008-12-29 13:45:52 +0100 | [diff] [blame] | 274 | KBUILD_MODPOST_NOFINAL can be set to skip the final link of modules. |
Randy Dunlap | df291fa | 2009-01-08 10:59:34 -0800 | [diff] [blame] | 275 | This is solely useful to speed up test compiles. |
Sam Ravnborg | acc08b5 | 2008-12-29 13:45:52 +0100 | [diff] [blame] | 276 | |
| 277 | KBUILD_EXTRA_SYMBOLS |
Mauro Carvalho Chehab | cd238ef | 2019-06-12 14:52:48 -0300 | [diff] [blame] | 278 | -------------------- |
Randy Dunlap | df291fa | 2009-01-08 10:59:34 -0800 | [diff] [blame] | 279 | For modules that use symbols from other modules. |
Masahiro Yamada | 2eebb7a | 2020-03-12 07:50:44 +0900 | [diff] [blame] | 280 | See more details in modules.rst. |
Jike Song | 4f62824 | 2009-01-05 14:57:03 +0800 | [diff] [blame] | 281 | |
| 282 | ALLSOURCE_ARCHS |
Mauro Carvalho Chehab | cd238ef | 2019-06-12 14:52:48 -0300 | [diff] [blame] | 283 | --------------- |
Randy Dunlap | df291fa | 2009-01-08 10:59:34 -0800 | [diff] [blame] | 284 | For tags/TAGS/cscope targets, you can specify more than one arch |
Mauro Carvalho Chehab | cd238ef | 2019-06-12 14:52:48 -0300 | [diff] [blame] | 285 | to be included in the databases, separated by blank space. E.g.:: |
Jike Song | 4f62824 | 2009-01-05 14:57:03 +0800 | [diff] [blame] | 286 | |
| 287 | $ make ALLSOURCE_ARCHS="x86 mips arm" tags |
John Kacur | bc75cc6 | 2010-03-02 16:57:52 +0100 | [diff] [blame] | 288 | |
Mauro Carvalho Chehab | cd238ef | 2019-06-12 14:52:48 -0300 | [diff] [blame] | 289 | To get all available archs you can also specify all. E.g.:: |
John Kacur | bc75cc6 | 2010-03-02 16:57:52 +0100 | [diff] [blame] | 290 | |
| 291 | $ make ALLSOURCE_ARCHS=all tags |
Borislav Petkov | 4a5838a | 2011-03-01 09:35:29 +0100 | [diff] [blame] | 292 | |
Paulo Miguel Almeida | 40bf2fc | 2022-12-14 09:26:15 +1300 | [diff] [blame] | 293 | IGNORE_DIRS |
| 294 | ----------- |
| 295 | For tags/TAGS/cscope targets, you can choose which directories won't |
| 296 | be included in the databases, separated by blank space. E.g.:: |
| 297 | |
| 298 | $ make IGNORE_DIRS="drivers/gpu/drm/radeon tools" cscope |
| 299 | |
Michal Marek | 53e6892 | 2011-04-05 14:32:30 +0200 | [diff] [blame] | 300 | KBUILD_BUILD_TIMESTAMP |
Mauro Carvalho Chehab | cd238ef | 2019-06-12 14:52:48 -0300 | [diff] [blame] | 301 | ---------------------- |
Michal Marek | 53e6892 | 2011-04-05 14:32:30 +0200 | [diff] [blame] | 302 | Setting this to a date string overrides the timestamp used in the |
Michal Marek | a8b8017 | 2011-03-31 23:16:42 +0200 | [diff] [blame] | 303 | UTS_VERSION definition (uname -v in the running kernel). The value has to |
| 304 | be a string that can be passed to date -d. The default value |
Michal Marek | 53e6892 | 2011-04-05 14:32:30 +0200 | [diff] [blame] | 305 | is the output of the date command at one point during build. |
| 306 | |
| 307 | KBUILD_BUILD_USER, KBUILD_BUILD_HOST |
Mauro Carvalho Chehab | cd238ef | 2019-06-12 14:52:48 -0300 | [diff] [blame] | 308 | ------------------------------------ |
Michal Marek | 53e6892 | 2011-04-05 14:32:30 +0200 | [diff] [blame] | 309 | These two variables allow to override the user@host string displayed during |
| 310 | boot and in /proc/version. The default value is the output of the commands |
| 311 | whoami and host, respectively. |
Masahiro Yamada | a0d1c95 | 2020-04-08 10:36:23 +0900 | [diff] [blame] | 312 | |
| 313 | LLVM |
| 314 | ---- |
| 315 | If this variable is set to 1, Kbuild will use Clang and LLVM utilities instead |
| 316 | of GCC and GNU binutils to build the kernel. |