提交 f13487c6 编写于 作者: O Olaf Hering 提交者: Linus Torvalds

[PATCH] ppc32: make -j12 all fails in uImage target

make -j zImage may call if_changed twice at the same time, the result is a
corrupted vmlinux.gz

Write to a temporary file for the time being until someone with make skills
fix the serialization properly.
Signed-off-by: NOlaf Hering <olh@suse.de>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Sam Ravnborg <sam@ravnborg.org>
Acked-by: NTom Rini <trini@kernel.crashing.org>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 7ee91ec1
...@@ -6,12 +6,17 @@ MKIMAGE := $(srctree)/scripts/mkuboot.sh ...@@ -6,12 +6,17 @@ MKIMAGE := $(srctree)/scripts/mkuboot.sh
extra-y := vmlinux.bin vmlinux.gz extra-y := vmlinux.bin vmlinux.gz
# two make processes may write to vmlinux.gz at the same time with make -j
quiet_cmd_mygzip = GZIP $@
cmd_mygzip = gzip -f -9 < $< > $@.$$$$ && mv $@.$$$$ $@
OBJCOPYFLAGS_vmlinux.bin := -O binary OBJCOPYFLAGS_vmlinux.bin := -O binary
$(obj)/vmlinux.bin: vmlinux FORCE $(obj)/vmlinux.bin: vmlinux FORCE
$(call if_changed,objcopy) $(call if_changed,objcopy)
$(obj)/vmlinux.gz: $(obj)/vmlinux.bin FORCE $(obj)/vmlinux.gz: $(obj)/vmlinux.bin FORCE
$(call if_changed,gzip) $(call if_changed,mygzip)
quiet_cmd_uimage = UIMAGE $@ quiet_cmd_uimage = UIMAGE $@
cmd_uimage = $(CONFIG_SHELL) $(MKIMAGE) -A ppc -O linux -T kernel \ cmd_uimage = $(CONFIG_SHELL) $(MKIMAGE) -A ppc -O linux -T kernel \
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册