Linux MIPS Architecture development
 help / color / mirror / Atom feed
* [PATCH -queue v2] MIPS: Move Alchemy Makefile parts to their own Platform file.
@ 2010-06-01 15:23 Manuel Lauss
  2010-06-01 16:35 ` Sam Ravnborg
  0 siblings, 1 reply; 7+ messages in thread
From: Manuel Lauss @ 2010-06-01 15:23 UTC (permalink / raw)
  To: Linux-MIPS; +Cc: Manuel Lauss, Sam Ravnborg

Cc: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Manuel Lauss <manuel.lauss@googlemail.com>
---
On top of latest mips-queue.  The changes to the mtx1/xx1500 Makefiles were
necessary to work around vmlinux link failures.

 arch/mips/Kbuild.platforms         |    1 +
 arch/mips/Makefile                 |  105 ----------------------------------
 arch/mips/alchemy/Platform         |  109 ++++++++++++++++++++++++++++++++++++
 arch/mips/alchemy/mtx-1/Makefile   |    3 +-
 arch/mips/alchemy/xxs1500/Makefile |    2 +-
 5 files changed, 112 insertions(+), 108 deletions(-)
 create mode 100644 arch/mips/alchemy/Platform

diff --git a/arch/mips/Kbuild.platforms b/arch/mips/Kbuild.platforms
index 9784c49..dc2bac5 100644
--- a/arch/mips/Kbuild.platforms
+++ b/arch/mips/Kbuild.platforms
@@ -1,5 +1,6 @@
 # All platforms listed in alphabetic order
 
+platforms += alchemy
 platforms += ar7
 platforms += loongson
 
diff --git a/arch/mips/Makefile b/arch/mips/Makefile
index 14b755d..b191730 100644
--- a/arch/mips/Makefile
+++ b/arch/mips/Makefile
@@ -199,111 +199,6 @@ cflags-$(CONFIG_MACH_JAZZ)	+= -I$(srctree)/arch/mips/include/asm/mach-jazz
 load-$(CONFIG_MACH_JAZZ)	+= 0xffffffff80080000
 
 #
-# Common Alchemy Au1x00 stuff
-#
-core-$(CONFIG_SOC_AU1X00)	+= arch/mips/alchemy/common/
-
-#
-# AMD Alchemy Pb1000 eval board
-#
-core-$(CONFIG_MIPS_PB1000)	+= arch/mips/alchemy/devboards/
-cflags-$(CONFIG_MIPS_PB1000)	+= -I$(srctree)/arch/mips/include/asm/mach-pb1x00
-load-$(CONFIG_MIPS_PB1000)	+= 0xffffffff80100000
-
-#
-# AMD Alchemy Pb1100 eval board
-#
-core-$(CONFIG_MIPS_PB1100)	+= arch/mips/alchemy/devboards/
-cflags-$(CONFIG_MIPS_PB1100)	+= -I$(srctree)/arch/mips/include/asm/mach-pb1x00
-load-$(CONFIG_MIPS_PB1100)	+= 0xffffffff80100000
-
-#
-# AMD Alchemy Pb1500 eval board
-#
-core-$(CONFIG_MIPS_PB1500)	+= arch/mips/alchemy/devboards/
-cflags-$(CONFIG_MIPS_PB1500)	+= -I$(srctree)/arch/mips/include/asm/mach-pb1x00
-load-$(CONFIG_MIPS_PB1500)	+= 0xffffffff80100000
-
-#
-# AMD Alchemy Pb1550 eval board
-#
-core-$(CONFIG_MIPS_PB1550)	+= arch/mips/alchemy/devboards/
-cflags-$(CONFIG_MIPS_PB1550)	+= -I$(srctree)/arch/mips/include/asm/mach-pb1x00
-load-$(CONFIG_MIPS_PB1550)	+= 0xffffffff80100000
-
-#
-# AMD Alchemy Pb1200 eval board
-#
-core-$(CONFIG_MIPS_PB1200)	+= arch/mips/alchemy/devboards/
-cflags-$(CONFIG_MIPS_PB1200)	+= -I$(srctree)/arch/mips/include/asm/mach-pb1x00
-load-$(CONFIG_MIPS_PB1200)	+= 0xffffffff80100000
-
-#
-# AMD Alchemy Db1000 eval board
-#
-core-$(CONFIG_MIPS_DB1000)	+= arch/mips/alchemy/devboards/
-cflags-$(CONFIG_MIPS_DB1000)	+= -I$(srctree)/arch/mips/include/asm/mach-db1x00
-load-$(CONFIG_MIPS_DB1000)	+= 0xffffffff80100000
-
-#
-# AMD Alchemy Db1100 eval board
-#
-core-$(CONFIG_MIPS_DB1100)	+= arch/mips/alchemy/devboards/
-cflags-$(CONFIG_MIPS_DB1100)	+= -I$(srctree)/arch/mips/include/asm/mach-db1x00
-load-$(CONFIG_MIPS_DB1100)	+= 0xffffffff80100000
-
-#
-# AMD Alchemy Db1500 eval board
-#
-core-$(CONFIG_MIPS_DB1500)	+= arch/mips/alchemy/devboards/
-cflags-$(CONFIG_MIPS_DB1500)	+= -I$(srctree)/arch/mips/include/asm/mach-db1x00
-load-$(CONFIG_MIPS_DB1500)	+= 0xffffffff80100000
-
-#
-# AMD Alchemy Db1550 eval board
-#
-core-$(CONFIG_MIPS_DB1550)	+= arch/mips/alchemy/devboards/
-cflags-$(CONFIG_MIPS_DB1550)	+= -I$(srctree)/arch/mips/include/asm/mach-db1x00
-load-$(CONFIG_MIPS_DB1550)	+= 0xffffffff80100000
-
-#
-# AMD Alchemy Db1200 eval board
-#
-core-$(CONFIG_MIPS_DB1200)	+= arch/mips/alchemy/devboards/
-cflags-$(CONFIG_MIPS_DB1200)	+= -I$(srctree)/arch/mips/include/asm/mach-db1x00
-load-$(CONFIG_MIPS_DB1200)	+= 0xffffffff80100000
-
-#
-# AMD Alchemy Bosporus eval board
-#
-core-$(CONFIG_MIPS_BOSPORUS)	+= arch/mips/alchemy/devboards/
-cflags-$(CONFIG_MIPS_BOSPORUS)	+= -I$(srctree)/arch/mips/include/asm/mach-db1x00
-load-$(CONFIG_MIPS_BOSPORUS)	+= 0xffffffff80100000
-
-#
-# AMD Alchemy Mirage eval board
-#
-core-$(CONFIG_MIPS_MIRAGE)	+= arch/mips/alchemy/devboards/
-cflags-$(CONFIG_MIPS_MIRAGE)	+= -I$(srctree)/arch/mips/include/asm/mach-db1x00
-load-$(CONFIG_MIPS_MIRAGE)	+= 0xffffffff80100000
-
-#
-# 4G-Systems eval board
-#
-libs-$(CONFIG_MIPS_MTX1)	+= arch/mips/alchemy/mtx-1/
-load-$(CONFIG_MIPS_MTX1)	+= 0xffffffff80100000
-
-#
-# MyCable eval board
-#
-libs-$(CONFIG_MIPS_XXS1500)	+= arch/mips/alchemy/xxs1500/
-load-$(CONFIG_MIPS_XXS1500)	+= 0xffffffff80100000
-
-# must be last for Alchemy systems for GPIO to work properly
-cflags-$(CONFIG_SOC_AU1X00)	+= -I$(srctree)/arch/mips/include/asm/mach-au1x00
-
-
-#
 # Cobalt Server
 #
 core-$(CONFIG_MIPS_COBALT)	+= arch/mips/cobalt/
diff --git a/arch/mips/alchemy/Platform b/arch/mips/alchemy/Platform
new file mode 100644
index 0000000..495cc9a
--- /dev/null
+++ b/arch/mips/alchemy/Platform
@@ -0,0 +1,109 @@
+#
+# Core Alchemy code
+#
+platform-$(CONFIG_MACH_ALCHEMY)	+= alchemy/common/
+
+
+#
+# AMD Alchemy Pb1000 eval board
+#
+platform-$(CONFIG_MIPS_PB1000)	+= alchemy/devboards/
+cflags-$(CONFIG_MIPS_PB1000)	+= -I$(srctree)/arch/mips/include/asm/mach-pb1x00
+load-$(CONFIG_MIPS_PB1000)	+= 0xffffffff80100000
+
+#
+# AMD Alchemy Pb1100 eval board
+#
+platform-$(CONFIG_MIPS_PB1100)	+= alchemy/devboards/
+cflags-$(CONFIG_MIPS_PB1100)	+= -I$(srctree)/arch/mips/include/asm/mach-pb1x00
+load-$(CONFIG_MIPS_PB1100)	+= 0xffffffff80100000
+
+#
+# AMD Alchemy Pb1500 eval board
+#
+platform-$(CONFIG_MIPS_PB1500)	+= alchemy/devboards/
+cflags-$(CONFIG_MIPS_PB1500)	+= -I$(srctree)/arch/mips/include/asm/mach-pb1x00
+load-$(CONFIG_MIPS_PB1500)	+= 0xffffffff80100000
+
+#
+# AMD Alchemy Pb1550 eval board
+#
+platform-$(CONFIG_MIPS_PB1550)	+= alchemy/devboards/
+cflags-$(CONFIG_MIPS_PB1550)	+= -I$(srctree)/arch/mips/include/asm/mach-pb1x00
+load-$(CONFIG_MIPS_PB1550)	+= 0xffffffff80100000
+
+#
+# AMD Alchemy Pb1200 eval board
+#
+platform-$(CONFIG_MIPS_PB1200)	+= alchemy/devboards/
+cflags-$(CONFIG_MIPS_PB1200)	+= -I$(srctree)/arch/mips/include/asm/mach-pb1x00
+load-$(CONFIG_MIPS_PB1200)	+= 0xffffffff80100000
+
+#
+# AMD Alchemy Db1000 eval board
+#
+platform-$(CONFIG_MIPS_DB1000)	+= alchemy/devboards/
+cflags-$(CONFIG_MIPS_DB1000)	+= -I$(srctree)/arch/mips/include/asm/mach-db1x00
+load-$(CONFIG_MIPS_DB1000)	+= 0xffffffff80100000
+
+#
+# AMD Alchemy Db1100 eval board
+#
+platform-$(CONFIG_MIPS_DB1100)	+= alchemy/devboards/
+cflags-$(CONFIG_MIPS_DB1100)	+= -I$(srctree)/arch/mips/include/asm/mach-db1x00
+load-$(CONFIG_MIPS_DB1100)	+= 0xffffffff80100000
+
+#
+# AMD Alchemy Db1500 eval board
+#
+platform-$(CONFIG_MIPS_DB1500)	+= alchemy/devboards/
+cflags-$(CONFIG_MIPS_DB1500)	+= -I$(srctree)/arch/mips/include/asm/mach-db1x00
+load-$(CONFIG_MIPS_DB1500)	+= 0xffffffff80100000
+
+#
+# AMD Alchemy Db1550 eval board
+#
+platform-$(CONFIG_MIPS_DB1550)	+= alchemy/devboards/
+cflags-$(CONFIG_MIPS_DB1550)	+= -I$(srctree)/arch/mips/include/asm/mach-db1x00
+load-$(CONFIG_MIPS_DB1550)	+= 0xffffffff80100000
+
+#
+# AMD Alchemy Db1200 eval board
+#
+platform-$(CONFIG_MIPS_DB1200)	+= alchemy/devboards/
+cflags-$(CONFIG_MIPS_DB1200)	+= -I$(srctree)/arch/mips/include/asm/mach-db1x00
+load-$(CONFIG_MIPS_DB1200)	+= 0xffffffff80100000
+
+#
+# AMD Alchemy Bosporus eval board
+#
+platform-$(CONFIG_MIPS_BOSPORUS) += alchemy/devboards/
+cflags-$(CONFIG_MIPS_BOSPORUS)	 += -I$(srctree)/arch/mips/include/asm/mach-db1x00
+load-$(CONFIG_MIPS_BOSPORUS)	 += 0xffffffff80100000
+
+#
+# AMD Alchemy Mirage eval board
+#
+platform-$(CONFIG_MIPS_MIRAGE)	+= alchemy/devboards/
+cflags-$(CONFIG_MIPS_MIRAGE)	+= -I$(srctree)/arch/mips/include/asm/mach-db1x00
+load-$(CONFIG_MIPS_MIRAGE)	+= 0xffffffff80100000
+
+#
+# 4G-Systems eval board
+#
+platform-$(CONFIG_MIPS_MTX1)	+= alchemy/mtx-1/
+load-$(CONFIG_MIPS_MTX1)	+= 0xffffffff80100000
+
+#
+# MyCable eval board
+#
+platform-$(CONFIG_MIPS_XXS1500)	+= alchemy/xxs1500/
+load-$(CONFIG_MIPS_XXS1500)	+= 0xffffffff80100000
+
+
+# boards can specify their own <gpio.h> in one of their include dirs.
+# If they do, placing this line here at the end will make sure the
+# compiler picks the board one.  If they don't, it will make sure
+# the alchemy generic gpio header is picked up.
+
+cflags-$(CONFIG_MACH_ALCHEMY)	+= -I$(srctree)/arch/mips/include/asm/mach-au1x00
diff --git a/arch/mips/alchemy/mtx-1/Makefile b/arch/mips/alchemy/mtx-1/Makefile
index 4a53815..4d1367e 100644
--- a/arch/mips/alchemy/mtx-1/Makefile
+++ b/arch/mips/alchemy/mtx-1/Makefile
@@ -6,7 +6,6 @@
 # Makefile for 4G Systems MTX-1 board.
 #
 
-lib-y := init.o board_setup.o
-obj-y := platform.o
+obj-y := init.o board_setup.o platform.o
 
 EXTRA_CFLAGS += -Werror
diff --git a/arch/mips/alchemy/xxs1500/Makefile b/arch/mips/alchemy/xxs1500/Makefile
index 4dc81d7..346bdb0 100644
--- a/arch/mips/alchemy/xxs1500/Makefile
+++ b/arch/mips/alchemy/xxs1500/Makefile
@@ -5,6 +5,6 @@
 # Makefile for MyCable XXS1500 board.
 #
 
-lib-y := init.o board_setup.o platform.o
+obj-y := init.o board_setup.o platform.o
 
 EXTRA_CFLAGS += -Werror
-- 
1.7.1

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

* Re: [PATCH -queue v2] MIPS: Move Alchemy Makefile parts to their own Platform file.
  2010-06-01 15:23 [PATCH -queue v2] MIPS: Move Alchemy Makefile parts to their own Platform file Manuel Lauss
@ 2010-06-01 16:35 ` Sam Ravnborg
  2010-06-01 16:47   ` Manuel Lauss
  0 siblings, 1 reply; 7+ messages in thread
From: Sam Ravnborg @ 2010-06-01 16:35 UTC (permalink / raw)
  To: Manuel Lauss; +Cc: Linux-MIPS

On Tue, Jun 01, 2010 at 05:23:15PM +0200, Manuel Lauss wrote:
> Cc: Sam Ravnborg <sam@ravnborg.org>
> Signed-off-by: Manuel Lauss <manuel.lauss@googlemail.com>
> ---
> On top of latest mips-queue.  The changes to the mtx1/xx1500 Makefiles were
> necessary to work around vmlinux link failures.

Was this something the platform patches introduced or
is it needed to fix the build?
In the first case I have broken something I need to fix.
In the latter case this should be a seperate patch (that comes first).

> diff --git a/arch/mips/alchemy/Platform b/arch/mips/alchemy/Platform
> new file mode 100644
> index 0000000..495cc9a
> --- /dev/null
> +++ b/arch/mips/alchemy/Platform

...
> +#
> +# 4G-Systems eval board
> +#
> +platform-$(CONFIG_MIPS_MTX1)	+= alchemy/mtx-1/
> +load-$(CONFIG_MIPS_MTX1)	+= 0xffffffff80100000

> diff --git a/arch/mips/alchemy/mtx-1/Makefile b/arch/mips/alchemy/mtx-1/Makefile
> index 4a53815..4d1367e 100644
> --- a/arch/mips/alchemy/mtx-1/Makefile
> +++ b/arch/mips/alchemy/mtx-1/Makefile
> @@ -6,7 +6,6 @@
>  # Makefile for 4G Systems MTX-1 board.
>  #
>  
> -lib-y := init.o board_setup.o
> -obj-y := platform.o
> +obj-y := init.o board_setup.o platform.o
>  
>  EXTRA_CFLAGS += -Werror

In the above we added alchemy/mtx-1/ to platform-y
so mtx-1/ is automatically covered by -Werror by arch/mips/Kbuild

So the above assignment to EXTRA_CFLAGS is now redundant and can be dropped.

	Sam

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

* Re: [PATCH -queue v2] MIPS: Move Alchemy Makefile parts to their own  Platform file.
  2010-06-01 16:35 ` Sam Ravnborg
