Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7c94fe4a authored by Max Filippov's avatar Max Filippov Committed by Chris Zankel
Browse files

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: default avatarMax Filippov <jcmvbkbc@gmail.com>
Signed-off-by: default avatarChris Zankel <chris@zankel.net>
parent d0fccc04
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -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
+7 −5
Original line number Diff line number Diff line
@@ -21,15 +21,17 @@ LIBS := arch/xtensa/boot/lib/lib.a arch/xtensa/lib/lib.a

LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name)

zImage: vmlinux $(OBJS) $(LIBS)
vmlinux.tmp: vmlinux
	$(OBJCOPY) --strip-all -R .comment -R .note.gnu.build-id -O binary \
		vmlinux vmlinux.tmp
	gzip -vf9 vmlinux.tmp
		$^ $@

vmlinux.tmp.gz: vmlinux.tmp
	$(GZIP) $(GZIP_FLAGS) $^ > $@

zImage: vmlinux.tmp.gz $(OBJS) $(LIBS)
	$(OBJCOPY) $(OBJCOPY_ARGS) -R .comment \
		--add-section image=vmlinux.tmp.gz \
		--set-section-flags image=contents,alloc,load,load,data \
		$(OBJS) $@.tmp
	$(LD) $(LD_ARGS) -o $@.elf $@.tmp $(LIBS) -L/xtensa-elf/lib $(LIBGCC)
	$(OBJCOPY) -S -O binary $@.elf arch/$(ARCH)/boot/$@.redboot
	rm -f $@.tmp $@.elf vmlinux.tmp.gz