diff options
Diffstat (limited to 'arch/x86/boot/compressed/Makefile')
-rw-r--r-- | arch/x86/boot/compressed/Makefile | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/arch/x86/boot/compressed/Makefile b/arch/x86/boot/compressed/Makefile index 1771c804e02f..3ca4c194b8e5 100644 --- a/arch/x86/boot/compressed/Makefile +++ b/arch/x86/boot/compressed/Makefile | |||
@@ -4,7 +4,7 @@ | |||
4 | # create a compressed vmlinux image from the original vmlinux | 4 | # create a compressed vmlinux image from the original vmlinux |
5 | # | 5 | # |
6 | 6 | ||
7 | targets := vmlinux vmlinux.bin vmlinux.bin.gz head_$(BITS).o misc.o piggy.o | 7 | targets := vmlinux vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2 vmlinux.bin.lzma head_$(BITS).o misc.o piggy.o |
8 | 8 | ||
9 | KBUILD_CFLAGS := -m$(BITS) -D__KERNEL__ $(LINUX_INCLUDE) -O2 | 9 | KBUILD_CFLAGS := -m$(BITS) -D__KERNEL__ $(LINUX_INCLUDE) -O2 |
10 | KBUILD_CFLAGS += -fno-strict-aliasing -fPIC | 10 | KBUILD_CFLAGS += -fno-strict-aliasing -fPIC |
@@ -47,18 +47,35 @@ ifeq ($(CONFIG_X86_32),y) | |||
47 | ifdef CONFIG_RELOCATABLE | 47 | ifdef CONFIG_RELOCATABLE |
48 | $(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin.all FORCE | 48 | $(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin.all FORCE |
49 | $(call if_changed,gzip) | 49 | $(call if_changed,gzip) |
50 | $(obj)/vmlinux.bin.bz2: $(obj)/vmlinux.bin.all FORCE | ||
51 | $(call if_changed,bzip2) | ||
52 | $(obj)/vmlinux.bin.lzma: $(obj)/vmlinux.bin.all FORCE | ||
53 | $(call if_changed,lzma) | ||
50 | else | 54 | else |
51 | $(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin FORCE | 55 | $(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin FORCE |
52 | $(call if_changed,gzip) | 56 | $(call if_changed,gzip) |
57 | $(obj)/vmlinux.bin.bz2: $(obj)/vmlinux.bin FORCE | ||
58 | $(call if_changed,bzip2) | ||
59 | $(obj)/vmlinux.bin.lzma: $(obj)/vmlinux.bin FORCE | ||
60 | $(call if_changed,lzma) | ||
53 | endif | 61 | endif |
54 | LDFLAGS_piggy.o := -r --format binary --oformat elf32-i386 -T | 62 | LDFLAGS_piggy.o := -r --format binary --oformat elf32-i386 -T |
55 | 63 | ||
56 | else | 64 | else |
65 | |||
57 | $(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin FORCE | 66 | $(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin FORCE |
58 | $(call if_changed,gzip) | 67 | $(call if_changed,gzip) |
68 | $(obj)/vmlinux.bin.bz2: $(obj)/vmlinux.bin FORCE | ||
69 | $(call if_changed,bzip2) | ||
70 | $(obj)/vmlinux.bin.lzma: $(obj)/vmlinux.bin FORCE | ||
71 | $(call if_changed,lzma) | ||
59 | 72 | ||
60 | LDFLAGS_piggy.o := -r --format binary --oformat elf64-x86-64 -T | 73 | LDFLAGS_piggy.o := -r --format binary --oformat elf64-x86-64 -T |
61 | endif | 74 | endif |
62 | 75 | ||
63 | $(obj)/piggy.o: $(obj)/vmlinux.scr $(obj)/vmlinux.bin.gz FORCE | 76 | suffix_$(CONFIG_KERNEL_GZIP) = gz |
77 | suffix_$(CONFIG_KERNEL_BZIP2) = bz2 | ||
78 | suffix_$(CONFIG_KERNEL_LZMA) = lzma | ||
79 | |||
80 | $(obj)/piggy.o: $(obj)/vmlinux.scr $(obj)/vmlinux.bin.$(suffix_y) FORCE | ||
64 | $(call if_changed,ld) | 81 | $(call if_changed,ld) |