Michal Marek | bc081dd | 2009-12-07 16:38:33 +0100 | [diff] [blame] | 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 | |
Sam Ravnborg | acc08b5 | 2008-12-29 13:45:52 +0100 | [diff] [blame] | 15 | Environment variables |
| 16 | |
| 17 | KCPPFLAGS |
| 18 | -------------------------------------------------- |
| 19 | Additional options to pass when preprocessing. The preprocessing options |
Randy Dunlap | df291fa | 2009-01-08 10:59:34 -0800 | [diff] [blame] | 20 | will be used in all cases where kbuild does preprocessing including |
Sam Ravnborg | acc08b5 | 2008-12-29 13:45:52 +0100 | [diff] [blame] | 21 | building C files and assembler files. |
| 22 | |
| 23 | KAFLAGS |
| 24 | -------------------------------------------------- |
Sam Ravnborg | 6588169 | 2010-07-28 17:33:09 +0200 | [diff] [blame^] | 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). |
Sam Ravnborg | acc08b5 | 2008-12-29 13:45:52 +0100 | [diff] [blame] | 30 | |
| 31 | KCFLAGS |
| 32 | -------------------------------------------------- |
Sam Ravnborg | 6588169 | 2010-07-28 17:33:09 +0200 | [diff] [blame^] | 33 | Additional options to the C compiler (for built-in and modules). |
| 34 | |
| 35 | CFLAGS_MODULE |
| 36 | -------------------------------------------------- |
| 37 | Addtional module specific options to use for $(CC). |
| 38 | |
| 39 | LDFLAGS_MODULE |
| 40 | -------------------------------------------------- |
| 41 | Additional options used for $(LD) when linking modules. |
Sam Ravnborg | acc08b5 | 2008-12-29 13:45:52 +0100 | [diff] [blame] | 42 | |
| 43 | KBUILD_VERBOSE |
| 44 | -------------------------------------------------- |
Randy Dunlap | df291fa | 2009-01-08 10:59:34 -0800 | [diff] [blame] | 45 | Set the kbuild verbosity. Can be assigned same values as "V=...". |
Sam Ravnborg | acc08b5 | 2008-12-29 13:45:52 +0100 | [diff] [blame] | 46 | See make help for the full list. |
| 47 | Setting "V=..." takes precedence over KBUILD_VERBOSE. |
| 48 | |
| 49 | KBUILD_EXTMOD |
| 50 | -------------------------------------------------- |
| 51 | Set the directory to look for the kernel source when building external |
| 52 | modules. |
| 53 | The directory can be specified in several ways: |
| 54 | 1) Use "M=..." on the command line |
| 55 | 2) Environmnet variable KBUILD_EXTMOD |
| 56 | 3) Environmnet variable SUBDIRS |
| 57 | The possibilities are listed in the order they take precedence. |
| 58 | Using "M=..." will always override the others. |
| 59 | |
| 60 | KBUILD_OUTPUT |
| 61 | -------------------------------------------------- |
| 62 | Specify the output directory when building the kernel. |
| 63 | The output directory can also be specificed using "O=...". |
Randy Dunlap | df291fa | 2009-01-08 10:59:34 -0800 | [diff] [blame] | 64 | Setting "O=..." takes precedence over KBUILD_OUTPUT. |
Sam Ravnborg | acc08b5 | 2008-12-29 13:45:52 +0100 | [diff] [blame] | 65 | |
| 66 | ARCH |
| 67 | -------------------------------------------------- |
| 68 | Set ARCH to the architecture to be built. |
| 69 | In most cases the name of the architecture is the same as the |
| 70 | directory name found in the arch/ directory. |
Randy Dunlap | df291fa | 2009-01-08 10:59:34 -0800 | [diff] [blame] | 71 | But some architectures such as x86 and sparc have aliases. |
Sam Ravnborg | acc08b5 | 2008-12-29 13:45:52 +0100 | [diff] [blame] | 72 | x86: i386 for 32 bit, x86_64 for 64 bit |
| 73 | sparc: sparc for 32 bit, sparc64 for 64 bit |
| 74 | |
| 75 | CROSS_COMPILE |
| 76 | -------------------------------------------------- |
| 77 | Specify an optional fixed part of the binutils filename. |
| 78 | CROSS_COMPILE can be a part of the filename or the full path. |
| 79 | |
Kirill Smelkov | e8d400a | 2010-02-17 11:45:33 +0300 | [diff] [blame] | 80 | CROSS_COMPILE is also used for ccache in some setups. |
Sam Ravnborg | acc08b5 | 2008-12-29 13:45:52 +0100 | [diff] [blame] | 81 | |
| 82 | CF |
| 83 | -------------------------------------------------- |
| 84 | Additional options for sparse. |
| 85 | CF is often used on the command-line like this: |
| 86 | |
| 87 | make CF=-Wbitwise C=2 |
| 88 | |
| 89 | INSTALL_PATH |
| 90 | -------------------------------------------------- |
| 91 | INSTALL_PATH specifies where to place the updated kernel and system map |
Randy Dunlap | df291fa | 2009-01-08 10:59:34 -0800 | [diff] [blame] | 92 | images. Default is /boot, but you can set it to other values. |
Sam Ravnborg | acc08b5 | 2008-12-29 13:45:52 +0100 | [diff] [blame] | 93 | |
Sam Ravnborg | caa27b6 | 2009-07-20 21:37:11 +0200 | [diff] [blame] | 94 | INSTALLKERNEL |
| 95 | -------------------------------------------------- |
| 96 | Install script called when using "make install". |
| 97 | The default name is "installkernel". |
| 98 | |
| 99 | The script will be called with the following arguments: |
| 100 | $1 - kernel version |
| 101 | $2 - kernel image file |
| 102 | $3 - kernel map file |
| 103 | $4 - default install path (use root directory if blank) |
| 104 | |
| 105 | The implmentation of "make install" is architecture specific |
| 106 | and it may differ from the above. |
| 107 | |
| 108 | INSTALLKERNEL is provided to enable the possibility to |
| 109 | specify a custom installer when cross compiling a kernel. |
Sam Ravnborg | acc08b5 | 2008-12-29 13:45:52 +0100 | [diff] [blame] | 110 | |
| 111 | MODLIB |
| 112 | -------------------------------------------------- |
| 113 | Specify where to install modules. |
| 114 | The default value is: |
| 115 | |
| 116 | $(INSTALL_MOD_PATH)/lib/modules/$(KERNELRELEASE) |
| 117 | |
| 118 | The value can be overridden in which case the default value is ignored. |
| 119 | |
| 120 | INSTALL_MOD_PATH |
| 121 | -------------------------------------------------- |
| 122 | INSTALL_MOD_PATH specifies a prefix to MODLIB for module directory |
| 123 | relocations required by build roots. This is not defined in the |
| 124 | makefile but the argument can be passed to make if needed. |
| 125 | |
| 126 | INSTALL_MOD_STRIP |
| 127 | -------------------------------------------------- |
| 128 | INSTALL_MOD_STRIP, if defined, will cause modules to be |
| 129 | stripped after they are installed. If INSTALL_MOD_STRIP is '1', then |
| 130 | the default option --strip-debug will be used. Otherwise, |
| 131 | INSTALL_MOD_STRIP will used as the options to the strip command. |
| 132 | |
| 133 | INSTALL_FW_PATH |
| 134 | -------------------------------------------------- |
Randy Dunlap | df291fa | 2009-01-08 10:59:34 -0800 | [diff] [blame] | 135 | INSTALL_FW_PATH specifies where to install the firmware blobs. |
Sam Ravnborg | acc08b5 | 2008-12-29 13:45:52 +0100 | [diff] [blame] | 136 | The default value is: |
| 137 | |
| 138 | $(INSTALL_MOD_PATH)/lib/firmware |
| 139 | |
| 140 | The value can be overridden in which case the default value is ignored. |
| 141 | |
| 142 | INSTALL_HDR_PATH |
| 143 | -------------------------------------------------- |
Randy Dunlap | df291fa | 2009-01-08 10:59:34 -0800 | [diff] [blame] | 144 | INSTALL_HDR_PATH specifies where to install user space headers when |
Sam Ravnborg | acc08b5 | 2008-12-29 13:45:52 +0100 | [diff] [blame] | 145 | executing "make headers_*". |
| 146 | The default value is: |
| 147 | |
| 148 | $(objtree)/usr |
| 149 | |
| 150 | $(objtree) is the directory where output files are saved. |
| 151 | The output directory is often set using "O=..." on the commandline. |
| 152 | |
| 153 | The value can be overridden in which case the default value is ignored. |
| 154 | |
| 155 | KBUILD_MODPOST_WARN |
| 156 | -------------------------------------------------- |
Randy Dunlap | df291fa | 2009-01-08 10:59:34 -0800 | [diff] [blame] | 157 | KBUILD_MODPOST_WARN can be set to avoid errors in case of undefined |
| 158 | symbols in the final module linking stage. It changes such errors |
| 159 | into warnings. |
Sam Ravnborg | acc08b5 | 2008-12-29 13:45:52 +0100 | [diff] [blame] | 160 | |
Randy Dunlap | df291fa | 2009-01-08 10:59:34 -0800 | [diff] [blame] | 161 | KBUILD_MODPOST_NOFINAL |
Sam Ravnborg | acc08b5 | 2008-12-29 13:45:52 +0100 | [diff] [blame] | 162 | -------------------------------------------------- |
| 163 | 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] | 164 | This is solely useful to speed up test compiles. |
Sam Ravnborg | acc08b5 | 2008-12-29 13:45:52 +0100 | [diff] [blame] | 165 | |
| 166 | KBUILD_EXTRA_SYMBOLS |
| 167 | -------------------------------------------------- |
Randy Dunlap | df291fa | 2009-01-08 10:59:34 -0800 | [diff] [blame] | 168 | For modules that use symbols from other modules. |
Sam Ravnborg | acc08b5 | 2008-12-29 13:45:52 +0100 | [diff] [blame] | 169 | See more details in modules.txt. |
Jike Song | 4f62824 | 2009-01-05 14:57:03 +0800 | [diff] [blame] | 170 | |
| 171 | ALLSOURCE_ARCHS |
| 172 | -------------------------------------------------- |
Randy Dunlap | df291fa | 2009-01-08 10:59:34 -0800 | [diff] [blame] | 173 | For tags/TAGS/cscope targets, you can specify more than one arch |
| 174 | to be included in the databases, separated by blank space. E.g.: |
Jike Song | 4f62824 | 2009-01-05 14:57:03 +0800 | [diff] [blame] | 175 | |
| 176 | $ make ALLSOURCE_ARCHS="x86 mips arm" tags |
John Kacur | bc75cc6 | 2010-03-02 16:57:52 +0100 | [diff] [blame] | 177 | |
| 178 | To get all available archs you can also specify all. E.g.: |
| 179 | |
| 180 | $ make ALLSOURCE_ARCHS=all tags |