@ 2010-06-01 16:47   ` Manuel Lauss
  2010-06-01 16:47     ` Manuel Lauss
  2010-06-01 20:02     ` Sam Ravnborg
  0 siblings, 2 replies; 7+ messages in thread
From: Manuel Lauss @ 2010-06-01 16:47 UTC (permalink / raw)
  To: Sam Ravnborg; +Cc: Linux-MIPS

On Tue, Jun 1, 2010 at 6:35 PM, Sam Ravnborg <sam@ravnborg.org> wrote:
> On Tue, Jun 01, 2010 at 05:23:15PM +0200, Manuel Lauss wrote:
>> Cc: Sam Ravnborg <sam@ravnborg.org>
>> Signed-off-by: Manuel Lauss <manuel.lauss@googlemail.com>
>> ---
>> On top of latest mips-queue.  The changes to the mtx1/xx1500 Makefiles were
>> necessary to work around vmlinux link failures.
>
> Was this something the platform patches introduced or
> is it needed to fix the build?

Maybe.  Link failures with the "lib-y" parts do crop up occasionally.
Usually, the lib-y parts are built as the last files (along with other
arch/mips/lib code); with your changes they're built with the other
files in a directory:
 CC      arch/mips/alchemy/mtx-1/platform.o
  LD      arch/mips/alchemy/mtx-1/built-in.o
  CC      arch/mips/alchemy/mtx-1/board_setup.o
  CC      arch/mips/alchemy/mtx-1/init.o
  AR      arch/mips/alchemy/mtx-1/lib.a

That lib.a is apparently not picked up by the linker:
  LD      .tmp_vmlinux1
arch/mips/built-in.o: In function `plat_mem_setup':
/mnt/data/_home/mano/db1200/kernel/linux-2.6.git/arch/mips/alchemy/common/setup.c:55:
undefined reference to `board_setup'
/mnt/data/_home/mano/db1200/kernel/linux-2.6.git/arch/mips/alchemy/common/setup.c:55:
relocation truncated to fit: R_MIPS_26 against `board_setup'
arch/mips/built-in.o: In function `setup_arch':
/mnt/data/_home/mano/db1200/kernel/linux-2.6.git/arch/mips/kernel/setup.c:550:
undefined reference to `prom_init'
/mnt/data/_home/mano/db1200/kernel/linux-2.6.git/arch/mips/kernel/setup.c:550:
relocation truncated to fit: R_MIPS_26 against `prom_init'
[...]
make[1]: *** [.tmp_vmlinux1] Error 1
make: *** [sub-make] Error 2

Using obj-y is much more reliable.  I have no idea why some boards have
lib-y code; maybe Ralf knows more.


>> diff --git a/arch/mips/alchemy/Platform b/arch/mips/alchemy/Platform
>> new file mode 100644
>> index 0000000..495cc9a
>> --- /dev/null
>> +++ b/arch/mips/alchemy/Platform
>
> ...
>> +#
>> +# 4G-Systems eval board
>> +#
>> +platform-$(CONFIG_MIPS_MTX1) += alchemy/mtx-1/
>> +load-$(CONFIG_MIPS_MTX1)     += 0xffffffff80100000
>
>> diff --git a/arch/mips/alchemy/mtx-1/Makefile b/arch/mips/alchemy/mtx-1/Makefile
>> index 4a53815..4d1367e 100644
>> --- a/arch/mips/alchemy/mtx-1/Makefile
>> +++ b/arch/mips/alchemy/mtx-1/Makefile
>> @@ -6,7 +6,6 @@
>>  # Makefile for 4G Systems MTX-1 board.
>>  #
>>
>> -lib-y := init.o board_setup.o
>> -obj-y := platform.o
>> +obj-y := init.o board_setup.o platform.o
>>
>>  EXTRA_CFLAGS += -Werror
>
> In the above we added alchemy/mtx-1/ to platform-y
> so mtx-1/ is automatically covered by -Werror by arch/mips/Kbuild
>
> So the above assignment to EXTRA_CFLAGS is now redundant and can be dropped.

Okay, they're gone.

Thank you,
     Manuel Lauss

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

* Re: [PATCH -queue v2] MIPS: Move Alchemy Makefile parts to their own Platform file.
  2010-06-01 16:47   ` Manuel Lauss
@ 2010-06-01 16:47     ` Manuel Lauss
  2010-06-01 20:02     ` Sam Ravnborg
  1 sibling, 0 replies; 7+ messages in thread
From: Manuel Lauss @ 2010-06-01 16:47 UTC (permalink / raw)
  To: Sam Ravnborg; +Cc: Linux-MIPS

On Tue, Jun 1, 2010 at 6:35 PM, Sam Ravnborg <sam@ravnborg.org> wrote:
> On Tue, Jun 01, 2010 at 05:23:15PM +0200, Manuel Lauss wrote:
>> Cc: Sam Ravnborg <sam@ravnborg.org>
>> Signed-off-by: Manuel Lauss <manuel.lauss@googlemail.com>
>> ---
>> On top of latest mips-queue.  The changes to the mtx1/xx1500 Makefiles were
>> necessary to work around vmlinux link failures.
>
> Was this something the platform patches introduced or
> is it needed to fix the build?

Maybe.  Link failures with the "lib-y" parts do crop up occasionally.
Usually, the lib-y parts are built as the last files (along with other
arch/mips/lib code); with your changes they're built with the other
files in a directory:
 CC      arch/mips/alchemy/mtx-1/platform.o
  LD      arch/mips/alchemy/mtx-1/built-in.o
  CC      arch/mips/alchemy/mtx-1/board_setup.o
  CC      arch/mips/alchemy/mtx-1/init.o
  AR      arch/mips/alchemy/mtx-1/lib.a

That lib.a is apparently not picked up by the linker:
  LD      .tmp_vmlinux1
arch/mips/built-in.o: In function `plat_mem_setup':
/mnt/data/_home/mano/db1200/kernel/linux-2.6.git/arch/mips/alchemy/common/setup.c:55:
undefined reference to `board_setup'
/mnt/data/_home/mano/db1200/kernel/linux-2.6.git/arch/mips/alchemy/common/setup.c:55:
relocation truncated to fit: R_MIPS_26 against `board_setup'
arch/mips/built-in.o: In function `setup_arch':
/mnt/data/_home/mano/db1200/kernel/linux-2.6.git/arch/mips/kernel/setup.c:550:
undefined reference to `prom_init'
/mnt/data/_home/mano/db1200/kernel/linux-2.6.git/arch/mips/kernel/setup.c:550:
relocation truncated to fit: R_MIPS_26 against `prom_init'
[...]
make[1]: *** [.tmp_vmlinux1] Error 1
make: *** [sub-make] Error 2

Using obj-y is much more reliable.  I have no idea why some boards have
lib-y code; maybe Ralf knows more.


>> diff --git a/arch/mips/alchemy/Platform b/arch/mips/alchemy/Platform
>> new file mode 100644
>> index 0000000..495cc9a
>> --- /dev/null
>> +++ b/arch/mips/alchemy/Platform
>
> ...
>> +#
>> +# 4G-Systems eval board
>> +#
>> +platform-$(CONFIG_MIPS_MTX1) += alchemy/mtx-1/
>> +load-$(CONFIG_MIPS_MTX1)     += 0xffffffff80100000
>
>> diff --git a/arch/mips/alchemy/mtx-1/Makefile b/arch/mips/alchemy/mtx-1/Makefile
>> index 4a53815..4d1367e 100644
>> --- a/arch/mips/alchemy/mtx-1/Makefile
>> +++ b/arch/mips/alchemy/mtx-1/Makefile
>> @@ -6,7 +6,6 @@
>>  # Makefile for 4G Systems MTX-1 board.
>>  #
>>
>> -lib-y := init.o board_setup.o
>> -obj-y := platform.o
>> +obj-y := init.o board_setup.o platform.o
>>
>>  EXTRA_CFLAGS += -Werror
>
> In the above we added alchemy/mtx-1/ to platform-y
> so mtx-1/ is automatically covered by -Werror by arch/mips/Kbuild
>
> So the above assignment to EXTRA_CFLAGS is now redundant and can be dropped.

