All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/6] mips: diverse Makefile updates
@ 2010-05-30 14:19 Sam Ravnborg
  2010-05-30 14:26 ` [PATCH 1/6] mips: introduce arch/mips/Kbuild Sam Ravnborg
                   ` (11 more replies)
  0 siblings, 12 replies; 25+ messages in thread
From: Sam Ravnborg @ 2010-05-30 14:19 UTC (permalink / raw)
  To: linux-mips, Ralf Baechle, Wu Zhangjin; +Cc: sam

This patchset does the following:
- introduce arch/mips/Kbuild
- use -Werror on all core-y files of the mips kernel
- introduce a distributed way to specify platform definitions
- refactor a few Makefiles
- clean up cleaning 

Ralf asked in private mail if I could try to implement
a working varient of a suggestion I made some time ago.
The idea was to move platform specific definitions to
dedicated platfrom files.

This is implmented in the third patch.

The idea is to move the platform definitions from arch/mips/Makefile
to arch/mips/<platform>/Platfrom

The content of this file is used in arch/mips/Makefile
and arch/mips/Kbuild.

On top of this is a few patches that refactor the
boot and boot/compressed Makefiles so they are more
kbuild conformant.
This beautify the output when we build a kernel.

Wu Zhangjin have pointed out a few bugs in the first
variants of the patches that hit the mailing list - thanks!


Patches will follow.

Note: I tried to test a little with bigsur_defconfig
but get_user() is buggy. Or at least my gcc thinks that
first argument may be used uninitialized.
I think mips needs to fix the 64 bit variant of get_user().
I took a quick look but ran away.

	Sam


Sam Ravnborg (6):
      mips: introduce arch/mips/Kbuild
      mips: add -Werror to arch/mips/Kbuild
      mips: introduce support for Platform definitions
      mips: refactor arch/mips/boot/Makefile
      mips: refactor arch/mips/boot/compressed/Makefile
      mips: clean up arch/mips/Makefile

 arch/mips/Kbuild                   |   15 +++++++++
 arch/mips/Kbuild.platforms         |    6 ++++
 arch/mips/Makefile                 |   57 +++++++++---------------------------
 arch/mips/ar7/Platform             |    7 ++++
 arch/mips/boot/Makefile            |   49 ++++++++++++++----------------
 arch/mips/boot/compressed/Makefile |   54 ++++++++++++++++++----------------
 arch/mips/kernel/Makefile          |    2 -
 arch/mips/math-emu/Makefile        |    1 -
 arch/mips/mm/Makefile              |    2 -
 9 files changed, 94 insertions(+), 99 deletions(-)

^ permalink raw reply	[flat|nested] 25+ messages in thread
* [PATCH 3/6] mips: introduce support for Platform definitions
@ 2010-05-30 14:03 Sam Ravnborg
  0 siblings, 0 replies; 25+ messages in thread
From: Sam Ravnborg @ 2010-05-30 14:03 UTC (permalink / raw)


Move platform specific definitions to the platfrom directories.

Each platform shall do the following:
1) include an entry in arch/mips/Kbuild.platforms
2) add relevant definitions to arch/mips/<platform>/Platform

This commits change ar7 to the new scheme as an example.

Introducing a platform speecific Platfrom file has following advantages:
1) decentralization of platfrom definitions
2) simplification af arch/mips/Makefile
3) force all platfrom to build with -Werror (done in arch/mips/Kbuild)

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
---
 arch/mips/Kbuild           |    3 +++
 arch/mips/Kbuild.platforms |    6 ++++++
 arch/mips/Makefile         |    8 +-------
 arch/mips/ar7/Platform     |    7 +++++++
 4 files changed, 17 insertions(+), 7 deletions(-)
 create mode 100644 arch/mips/Kbuild.platforms
 create mode 100644 arch/mips/ar7/Platform

diff --git a/arch/mips/Kbuild b/arch/mips/Kbuild
index 6ce9382..e322d65 100644
--- a/arch/mips/Kbuild
+++ b/arch/mips/Kbuild
@@ -3,6 +3,9 @@
 # CFLAGS_<file.o> := -Wno-error
 subdir-ccflags-y := -Werror
 
