diff options
Diffstat (limited to 'Documentation/kbuild/kbuild.txt')
-rw-r--r-- | Documentation/kbuild/kbuild.txt | 126 |
1 files changed, 126 insertions, 0 deletions
diff --git a/Documentation/kbuild/kbuild.txt b/Documentation/kbuild/kbuild.txt new file mode 100644 index 000000000000..51771847e816 --- /dev/null +++ b/Documentation/kbuild/kbuild.txt | |||
@@ -0,0 +1,126 @@ | |||
1 | Environment variables | ||
2 | |||
3 | KCPPFLAGS | ||
4 | -------------------------------------------------- | ||
5 | Additional options to pass when preprocessing. The preprocessing options | ||
6 | will be used in all cases where kbuild do preprocessing including | ||
7 | building C files and assembler files. | ||
8 | |||
9 | KAFLAGS | ||
10 | -------------------------------------------------- | ||
11 | Additional options to the assembler. | ||
12 | |||
13 | KCFLAGS | ||
14 | -------------------------------------------------- | ||
15 | Additional options to the C compiler. | ||
16 | |||
17 | KBUILD_VERBOSE | ||
18 | -------------------------------------------------- | ||
19 | Set the kbuild verbosity. Can be assinged same values as "V=...". | ||
20 | See make help for the full list. | ||
21 | Setting "V=..." takes precedence over KBUILD_VERBOSE. | ||
22 | |||
23 | KBUILD_EXTMOD | ||
24 | -------------------------------------------------- | ||
25 | Set the directory to look for the kernel source when building external | ||
26 | modules. | ||
27 | The directory can be specified in several ways: | ||
28 | 1) Use "M=..." on the command line | ||
29 | 2) Environmnet variable KBUILD_EXTMOD | ||
30 | 3) Environmnet variable SUBDIRS | ||
31 | The possibilities are listed in the order they take precedence. | ||
32 | Using "M=..." will always override the others. | ||
33 | |||
34 | KBUILD_OUTPUT | ||
35 | -------------------------------------------------- | ||
36 | Specify the output directory when building the kernel. | ||
37 | The output directory can also be specificed using "O=...". | ||
38 | Setting "O=..." takes precedence over KBUILD_OUTPUT | ||
39 | |||
40 | ARCH | ||
41 | -------------------------------------------------- | ||
42 | Set ARCH to the architecture to be built. | ||
43 | In most cases the name of the architecture is the same as the | ||
44 | directory name found in the arch/ directory. | ||
45 | But some architectures suach as x86 and sparc has aliases. | ||
46 | x86: i386 for 32 bit, x86_64 for 64 bit | ||
47 | sparc: sparc for 32 bit, sparc64 for 64 bit | ||
48 | |||
49 | CROSS_COMPILE | ||
50 | -------------------------------------------------- | ||
51 | Specify an optional fixed part of the binutils filename. | ||
52 | CROSS_COMPILE can be a part of the filename or the full path. | ||
53 | |||
54 | CROSS_COMPILE is also used for ccache is some setups. | ||
55 | |||
56 | CF | ||
57 | -------------------------------------------------- | ||
58 | Additional options for sparse. | ||
59 | CF is often used on the command-line like this: | ||
60 | |||
61 | make CF=-Wbitwise C=2 | ||
62 | |||
63 | INSTALL_PATH | ||
64 | -------------------------------------------------- | ||
65 | INSTALL_PATH specifies where to place the updated kernel and system map | ||
66 | images. Default is /boot, but you can set it to other values | ||
67 | |||
68 | |||
69 | MODLIB | ||
70 | -------------------------------------------------- | ||
71 | Specify where to install modules. | ||
72 | The default value is: | ||
73 | |||
74 | $(INSTALL_MOD_PATH)/lib/modules/$(KERNELRELEASE) | ||
75 | |||
76 | The value can be overridden in which case the default value is ignored. | ||
77 | |||
78 | INSTALL_MOD_PATH | ||
79 | -------------------------------------------------- | ||
80 | INSTALL_MOD_PATH specifies a prefix to MODLIB for module directory | ||
81 | relocations required by build roots. This is not defined in the | ||
82 | makefile but the argument can be passed to make if needed. | ||
83 | |||
84 | INSTALL_MOD_STRIP | ||
85 | -------------------------------------------------- | ||
86 | INSTALL_MOD_STRIP, if defined, will cause modules to be | ||
87 | stripped after they are installed. If INSTALL_MOD_STRIP is '1', then | ||
88 | the default option --strip-debug will be used. Otherwise, | ||
89 | INSTALL_MOD_STRIP will used as the options to the strip command. | ||
90 | |||
91 | INSTALL_FW_PATH | ||
92 | -------------------------------------------------- | ||
93 | INSTALL_FW_PATH specify where to install the firmware blobs. | ||
94 | The default value is: | ||
95 | |||
96 | $(INSTALL_MOD_PATH)/lib/firmware | ||
97 | |||
98 | The value can be overridden in which case the default value is ignored. | ||
99 | |||
100 | INSTALL_HDR_PATH | ||
101 | -------------------------------------------------- | ||
102 | INSTALL_HDR_PATH specify where to install user space headers when | ||
103 | executing "make headers_*". | ||
104 | The default value is: | ||
105 | |||
106 | $(objtree)/usr | ||
107 | |||
108 | $(objtree) is the directory where output files are saved. | ||
109 | The output directory is often set using "O=..." on the commandline. | ||
110 | |||
111 | The value can be overridden in which case the default value is ignored. | ||
112 | |||
113 | KBUILD_MODPOST_WARN | ||
114 | -------------------------------------------------- | ||
115 | KBUILD_MODPOST_WARN can be set to avoid error out in case of undefined | ||
116 | symbols in the final module linking stage. | ||
117 | |||
118 | KBUILD_MODPOST_FINAL | ||
119 | -------------------------------------------------- | ||
120 | KBUILD_MODPOST_NOFINAL can be set to skip the final link of modules. | ||
121 | This is solely usefull to speed up test compiles. | ||
122 | |||
123 | KBUILD_EXTRA_SYMBOLS | ||
124 | -------------------------------------------------- | ||
125 | For modules use symbols from another modules. | ||
126 | See more details in modules.txt. | ||