Okay, they're gone.

Thank you,
     Manuel Lauss

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

* Re: [PATCH -queue v2] MIPS: Move Alchemy Makefile parts to their own Platform file.
  2010-06-01 16:47   ` Manuel Lauss
  2010-06-01 16:47     ` Manuel Lauss
@ 2010-06-01 20:02     ` Sam Ravnborg
  2010-06-01 20:12       ` Manuel Lauss
  1 sibling, 1 reply; 7+ messages in thread
From: Sam Ravnborg @ 2010-06-01 20:02 UTC (permalink / raw)
  To: Manuel Lauss; +Cc: Linux-MIPS

On Tue, Jun 01, 2010 at 06:47:59PM +0200, Manuel Lauss wrote:
> On Tue, Jun 1, 2010 at 6:35 PM, Sam Ravnborg <sam@ravnborg.org> wrote:
> > On Tue, Jun 01, 2010 at 05:23:15PM +0200, Manuel Lauss wrote:
> >> Cc: Sam Ravnborg <sam@ravnborg.org>
> >> Signed-off-by: Manuel Lauss <manuel.lauss@googlemail.com>
> >> ---
> >> On top of latest mips-queue.  The changes to the mtx1/xx1500 Makefiles were
> >> necessary to work around vmlinux link failures.
> >
> > Was this something the platform patches introduced or
> > is it needed to fix the build?
> 
> Maybe.  Link failures with the "lib-y" parts do crop up occasionally.
> Usually, the lib-y parts are built as the last files (along with other
> arch/mips/lib code); with your changes they're built with the other
> files in a directory:
>  CC      arch/mips/alchemy/mtx-1/platform.o
>   LD      arch/mips/alchemy/mtx-1/built-in.o
>   CC      arch/mips/alchemy/mtx-1/board_setup.o
>   CC      arch/mips/alchemy/mtx-1/init.o
>   AR      arch/mips/alchemy/mtx-1/lib.a
> 
> That lib.a is apparently not picked up by the linker:
>   LD      .tmp_vmlinux1

