[PATCH] MIPS: zboot: make the vmlinuz be fresh all the time

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Manuel Lauss have reported:

"when I change the compression type in a built tree, the compressed/ directoryy
doesn't get rebuilt and a stale vmlinuz remains"

This patch fixes it.

Signed-off-by: Wu Zhangjin <wuzhangjin@xxxxxxxxx>
---
 arch/mips/Makefile                 |    2 +-
 arch/mips/boot/compressed/Makefile |    3 ---
 2 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/arch/mips/Makefile b/arch/mips/Makefile
index 05bcf99..c240f7d 100644
--- a/arch/mips/Makefile
+++ b/arch/mips/Makefile
@@ -712,7 +712,7 @@ makezboot =$(Q)$(MAKE) $(build)=arch/mips/boot/compressed \
 
 all:	$(all-y)
 
-vmlinuz: vmlinux
+vmlinuz: vmlinux FORCE
 	+@$(call makezboot,$@)
 
 vmlinuz.bin: vmlinux
diff --git a/arch/mips/boot/compressed/Makefile b/arch/mips/boot/compressed/Makefile
index 5cf9b46..90e5879 100644
--- a/arch/mips/boot/compressed/Makefile
+++ b/arch/mips/boot/compressed/Makefile
@@ -49,20 +49,17 @@ tool_$(CONFIG_KERNEL_LZMA)    = lzma
 tool_$(CONFIG_KERNEL_LZO)    = lzo
 $(obj)/vmlinux.$(suffix_y): $(obj)/vmlinux.bin
 	$(call if_changed,$(tool_y))
-	$(Q)rm -f $<
 
 $(obj)/piggy.o: $(obj)/vmlinux.$(suffix_y) $(obj)/dummy.o
 	$(Q)$(OBJCOPY) $(OBJCOPYFLAGS) \
 		--add-section=.image=$< \
 		--set-section-flags=.image=contents,alloc,load,readonly,data \
 		$(obj)/dummy.o $@
-	$(Q)rm -f $<
 
 LDFLAGS_vmlinuz := $(LDFLAGS) -Ttext $(VMLINUZ_LOAD_ADDRESS) -T
 vmlinuz: $(src)/ld.script $(obj-y) $(obj)/piggy.o
 	$(call if_changed,ld)
 	$(Q)$(OBJCOPY) $(OBJCOPYFLAGS) -R .comment -R .stab -R .stabstr -R .initrd -R .sysmap $@
-	$(Q)rm -f $(obj)/piggy.o
 
 #
 # Some DECstations need all possible sections of an ECOFF executable
-- 
1.6.2.1



[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux