mips: refactor arch/mips/boot/Makefile
PATCH 1/1 mips: refactor arch/mips/boot/Makefile
Hi, Sam
This patch really make the Makefile looks better,
Could you please apply the similar modification to arch/mips/boot/compressed/Makefile? thanks!
Regards,
Wu Zhangjin
Quoted 69 lines · Sam Ravnborg
Quoted 1 line
From
0b95917f21f145d07351fb098b3f4804c4bf6ca1Mon Sep 17 00:00:00 2001From: Sam Ravnborg <[email protected]>
Date: Sat, 29 May 2010 21:50:50 +0200
Subject: [PATCH] mips: refactorarch/mips/boot/Makefile- remove stuff that is not needed
VMLINUX assignment, all: rule, unused assignment
- use hostprogs-y for the host program
- use direct assignmnet when possible
- use kbuild rules for the three targets - to beautify output
- update clean-files to specify the targets that is built in the top.level dirSigned-off-by Sam Ravnborg <[email protected]>--- arch/mips/boot/Makefile | 30 +++++++++++++++--------------- 1 files changed, 15 insertions(+), 15 deletions(-)arch/mips/boot/Makefile +15
-15@@ -11,32 +11,32 @@ # Some DECstations need all possible sections of an ECOFF executable # ifdef CONFIG_MACH_DECSTATION - E2EFLAGS = -a -else - E2EFLAGS = + E2EFLAGS := -a endif # # Drop some uninteresting sections in the kernel. # This is only relevant for ELF kernels but doesn't hurt a.out # -drop-sections = .reginfo .mdebug .comment .note .pdr .options .MIPS.options -strip-flags = $(addprefix --remove-section=,$(drop-sections)) +drop-sections := .reginfo .mdebug .comment .note .pdr .options .MIPS.options +strip-flags := $(addprefix --remove-section=,$(drop-sections)) -VMLINUX = vmlinux - -all: vmlinux.ecoff vmlinux.srec +hostprogs-y := elf2ecoff +quiet_cmd_ecoff = ECOFF $@ + cmd_ecoff = $(obj)/elf2ecoff $(VMLINUX) $(obj)/vmlinux.ecoff $(E2EFLAGS) vmlinux.ecoff: $(obj)/elf2ecoff $(VMLINUX) - $(obj)/elf2ecoff $(VMLINUX) $(obj)/vmlinux.ecoff $(E2EFLAGS) - -$(obj)/elf2ecoff: $(obj)/elf2ecoff.c - $(HOSTCC) -o $@ $^ + $(call cmd,ecoff) +quiet_cmd_bin = OBJCOPY $@ + cmd_bin = $(OBJCOPY) -O binary $(strip-flags) $(VMLINUX) $(obj)/vmlinux.bin vmlinux.bin: $(VMLINUX) - $(OBJCOPY) -O binary $(strip-flags) $(VMLINUX) $(obj)/vmlinux.bin + $(call cmd,bin) +quiet_cmd_srec = OBJCOPY $@ + cmd_srec = $(OBJCOPY) -S -O srec $(strip-flags) $(VMLINUX) $(obj)/vmlinux.srec vmlinux.srec: $(VMLINUX) - $(OBJCOPY) -S -O srec $(strip-flags) $(VMLINUX) $(obj)/vmlinux.srec + $(call cmd,srec) -clean-files += elf2ecoff +# clean files created in top-level directory +clean-files := $(objtree)/vmlinux.*
Quoted 3 lines · Wu Zhangjin
Hi, Sam
This patch really make the
Makefilelooks better,
Thanks.
Quoted 2 lines
Could you please apply the similar modification to
arch/mips/boot/compressed/Makefile? thanks!
I am working on it.
I will post a full (albeit) small serie of patches later today. It will replace the patches I sent yesterday.
Sam
Hi, Sam & Ralf
On Sun, 2010-05-30 at 07:23 +0200, Sam Ravnborg wrote:
[...]
Quoted 6 lines
Quoted 2 lines
Could you please apply the similar modification to
arch/mips/boot/compressed/Makefile? thanks!I am working on it.
I will post a full (albeit) small serie of patches later today. It will replace the patches I sent yesterday.
I have rewritten the calculation of the VMLINUZ_LOAD_ADDRESS in C and removed the suffix_* related parts and plan to send them out later.
To avoid my patches conflict with yours, I will wait for yours ;)
Best Regards,
Wu Zhangjin