...

> > ...
> >> +#
> >> +# 4G-Systems eval board
> >> +#
> >> +platform-$(CONFIG_MIPS_MTX1) += alchemy/mtx-1/
> >> +load-$(CONFIG_MIPS_MTX1)     += 0xffffffff80100000
> >
> >> diff --git a/arch/mips/alchemy/mtx-1/Makefile b/arch/mips/alchemy/mtx-1/Makefile
> >> index 4a53815..4d1367e 100644
> >> --- a/arch/mips/alchemy/mtx-1/Makefile
> >> +++ b/arch/mips/alchemy/mtx-1/Makefile
> >> @@ -6,7 +6,6 @@
> >>  # Makefile for 4G Systems MTX-1 board.
> >>  #
> >>
> >> -lib-y := init.o board_setup.o
> >> -obj-y := platform.o
> >> +obj-y := init.o board_setup.o platform.o
> >>
> >>  EXTRA_CFLAGS += -Werror
> >

So the original ocde looked like this:

arch/mips/Makefile:
libs-$(CONFIG_MIPS_MTX1)        += arch/mips/alchemy/mtx-1/

The above is used to tell that it shall look for a lib.a
in the directory: arch/mips/alchemy/mtx-1/
It also tell kbuild to build any built-in or modules in the same dir. 

In your conversion this became:
platform-$(CONFIG_MIPS_MTX1) += alchemy/mtx-1/

The above tells kbuild to build objects as built-in or modules
in the directory. It does not say anything about libs.

So we loose the information about the lib.a in the directory.
I know that kbuild will build it - but it happens
to forget all about it when done.

The right fixs seems to keep the libs-$(...) assignments in
the Platform files and let kbuild pick them up due to
the include in arch/mips/Makefile.

This is not optimal and we may address this later.
But for now this looks like the simplest/safest way forward.

