diff options
| -rw-r--r-- | .gitignore | 1 | ||||
| -rw-r--r-- | Documentation/DocBook/Makefile | 2 | ||||
| -rw-r--r-- | Documentation/kbuild/kbuild.txt | 13 | ||||
| -rw-r--r-- | Documentation/kbuild/makefiles.txt | 53 | ||||
| -rw-r--r-- | Makefile | 50 | ||||
| -rw-r--r-- | init/Kconfig | 30 | ||||
| -rw-r--r-- | scripts/.gitignore | 1 | ||||
| -rw-r--r-- | scripts/Kbuild.include | 12 | ||||
| -rw-r--r-- | scripts/Makefile | 7 | ||||
| -rw-r--r-- | scripts/Makefile.asm-generic | 23 | ||||
| -rw-r--r-- | scripts/Makefile.build | 74 | ||||
| -rw-r--r-- | scripts/Makefile.headersinst | 10 | ||||
| -rw-r--r-- | scripts/Makefile.lib | 2 | ||||
| -rw-r--r-- | scripts/basic/.gitignore | 2 | ||||
| -rw-r--r-- | scripts/basic/Makefile | 3 | ||||
| -rw-r--r-- | scripts/docproc.c (renamed from scripts/basic/docproc.c) | 0 | ||||
| -rw-r--r-- | scripts/gen_initramfs_list.sh | 27 | ||||
| -rw-r--r-- | scripts/kallsyms.c | 2 | ||||
| -rwxr-xr-x | scripts/mkcompile_h | 30 | ||||
| -rw-r--r-- | usr/gen_init_cpio.c | 53 |
20 files changed, 287 insertions, 108 deletions
diff --git a/.gitignore b/.gitignore index 5d56a3fd0de6..9dacde0a4b2d 100644 --- a/.gitignore +++ b/.gitignore | |||
| @@ -57,6 +57,7 @@ modules.builtin | |||
| 57 | include/config | 57 | include/config |
| 58 | include/linux/version.h | 58 | include/linux/version.h |
| 59 | include/generated | 59 | include/generated |
| 60 | arch/*/include/generated | ||
| 60 | 61 | ||
| 61 | # stgit generated dirs | 62 | # stgit generated dirs |
| 62 | patches-* | 63 | patches-* |
diff --git a/Documentation/DocBook/Makefile b/Documentation/DocBook/Makefile index 8436b018c289..3cebfa0d1611 100644 --- a/Documentation/DocBook/Makefile +++ b/Documentation/DocBook/Makefile | |||
| @@ -73,7 +73,7 @@ installmandocs: mandocs | |||
| 73 | ### | 73 | ### |
| 74 | #External programs used | 74 | #External programs used |
| 75 | KERNELDOC = $(srctree)/scripts/kernel-doc | 75 | KERNELDOC = $(srctree)/scripts/kernel-doc |
| 76 | DOCPROC = $(objtree)/scripts/basic/docproc | 76 | DOCPROC = $(objtree)/scripts/docproc |
| 77 | 77 | ||
| 78 | XMLTOFLAGS = -m $(srctree)/Documentation/DocBook/stylesheet.xsl | 78 | XMLTOFLAGS = -m $(srctree)/Documentation/DocBook/stylesheet.xsl |
| 79 | XMLTOFLAGS += --skip-validation | 79 | XMLTOFLAGS += --skip-validation |
diff --git a/Documentation/kbuild/kbuild.txt b/Documentation/kbuild/kbuild.txt index 7c2a89ba674c..68e32bb6bd80 100644 --- a/Documentation/kbuild/kbuild.txt +++ b/Documentation/kbuild/kbuild.txt | |||
| @@ -201,3 +201,16 @@ KBUILD_ENABLE_EXTRA_GCC_CHECKS | |||
| 201 | -------------------------------------------------- | 201 | -------------------------------------------------- |
| 202 | If enabled over the make command line with "W=1", it turns on additional | 202 | If enabled over the make command line with "W=1", it turns on additional |
| 203 | gcc -W... options for more extensive build-time checking. | 203 | gcc -W... options for more extensive build-time checking. |
| 204 | |||
| 205 | KBUILD_BUILD_TIMESTAMP | ||
| 206 | -------------------------------------------------- | ||
| 207 | Setting this to a date string overrides the timestamp used in the | ||
| 208 | UTS_VERSION definition (uname -v in the running kernel). The value has to | ||
| 209 | be a string that can be passed to date -d. The default value | ||
| 210 | is the output of the date command at one point during build. | ||
| 211 | |||
| 212 | KBUILD_BUILD_USER, KBUILD_BUILD_HOST | ||
| 213 | -------------------------------------------------- | ||
| 214 | These two variables allow to override the user@host string displayed during | ||
| 215 | boot and in /proc/version. The default value is the output of the commands | ||
| 216 | whoami and host, respectively. | ||
diff --git a/Documentation/kbuild/makefiles.txt b/Documentation/kbuild/makefiles.txt index 5d145bb443c0..47435e56c5da 100644 --- a/Documentation/kbuild/makefiles.txt +++ b/Documentation/kbuild/makefiles.txt | |||
| @@ -40,11 +40,13 @@ This document describes the Linux kernel Makefiles. | |||
| 40 | --- 6.6 Commands useful for building a boot image | 40 | --- 6.6 Commands useful for building a boot image |
| 41 | --- 6.7 Custom kbuild commands | 41 | --- 6.7 Custom kbuild commands |
| 42 | --- 6.8 Preprocessing linker scripts | 42 | --- 6.8 Preprocessing linker scripts |
| 43 | --- 6.9 Generic header files | ||
| 43 | 44 | ||
| 44 | === 7 Kbuild syntax for exported headers | 45 | === 7 Kbuild syntax for exported headers |
| 45 | --- 7.1 header-y | 46 | --- 7.1 header-y |
| 46 | --- 7.2 objhdr-y | 47 | --- 7.2 objhdr-y |
| 47 | --- 7.3 destination-y | 48 | --- 7.3 destination-y |
| 49 | --- 7.4 generic-y | ||
| 48 | 50 | ||
| 49 | === 8 Kbuild Variables | 51 | === 8 Kbuild Variables |
| 50 | === 9 Makefile language | 52 | === 9 Makefile language |
| @@ -499,6 +501,18 @@ more details, with real examples. | |||
| 499 | gcc >= 3.00. For gcc < 3.00, -malign-functions=4 is used. | 501 | gcc >= 3.00. For gcc < 3.00, -malign-functions=4 is used. |
| 500 | Note: cc-option-align uses KBUILD_CFLAGS for $(CC) options | 502 | Note: cc-option-align uses KBUILD_CFLAGS for $(CC) options |
| 501 | 503 | ||
| 504 | cc-disable-warning | ||
| 505 | cc-disable-warning checks if gcc supports a given warning and returns | ||
| 506 | the commandline switch to disable it. This special function is needed, | ||
| 507 | because gcc 4.4 and later accept any unknown -Wno-* option and only | ||
| 508 | warn about it if there is another warning in the source file. | ||
| 509 | |||
| 510 | Example: | ||
| 511 | KBUILD_CFLAGS += $(call cc-disable-warning, unused-but-set-variable) | ||
| 512 | |||
| 513 | In the above example, -Wno-unused-but-set-variable will be added to | ||
| 514 | KBUILD_CFLAGS only if gcc really accepts it. | ||
| 515 | |||
| 502 | cc-version | 516 | cc-version |
| 503 | cc-version returns a numerical version of the $(CC) compiler version. | 517 | cc-version returns a numerical version of the $(CC) compiler version. |
| 504 | The format is <major><minor> where both are two digits. So for example | 518 | The format is <major><minor> where both are two digits. So for example |
| @@ -955,6 +969,11 @@ When kbuild executes, the following steps are followed (roughly): | |||
| 955 | used when linking modules. This is often a linker script. | 969 | used when linking modules. This is often a linker script. |
| 956 | From commandline LDFLAGS_MODULE shall be used (see kbuild.txt). | 970 | From commandline LDFLAGS_MODULE shall be used (see kbuild.txt). |
| 957 | 971 | ||
| 972 | KBUILD_ARFLAGS Options for $(AR) when creating archives | ||
| 973 | |||
| 974 | $(KBUILD_ARFLAGS) set by the top level Makefile to "D" (deterministic | ||
| 975 | mode) if this option is supported by $(AR). | ||
| 976 | |||
| 958 | --- 6.2 Add prerequisites to archprepare: | 977 | --- 6.2 Add prerequisites to archprepare: |
| 959 | 978 | ||
| 960 | 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 |
| @@ -1209,6 +1228,14 @@ When kbuild executes, the following steps are followed (roughly): | |||
| 1209 | The kbuild infrastructure for *lds file are used in several | 1228 | The kbuild infrastructure for *lds file are used in several |
| 1210 | architecture-specific files. | 1229 | architecture-specific files. |
| 1211 | 1230 | ||
| 1231 | --- 6.9 Generic header files | ||
| 1232 | |||
| 1233 | The directory include/asm-generic contains the header files | ||
| 1234 | that may be shared between individual architectures. | ||
| 1235 | The recommended approach how to use a generic header file is | ||
| 1236 | to list the file in the Kbuild file. | ||
| 1237 | See "7.4 generic-y" for further info on syntax etc. | ||
| 1238 | |||
| 1212 | === 7 Kbuild syntax for exported headers | 1239 | === 7 Kbuild syntax for exported headers |
| 1213 | 1240 | ||
| 1214 | The kernel include a set of headers that is exported to userspace. | 1241 | The kernel include a set of headers that is exported to userspace. |
| @@ -1265,6 +1292,32 @@ See subsequent chapter for the syntax of the Kbuild file. | |||
| 1265 | In the example above all exported headers in the Kbuild file | 1292 | In the example above all exported headers in the Kbuild file |
| 1266 | will be located in the directory "include/linux" when exported. | 1293 | will be located in the directory "include/linux" when exported. |
| 1267 | 1294 | ||
| 1295 | --- 7.4 generic-y | ||
| 1296 | |||
| 1297 | If an architecture uses a verbatim copy of a header from | ||
| 1298 | include/asm-generic then this is listed in the file | ||
| 1299 | arch/$(ARCH)/include/asm/Kbuild like this: | ||
| 1300 | |||
| 1301 | Example: | ||
| 1302 | #arch/x86/include/asm/Kbuild | ||
| 1303 | generic-y += termios.h | ||
| 1304 | generic-y += rtc.h | ||
| 1305 | |||
| 1306 | During the prepare phase of the build a wrapper include | ||
| 1307 | file is generated in the directory: | ||
| 1308 | |||
| 1309 | arch/$(ARCH)/include/generated/asm | ||
| 1310 | |||
| 1311 | When a header is exported where the architecture uses | ||
| 1312 | the generic header a similar wrapper is generated as part | ||
| 1313 | of the set of exported headers in the directory: | ||
| 1314 | |||
| 1315 | usr/include/asm | ||
| 1316 | |||
| 1317 | The generated wrapper will in both cases look like the following: | ||
| 1318 | |||
| 1319 | Example: termios.h | ||
| 1320 | #include <asm-generic/termios.h> | ||
| 1268 | 1321 | ||
| 1269 | === 8 Kbuild Variables | 1322 | === 8 Kbuild Variables |
| 1270 | 1323 | ||
| @@ -103,7 +103,7 @@ ifeq ("$(origin O)", "command line") | |||
| 103 | endif | 103 | endif |
| 104 | 104 | ||
| 105 | ifeq ("$(origin W)", "command line") | 105 | ifeq ("$(origin W)", "command line") |
| 106 | export KBUILD_ENABLE_EXTRA_GCC_CHECKS := 1 | 106 | export KBUILD_ENABLE_EXTRA_GCC_CHECKS := $(W) |
| 107 | endif | 107 | endif |
| 108 | 108 | ||
| 109 | # That's our default target when none is given on the command line | 109 | # That's our default target when none is given on the command line |
| @@ -349,7 +349,8 @@ CFLAGS_GCOV = -fprofile-arcs -ftest-coverage | |||
| 349 | 349 | ||
| 350 | # Use LINUXINCLUDE when you must reference the include/ directory. | 350 | # Use LINUXINCLUDE when you must reference the include/ directory. |
| 351 | # Needed to be compatible with the O= option | 351 | # Needed to be compatible with the O= option |
| 352 | LINUXINCLUDE := -I$(srctree)/arch/$(hdr-arch)/include -Iinclude \ | 352 | LINUXINCLUDE := -I$(srctree)/arch/$(hdr-arch)/include \ |
| 353 | -Iarch/$(hdr-arch)/include/generated -Iinclude \ | ||
| 353 | $(if $(KBUILD_SRC), -I$(srctree)/include) \ | 354 | $(if $(KBUILD_SRC), -I$(srctree)/include) \ |
| 354 | -include include/generated/autoconf.h | 355 | -include include/generated/autoconf.h |
| 355 | 356 | ||
| @@ -382,6 +383,7 @@ export KBUILD_CFLAGS CFLAGS_KERNEL CFLAGS_MODULE CFLAGS_GCOV | |||
| 382 | export KBUILD_AFLAGS AFLAGS_KERNEL AFLAGS_MODULE | < | |
