Linux MIPS Architecture development
 help / color / mirror / Atom feed
* linker script problem
@ 2004-03-26 12:49 Thomas Koeller
  2004-03-26 12:57 ` Thiemo Seufer
  0 siblings, 1 reply; 5+ messages in thread
From: Thomas Koeller @ 2004-03-26 12:49 UTC (permalink / raw)
  To: linux-mips

Hi,

I just ran into the folowing problem when building a kernel.
This is the first time I build a MIPS kernel, and so I may
be making mistakes. Here's what I found:

When building the kernel, the linker chokes on
arch/mips/kernel/vmlinux.lds.s, because it contains

OUTPUT_ARCH(mips)
ENTRY(kernel_entry)
jiffies = jiffies_64 + 4;
SECTIONS
{
  . = ;
 *** ^ ***

This has been generated from arch/mips/kernel/vmlinux.lds.S,
which contains

  . = LOADADDR;

which is in turn generated from arch/mips/kernel/.vmlinux.lds.s.cmd,
which contains

cmd_arch/mips/kernel/vmlinux.lds.s := mips-linux-gcc -E -Wp,-MD,arch/mips/kernel/.vmlinux.lds.s.d -nostdinc -iwithprefix include -D__KERNEL__ -Iinclude  -D__KERNEL__ -Iinclude  -D__ASSEMBLY__ -I /home/GERMANY/tkoeller/mips-linux/build/linux/include/asm/gcc -G 0 -mno-abicalls -fno-pic -pipe  -finline-limit=100000 -mabi=32 -march=r5000 -Wa,-32 -Wa,-march=r5000 -Wa,-mips4 -Wa,--trap -Iinclude/asm-mips/mach-generic  -D__KERNEL__ -Iinclude  -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -I /home/GERMANY/tkoeller/mips-linux/build/linux/include/asm/gcc -G 0 -mno-abicalls -fno-pic -pipe  -finline-limit=100000 -mabi=32 -march=r5000 -Wa,-32 -Wa,-march=r5000 -Wa,-mips4 -Wa,--trap -Iinclude/asm-mips/mach-generic  -O2 -fomit-frame-pointer  -D"LOADADDR=" -D"JIFFIES=jiffies_64 + 4" -imacros /home/GERMANY/tkoeller/mips-linux/build/linux/include/asm-mips/sn/mapped_kernel.h -P -C -Umips    -o arch/mips/kernel/vmlinux.lds.s arch/mips/kernel/vmlinux.lds.S 

in line #1. The -D"LOADADDR=" looks suspicious, but I
have not been able to trace the problem beyond this point.

Can anybody help out?

tk
-- 
--------------------------------------------------

Thomas Koeller, Software Development
Basler Vision Technologies

thomas dot koeller at baslerweb dot com
http://www.baslerweb.com

==============================

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

* Re: linker script problem
  2004-03-26 12:49 linker script problem Thomas Koeller
@ 2004-03-26 12:57 ` Thiemo Seufer
  2004-03-26 13:55   ` Thomas Koeller
  0 siblings, 1 reply; 5+ messages in thread
From: Thiemo Seufer @ 2004-03-26 12:57 UTC (permalink / raw)
  To: Thomas Koeller; +Cc: linux-mips

Thomas Koeller wrote:
[snip]
> in line #1. The -D"LOADADDR=" looks suspicious, but I
> have not been able to trace the problem beyond this point.

You haven't told what target you are compiling for. LOADADDR should
be defined in arch/mips*/Makefile for every subarchitecture.


Thiemo

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

* Re: linker script problem
  2004-03-26 12:57 ` Thiemo Seufer
@ 2004-03-26 13:55   ` Thomas Koeller
  2004-03-26 14:13     ` Maciej W. Rozycki
  2004-03-26 14:21     ` Thiemo Seufer
  0 siblings, 2 replies; 5+ messages in thread
From: Thomas Koeller @ 2004-03-26 13:55 UTC (permalink / raw)
  To: Thiemo Seufer; +Cc: linux-mips

Thiemo Seufer wrote:
> You haven't told what target you are compiling for. LOADADDR should
> be defined in arch/mips*/Makefile for every subarchitecture.

Thanks for the hint. My target is the PMC-Sierra Yosemite evaluation
board. I found that this board has no entry in arch/mips/Makefile,
which explains why LOADADDR is unset. Can you point me at some useful
information about how to choose a sensible load address? Will the RAM
base address do?

Btw. if I get this right and want to contribute a patch, what are the
rules for doing so? Would I need to provide some legal stuff (copyright
assignment) first?

tk
-- 
--------------------------------------------------

Thomas Koeller, Software Development
Basler Vision Technologies

thomas dot koeller at baslerweb dot com
http://www.baslerweb.com

==============================

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

* Re: linker script problem
  2004-03-26 13:55   ` Thomas Koeller
@ 2004-03-26 14:13     ` Maciej W. Rozycki
  2004-03-26 14:21     ` Thiemo Seufer
  1 sibling, 0 replies; 5+ messages in thread
From: Maciej W. Rozycki @ 2004-03-26 14:13 UTC (permalink / raw)
  To: Thomas Koeller; +Cc: Thiemo Seufer, linux-mips

On Fri, 26 Mar 2004, Thomas Koeller wrote:

> Thanks for the hint. My target is the PMC-Sierra Yosemite evaluation
> board. I found that this board has no entry in arch/mips/Makefile,
> which explains why LOADADDR is unset. Can you point me at some useful
> information about how to choose a sensible load address? Will the RAM
> base address do?

 A KSEG0 address of the beginning of RAM is a reasonable choice unless 
your firmware reserves some space for own needs.

> Btw. if I get this right and want to contribute a patch, what are the
> rules for doing so? Would I need to provide some legal stuff (copyright
> assignment) first?

 Just send patches here, cc-ing ones you consider ready for inclusion to
Ralf Baechle.

-- 
+  Maciej W. Rozycki, Technical University of Gdansk, Poland   +
+--------------------------------------------------------------+
+        e-mail: macro@ds2.pg.gda.pl, PGP key available        +

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

* Re: linker script problem
  2004-03-26 13:55   ` Thomas Koeller
  2004-03-26 14:13     ` Maciej W. Rozycki
@ 2004-03-26 14:21     ` Thiemo Seufer
  1 sibling, 0 replies; 5+ messages in thread
From: Thiemo Seufer @ 2004-03-26 14:21 UTC (permalink / raw)
  To: Thomas Koeller; +Cc: linux-mips

Thomas Koeller wrote:
> Thiemo Seufer wrote:
> > You haven't told what target you are compiling for. LOADADDR should
> > be defined in arch/mips*/Makefile for every subarchitecture.
> 
> Thanks for the hint. My target is the PMC-Sierra Yosemite evaluation
> board. I found that this board has no entry in arch/mips/Makefile,
> which explains why LOADADDR is unset. Can you point me at some useful
> information about how to choose a sensible load address? Will the RAM
> base address do?

The documentation of the board should tell. Usually the first few pages
are already in use by exception handlers and firmware.

> Btw. if I get this right and want to contribute a patch, what are the
> rules for doing so? Would I need to provide some legal stuff (copyright
> assignment) first?

For the linux kernel there is no central instance holding the copyrights,
so no assignment is necessary. Of course, the patch must be licensed
under the same terms as Linux itself, which is GPL v2.


Thiemo

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

end of thread, other threads:[~2004-03-26 14:21 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-03-26 12:49 linker script problem Thomas Koeller
2004-03-26 12:57 ` Thiemo Seufer
2004-03-26 13:55   ` Thomas Koeller
2004-03-26 14:13     ` Maciej W. Rozycki
2004-03-26 14:21     ` Thiemo Seufer

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