Getting rid of the libs like you did is also an option.
And if this is OK then this is the niver way to do it.
But I have not looked into this enough to judge.
Does the lib files contain stuff that is only used in some
confgurations or does the content end up being linked
in always anyway?
Also are there any linker order constrains to tke care of?

Lots of questions I know - sorry.

	Sam

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

* Re: [PATCH -queue v2] MIPS: Move Alchemy Makefile parts to their own  Platform file.
  2010-06-01 20:02     ` Sam Ravnborg
@ 2010-06-01 20:12       ` Manuel Lauss
  2010-06-01 20:12         ` Manuel Lauss
  0 siblings, 1 reply; 7+ messages in thread
From: Manuel Lauss @ 2010-06-01 20:12 UTC (permalink / raw)
  To: Sam Ravnborg; +Cc: Linux-MIPS

On Tue, Jun 1, 2010 at 10:02 PM, Sam Ravnborg <sam@ravnborg.org> wrote:
> On Tue, Jun 01, 2010 at 06:47:59PM +0200, Manuel Lauss wrote:
>> On Tue, Jun 1, 2010 at 6:35 PM, Sam Ravnborg <sam@ravnborg.org> wrote:
>> > On Tue, Jun 01, 2010 at 05:23:15PM +0200, Manuel Lauss wrote:
>> >> Cc: Sam Ravnborg <sam@ravnborg.org>
>> >> Signed-off-by: Manuel Lauss <manuel.lauss@googlemail.com>
>> >> ---
>> >> On top of latest mips-queue.  The changes to the mtx1/xx1500 Makefiles were
>> >> necessary to work around vmlinux link failures.
>> >
>> > Was this something the platform patches introduced or
>> > is it needed to fix the build?
>>
>> Maybe.  Link failures with the "lib-y" parts do crop up occasionally.
>> Usually, the lib-y parts are built as the last files (along with other
>> arch/mips/lib code); with your changes they're built with the other
>> files in a directory:
>>  CC      arch/mips/alchemy/mtx-1/platform.o
>>   LD      arch/mips/alchemy/mtx-1/built-in.o
>>   CC      arch/mips/alchemy/mtx-1/board_setup.o
>>   CC      arch/mips/alchemy/mtx-1/init.o
>>   AR      arch/mips/alchemy/mtx-1/lib.a
>>
>> That lib.a is apparently not picked up by the linker:
>>   LD      .tmp_vmlinux1
>
> ...
>
>> > ...
>> >> +#
>> >> +# 4G-Systems eval board
>> >> +#
>> >> +platform-$(CONFIG_MIPS_MTX1) += alchemy/mtx-1/
>> >> +load-$(CONFIG_MIPS_MTX1)     += 0xffffffff80100000
>> >
>> >> diff --git a/arch/mips/alchemy/mtx-1/Makefile b/arch/mips/alchemy/mtx-1/Makefile
>> >> index 4a53815..4d1367e 100644
>> >> --- a/arch/mips/alchemy/mtx-1/Makefile
>> >> +++ b/arch/mips/alchemy/mtx-1/Makefile
>> >> @@ -6,7 +6,6 @@
>> >>  # Makefile for 4G Systems MTX-1 board.
>> >>  #
>> >>
>> >> -lib-y := init.o board_setup.o
>> >> -obj-y := platform.o
>> >> +obj-y := init.o board_setup.o platform.o
>> >>
>> >>  EXTRA_CFLAGS += -Werror
>> >
>
> So the original ocde looked like this:
>
> arch/mips/Makefile:
> libs-$(CONFIG_MIPS_MTX1)        += arch/mips/alchemy/mtx-1/
>
> The above is used to tell that it shall look for a lib.a
> in the directory: arch/mips/alchemy/mtx-1/
> It also tell kbuild to build any built-in or modules in the same dir.
>
> In your conversion this became:
> platform-$(CONFIG_MIPS_MTX1) += alchemy/mtx-1/
>
> The above tells kbuild to build objects as built-in or modules
> in the directory. It does not say anything about libs.
>
> So we loose the information about the lib.a in the directory.
> I know that kbuild will build it - but it happens
> to forget all about it when done.
>
> The right fixs seems to keep the libs-$(...) assignments in
> the Platform files and let kbuild pick them up due to
> the include in arch/mips/Makefile.

That doesn't work, I get errors for instance when doing "make clean":

linux-2.6.git/scripts/Makefile.clean:17:
linux-2.6.git/alchemy/mtx-1/Makefile: No such file or directory


> Getting rid of the libs like you did is also an option.

I'll send new patches doing exactly that and pile this one on
top of it.


> Does the lib files contain stuff that is only used in some
> confgurations or does the content end up being linked
> in always anyway?

Nope, just usual board initialization and platform data.


> Also are there any linker order constrains to tke care of?

None that I'm aware of, at least for the affected boards.


        Manuel

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

* Re: [PATCH -queue v2] MIPS: Move Alchemy Makefile parts to their own Platform file.
  2010-06-01 20:12       ` Manuel Lauss
