Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

MIPS: zboot: Avoid useless rebuilds

Add dummy.o to the targets list, and fill targets automatically from
$(vmlinuzobjs) to avoid having to maintain two lists.

When building with XZ compression copy ashldi3.c to the build
directory to use a different object file for the kernel and zboot.
Without this the same object file need to be build with different
flags which cause a rebuild at every run.

Signed-off-by: Alban Bedel <albeu@free.fr>
Cc: linux-mips@linux-mips.org
Cc: Alex Smith <alex.smith@imgtec.com>
Cc: Wu Zhangjin <wuzhangjin@gmail.com>
Cc: Andrew Bresticker <abrestic@chromium.org>
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/11810/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

authored by

Alban Bedel and committed by
Ralf Baechle
25f66096 a7b43812

+8 -6
+8 -6
arch/mips/boot/compressed/Makefile
··· 29 29 -DBOOT_HEAP_SIZE=$(BOOT_HEAP_SIZE) \ 30 30 -DKERNEL_ENTRY=$(VMLINUX_ENTRY_ADDRESS) 31 31 32 - targets := head.o decompress.o string.o dbg.o uart-16550.o uart-alchemy.o 33 - 34 32 # decompressor objects (linked with vmlinuz) 35 33 vmlinuzobjs-y := $(obj)/head.o $(obj)/decompress.o $(obj)/string.o 36 34 ··· 38 40 vmlinuzobjs-$(CONFIG_MIPS_ALCHEMY) += $(obj)/uart-alchemy.o 39 41 endif 40 42 41 - ifdef CONFIG_KERNEL_XZ 42 - vmlinuzobjs-y += $(obj)/../../lib/ashldi3.o 43 - endif 43 + vmlinuzobjs-$(CONFIG_KERNEL_XZ) += $(obj)/ashldi3.o 44 + 45 + $(obj)/ashldi3.o: KBUILD_CFLAGS += -I$(srctree)/arch/mips/lib 46 + $(obj)/ashldi3.c: $(srctree)/arch/mips/lib/ashldi3.c 47 + $(call cmd,shipped) 48 + 49 + targets := $(notdir $(vmlinuzobjs-y)) 44 50 45 51 targets += vmlinux.bin 46 52 OBJCOPYFLAGS_vmlinux.bin := $(OBJCOPYFLAGS) -O binary -R .comment -S ··· 62 60 $(obj)/vmlinux.bin.z: $(obj)/vmlinux.bin FORCE 63 61 $(call if_changed,$(tool_y)) 64 62 65 - targets += piggy.o 63 + targets += piggy.o dummy.o 66 64 OBJCOPYFLAGS_piggy.o := --add-section=.image=$(obj)/vmlinux.bin.z \ 67 65 --set-section-flags=.image=contents,alloc,load,readonly,data 68 66 $(obj)/piggy.o: $(obj)/dummy.o $(obj)/vmlinux.bin.z FORCE