MIPS: Fix failed run of MAKEALL mips script
cover MIPS: Fix failed run of MAKEALL mips script
Currently MAKEALL mips covers 21 boards and 15 of them have compile errors with gcc-4.3.3. This patch series fixes these boards.
Daniel Schwierzeck (3):
MIPS: VCT: Fix enabling of unwanted options if networking or USB
support are disabled
MIPS: Purple: Fix multiple definition error on final linking of
u-boot binary
MIPS: dbau1x00: Disable compilation of flash driver stub
board/dbau1x00/Makefile | 2 +- board/purple/u-boot.lds | 5 ----- include/configs/vct.h | 7 +++++-- 3 files changed, 6 insertions(+), 8 deletions(-)
--
1.7.3.5
PATCH 1/3 MIPS: VCT: Fix enabling of unwanted options if networking or USB support are disabled
Some VCT boards lacks the support of networking or USB. Additionally that support is disabled in small image configurations.
If CONFIG_CMD_NET should not used the CONFIG_CMD_NFS option have to be disabled too. Otherwise the linker fails with unresolved symbols.
If CONFIG_VCT_SMALL_IMAGE is set than CONFIG_CMD_NET and CONFIG_CMD_USB are disabled at the end of vct.h. This is not adequate because CONFIG_CMD_USB enables additional options and the linker fails again with unresolved symbols.
This patch adds an early check against CONFIG_VCT_SMALL_IMAGE so the additional options are only enabled if they are really needed.
--- include/configs/vct.h | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-)
include/configs/vct.h +5 -2
@@ -109,17 +109,20 @@/* * Only Premium/Platinum have ethernet support right now */ -#if defined(CONFIG_VCT_PREMIUM ) || defined(CONFIG_VCT_PLATINUM ) +#if (defined(CONFIG_VCT_PREMIUM ) || defined(CONFIG_VCT_PLATINUM )) && \ + !definedCONFIG_VCT_SMALL_IMAGE #define CONFIG_CMD_PING #define CONFIG_CMD_SNTP #else #undef CONFIG_CMD_NET +#undef CONFIG_CMD_NFS#endif /* * Only Premium/Platinum have USB-EHCI support right now */ -#if defined(CONFIG_VCT_PREMIUM ) || defined(CONFIG_VCT_PLATINUM ) +#if (defined(CONFIG_VCT_PREMIUM ) || defined(CONFIG_VCT_PLATINUM )) && \ + !definedCONFIG_VCT_SMALL_IMAGE #define CONFIG_CMD_USB #define CONFIG_CMD_FAT #endif
--
1.7.3.5
PATCH 1/3 MIPS: VCT: Fix enabling of unwanted options if networking or USB support are disabled
Hi Daniel,
Quoted 28 lines · On Thursday 03 February 2011 12:59:50 daniel.schwierzeck at googlemail.com…
Some VCT boards lacks the support of networking or USB. Additionally that support is disabled in small image configurations.
If
CONFIG_CMD_NETshould not used theCONFIG_CMD_NFSoption have to be disabled too. Otherwise the linker fails with unresolved symbols.If
CONFIG_VCT_SMALL_IMAGEis set thanCONFIG_CMD_NETandCONFIG_CMD_USBare disabled at the end ofvct.h. This is not adequate becauseCONFIG_CMD_USBenables additional options and the linker fails again with unresolved symbols.This patch adds an early check against
CONFIG_VCT_SMALL_IMAGEso the additional options are only enabled if they are really needed.Signed-off-by Daniel Schwierzeck <[email protected]>Cc Stefan Roese <[email protected]>--- include/configs/vct.h | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-)include/configs/vct.h +0
-0
include/configs/vct.h line 113
Quoted 6 lines
include/configs/vct.h +2
-1@@ -109,17 +109,20 @@/* * Only Premium/Platinum have ethernet support right now */ -#if defined(CONFIG_VCT_PREMIUM ) || defined(CONFIG_VCT_PLATINUM ) +#if (defined(CONFIG_VCT_PREMIUM ) || defined(CONFIG_VCT_PLATINUM )) && \ + !definedCONFIG_VCT_SMALL_IMAGE
I would prefer consistent style with braces around CONFIG_VCT_SMALL_IMAGE here.
include/configs/vct.h line 125
Quoted 13 lines
include/configs/vct.h +3
-1#define CONFIG_CMD_PING #define CONFIG_CMD_SNTP #else #undef CONFIG_CMD_NET +#undef CONFIG_CMD_NFS#endif /* * Only Premium/Platinum have USB-EHCI support right now */ -#if defined(CONFIG_VCT_PREMIUM ) || defined(CONFIG_VCT_PLATINUM ) +#if (defined(CONFIG_VCT_PREMIUM ) || defined(CONFIG_VCT_PLATINUM )) && \ + !definedCONFIG_VCT_SMALL_IMAGE
Same here. Otherwise:
Thanks.
Cheers,
Stefan
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: office at denx.de
PATCH 1/3 MIPS: VCT: Fix enabling of unwanted options if networking or USB support are disabled
Hi Stefan,
Quoted 5 lines
Quoted 4 lines
* Only Premium/Platinum have ethernet support right now
*/
Quoted 8 lines
include/configs/vct.h line 125
Quoted 5 lines
include/configs/vct.h +2
-1-#if defined(CONFIG_VCT_PREMIUM ) || defined(CONFIG_VCT_PLATINUM ) +#if (defined(CONFIG_VCT_PREMIUM ) || defined(CONFIG_VCT_PLATINUM )) && \ + !definedCONFIG_VCT_SMALL_IMAGE I would prefer consistent style with braces around
CONFIG_VCT_SMALL_IMAGEhere.
Ok I'll change this.
Quoted 21 lines
Quoted 20 lines
#define
CONFIG_CMD_PING#define
CONFIG_CMD_SNTP#else
#undef
CONFIG_CMD_NET+#undef
CONFIG_CMD_NFS#endif
/*
* Only Premium/Platinum have USB-EHCI support right now
*/
Quoted 7 lines
include/configs/vct.h line 125
Quoted 5 lines
include/configs/vct.h +2
-1-#if defined(CONFIG_VCT_PREMIUM ) || defined(CONFIG_VCT_PLATINUM ) +#if (defined(CONFIG_VCT_PREMIUM ) || defined(CONFIG_VCT_PLATINUM )) && \ + !definedCONFIG_VCT_SMALL_IMAGE Same here. Otherwise:
Dito.
Thanks
Daniel
PATCH 2/3 MIPS: Purple: Fix multiple definition error on final linking of u-boot binary
In reply to daniel.schwierzeck at googlemail.comThe linker of recent toolchains complains about multiple definitions on final linking of u-boot binary. This patch removes all redundant object files from u-boot.lds those are already added to .text section by the linker.
That patch could not be tested but the resulting u-boot.map still looks good. The start symbol is at 0xB0000000, the environment at 0xB0008000 so u-boot should boot.
--- board/purple/u-boot.lds | 5 ----- 1 files changed, 0 insertions(+), 5 deletions(-)
board/purple/u-boot.lds +0 -5
@@ -36,11 +36,6 @@ SECTIONS { arch/mips/cpu/start.o (.text) board/purple/lowlevel_init.o (.text) - arch/mips/cpu/cache.o (.text) - common/main.o (.text) - common/dlmalloc.o (.text) - common/cmd_boot.o (.text) - lib/zlib.o (.text) . = DEFINED(env_offset) ? env_offset : .; common/env_embedded.o (.ppcenv)
--
1.7.3.5
PATCH 2/3 MIPS: Purple: Fix multiple definition error on final linking of u-boot binary
Quoted 4 lines · daniel.schwierzeck at googlemail.com
The linker of recent toolchains complains about multiple definitions on final linking of u-boot binary. This patch removes all redundant object files from
u-boot.ldsthose are already added to .text section by the linker.
Confirmed.
Quoted 3 lines
That patch could not be tested but the resulting u-boot.map still looks good. The start symbol is at
0xB0000000, the environment at0xB0008000so u-boot should boot.
Agreed.
board/purple/u-boot.lds SECTIONS · line 40
Quoted 13 lines
board/purple/u-boot.lds +0
-5@@ -36,11 +36,6 @@ SECTIONS { arch/mips/cpu/start.o (.text) board/purple/lowlevel_init.o (.text) - arch/mips/cpu/cache.o (.text) - common/main.o (.text) - common/dlmalloc.o (.text) - common/cmd_boot.o (.text) - lib/zlib.o (.text) . = DEFINED(env_offset) ? env_offset : .; common/env_embedded.o (.ppcenv)
This is ok, though we have some room for further cealnups. With having .text statement in the lowlevel_init.S, we could remove all these lines.
Applied anyway, thanks for the patch.
PATCH 2/3 MIPS: Purple: Fix multiple definition error on final linking of u-boot binary
Dear Shinya Kuribayashi,
Quoted 17 lines · In message <[email protected]> you wrote:
Quoted 4 lines
board/purple/u-boot.lds SECTIONS · line 40
Quoted 10 lines
board/purple/u-boot.lds +0
-5@@ -36,11 +36,6 @@ SECTIONS { arch/mips/cpu/start.o (.text) board/purple/lowlevel_init.o (.text) - arch/mips/cpu/cache.o (.text) - common/main.o (.text) - common/dlmalloc.o (.text) - common/cmd_boot.o (.text) - lib/zlib.o (.text) . = DEFINED(env_offset) ? env_offset : .; common/env_embedded.o (.ppcenv)This is ok, though we have some room for further cealnups. With having .text statement in the
lowlevel_init.S, we could remove all these lines.
The prupose of explicitly pulling in these objects at that place is to fill in the first flash sector below the sector(s) that is/are reserved for the environment (we call this setup "embedded environment").
But then, the Purple board has not been actively maintained for years, and I guess we could as well remove it. At least I have not had access to this board for several yars.
Best regards,
Wolfgang Denk
Signature · 6 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de The more complex the mind, the greater the need for the simplicity of play. -- Kirk, "Shore Leave", stardate 3025.8
PATCH 3/3 MIPS: dbau1x00: Disable compilation of flash driver stub
In reply to daniel.schwierzeck at googlemail.comAll dbau1x00 boards use the CFI driver so this stub driver is useless and should not be compiled.
This patch fixes the error:
u-boot-git/board/dbau1x00/flash.c:34: multiple definition of flash_init' drivers/mtd/libmtd.o:u-boot-git/drivers/mtd/cfi_flash.c:2084: first defined here board/dbau1x00/libdbau1x00.o: In function write_buff':u-boot-git/board/dbau1x00/flash.c:40: multiple definition of `write_buff' drivers/mtd/libmtd.o:u-boot-git/drivers/mtd/cfi_flash.c:1265: first defined here
--- board/dbau1x00/Makefile | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
board/dbau1x00/Makefile +1 -1
@@ -25,7 +25,7 @@ include $(TOPDIR)/config.mk LIB = $(obj)lib$(BOARD).o -COBJS = $(BOARD).o flash.o +COBJS = $(BOARD).o SOBJS = lowlevel_init.o SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
--
1.7.3.5
PATCH 3/3 MIPS: dbau1x00: Disable compilation of flash driver stub
Hi Daniel,
Quoted 11 lines · On Thursday 03 February 2011 12:59:52 daniel.schwierzeck at googlemail.com…
All dbau1x00 boards use the CFI driver so this stub driver is useless and should not be compiled.
This patch fixes the error:
u-boot-git/board/dbau1x00/flash.c:34: multiple definition offlash_init' drivers/mtd/libmtd.o:u-boot-git/drivers/mtd/cfi_flash.c:2084: first defined here board/dbau1x00/libdbau1x00.o: In functionwrite_buff':u-boot-git/board/dbau1x00/flash.c:40: multiple definition of `write_buff' drivers/mtd/libmtd.o:u-boot-git/drivers/mtd/cfi_flash.c:1265: first defined here
I suggest that you not only disable the compilation of this file, but remove it completely.
Cheers,
Stefan
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: office at denx.de
PATCH 3/3 MIPS: dbau1x00: Disable compilation of flash driver stub
Hi Stefan,
2011/2/3 Stefan Roese <[email protected]>:
Quoted 24 lines
Hi Daniel,
Quoted 18 lines · On Thursday 03 February 2011 12:59:52 daniel.schwierzeck at googlemail.com…
All dbau1x00 boards use the CFI driver so this stub driver is useless
and should not be compiled.
This patch fixes the error:
u-boot-git/board/dbau1x00/flash.c:34: multiple definition of `flash_init'drivers/mtd/libmtd.o:u-boot-git/drivers/mtd/cfi_flash.c:2084: first defined
here
board/dbau1x00/libdbau1x00.o: In function `write_buff':
u-boot-git/board/dbau1x00/flash.c:40: multiple definition of `write_buff'
Quoted 7 lines
Quoted 4 lines
drivers/mtd/libmtd.o:u-boot-git/drivers/mtd/cfi_flash.c:1265: first defined
here
I suggest that you not only disable the compilation of this file, but remove it completely.
Ok I can do that if you and Wolfgang agree
Daniel
PATCH 3/3 MIPS: dbau1x00: Disable compilation of flash driver stub
Dear Daniel Schwierzeck,
Quoted 5 lines · In message <[email protected]> you…
Quoted 3 lines
I suggest that you not only disable the compilation of this file, but remove it completely.
Ok I can do that if you and Wolfgang agree
I do.
Best regards,
Wolfgang Denk
Signature · 6 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
The moral of the story is: "Don't stop to tighten your shoe laces
during the Olympics 100m finals".
- Kevin Jones in <[email protected]>