@ 2010-06-01 20:12         ` Manuel Lauss
  0 siblings, 0 replies; 7+ messages in thread
From: Manuel Lauss @ 2010-06-01 20:12 UTC (permalink / raw)
  To: Sam Ravnborg; +Cc: Linux-MIPS

On Tue, Jun 1, 2010 at 10:02 PM, Sam Ravnborg <sam@ravnborg.org> wrote:
> On Tue, Jun 01, 2010 at 06:47:59PM +0200, Manuel Lauss wrote:
>> On Tue, Jun 1, 2010 at 6:35 PM, Sam Ravnborg <sam@ravnborg.org> wrote:
>> > On Tue, Jun 01, 2010 at 05:23:15PM +0200, Manuel Lauss wrote:
>> >> Cc: Sam Ravnborg <sam@ravnborg.org>
>> >> Signed-off-by: Manuel Lauss <manuel.lauss@googlemail.com>
>> >> ---
>> >> On top of latest mips-queue.  The changes to the mtx1/xx1500 Makefiles were
>> >> necessary to work around vmlinux link failures.
>> >
>> > Was this something the platform patches introduced or
>> > is it needed to fix the build?
>>
>> Maybe.  Link failures with the "lib-y" parts do crop up occasionally.
>> Usually, the lib-y parts are built as the last files (along with other
>> arch/mips/lib code); with your changes they're built with the other
>> files in a directory:
>>  CC      arch/mips/alchemy/mtx-1/platform.o
>>   LD      arch/mips/alchemy/mtx-1/built-in.o
>>   CC      arch/mips/alchemy/mtx-1/board_setup.o
>>   CC      arch/mips/alchemy/mtx-1/init.o
>>   AR      arch/mips/alchemy/mtx-1/lib.a
>>
>> That lib.a is apparently not picked up by the linker:
>>   LD      .tmp_vmlinux1
>
> ...
>
>> > ...
>> >> +#
>> >> +# 4G-Systems eval board
>> >> +#
>> >> +platform-$(CONFIG_MIPS_MTX1) += alchemy/mtx-1/
>> >> +load-$(CONFIG_MIPS_MTX1)     += 0xffffffff80100000
>> >
>> >> diff --git a/arch/mips/alchemy/mtx-1/Makefile b/arch/mips/alchemy/mtx-1/Makefile
>> >> index 4a53815..4d1367e 100644
>> >> --- a/arch/mips/alchemy/mtx-1/Makefile
>> >> +++ b/arch/mips/alchemy/mtx-1/Makefile
>> >> @@ -6,7 +6,6 @@
>> >>  # Makefile for 4G Systems MTX-1 board.
>> >>  #
>> >>
>> >> -lib-y := init.o board_setup.o
>> >> -obj-y := platform.o
>> >> +obj-y := init.o board_setup.o platform.o
>> >>
>> >>  EXTRA_CFLAGS += -Werror
>> >
>
> So the original ocde looked like this:
>
> arch/mips/Makefile:
> libs-$(CONFIG_MIPS_MTX1)        += arch/mips/alchemy/mtx-1/
>
> The above is used to tell that it shall look for a lib.a
> in the directory: arch/mips/alchemy/mtx-1/
> It also tell kbuild to build any built-in or modules in the same dir.
>
> In your conversion this became:
> platform-$(CONFIG_MIPS_MTX1) += alchemy/mtx-1/
>
> The above tells kbuild to build objects as built-in or modules
> in the directory. It does not say anything about libs.
>
> So we loose the information about the lib.a in the directory.
> I know that kbuild will build it - but it happens
> to forget all about it when done.
>
> The right fixs seems to keep the libs-$(...) assignments in
> the Platform files and let kbuild pick them up due to
> the include in arch/mips/Makefile.

That doesn't work, I get errors for instance when doing "make clean":

linux-2.6.git/scripts/Makefile.clean:17:
linux-2.6.git/alchemy/mtx-1/Makefile: No such file or directory


> Getting rid of the libs like you did is also an option.

I'll send new patches doing exactly that and pile this one on
top of it.


> Does the lib files contain stuff that is only used in some
> confgurations or does the content end up being linked
> in always anyway?

Nope, just usual board initialization and platform data.


> Also are there any linker order constrains to tke care of?

None that I'm aware of, at least for the affected boards.


        Manuel

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

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

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-01 15:23 [PATCH -queue v2] MIPS: Move Alchemy Makefile parts to their own Platform file Manuel Lauss
2010-06-01 16:35 ` Sam Ravnborg
2010-06-01 16:47   ` Manuel Lauss
2010-06-01 16:47     ` Manuel Lauss
2010-06-01 20:02     ` Sam Ravnborg
2010-06-01 20:12       ` Manuel Lauss
2010-06-01 20:12         ` Manuel Lauss

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox