diff options
| author | Max Filippov <jcmvbkbc@gmail.com> | 2012-11-05 00:10:00 -0500 |
|---|---|---|
| committer | Chris Zankel <chris@zankel.net> | 2012-12-19 00:10:23 -0500 |
| commit | 3f5ec298e56587462d91320c9e49f3e38f2beb17 (patch) | |
| tree | 4e9fb2010438ff1bce80dd5388057c878a5a1bf2 /arch/xtensa/boot/boot-elf/Makefile | |
| parent | 599bf77a0d0b253dd94fd058275b05520c6d25db (diff) | |
xtensa: clean up boot make rules
- remove duplicate rules for binary and packed image
- use predefined macros for ld/objcopy/gzip
- remove build-id section from bootable elf image
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Chris Zankel <chris@zankel.net>
Diffstat (limited to 'arch/xtensa/boot/boot-elf/Makefile')
| -rw-r--r-- | arch/xtensa/boot/boot-elf/Makefile | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/arch/xtensa/boot/boot-elf/Makefile b/arch/xtensa/boot/boot-elf/Makefile index f10992b89027..1fe01b78c124 100644 --- a/arch/xtensa/boot/boot-elf/Makefile +++ b/arch/xtensa/boot/boot-elf/Makefile | |||
| @@ -4,9 +4,6 @@ | |||
| 4 | # for more details. | 4 | # for more details. |
| 5 | # | 5 | # |
| 6 | 6 | ||
| 7 | GZIP = gzip | ||
| 8 | GZIP_FLAGS = -v9fc | ||
| 9 | |||
| 10 | ifeq ($(BIG_ENDIAN),1) | 7 | ifeq ($(BIG_ENDIAN),1) |
| 11 | OBJCOPY_ARGS := -O elf32-xtensa-be | 8 | OBJCOPY_ARGS := -O elf32-xtensa-be |
| 12 | else | 9 | else |
| @@ -20,18 +17,17 @@ boot-y := bootstrap.o | |||
| 20 | 17 | ||
| 21 | OBJS := $(addprefix $(obj)/,$(boot-y)) | 18 | OBJS := $(addprefix $(obj)/,$(boot-y)) |
| 22 | 19 | ||
| 23 | vmlinux.tmp: vmlinux | 20 | $(obj)/Image.o: vmlinux.bin $(OBJS) |
| 24 | $(OBJCOPY) --strip-all -R .comment -R .note.gnu.build-id -O binary \ | 21 | $(Q)$(OBJCOPY) $(OBJCOPY_ARGS) -R .comment \ |
| 25 | $^ $@ | 22 | --add-section image=vmlinux.bin \ |
| 26 | |||
| 27 | Image: vmlinux.tmp $(OBJS) arch/$(ARCH)/boot/boot-elf/boot.lds | ||
| 28 | $(OBJCOPY) $(OBJCOPY_ARGS) -R .comment \ | ||
| 29 | --add-section image=vmlinux.tmp \ | ||
| 30 | --set-section-flags image=contents,alloc,load,load,data \ | 23 | --set-section-flags image=contents,alloc,load,load,data \ |
| 31 | $(OBJS) $@.tmp | 24 | $(OBJS) $@ |
| 32 | $(LD) $(LDFLAGS) $(LDFLAGS_vmlinux) \ | ||
| 33 | -T arch/$(ARCH)/boot/boot-elf/boot.lds \ | ||
| 34 | -o arch/$(ARCH)/boot/$@.elf $@.tmp | ||
| 35 | 25 | ||
| 36 | zImage: Image | 26 | $(obj)/../Image.elf: $(obj)/Image.o $(obj)/boot.lds |
| 27 | $(Q)$(LD) $(LDFLAGS) $(LDFLAGS_vmlinux) \ | ||
| 28 | -T $(obj)/boot.lds \ | ||
| 29 | --build-id=none \ | ||
| 30 | -o $@ $(obj)/Image.o | ||
| 31 | $(Q)$(kecho) ' Kernel: $@ is ready' | ||
| 37 | 32 | ||
| 33 | zImage: $(obj)/../Image.elf | ||
