[U-Boot-Users] u-boot for SC520 - patches for cvs

Hi,
I'm attempting to build u-boot for the SC520, starting with the AMD eval board. The code in cvs doesn't build. With the patch below it builds.
But, the "objdump" to srec fails... If I do the objdump to a binary file I get a 900mb file :-)
obviously objdump is attempting to fill some gap - but how to fix this?
something tells me this behavior is "new" and didn't happen with older objdumps...
also, in case it's interesting I've been able to do a lot of debugging with bochs, using a modified link directive file...
-brad
Index: Makefile =================================================================== RCS file: /cvsroot/u-boot/u-boot/board/sc520_cdp/Makefile,v retrieving revision 1.2 diff -u -r1.2 Makefile --- Makefile 27 Jun 2003 21:32:24 -0000 1.2 +++ Makefile 2 Aug 2003 15:07:27 -0000 @@ -29,7 +29,7 @@ SOBJS := sc520_cdp_asm.o sc520_cdp_asm16.o
$(LIB): $(OBJS) $(SOBJS) - $(AR) crv $@ $(OBJS) + $(AR) crv $@ $(OBJS) $(SOBJS)
clean: rm -f $(SOBJS) $(OBJS) Index: sc520_cdp.c =================================================================== RCS file: /cvsroot/u-boot/u-boot/board/sc520_cdp/sc520_cdp.c,v retrieving revision 1.6 diff -u -r1.6 sc520_cdp.c --- sc520_cdp.c 27 Jun 2003 21:32:24 -0000 1.6 +++ sc520_cdp.c 2 Aug 2003 15:07:27 -0000 @@ -28,7 +28,7 @@ #include <asm/pci.h> #include <asm/ic/sc520.h> #include <asm/ic/ali512x.h> -#include <ssi.h> +#include <spi.h>
#undef SC520_CDP_DEBUG
@@ -557,6 +557,20 @@ } }
+void spi_eeprom_probe(int x) +{ +} + +int spi_eeprom_read(int x, int offset, char *buffer, int len) +{ + return 0; +} + +int spi_eeprom_write(int x, int offset, char *buffer, int len) +{ + return 0; +} +
void spi_init_f(void) { @@ -585,6 +599,9 @@ #endif #ifdef CONFIG_SC520_CDP_USE_MW res = mw_eeprom_read(2, offset, buffer, len); +#endif +#if !defined(CONFIG_SC520_CDP_USE_SPI) && !defined(CONFIG_SC520_CDP_USE_MW) + res = 0; #endif return res; } @@ -606,6 +623,9 @@ #endif #ifdef CONFIG_SC520_CDP_USE_MW res = mw_eeprom_write(2, offset, buffer, len); +#endif +#if !defined(CONFIG_SC520_CDP_USE_SPI) && !defined(CONFIG_SC520_CDP_USE_MW) + res = 0; #endif return res; } Index: u-boot.lds =================================================================== RCS file: /cvsroot/u-boot/u-boot/board/sc520_cdp/u-boot.lds,v retrieving revision 1.3 diff -u -r1.3 u-boot.lds --- u-boot.lds 27 Jun 2003 21:32:24 -0000 1.3 +++ u-boot.lds 2 Aug 2003 15:07:27 -0000 @@ -31,7 +31,7 @@ .text : { *(.text); }
. = ALIGN(4); - .rodata : { *(.rodata) } + .rodata : { *(.rodata) *(.rodata.str1.1) *(.rodata.str1.32) }
. = 0x400000; /* Ram data segment to use */ _i386boot_romdata_dest = ABSOLUTE(.);

Dear Brad,
in message 200308021520.h72FKIM08135@p2.parker.boston.ma.us you wrote:
I'm attempting to build u-boot for the SC520, starting with the AMD eval board. The code in cvs doesn't build. With the patch below it builds.
Thanks, added.
But, the "objdump" to srec fails... If I do the objdump to a binary file I get a 900mb file :-)
obviously objdump is attempting to fill some gap - but how to fix this?
By fixing the bugs in the "u-boot.lds" file.
something tells me this behavior is "new" and didn't happen with older objdumps...
also, in case it's interesting I've been able to do a lot of debugging with bochs, using a modified link directive file...
Well, I have zero knowledge about the x86 stuff, but the "u-boot.lds" file reads:
... . = 0x387c0000; /* Where bootcode in the flash is mapped */ ... . = 0x400000; /* Ram data segment to use */
0x387c0000 - 0x400000 = 899.75 MB
I think I know why you get a 900 MG image, but I cannot give you any hints how to fix that.
Best regards,
Wolfgang Denk

On Sat, Aug 02, 2003 at 07:29:50PM +0200, Wolfgang Denk wrote:
Well, I have zero knowledge about the x86 stuff, but the "u-boot.lds" file reads:
... . = 0x387c0000; /* Where bootcode in the flash is mapped */ ... . = 0x400000; /* Ram data segment to use */
0x387c0000 - 0x400000 = 899.75 MB
I have a faint memory that the problem is the order of the sections. It ought to be OK to specify sparse VMAs as long as the LMAs put the code out in a continuous block.
Cheers.

On Sat, Aug 02, 2003 at 11:20:18AM -0400, Brad Parker wrote:
Hi,
I'm attempting to build u-boot for the SC520, starting with the AMD eval board. The code in cvs doesn't build. With the patch below it builds.
But, the "objdump" to srec fails... If I do the objdump to a binary file I get a 900mb file :-)
In my experience, this behavior is usually a problem with the linker definition file. I'm not certain if it is a bug in the toolchain, or simply some kind of mistake in the lds file.
obviously objdump is attempting to fill some gap - but how to fix this?
something tells me this behavior is "new" and didn't happen with older objdumps...
What version of the compiler are you using?
also, in case it's interesting I've been able to do a lot of debugging with bochs, using a modified link directive file...
Cross compiling, perhaps?
I'm including a link to a version of the linker file that I've used. It may not work as-is for you because I added some sections in order to move code around.
http://ftp.buici.com/pub/u-boot/
There is an linker definition file there as well as an old tar-ball with sources for u-boot that did build.
Cheers.
participants (3)
-
Brad Parker
-
Marc Singer
-
Wolfgang Denk