* [PATCH] mips: refactor arch/mips/boot/Makefile
@ 2010-05-29 19:57 Sam Ravnborg
2010-05-30 3:11 ` Wu Zhangjin
0 siblings, 1 reply; 5+ messages in thread
From: Sam Ravnborg @ 2010-05-29 19:57 UTC (permalink / raw)
To: Ralf Baechle, linux-mips; +Cc: Wu Zhangjin
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] mips: refactor arch/mips/boot/Makefile
2010-05-29 19:57 [PATCH] mips: refactor arch/mips/boot/Makefile Sam Ravnborg
@ 2010-05-30 3:11 ` Wu Zhangjin
2010-05-30 5:23 ` Sam Ravnborg
0 siblings, 1 reply; 5+ messages in thread
From: Wu Zhangjin @ 2010-05-30 3:11 UTC (permalink / raw)
To: Sam Ravnborg; +Cc: Ralf Baechle, linux-mips
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
On Sat, 2010-05-29 at 21:57 +0200, Sam Ravnborg wrote:
> >From 0b95917f21f145d07351fb098b3f4804c4bf6ca1 Mon Sep 17 00:00:00 2001
> From: Sam Ravnborg <sam@ravnborg.org>
> Date: Sat, 29 May 2010 21:50:50 +0200
> Subject: [PATCH] mips: refactor arch/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 dir
>
> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
> ---
> arch/mips/boot/Makefile | 30 +++++++++++++++---------------
> 1 files changed, 15 insertions(+), 15 deletions(-)
>
> diff --git a/arch/mips/boot/Makefile b/arch/mips/boot/Makefile
> index de20e81..28dbf92 100644
> --- a/arch/mips/boot/Makefile
> +++ b/arch/mips/boot/Makefile
> @@ -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.*
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] mips: refactor arch/mips/boot/Makefile
2010-05-30 3:11 ` Wu Zhangjin
@ 2010-05-30 5:23 ` Sam Ravnborg
2010-05-30 9:11 ` Wu Zhangjin
0 siblings, 1 reply; 5+ messages in thread
From: Sam Ravnborg @ 2010-05-30 5:23 UTC (permalink / raw)
To: Wu Zhangjin; +Cc: Ralf Baechle, linux-mips
On Sun, May 30, 2010 at 11:11:25AM +0800, Wu Zhangjin wrote:
> Hi, Sam
>
> This patch really make the Makefile looks better,
Thanks.
> 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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] mips: refactor arch/mips/boot/Makefile
2010-05-30 5:23 ` Sam Ravnborg
@ 2010-05-30 9:11 ` Wu Zhangjin
0 siblings, 0 replies; 5+ messages in thread
From: Wu Zhangjin @ 2010-05-30 9:11 UTC (permalink / raw)
To: Sam Ravnborg; +Cc: Ralf Baechle, linux-mips
Hi, Sam & Ralf
On Sun, 2010-05-30 at 07:23 +0200, Sam Ravnborg wrote:
[...]
> > 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
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] mips: refactor arch/mips/boot/Makefile
@ 2010-05-29 19:50 Sam Ravnborg
0 siblings, 0 replies; 5+ messages in thread
From: Sam Ravnborg @ 2010-05-29 19:50 UTC (permalink / raw)
- 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 dir
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
---
arch/mips/boot/Makefile | 30 +++++++++++++++---------------
1 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/arch/mips/boot/Makefile b/arch/mips/boot/Makefile
index de20e81..28dbf92 100644
--- a/arch/mips/boot/Makefile
+++ b/arch/mips/boot/Makefile
@@ -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.*
--
1.6.0.6
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-05-30 9:12 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-29 19:57 [PATCH] mips: refactor arch/mips/boot/Makefile Sam Ravnborg
2010-05-30 3:11 ` Wu Zhangjin
2010-05-30 5:23 ` Sam Ravnborg
2010-05-30 9:11 ` Wu Zhangjin
-- strict thread matches above, loose matches on Subject: below --
2010-05-29 19:50 Sam Ravnborg
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.