diff options
| -rw-r--r-- | Documentation/kbuild/makefiles.txt | 7 | ||||
| -rw-r--r-- | Kbuild | 4 | ||||
| -rw-r--r-- | Makefile | 33 | ||||
| -rw-r--r-- | include/asm-generic/vmlinux.lds.h | 3 | ||||
| -rw-r--r-- | init/initramfs.c | 9 | ||||
| -rw-r--r-- | scripts/Makefile.clean | 2 | ||||
| -rw-r--r-- | scripts/Makefile.lib | 4 | ||||
| -rw-r--r-- | scripts/kallsyms.c | 8 | ||||
| -rw-r--r-- | scripts/mod/modpost.c | 5 | ||||
| -rwxr-xr-x | scripts/setlocalversion | 6 | ||||
| -rw-r--r-- | usr/Makefile | 6 | ||||
| -rw-r--r-- | usr/initramfs_data.S | 21 | ||||
| -rw-r--r-- | usr/initramfs_data.bz2.S | 29 | ||||
| -rw-r--r-- | usr/initramfs_data.gz.S | 29 | ||||
| -rw-r--r-- | usr/initramfs_data.lzma.S | 29 | ||||
| -rw-r--r-- | usr/initramfs_data.lzo.S | 29 |
16 files changed, 61 insertions, 163 deletions
diff --git a/Documentation/kbuild/makefiles.txt b/Documentation/kbuild/makefiles.txt index c787ae512120..0ef00bd6e54d 100644 --- a/Documentation/kbuild/makefiles.txt +++ b/Documentation/kbuild/makefiles.txt | |||
| @@ -776,6 +776,13 @@ This will delete the directory debian, including all subdirectories. | |||
| 776 | Kbuild will assume the directories to be in the same relative path as the | 776 | Kbuild will assume the directories to be in the same relative path as the |
| 777 | Makefile if no absolute path is specified (path does not start with '/'). | 777 | Makefile if no absolute path is specified (path does not start with '/'). |
| 778 | 778 | ||
| 779 | To exclude certain files from make clean, use the $(no-clean-files) variable. | ||
| 780 | This is only a special case used in the top level Kbuild file: | ||
| 781 | |||
| 782 | Example: | ||
| 783 | #Kbuild | ||
| 784 | no-clean-files := $(bounds-file) $(offsets-file) | ||
| 785 | |||
| 779 | Usually kbuild descends down in subdirectories due to "obj-* := dir/", | 786 | Usually kbuild descends down in subdirectories due to "obj-* := dir/", |
| 780 | but in the architecture makefiles where the kbuild infrastructure | 787 | but in the architecture makefiles where the kbuild infrastructure |
| 781 | is not sufficient this sometimes needs to be explicit. | 788 | is not sufficient this sometimes needs to be explicit. |
| @@ -95,5 +95,5 @@ PHONY += missing-syscalls | |||
| 95 | missing-syscalls: scripts/checksyscalls.sh FORCE | 95 | missing-syscalls: scripts/checksyscalls.sh FORCE |
| 96 | $(call cmd,syscalls) | 96 | $(call cmd,syscalls) |
| 97 | 97 | ||
| 98 | # Delete all targets during make clean | 98 | # Keep these two files during make clean |
| 99 | clean-files := $(addprefix $(objtree)/,$(filter-out $(bounds-file) $(offsets-file),$(targets))) | 99 | no-clean-files := $(bounds-file) $(offsets-file) |
| @@ -1137,21 +1137,13 @@ MRPROPER_FILES += .config .config.old .version .old_version \ | |||
| 1137 | # | 1137 | # |
| 1138 | clean: rm-dirs := $(CLEAN_DIRS) | 1138 | clean: rm-dirs := $(CLEAN_DIRS) |
| 1139 | clean: rm-files := $(CLEAN_FILES) | 1139 | clean: rm-files := $(CLEAN_FILES) |
| 1140 | clean-dirs := $(addprefix _clean_,$(srctree) $(vmlinux-alldirs) Documentation) | 1140 | clean-dirs := $(addprefix _clean_, . $(vmlinux-alldirs) Documentation) |
| 1141 | 1141 | ||
| 1142 | PHONY += $(clean-dirs) clean archclean | 1142 | PHONY += $(clean-dirs) clean archclean |
| 1143 | $(clean-dirs): | 1143 | $(clean-dirs): |
| 1144 | $(Q)$(MAKE) $(clean)=$(patsubst _clean_%,%,$@) | 1144 | $(Q)$(MAKE) $(clean)=$(patsubst _clean_%,%,$@) |
| 1145 | 1145 | ||
| 1146 | clean: archclean $(clean-dirs) | 1146 | clean: archclean |
| 1147 | $(call cmd,rmdirs) | ||
| 1148 | $(call cmd,rmfiles) | ||
| 1149 | @find . $(RCS_FIND_IGNORE) \ | ||
| 1150 | \( -name '*.[oas]' -o -name '*.ko' -o -name '.*.cmd' \ | ||
| 1151 | -o -name '.*.d' -o -name '.*.tmp' -o -name '*.mod.c' \ | ||
| 1152 | -o -name '*.symtypes' -o -name 'modules.order' \ | ||
| 1153 | -o -name modules.builtin -o -name '.tmp_*.o.*' \ | ||
| 1154 | -o -name '*.gcno' \) -type f -print | xargs rm -f | ||
| 1155 | 1147 | ||
| 1156 | # mrproper - Delete all generated files, including .config | 1148 | # mrproper - Delete all generated files, including .config |
| 1157 | # | 1149 | # |
| @@ -1352,16 +1344,7 @@ $(clean-dirs): | |||
| 1352 | $(Q)$(MAKE) $(clean)=$(patsubst _clean_%,%,$@) | 1344 | $(Q)$(MAKE) $(clean)=$(patsubst _clean_%,%,$@) |
| 1353 | 1345 | ||
| 1354 | clean: rm-dirs := $(MODVERDIR) | 1346 | clean: rm-dirs := $(MODVERDIR) |
| 1355 | clean: rm-files := $(KBUILD_EXTMOD)/Module.symvers \ | 1347 | clean: rm-files := $(KBUILD_EXTMOD)/Module.symvers |
| 1356 | $(KBUILD_EXTMOD)/modules.order \ | ||
| 1357 | $(KBUILD_EXTMOD)/modules.builtin | ||
| 1358 | clean: $(clean-dirs) | ||
| 1359 | $(call cmd,rmdirs) | ||
| 1360 | $(call cmd,rmfiles) | ||
| 1361 | @find $(KBUILD_EXTMOD) $(RCS_FIND_IGNORE) \ | ||
| 1362 | \( -name '*.[oas]' -o -name '*.ko' -o -name '.*.cmd' \ | ||
| 1363 | -o -name '.*.d' -o -name '.*.tmp' -o -name '*.mod.c' \ | ||
| 1364 | -o -name '*.gcno' \) -type f -print | xargs rm -f | ||
| 1365 | 1348 | ||
| 1366 | help: | 1349 | help: |
| 1367 | @echo ' Building external modules.' | 1350 | @echo ' Building external modules.' |
| @@ -1378,6 +1361,16 @@ prepare: ; | |||
| 1378 | scripts: ; | 1361 | scripts: ; |
| 1379 | endif # KBUILD_EXTMOD | 1362 | endif # KBUILD_EXTMOD |
| 1380 | 1363 | ||
| 1364 | clean: $(clean-dirs) | ||
| 1365 | $(call cmd,rmdirs) | ||
| 1366 | $(call cmd,rmfiles) | ||
| 1367 | @find $(or $(KBUILD_EXTMOD), .) $(RCS_FIND_IGNORE) \ | ||
| 1368 | \( -name '*.[oas]' -o -name '*.ko' -o -name '.*.cmd' \ | ||
| 1369 | -o -name '.*.d' -o -name '.*.tmp' -o -name '*.mod.c' \ | ||
| 1370 | -o -name '*.symtypes' -o -name 'modules.order' \ | ||
| 1371 | -o -name modules.builtin -o -name '.tmp_*.o.*' \ | ||
| 1372 | -o -name '*.gcno' \) -type f -print | xargs rm -f | ||
| 1373 | |||
| 1381 | # Generate tags for editors | 1374 | # Generate tags for editors |
| 1382 | # --------------------------------------------------------------------------- | 1375 | # --------------------------------------------------------------------------- |
| 1383 | quiet_cmd_tags = GEN $@ | 1376 | quiet_cmd_tags = GEN $@ |
diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h index 2c0fc10956ba..bd69d79208de 100644 --- a/include/asm-generic/vmlinux.lds.h +++ b/include/asm-generic/vmlinux.lds.h | |||
| @@ -640,7 +640,8 @@ | |||
| 640 | . = ALIGN(4); \ | 640 | . = ALIGN(4); \ |
| 641 | VMLINUX_SYMBOL(__initramfs_start) = .; \ | 641 | VMLINUX_SYMBOL(__initramfs_start) = .; \ |
| 642 | *(.init.ramfs) \ | 642 | *(.init.ramfs) \ |
| 643 | VMLINUX_SYMBOL(__initramfs_end) = .; | 643 | . = ALIGN(8); \ |
| 644 | *(.init.ramfs.info) | ||
| 644 | #else | 645 | #else |
| 645 | #define INIT_RAM_FS | 646 | #define INIT_RAM_FS |
| 646 | #endif | 647 | #endif |
diff --git a/init/initramfs.c b/init/initramfs.c index d9c6e782ff53..2531811d42cb 100644 --- a/init/initramfs.c +++ b/init/initramfs.c | |||
| @@ -483,7 +483,8 @@ static int __init retain_initrd_param(char *str) | |||
| 483 | } | 483 | } |
| 484 | __setup("retain_initrd", retain_initrd_param); | 484 | __setup("retain_initrd", retain_initrd_param); |
| 485 | 485 | ||
| 486 | extern char __initramfs_start[], __initramfs_end[]; | 486 | extern char __initramfs_start[]; |
| 487 | extern unsigned long __initramfs_size; | ||
| 487 | #include <linux/initrd.h> | 488 | #include <linux/initrd.h> |
| 488 | #include <linux/kexec.h> | 489 | #include <linux/kexec.h> |
| 489 | 490 | ||
| @@ -570,8 +571,7 @@ static void __init clean_rootfs(void) | |||
| 570 | 571 | ||
| 571 | static int __init populate_rootfs(void) | 572 | static int __init populate_rootfs(void) |
| 572 | { | 573 | { |
| 573 | char *err = unpack_to_rootfs(__initramfs_start, | 574 | char *err = unpack_to_rootfs(__initramfs_start, __initramfs_size); |
| 574 | __initramfs_end - __initramfs_start); | ||
| 575 | if (err) | 575 | if (err) |
| 576 | panic(err); /* Failed to decompress INTERNAL initramfs */ | 576 | panic(err); /* Failed to decompress INTERNAL initramfs */ |
| 577 | if (initrd_start) { | 577 | if (initrd_start) { |
| @@ -585,8 +585,7 @@ static int __init populate_rootfs(void) | |||
| 585 | return 0; | 585 | return 0; |
| 586 | } else { | 586 | } else { |
| 587 | clean_rootfs(); | 587 | clean_rootfs(); |
| 588 | unpack_to_rootfs(__initramfs_start, | 588 | unpack_to_rootfs(__initramfs_start, __initramfs_size); |
| 589 | __initramfs_end - __initramfs_start); | ||
| 590 | } | 589 | } |
| 591 | printk(KERN_INFO "rootfs image is not initramfs (%s)" | 590 | printk(KERN_INFO "rootfs image is not initramfs (%s)" |
| 592 | "; looks like an initrd\n", err); | 591 | "; looks like an initrd\n", err); |
diff --git a/scripts/Makefile.clean b/scripts/Makefile.clean index 6f89fbb56256..686cb0d31c7c 100644 --- a/scripts/Makefile.clean +++ b/scripts/Makefile.clean | |||
| @@ -45,6 +45,8 @@ __clean-files := $(extra-y) $(always) \ | |||
| 45 | $(host-progs) \ | 45 | $(host-progs) \ |
| 46 | $(hostprogs-y) $(hostprogs-m) $(hostprogs-) | 46 | $(hostprogs-y) $(hostprogs-m) $(hostprogs-) |
| 47 | 47 | ||
| 48 | __clean-files := $(filter-out $(no-clean-files), $(__clean-files)) | ||
| 49 | |||
| 48 | # as clean-files is given relative to the current directory, this adds | 50 | # as clean-files is given relative to the current directory, this adds |
| 49 | # a $(obj) prefix, except for absolute paths | 51 | # a $(obj) prefix, except for absolute paths |
| 50 | 52 | ||
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index 7bfcf1a09ac5..4c72c1189479 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib | |||
| @@ -120,7 +120,9 @@ _c_flags += $(if $(patsubst n%,, \ | |||
| 120 | endif | 120 | endif |
| 121 | 121 | ||
| 122 | ifdef CONFIG_SYMBOL_PREFIX | 122 | ifdef CONFIG_SYMBOL_PREFIX |
| 123 | _cpp_flags += -DSYMBOL_PREFIX=$(patsubst "%",%,$(CONFIG_SYMBOL_PREFIX)) | 123 | _sym_flags = -DSYMBOL_PREFIX=$(patsubst "%",%,$(CONFIG_SYMBOL_PREFIX)) |
| 124 | _cpp_flags += $(_sym_flags) | ||
| 125 | _a_flags += $(_sym_flags) | ||
| 124 | endif | 126 | endif |
| 125 | 127 | ||
| 126 | 128 | ||