+# platform specific definitions
+include arch/mips/Kbuild.platforms
+obj-y := $(platform-y)
 
 # mips object files
 # The object files are linked as core-y files would be linked
diff --git a/arch/mips/Kbuild.platforms b/arch/mips/Kbuild.platforms
new file mode 100644
index 0000000..932f268
--- /dev/null
+++ b/arch/mips/Kbuild.platforms
@@ -0,0 +1,6 @@
+# All platforms listed in alphabetic order
+
+platforms += ar7
+
+# include the platform specific files
+include $(patsubst %, arch/mips/%/Platform, $(platforms))
diff --git a/arch/mips/Makefile b/arch/mips/Makefile
index d39be47..92346d0 100644
--- a/arch/mips/Makefile
+++ b/arch/mips/Makefile
@@ -209,13 +209,7 @@ endif
 #
 # Board-dependent options and extra files
 #
-
-#
-# Texas Instruments AR7
-#
-core-$(CONFIG_AR7)		+= arch/mips/ar7/
-cflags-$(CONFIG_AR7)		+= -I$(srctree)/arch/mips/include/asm/mach-ar7
-load-$(CONFIG_AR7)		+= 0xffffffff94100000
+include arch/mips/Kbuild.platforms
 
 #
 # Acer PICA 61, Mips Magnum 4000 and Olivetti M700.
diff --git a/arch/mips/ar7/Platform b/arch/mips/ar7/Platform
new file mode 100644
index 0000000..2978ddb
--- /dev/null
+++ b/arch/mips/ar7/Platform
@@ -0,0 +1,7 @@
+#
+# Texas Instruments AR7
+#
+platform-$(CONFIG_AR7)          += ar7/
+cflags-$(CONFIG_AR7)            += -I$(srctree)/arch/mips/include/asm/mach-ar7
+load-$(CONFIG_AR7)              += 0xffffffff94100000
+
-- 
1.6.0.6

^ permalink raw reply related	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2010-06-01 10:28 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-05-30 14:19 [PATCH 0/6] mips: diverse Makefile updates Sam Ravnborg
2010-05-30 14:26 ` [PATCH 1/6] mips: introduce arch/mips/Kbuild Sam Ravnborg
2010-05-30 14:26 ` [PATCH 2/6] mips: add -Werror to arch/mips/Kbuild Sam Ravnborg
2010-05-30 14:27 ` [PATCH 3/6] mips: introduce support for Platform definitions Sam Ravnborg
2010-05-30 14:27 ` [PATCH 4/6] mips: refactor arch/mips/boot/Makefile Sam Ravnborg
2010-05-30 14:28 ` [PATCH 5/6] mips: refactor arch/mips/boot/compressed/Makefile Sam Ravnborg
2010-05-30 14:28 ` [PATCH 6/6] mips: clean up arch/mips/Makefile Sam Ravnborg
2010-05-30 15:39 ` [PATCH 0/6] mips: diverse Makefile updates Sam Ravnborg
2010-05-30 23:19   ` Ralf Baechle
2010-05-31 10:29     ` Ralf Baechle
2010-05-31 10:55       ` Sam Ravnborg
2010-06-01 10:28         ` Ralf Baechle
2010-05-30 18:03 ` [ Sam Ravnborg
2010-05-30 18:06 ` [PATCH] mips: fix uninitialized warning when using get_user() Sam Ravnborg
2010-05-31  8:45 ` [PATCH 0/6] mips: diverse Makefile updates Wu Zhangjin
2010-05-31  9:10   ` Sam Ravnborg
2010-05-31 14:56 ` Ralf Baechle
2010-05-31 15:33 ` Manuel Lauss
2010-05-31 18:03   ` [PATCH] mips: fix build with O= Sam Ravnborg
2010-05-31 18:03     ` Sam Ravnborg
2010-05-31 18:19     ` Manuel Lauss
2010-05-31 19:00       ` Sam Ravnborg
2010-05-31 22:36         ` Ralf Baechle
2010-05-31 22:46     ` Ralf Baechle
  -- strict thread matches above, loose matches on Subject: below --
2010-05-30 14:03 [PATCH 3/6] mips: introduce support for Platform definitions 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.