* [PATCH] m68k: merge the mmu and non-mmu kernel/Makefiles
@ 2011-08-11 4:47 gerg
2011-08-11 6:08 ` [uClinux-dev] " Sam Ravnborg
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: gerg @ 2011-08-11 4:47 UTC (permalink / raw)
To: linux-m68k, uclinux-dev; +Cc: Greg Ungerer
From: Greg Ungerer <gerg@uclinux.org>
[This is a resend of this patch. If no-one has any objections then I
want to push this into linux-next, for eventual inclusion in the 3.2
merge window.]
The few differences between the mmu and non-mmu kernel/Makefiles can
easily be handled inside of a single Makefile. Merge the 2 back into
a single Makefile.
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
---
arch/m68k/kernel/Makefile | 23 +++++++++++++++++++----
arch/m68k/kernel/Makefile_mm | 17 -----------------
arch/m68k/kernel/Makefile_no | 10 ----------
3 files changed, 19 insertions(+), 31 deletions(-)
delete mode 100644 arch/m68k/kernel/Makefile_mm
delete mode 100644 arch/m68k/kernel/Makefile_no
diff --git a/arch/m68k/kernel/Makefile b/arch/m68k/kernel/Makefile
index c482ebc..5e1bf94 100644
--- a/arch/m68k/kernel/Makefile
+++ b/arch/m68k/kernel/Makefile
@@ -1,5 +1,20 @@
-ifdef CONFIG_MMU
-include arch/m68k/kernel/Makefile_mm
-else
-include arch/m68k/kernel/Makefile_no
+#
+# Makefile for the linux kernel.
+#
+
+extra-$(CONFIG_MMU) := head.o
+extra-$(CONFIG_SUN3) := sun3-head.o
+extra-y += vmlinux.lds
+
+obj-y := entry.o m68k_ksyms.o process.o ptrace.o setup.o signal.o \
+ sys_m68k.o syscalltable.o time.o traps.o
+
+obj-y$(CONFIG_MMU_SUN3) += dma.o # no, it's not a typo
+obj-$(CONFIG_MMU) += ints.o module.o devres.o
+devres-$(CONFIG_MMU) = ../../../kernel/irq/devres.o
+
+ifndef CONFIG_MMU
+obj-y += init_task.o irq.o
+obj-$(CONFIG_MODULES) += module.o
endif
+
diff --git a/arch/m68k/kernel/Makefile_mm b/arch/m68k/kernel/Makefile_mm
deleted file mode 100644
index aced678..0000000
--- a/arch/m68k/kernel/Makefile_mm
+++ /dev/null
@@ -1,17 +0,0 @@
-#
-# Makefile for the linux kernel.
-#
-
-ifndef CONFIG_SUN3
- extra-y := head.o
-else
- extra-y := sun3-head.o
-endif
-extra-y += vmlinux.lds
-
-obj-y := entry.o process.o traps.o ints.o signal.o ptrace.o module.o \
- sys_m68k.o time.o setup.o m68k_ksyms.o devres.o syscalltable.o
-
-devres-y = ../../../kernel/irq/devres.o
-
-obj-y$(CONFIG_MMU_SUN3) += dma.o # no, it's not a typo
diff --git a/arch/m68k/kernel/Makefile_no b/arch/m68k/kernel/Makefile_no
deleted file mode 100644
index 37c3fc0..0000000
--- a/arch/m68k/kernel/Makefile_no
+++ /dev/null
@@ -1,10 +0,0 @@
-#
-# Makefile for arch/m68knommu/kernel.
-#
-
-extra-y := vmlinux.lds
-
-obj-y += dma.o entry.o init_task.o irq.o m68k_ksyms.o process.o ptrace.o \
- setup.o signal.o syscalltable.o sys_m68k.o time.o traps.o
-
-obj-$(CONFIG_MODULES) += module.o
--
1.7.0.4
^ permalink raw reply related [flat|nested] 7+ messages in thread* Re: [uClinux-dev] [PATCH] m68k: merge the mmu and non-mmu kernel/Makefiles
2011-08-11 4:47 [PATCH] m68k: merge the mmu and non-mmu kernel/Makefiles gerg
@ 2011-08-11 6:08 ` Sam Ravnborg
2011-08-11 6:45 ` Greg Ungerer
2011-08-13 14:27 ` Geert Uytterhoeven
2011-08-13 16:44 ` Andreas Schwab
2 siblings, 1 reply; 7+ messages in thread
From: Sam Ravnborg @ 2011-08-11 6:08 UTC (permalink / raw)
To: uClinux development list; +Cc: linux-m68k, Greg Ungerer
On Thu, Aug 11, 2011 at 02:47:24PM +1000, gerg@snapgear.com wrote:
> From: Greg Ungerer <gerg@uclinux.org>
>
> [This is a resend of this patch. If no-one has any objections then I
> want to push this into linux-next, for eventual inclusion in the 3.2
> merge window.]
>
> The few differences between the mmu and non-mmu kernel/Makefiles can
> easily be handled inside of a single Makefile. Merge the 2 back into
> a single Makefile.
Looks good (except the typo that is nto a typo:-) )
Acked-by: Sam Ravnborg <sam@ravnborg.org>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [uClinux-dev] [PATCH] m68k: merge the mmu and non-mmu kernel/Makefiles
2011-08-11 6:08 ` [uClinux-dev] " Sam Ravnborg
@ 2011-08-11 6:45 ` Greg Ungerer
0 siblings, 0 replies; 7+ messages in thread
From: Greg Ungerer @ 2011-08-11 6:45 UTC (permalink / raw)
To: Sam Ravnborg; +Cc: uClinux development list, linux-m68k, Greg Ungerer
On 11/08/11 16:08, Sam Ravnborg wrote:
> On Thu, Aug 11, 2011 at 02:47:24PM +1000, gerg@snapgear.com wrote:
>> From: Greg Ungerer<gerg@uclinux.org>
>>
>> [This is a resend of this patch. If no-one has any objections then I
>> want to push this into linux-next, for eventual inclusion in the 3.2
>> merge window.]
>>
>> The few differences between the mmu and non-mmu kernel/Makefiles can
>> easily be handled inside of a single Makefile. Merge the 2 back into
>> a single Makefile.
>
> Looks good (except the typo that is nto a typo:-) )
That is a little gem that one :-)
> Acked-by: Sam Ravnborg<sam@ravnborg.org>
Thanks Sam!
Regards
Greg
------------------------------------------------------------------------
Greg Ungerer -- Principal Engineer EMAIL: gerg@snapgear.com
SnapGear Group, McAfee PHONE: +61 7 3435 2888
8 Gardner Close FAX: +61 7 3217 5323
Milton, QLD, 4064, Australia WEB: http://www.SnapGear.com
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] m68k: merge the mmu and non-mmu kernel/Makefiles
2011-08-11 4:47 [PATCH] m68k: merge the mmu and non-mmu kernel/Makefiles gerg
2011-08-11 6:08 ` [uClinux-dev] " Sam Ravnborg
@ 2011-08-13 14:27 ` Geert Uytterhoeven
2011-08-15 2:07 ` Greg Ungerer
2011-08-13 16:44 ` Andreas Schwab
2 siblings, 1 reply; 7+ messages in thread
From: Geert Uytterhoeven @ 2011-08-13 14:27 UTC (permalink / raw)
To: gerg; +Cc: linux-m68k, uclinux-dev, Greg Ungerer
On Thu, Aug 11, 2011 at 06:47, <gerg@snapgear.com> wrote:
> --- a/arch/m68k/kernel/Makefile
> +++ b/arch/m68k/kernel/Makefile
> @@ -1,5 +1,20 @@
> -ifdef CONFIG_MMU
> -include arch/m68k/kernel/Makefile_mm
> -else
> -include arch/m68k/kernel/Makefile_no
> +#
> +# Makefile for the linux kernel.
> +#
> +
> +extra-$(CONFIG_MMU) := head.o
> +extra-$(CONFIG_SUN3) := sun3-head.o
> +extra-y += vmlinux.lds
> +
> +obj-y := entry.o m68k_ksyms.o process.o ptrace.o setup.o signal.o \
> + sys_m68k.o syscalltable.o time.o traps.o
> +
> +obj-y$(CONFIG_MMU_SUN3) += dma.o # no, it's not a typo
> +obj-$(CONFIG_MMU) += ints.o module.o devres.o
On MMU, we unconditionally build module.c.
> +devres-$(CONFIG_MMU) = ../../../kernel/irq/devres.o
> +
> +ifndef CONFIG_MMU
> +obj-y += init_task.o irq.o
> +obj-$(CONFIG_MODULES) += module.o
On nommu, it depends on CONFIG_MODULES.
However, most inside module.c is already protected by #ifdef CONFIG_MODULES.
Except for module_fixup(), which is empty for nommu. After moving the whole
module_fixup() inside #ifdef CONFIG_MMU, you can consolidate the module.o
entry in the Makefile.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH] m68k: merge the mmu and non-mmu kernel/Makefiles
2011-08-13 14:27 ` Geert Uytterhoeven
@ 2011-08-15 2:07 ` Greg Ungerer
0 siblings, 0 replies; 7+ messages in thread
From: Greg Ungerer @ 2011-08-15 2:07 UTC (permalink / raw)
To: Geert Uytterhoeven; +Cc: linux-m68k, uclinux-dev, Greg Ungerer
Hi Geert,
On 14/08/11 00:27, Geert Uytterhoeven wrote:
> On Thu, Aug 11, 2011 at 06:47,<gerg@snapgear.com> wrote:
>> --- a/arch/m68k/kernel/Makefile
>> +++ b/arch/m68k/kernel/Makefile
>> @@ -1,5 +1,20 @@
>> -ifdef CONFIG_MMU
>> -include arch/m68k/kernel/Makefile_mm
>> -else
>> -include arch/m68k/kernel/Makefile_no
>> +#
>> +# Makefile for the linux kernel.
>> +#
>> +
>> +extra-$(CONFIG_MMU) := head.o
>> +extra-$(CONFIG_SUN3) := sun3-head.o
>> +extra-y += vmlinux.lds
>> +
>> +obj-y := entry.o m68k_ksyms.o process.o ptrace.o setup.o signal.o \
>> + sys_m68k.o syscalltable.o time.o traps.o
>> +
>> +obj-y$(CONFIG_MMU_SUN3) += dma.o # no, it's not a typo
>> +obj-$(CONFIG_MMU) += ints.o module.o devres.o
>
> On MMU, we unconditionally build module.c.
>
>> +devres-$(CONFIG_MMU) = ../../../kernel/irq/devres.o
>> +
>> +ifndef CONFIG_MMU
>> +obj-y += init_task.o irq.o
>> +obj-$(CONFIG_MODULES) += module.o
>
> On nommu, it depends on CONFIG_MODULES.
>
> However, most inside module.c is already protected by #ifdef CONFIG_MODULES.
> Except for module_fixup(), which is empty for nommu. After moving the whole
> module_fixup() inside #ifdef CONFIG_MMU, you can consolidate the module.o
> entry in the Makefile.
Actually you don't even need to modify module.c to always build
at the moment. I can move to always building module.o, it costs
an extra 2 bytes in the final non-MMU/no-modules case :-)
Regards
Greg
------------------------------------------------------------------------
Greg Ungerer -- Principal Engineer EMAIL: gerg@snapgear.com
SnapGear Group, McAfee PHONE: +61 7 3435 2888
8 Gardner Close FAX: +61 7 3217 5323
Milton, QLD, 4064, Australia WEB: http://www.SnapGear.com
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] m68k: merge the mmu and non-mmu kernel/Makefiles
2011-08-11 4:47 [PATCH] m68k: merge the mmu and non-mmu kernel/Makefiles gerg
2011-08-11 6:08 ` [uClinux-dev] " Sam Ravnborg
2011-08-13 14:27 ` Geert Uytterhoeven
@ 2011-08-13 16:44 ` Andreas Schwab
2011-08-15 1:12 ` Greg Ungerer
2 siblings, 1 reply; 7+ messages in thread
From: Andreas Schwab @ 2011-08-13 16:44 UTC (permalink / raw)
To: gerg; +Cc: linux-m68k, uclinux-dev, Greg Ungerer
<gerg@snapgear.com> writes:
> +obj-y$(CONFIG_MMU_SUN3) += dma.o # no, it's not a typo
I'd rather put ifndef CONFIG_MMU_SUN3 around it.
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] m68k: merge the mmu and non-mmu kernel/Makefiles
2011-08-13 16:44 ` Andreas Schwab
@ 2011-08-15 1:12 ` Greg Ungerer
0 siblings, 0 replies; 7+ messages in thread
From: Greg Ungerer @ 2011-08-15 1:12 UTC (permalink / raw)
To: Andreas Schwab; +Cc: linux-m68k, uclinux-dev, Greg Ungerer
Hi Andreas,
On 14/08/11 02:44, Andreas Schwab wrote:
> <gerg@snapgear.com> writes:
>
>> +obj-y$(CONFIG_MMU_SUN3) += dma.o # no, it's not a typo
>
> I'd rather put ifndef CONFIG_MMU_SUN3 around it.
I agree. It is much more obvious what it is doing with the ifndef.
I'll change it over to that.
Regards
Greg
------------------------------------------------------------------------
Greg Ungerer -- Principal Engineer EMAIL: gerg@snapgear.com
SnapGear Group, McAfee PHONE: +61 7 3435 2888
8 Gardner Close FAX: +61 7 3217 5323
Milton, QLD, 4064, Australia WEB: http://www.SnapGear.com
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2011-08-15 2:04 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-11 4:47 [PATCH] m68k: merge the mmu and non-mmu kernel/Makefiles gerg
2011-08-11 6:08 ` [uClinux-dev] " Sam Ravnborg
2011-08-11 6:45 ` Greg Ungerer
2011-08-13 14:27 ` Geert Uytterhoeven
2011-08-15 2:07 ` Greg Ungerer
2011-08-13 16:44 ` Andreas Schwab
2011-08-15 1:12 ` Greg Ungerer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox