public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot-Users] Linking problem on new port
@ 2005-06-29 12:19 Richard Danter
  2005-06-29 13:29 ` Wolfgang Denk
  2005-06-29 13:29 ` [U-Boot-Users] Linking problem on new port -- SOLVED Richard Danter
  0 siblings, 2 replies; 3+ messages in thread
From: Richard Danter @ 2005-06-29 12:19 UTC (permalink / raw)
  To: u-boot

Hi all,

I have been using U-Boot for a while, but this is the first time I have 
tried to port it to a new board myself, so please consider me a newbie!

I have a problem linking U-Boot for my new board. I know this is my 
fault, I have missed something in the setup, can anyone point out what 
it is that is missed?

The compile stage works, this is what I see when I try to link:

----
ppc_74xx-ld -Bstatic -T 
/usr/home/wb231-le11/Workspace/u-boot/board/ppmc7xx/u-boot.lds -Ttext 
-n $UNDEF_SYM cpu/74xx_7xx/start.o \
                 --start-group lib_generic/libgeneric.a 
board/ppmc7xx/libppmc7xx.a cpu/74xx_7xx/lib74xx_7xx.a lib_ppc/libppc.a 
fs/cramfs/libcramfs.a fs/fat/libfat.a fs/fdos/libfdos.a 
fs/jffs2/libjffs2.a fs/reiserfs/libreiserfs.a fs/ext2/libext2fs.a 
net/libnet.a disk/libdisk.a rtc/librtc.a dtt/libdtt.a 
drivers/libdrivers.a drivers/sk98lin/libsk98lin.a post/libpost.a 
post/cpu/libcpu.a common/libcommon.a --end-group -L 
/opt/eldk3.1.1/usr/bin/../lib/gcc-lib/ppc-linux/3.3.3/m7400/pic -lgcc \
                 -Map u-boot.map -o u-boot
ppc_74xx-ld: invalid hex number `-n'
----

The $UNDEF_SYM is obviously wrong (I think!).

I am not surprised if I have missed things, so far I have written just a 
skeleton for the board support, even if it links it won't run yet. I 
have been adding things as needed, but I just can't find what is missing 
here. Any suggestions?

I'd like to ask another question too whilst I'm here. I have a single 
bank of Flash running from 0xFFC00000 to 0xFFFFFFFF. I want U-Boot to be 
placed at 0xFFF00000 with the entry point at 0xFFF00100. Am I right to 
set the following? If not, how do I achieve this?

#define CFG_FLASH_BASE   0xFFC00000
#define CFG_MONITOR_BASE 0xFFF00000

Is this related to the problem above?

Many thanks!
Rich

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

* [U-Boot-Users] Linking problem on new port
  2005-06-29 12:19 [U-Boot-Users] Linking problem on new port Richard Danter
@ 2005-06-29 13:29 ` Wolfgang Denk
  2005-06-29 13:29 ` [U-Boot-Users] Linking problem on new port -- SOLVED Richard Danter
  1 sibling, 0 replies; 3+ messages in thread
From: Wolfgang Denk @ 2005-06-29 13:29 UTC (permalink / raw)
  To: u-boot

In message <42C291C0.30909@ntlworld.com> you wrote:
> 
> The compile stage works, this is what I see when I try to link:
> 
> ----
> ppc_74xx-ld -Bstatic -T 
> /usr/home/wb231-le11/Workspace/u-boot/board/ppmc7xx/u-boot.lds -Ttext 
> -n $UNDEF_SYM cpu/74xx_7xx/start.o \

This part of the LDFLAGS variable definition (which holds the  linker
options) comes from the config.mk file:

LDFLAGS += -Bstatic -T $(LDSCRIPT) -Ttext $(TEXT_BASE) $(PLATFORM_LDFLAGS)

As you can see, the "-Ttext" argument should be followed by the  base
address  of  your  text  segment,  which gets defined in your board's
config.mk file; obviously you missed  to  define  TEXT_BASE  in  your
board/<whatever>/config.mk file.

Best regards,

Wolfgang Denk

-- 
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
A star captain's most solemn oath is that he will give his life, even
his entire crew, rather than violate the Prime Directive.
	-- Kirk, "The Omega Glory", stardate unknown

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

* [U-Boot-Users] Linking problem on new port -- SOLVED
  2005-06-29 12:19 [U-Boot-Users] Linking problem on new port Richard Danter
  2005-06-29 13:29 ` Wolfgang Denk
@ 2005-06-29 13:29 ` Richard Danter
  1 sibling, 0 replies; 3+ messages in thread
From: Richard Danter @ 2005-06-29 13:29 UTC (permalink / raw)
  To: u-boot

Richard Danter wrote:
> Hi all,
> 
> I have been using U-Boot for a while, but this is the first time I have 
> tried to port it to a new board myself, so please consider me a newbie!
> 
> I have a problem linking U-Boot for my new board. I know this is my 
> fault, I have missed something in the setup, can anyone point out what 
> it is that is missed?
> 
> The compile stage works, this is what I see when I try to link:
> 
> ----
> ppc_74xx-ld -Bstatic -T 
> /usr/home/wb231-le11/Workspace/u-boot/board/ppmc7xx/u-boot.lds -Ttext -n 
> $UNDEF_SYM cpu/74xx_7xx/start.o \
>                 --start-group lib_generic/libgeneric.a 
> board/ppmc7xx/libppmc7xx.a cpu/74xx_7xx/lib74xx_7xx.a lib_ppc/libppc.a 
> fs/cramfs/libcramfs.a fs/fat/libfat.a fs/fdos/libfdos.a 
> fs/jffs2/libjffs2.a fs/reiserfs/libreiserfs.a fs/ext2/libext2fs.a 
> net/libnet.a disk/libdisk.a rtc/librtc.a dtt/libdtt.a 
> drivers/libdrivers.a drivers/sk98lin/libsk98lin.a post/libpost.a 
> post/cpu/libcpu.a common/libcommon.a --end-group -L 
> /opt/eldk3.1.1/usr/bin/../lib/gcc-lib/ppc-linux/3.3.3/m7400/pic -lgcc \
>                 -Map u-boot.map -o u-boot
> ppc_74xx-ld: invalid hex number `-n'
> ----
> 
> The $UNDEF_SYM is obviously wrong (I think!).
> 
> I am not surprised if I have missed things, so far I have written just a 
> skeleton for the board support, even if it links it won't run yet. I 
> have been adding things as needed, but I just can't find what is missing 
> here. Any suggestions?

Found it! I did not have a definition for TEXT_BASE.

> 
> I'd like to ask another question too whilst I'm here. I have a single 
> bank of Flash running from 0xFFC00000 to 0xFFFFFFFF. I want U-Boot to be 
> placed at 0xFFF00000 with the entry point at 0xFFF00100. Am I right to 
> set the following? If not, how do I achieve this?
> 
> #define CFG_FLASH_BASE   0xFFC00000
> #define CFG_MONITOR_BASE 0xFFF00000
> 
> Is this related to the problem above?

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

end of thread, other threads:[~2005-06-29 13:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-06-29 12:19 [U-Boot-Users] Linking problem on new port Richard Danter
2005-06-29 13:29 ` Wolfgang Denk
2005-06-29 13:29 ` [U-Boot-Users] Linking problem on new port -- SOLVED Richard Danter

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