aboutsummaryrefslogtreecommitdiffstats
path: root/arch/xtensa/boot/boot-elf
diff options
context:
space:
mode:
Diffstat (limited to 'arch/xtensa/boot/boot-elf')
-rw-r--r--arch/xtensa/boot/boot-elf/Makefile9
1 files changed, 5 insertions, 4 deletions
diff --git a/arch/xtensa/boot/boot-elf/Makefile b/arch/xtensa/boot/boot-elf/Makefile
index 08e8814f8c71..4bbc26f797f1 100644
--- a/arch/xtensa/boot/boot-elf/Makefile
+++ b/arch/xtensa/boot/boot-elf/Makefile
@@ -20,9 +20,11 @@ boot-y := bootstrap.o
OBJS := $(addprefix $(obj)/,$(boot-y))
-Image: vmlinux $(OBJS) arch/$(ARCH)/boot/boot-elf/boot.lds
+vmlinux.tmp: vmlinux
$(OBJCOPY) --strip-all -R .comment -R .note.gnu.build-id -O binary \
- vmlinux vmlinux.tmp
+ $^ $@
+
+Image: vmlinux.tmp $(OBJS) arch/$(ARCH)/boot/boot-elf/boot.lds
$(OBJCOPY) $(OBJCOPY_ARGS) -R .comment \
--add-section image=vmlinux.tmp \
--set-section-flags image=contents,alloc,load,load,data \
@@ -30,7 +32,6 @@ Image: vmlinux $(OBJS) arch/$(ARCH)/boot/boot-elf/boot.lds
$(LD) $(LDFLAGS) $(LDFLAGS_vmlinux) \
-T arch/$(ARCH)/boot/boot-elf/boot.lds \
-o arch/$(ARCH)/boot/$@.elf $@.tmp
- rm -f $@.tmp vmlinux.tmp
Image.initrd: vmlinux $(OBJS)
$(OBJCOPY) --strip-all -R .comment -R .note.gnu.build-id -O binary \
@@ -44,7 +45,7 @@ Image.initrd: vmlinux $(OBJS)
$(LD) $(LDFLAGS) $(LDFLAGS_vmlinux) \
-T $(srctree)/arch/$(ARCH)/boot/boot-elf/boot.ld \
-o arch/$(ARCH)/boot/$@.elf $@.tmp
- rm -f $@.tmp vmlinux.tmp
+#rm -f $@.tmp vmlinux.tmp
zImage: Image