aboutsummaryrefslogtreecommitdiffstats
path: root/arch/xtensa/boot
diff options
context:
space:
mode:
authorMax Filippov <jcmvbkbc@gmail.com>2012-09-16 21:44:49 -0400
committerChris Zankel <chris@zankel.net>2012-10-03 18:12:29 -0400
commit7c94fe4a012e6d0858b9a80cbc18b7ee788f572d (patch)
tree4d1263bbc227bf9049c072badc8af4086a6034a4 /arch/xtensa/boot
parentd0fccc0446800a746d109d5c202a4a550036d923 (diff)
xtensa: fix parallel make
Make vmlinux.tmp and vmlinux.tmp.gz separate build targets, avoid removing vmlinux.tmp during vmlinux.tmp.gz build. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Chris Zankel <chris@zankel.net>
Diffstat (limited to 'arch/xtensa/boot')
-rw-r--r--arch/xtensa/boot/boot-elf/Makefile9
-rw-r--r--arch/xtensa/boot/boot-redboot/Makefile12
2 files changed, 12 insertions, 9 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
20 20
21OBJS := $(addprefix $(obj)/,$(boot-y)) 21OBJS := $(addprefix $(obj)/,$(boot-y))
22 22
23Image: vmlinux $(OBJS) arch/$(ARCH)/boot/boot-elf/boot.lds 23vmlinux.tmp: vmlinux
24 $(OBJCOPY) --strip-all -R .comment -R .note.gnu.build-id -O binary \ 24 $(OBJCOPY) --strip-all -R .comment -R .note.gnu.build-id -O binary \
25 vmlinux vmlinux.tmp 25 $^ $@
26
27Image: vmlinux.tmp $(OBJS) arch/$(ARCH)/boot/boot-elf/boot.lds
26 $(OBJCOPY) $(OBJCOPY_ARGS) -R .comment \ 28 $(OBJCOPY) $(OBJCOPY_ARGS) -R .comment \
27 --add-section image=vmlinux.tmp \ 29 --add-section image=vmlinux.tmp \
28 --set-section-flags image=contents,alloc,load,load,data \ 30 --set-section-flags image=contents,alloc,load,load,data \
@@ -30,7 +32,6 @@ Image: vmlinux $(OBJS) arch/$(ARCH)/boot/boot-elf/boot.lds
30 $(LD) $(LDFLAGS) $(LDFLAGS_vmlinux) \ 32 $(LD) $(LDFLAGS) $(LDFLAGS_vmlinux) \
31 -T arch/$(ARCH)/boot/boot-elf/boot.lds \ 33 -T arch/$(ARCH)/boot/boot-elf/boot.lds \
32 -o arch/$(ARCH)/boot/$@.elf $@.tmp 34 -o arch/$(ARCH)/boot/$@.elf $@.tmp
33 rm -f $@.tmp vmlinux.tmp
34 35
35Image.initrd: vmlinux $(OBJS) 36Image.initrd: vmlinux $(OBJS)
36 $(OBJCOPY) --strip-all -R .comment -R .note.gnu.build-id -O binary \ 37 $(OBJCOPY) --strip-all -R .comment -R .note.gnu.build-id -O binary \
@@ -44,7 +45,7 @@ Image.initrd: vmlinux $(OBJS)
44 $(LD) $(LDFLAGS) $(LDFLAGS_vmlinux) \ 45 $(LD) $(LDFLAGS) $(LDFLAGS_vmlinux) \
45 -T $(srctree)/arch/$(ARCH)/boot/boot-elf/boot.ld \ 46 -T $(srctree)/arch/$(ARCH)/boot/boot-elf/boot.ld \
46 -o arch/$(ARCH)/boot/$@.elf $@.tmp 47 -o arch/$(ARCH)/boot/$@.elf $@.tmp
47 rm -f $@.tmp vmlinux.tmp 48#rm -f $@.tmp vmlinux.tmp
48 49
49 50
50zImage: Image 51zImage: Image
diff --git a/arch/xtensa/boot/boot-redboot/Makefile b/arch/xtensa/boot/boot-redboot/Makefile
index 872029b84435..25a78c6b1530 100644
--- a/arch/xtensa/boot/boot-redboot/Makefile
+++ b/arch/xtensa/boot/boot-redboot/Makefile
@@ -21,15 +21,17 @@ LIBS := arch/xtensa/boot/lib/lib.a arch/xtensa/lib/lib.a
21 21
22LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name) 22LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name)
23 23
24zImage: vmlinux $(OBJS) $(LIBS) 24vmlinux.tmp: vmlinux
25 $(OBJCOPY) --strip-all -R .comment -R .note.gnu.build-id -O binary \ 25 $(OBJCOPY) --strip-all -R .comment -R .note.gnu.build-id -O binary \
26 vmlinux vmlinux.tmp 26 $^ $@
27 gzip -vf9 vmlinux.tmp 27
28vmlinux.tmp.gz: vmlinux.tmp
29 $(GZIP) $(GZIP_FLAGS) $^ > $@
30
31zImage: vmlinux.tmp.gz $(OBJS) $(LIBS)
28 $(OBJCOPY) $(OBJCOPY_ARGS) -R .comment \ 32 $(OBJCOPY) $(OBJCOPY_ARGS) -R .comment \
29 --add-section image=vmlinux.tmp.gz \ 33 --add-section image=vmlinux.tmp.gz \
30 --set-section-flags image=contents,alloc,load,load,data \ 34 --set-section-flags image=contents,alloc,load,load,data \
31 $(OBJS) $@.tmp 35 $(OBJS) $@.tmp
32 $(LD) $(LD_ARGS) -o $@.elf $@.tmp $(LIBS) -L/xtensa-elf/lib $(LIBGCC) 36 $(LD) $(LD_ARGS) -o $@.elf $@.tmp $(LIBS) -L/xtensa-elf/lib $(LIBGCC)
33 $(OBJCOPY) -S -O binary $@.elf arch/$(ARCH)/boot/$@.redboot 37 $(OBJCOPY) -S -O binary $@.elf arch/$(ARCH)/boot/$@.redboot
34 rm -f $@.tmp $@.elf vmlinux.tmp.gz
35