diff options
author | Jonathan Herman <hermanjl@cs.unc.edu> | 2013-01-17 16:15:55 -0500 |
---|---|---|
committer | Jonathan Herman <hermanjl@cs.unc.edu> | 2013-01-17 16:15:55 -0500 |
commit | 8dea78da5cee153b8af9c07a2745f6c55057fe12 (patch) | |
tree | a8f4d49d63b1ecc92f2fddceba0655b2472c5bd9 /Documentation/kbuild | |
parent | 406089d01562f1e2bf9f089fd7637009ebaad589 (diff) |
Patched in Tegra support.
Diffstat (limited to 'Documentation/kbuild')
-rw-r--r-- | Documentation/kbuild/kbuild.txt | 19 | ||||
-rw-r--r-- | Documentation/kbuild/kconfig-language.txt | 2 | ||||
-rw-r--r-- | Documentation/kbuild/kconfig.txt | 26 | ||||
-rw-r--r-- | Documentation/kbuild/makefiles.txt | 73 | ||||
-rw-r--r-- | Documentation/kbuild/modules.txt | 2 |
5 files changed, 45 insertions, 77 deletions
diff --git a/Documentation/kbuild/kbuild.txt b/Documentation/kbuild/kbuild.txt index 6466704d47b..68e32bb6bd8 100644 --- a/Documentation/kbuild/kbuild.txt +++ b/Documentation/kbuild/kbuild.txt | |||
@@ -50,10 +50,6 @@ LDFLAGS_MODULE | |||
50 | -------------------------------------------------- | 50 | -------------------------------------------------- |
51 | Additional options used for $(LD) when linking modules. | 51 | Additional options used for $(LD) when linking modules. |
52 | 52 | ||
53 | LDFLAGS_vmlinux | ||
54 | -------------------------------------------------- | ||
55 | Additional options passed to final link of vmlinux. | ||
56 | |||
57 | KBUILD_VERBOSE | 53 | KBUILD_VERBOSE |
58 | -------------------------------------------------- | 54 | -------------------------------------------------- |
59 | Set the kbuild verbosity. Can be assigned same values as "V=...". | 55 | Set the kbuild verbosity. Can be assigned same values as "V=...". |
@@ -218,18 +214,3 @@ KBUILD_BUILD_USER, KBUILD_BUILD_HOST | |||
218 | These two variables allow to override the user@host string displayed during | 214 | These two variables allow to override the user@host string displayed during |
219 | boot and in /proc/version. The default value is the output of the commands | 215 | boot and in /proc/version. The default value is the output of the commands |
220 | whoami and host, respectively. | 216 | whoami and host, respectively. |
221 | |||
222 | KBUILD_LDS | ||
223 | -------------------------------------------------- | ||
224 | The linker script with full path. Assigned by the top-level Makefile. | ||
225 | |||
226 | KBUILD_VMLINUX_INIT | ||
227 | -------------------------------------------------- | ||
228 | All object files for the init (first) part of vmlinux. | ||
229 | Files specified with KBUILD_VMLINUX_INIT are linked first. | ||
230 | |||
231 | KBUILD_VMLINUX_MAIN | ||
232 | -------------------------------------------------- | ||
233 | All object files for the main part of vmlinux. | ||
234 | KBUILD_VMLINUX_INIT and KBUILD_VMLINUX_MAIN together specify | ||
235 | all the object files used to link vmlinux. | ||
diff --git a/Documentation/kbuild/kconfig-language.txt b/Documentation/kbuild/kconfig-language.txt index a686f9cd69c..44e2649fbb2 100644 --- a/Documentation/kbuild/kconfig-language.txt +++ b/Documentation/kbuild/kconfig-language.txt | |||
@@ -117,7 +117,7 @@ applicable everywhere (see syntax). | |||
117 | This attribute is only applicable to menu blocks, if the condition is | 117 | This attribute is only applicable to menu blocks, if the condition is |
118 | false, the menu block is not displayed to the user (the symbols | 118 | false, the menu block is not displayed to the user (the symbols |
119 | contained there can still be selected by other symbols, though). It is | 119 | contained there can still be selected by other symbols, though). It is |
120 | similar to a conditional "prompt" attribute for individual menu | 120 | similar to a conditional "prompt" attribude for individual menu |
121 | entries. Default value of "visible" is true. | 121 | entries. Default value of "visible" is true. |
122 | 122 | ||
123 | - numerical ranges: "range" <symbol> <symbol> ["if" <expr>] | 123 | - numerical ranges: "range" <symbol> <symbol> ["if" <expr>] |
diff --git a/Documentation/kbuild/kconfig.txt b/Documentation/kbuild/kconfig.txt index a09f1a6a830..c313d71324b 100644 --- a/Documentation/kbuild/kconfig.txt +++ b/Documentation/kbuild/kconfig.txt | |||
@@ -28,10 +28,12 @@ new (default) values, so you can use: | |||
28 | 28 | ||
29 | grep "(NEW)" conf.new | 29 | grep "(NEW)" conf.new |
30 | 30 | ||
31 | to see the new config symbols or you can use diffconfig to see the | 31 | to see the new config symbols or you can 'diff' the previous and |
32 | differences between the previous and new .config files: | 32 | new .config files to see the differences: |
33 | 33 | ||
34 | scripts/diffconfig .config.old .config | less | 34 | diff .config.old .config | less |
35 | |||
36 | (Yes, we need something better here.) | ||
35 | 37 | ||
36 | ______________________________________________________________________ | 38 | ______________________________________________________________________ |
37 | Environment variables for '*config' | 39 | Environment variables for '*config' |
@@ -53,15 +55,15 @@ KCONFIG_ALLCONFIG | |||
53 | -------------------------------------------------- | 55 | -------------------------------------------------- |
54 | (partially based on lkml email from/by Rob Landley, re: miniconfig) | 56 | (partially based on lkml email from/by Rob Landley, re: miniconfig) |
55 | -------------------------------------------------- | 57 | -------------------------------------------------- |
56 | The allyesconfig/allmodconfig/allnoconfig/randconfig variants can also | 58 | The allyesconfig/allmodconfig/allnoconfig/randconfig variants can |
57 | use the environment variable KCONFIG_ALLCONFIG as a flag or a filename | 59 | also use the environment variable KCONFIG_ALLCONFIG as a flag or a |
58 | that contains config symbols that the user requires to be set to a | 60 | filename that contains config symbols that the user requires to be |
59 | specific value. If KCONFIG_ALLCONFIG is used without a filename where | 61 | set to a specific value. If KCONFIG_ALLCONFIG is used without a |
60 | KCONFIG_ALLCONFIG == "" or KCONFIG_ALLCONFIG == "1", "make *config" | 62 | filename, "make *config" checks for a file named |
61 | checks for a file named "all{yes/mod/no/def/random}.config" | 63 | "all{yes/mod/no/def/random}.config" (corresponding to the *config command |
62 | (corresponding to the *config command that was used) for symbol values | 64 | that was used) for symbol values that are to be forced. If this file |
63 | that are to be forced. If this file is not found, it checks for a | 65 | is not found, it checks for a file named "all.config" to contain forced |
64 | file named "all.config" to contain forced values. | 66 | values. |
65 | 67 | ||
66 | This enables you to create "miniature" config (miniconfig) or custom | 68 | This enables you to create "miniature" config (miniconfig) or custom |
67 | config files containing just the config symbols that you are interested | 69 | config files containing just the config symbols that you are interested |
diff --git a/Documentation/kbuild/makefiles.txt b/Documentation/kbuild/makefiles.txt index 14c3f4f1b61..f47cdefb4d1 100644 --- a/Documentation/kbuild/makefiles.txt +++ b/Documentation/kbuild/makefiles.txt | |||
@@ -33,19 +33,18 @@ This document describes the Linux kernel Makefiles. | |||
33 | 33 | ||
34 | === 6 Architecture Makefiles | 34 | === 6 Architecture Makefiles |
35 | --- 6.1 Set variables to tweak the build to the architecture | 35 | --- 6.1 Set variables to tweak the build to the architecture |
36 | --- 6.2 Add prerequisites to archheaders: | 36 | --- 6.2 Add prerequisites to archprepare: |
37 | --- 6.3 Add prerequisites to archprepare: | 37 | --- 6.3 List directories to visit when descending |
38 | --- 6.4 List directories to visit when descending | 38 | --- 6.4 Architecture-specific boot images |
39 | --- 6.5 Architecture-specific boot images | 39 | --- 6.5 Building non-kbuild targets |
40 | --- 6.6 Building non-kbuild targets | 40 | --- 6.6 Commands useful for building a boot image |
41 | --- 6.7 Commands useful for building a boot image | 41 | --- 6.7 Custom kbuild commands |
42 | --- 6.8 Custom kbuild commands | 42 | --- 6.8 Preprocessing linker scripts |
43 | --- 6.9 Preprocessing linker scripts | 43 | --- 6.9 Generic header files |
44 | --- 6.10 Generic header files | ||
45 | 44 | ||
46 | === 7 Kbuild syntax for exported headers | 45 | === 7 Kbuild syntax for exported headers |
47 | --- 7.1 header-y | 46 | --- 7.1 header-y |
48 | --- 7.2 genhdr-y | 47 | --- 7.2 objhdr-y |
49 | --- 7.3 destination-y | 48 | --- 7.3 destination-y |
50 | --- 7.4 generic-y | 49 | --- 7.4 generic-y |
51 | 50 | ||
@@ -253,7 +252,7 @@ more details, with real examples. | |||
253 | This will create a library lib.a based on delay.o. For kbuild to | 252 | This will create a library lib.a based on delay.o. For kbuild to |
254 | actually recognize that there is a lib.a being built, the directory | 253 | actually recognize that there is a lib.a being built, the directory |
255 | shall be listed in libs-y. | 254 | shall be listed in libs-y. |
256 | See also "6.4 List directories to visit when descending". | 255 | See also "6.3 List directories to visit when descending". |
257 | 256 | ||
258 | Use of lib-y is normally restricted to lib/ and arch/*/lib. | 257 | Use of lib-y is normally restricted to lib/ and arch/*/lib. |
259 | 258 | ||
@@ -975,20 +974,7 @@ When kbuild executes, the following steps are followed (roughly): | |||
975 | $(KBUILD_ARFLAGS) set by the top level Makefile to "D" (deterministic | 974 | $(KBUILD_ARFLAGS) set by the top level Makefile to "D" (deterministic |
976 | mode) if this option is supported by $(AR). | 975 | mode) if this option is supported by $(AR). |
977 | 976 | ||
978 | --- 6.2 Add prerequisites to archheaders: | 977 | --- 6.2 Add prerequisites to archprepare: |
979 | |||
980 | The archheaders: rule is used to generate header files that | ||
981 | may be installed into user space by "make header_install" or | ||
982 | "make headers_install_all". In order to support | ||
983 | "make headers_install_all", this target has to be able to run | ||
984 | on an unconfigured tree, or a tree configured for another | ||
985 | architecture. | ||
986 | |||
987 | It is run before "make archprepare" when run on the | ||
988 | architecture itself. | ||
989 | |||
990 | |||
991 | --- 6.3 Add prerequisites to archprepare: | ||
992 | 978 | ||
993 | The archprepare: rule is used to list prerequisites that need to be | 979 | The archprepare: rule is used to list prerequisites that need to be |
994 | built before starting to descend down in the subdirectories. | 980 | built before starting to descend down in the subdirectories. |
@@ -1004,7 +990,7 @@ When kbuild executes, the following steps are followed (roughly): | |||
1004 | generating offset header files. | 990 | generating offset header files. |
1005 | 991 | ||
1006 | 992 | ||
1007 | --- 6.4 List directories to visit when descending | 993 | --- 6.3 List directories to visit when descending |
1008 | 994 | ||
1009 | An arch Makefile cooperates with the top Makefile to define variables | 995 | An arch Makefile cooperates with the top Makefile to define variables |
1010 | which specify how to build the vmlinux file. Note that there is no | 996 | which specify how to build the vmlinux file. Note that there is no |
@@ -1033,7 +1019,7 @@ When kbuild executes, the following steps are followed (roughly): | |||
1033 | drivers-$(CONFIG_OPROFILE) += arch/sparc64/oprofile/ | 1019 | drivers-$(CONFIG_OPROFILE) += arch/sparc64/oprofile/ |
1034 | 1020 | ||
1035 | 1021 | ||
1036 | --- 6.5 Architecture-specific boot images | 1022 | --- 6.4 Architecture-specific boot images |
1037 | 1023 | ||
1038 | An arch Makefile specifies goals that take the vmlinux file, compress | 1024 | An arch Makefile specifies goals that take the vmlinux file, compress |
1039 | it, wrap it in bootstrapping code, and copy the resulting files | 1025 | it, wrap it in bootstrapping code, and copy the resulting files |
@@ -1084,7 +1070,7 @@ When kbuild executes, the following steps are followed (roughly): | |||
1084 | 1070 | ||
1085 | When "make" is executed without arguments, bzImage will be built. | 1071 | When "make" is executed without arguments, bzImage will be built. |
1086 | 1072 | ||
1087 | --- 6.6 Building non-kbuild targets | 1073 | --- 6.5 Building non-kbuild targets |
1088 | 1074 | ||
1089 | extra-y | 1075 | extra-y |
1090 | 1076 | ||
@@ -1104,7 +1090,7 @@ When kbuild executes, the following steps are followed (roughly): | |||
1104 | shall be built, but shall not be linked as part of built-in.o. | 1090 | shall be built, but shall not be linked as part of built-in.o. |
1105 | 1091 | ||
1106 | 1092 | ||
1107 | --- 6.7 Commands useful for building a boot image | 1093 | --- 6.6 Commands useful for building a boot image |
1108 | 1094 | ||
1109 | Kbuild provides a few macros that are useful when building a | 1095 | Kbuild provides a few macros that are useful when building a |
1110 | boot image. | 1096 | boot image. |
@@ -1126,7 +1112,7 @@ When kbuild executes, the following steps are followed (roughly): | |||
1126 | always be built. | 1112 | always be built. |
1127 | Assignments to $(targets) are without $(obj)/ prefix. | 1113 | Assignments to $(targets) are without $(obj)/ prefix. |
1128 | if_changed may be used in conjunction with custom commands as | 1114 | if_changed may be used in conjunction with custom commands as |
1129 | defined in 6.8 "Custom kbuild commands". | 1115 | defined in 6.7 "Custom kbuild commands". |
1130 | 1116 | ||
1131 | Note: It is a typical mistake to forget the FORCE prerequisite. | 1117 | Note: It is a typical mistake to forget the FORCE prerequisite. |
1132 | Another common pitfall is that whitespace is sometimes | 1118 | Another common pitfall is that whitespace is sometimes |
@@ -1175,18 +1161,17 @@ When kbuild executes, the following steps are followed (roughly): | |||
1175 | in an init section in the image. Platform code *must* copy the | 1161 | in an init section in the image. Platform code *must* copy the |
1176 | blob to non-init memory prior to calling unflatten_device_tree(). | 1162 | blob to non-init memory prior to calling unflatten_device_tree(). |
1177 | 1163 | ||
1178 | To use this command, simply add *.dtb into obj-y or targets, or make | 1164 | Example: |
1179 | some other target depend on %.dtb | 1165 | #arch/x86/platform/ce4100/Makefile |
1166 | clean-files := *dtb.S | ||
1180 | 1167 | ||
1181 | A central rule exists to create $(obj)/%.dtb from $(src)/%.dts; | 1168 | DTC_FLAGS := -p 1024 |
1182 | architecture Makefiles do no need to explicitly write out that rule. | 1169 | obj-y += foo.dtb.o |
1183 | 1170 | ||
1184 | Example: | 1171 | $(obj)/%.dtb: $(src)/%.dts |
1185 | targets += $(dtb-y) | 1172 | $(call cmd,dtc) |
1186 | clean-files += *.dtb | ||
1187 | DTC_FLAGS ?= -p 1024 | ||
1188 | 1173 | ||
1189 | --- 6.8 Custom kbuild commands | 1174 | --- 6.7 Custom kbuild commands |
1190 | 1175 | ||
1191 | When kbuild is executing with KBUILD_VERBOSE=0, then only a shorthand | 1176 | When kbuild is executing with KBUILD_VERBOSE=0, then only a shorthand |
1192 | of a command is normally displayed. | 1177 | of a command is normally displayed. |
@@ -1213,7 +1198,7 @@ When kbuild executes, the following steps are followed (roughly): | |||
1213 | will be displayed with "make KBUILD_VERBOSE=0". | 1198 | will be displayed with "make KBUILD_VERBOSE=0". |
1214 | 1199 | ||
1215 | 1200 | ||
1216 | --- 6.9 Preprocessing linker scripts | 1201 | --- 6.8 Preprocessing linker scripts |
1217 | 1202 | ||
1218 | When the vmlinux image is built, the linker script | 1203 | When the vmlinux image is built, the linker script |
1219 | arch/$(ARCH)/kernel/vmlinux.lds is used. | 1204 | arch/$(ARCH)/kernel/vmlinux.lds is used. |
@@ -1243,7 +1228,7 @@ When kbuild executes, the following steps are followed (roughly): | |||
1243 | The kbuild infrastructure for *lds file are used in several | 1228 | The kbuild infrastructure for *lds file are used in several |
1244 | architecture-specific files. | 1229 | architecture-specific files. |
1245 | 1230 | ||
1246 | --- 6.10 Generic header files | 1231 | --- 6.9 Generic header files |
1247 | 1232 | ||
1248 | The directory include/asm-generic contains the header files | 1233 | The directory include/asm-generic contains the header files |
1249 | that may be shared between individual architectures. | 1234 | that may be shared between individual architectures. |
@@ -1283,15 +1268,15 @@ See subsequent chapter for the syntax of the Kbuild file. | |||
1283 | 1268 | ||
1284 | Subdirectories are visited before their parent directories. | 1269 | Subdirectories are visited before their parent directories. |
1285 | 1270 | ||
1286 | --- 7.2 genhdr-y | 1271 | --- 7.2 objhdr-y |
1287 | 1272 | ||
1288 | genhdr-y specifies generated files to be exported. | 1273 | objhdr-y specifies generated files to be exported. |
1289 | Generated files are special as they need to be looked | 1274 | Generated files are special as they need to be looked |
1290 | up in another directory when doing 'make O=...' builds. | 1275 | up in another directory when doing 'make O=...' builds. |
1291 | 1276 | ||
1292 | Example: | 1277 | Example: |
1293 | #include/linux/Kbuild | 1278 | #include/linux/Kbuild |
1294 | genhdr-y += version.h | 1279 | objhdr-y += version.h |
1295 | 1280 | ||
1296 | --- 7.3 destination-y | 1281 | --- 7.3 destination-y |
1297 | 1282 | ||
diff --git a/Documentation/kbuild/modules.txt b/Documentation/kbuild/modules.txt index 69372fb98cf..3fb39e0116b 100644 --- a/Documentation/kbuild/modules.txt +++ b/Documentation/kbuild/modules.txt | |||
@@ -470,7 +470,7 @@ build. | |||
470 | 470 | ||
471 | Sometimes, an external module uses exported symbols from | 471 | Sometimes, an external module uses exported symbols from |
472 | another external module. kbuild needs to have full knowledge of | 472 | another external module. kbuild needs to have full knowledge of |
473 | all symbols to avoid spliitting out warnings about undefined | 473 | all symbols to avoid spitting out warnings about undefined |
474 | symbols. Three solutions exist for this situation. | 474 | symbols. Three solutions exist for this situation. |
475 | 475 | ||
476 | NOTE: The method with a top-level kbuild file is recommended | 476 | NOTE: The method with a top-level kbuild file is recommended |