Cross-compiling NetBSD for arm

Cross-compiling NetBSD for arm

Post by Kyle Unic » Wed, 24 Apr 2002 06:16:00



I am cross-compiling NetBSD for xscale on an i386 and I get the following
errors after some time of compiling.  Does anyone know how to fix this?

I execute the following command :

./build.sh -a arm -m i386 -D /usr/xscale/bin -O /usr/xscale/obj -T
/usr/xscale/tools

And it goes for quite a while and then I get this output:

/usr/xscale/tools/bin/arm--netbsdelf-gcc -O2 -fPIC -Wall -Wstrict-prototypes
 -Wm
issing-prototypes -Wpointer-arith -Wno-uninitialized -Wreturn-type -Wpointer
-ari
th -Wswitch -Wshadow    -I- -I/usr/src/lib/csu/arm_elf -DLIBC_SCCS -DPIC -DD
YNAM
IC -DELFSIZE=32 -I/usr/src/lib/csu/arm_elf/../../../libexec/ld.elf_so -I/usr
/src
/lib/csu/arm_elf/../common_elf -I/usr/src/lib/csu/arm_elf/../../libc/dlfcn -
DDWA
RF2_EH -DJCR -DDSO_HANDLE -nostdinc -isystem
/usr/xscale/bin/usr/include  -c -DC
RT0 /usr/src/lib/csu/arm_elf/crt0.c -o crt0.o
/var/tmp/ccZQUgOd.s: Assembler messages:
/var/tmp/ccZQUgOd.s:38: Error: Internal_relocation (type 212) not fixed up
(IMME
DIATE)
*** Error code 1

Stop.
nbmake: stopped in /usr/src/lib/csu/arm_elf
*** Error code 1

Stop.
nbmake: stopped in /usr/src/lib/csu/arm_elf
*** Error code 1

 
 
 

Cross-compiling NetBSD for arm

Post by Ben Harr » Wed, 24 Apr 2002 20:06:59




>I am cross-compiling NetBSD for xscale on an i386 and I get the following
>errors after some time of compiling.  Does anyone know how to fix this?

>I execute the following command :

>./build.sh -a arm -m i386 -D /usr/xscale/bin -O /usr/xscale/obj -T
>/usr/xscale/tools

Erm, -a and -m both specify the target system type.  You can't set the
target MACHINE to i386 while setting the MACHINE_ARCH to arm -- it won't
work.

[ usually, MACHINE_ARCH is fully determined by MACHINE, but there are some
  cases where there are two ABIs you could use on the same hardware (e.g.
  sparc64 vs sparc on sparc64 hardware) ]

--
Ben Harris
Unix Support, University of Cambridge Computing Service.
  If I wanted to speak for the University, I'd be in ucam.comp-serv.announce.

 
 
 

Cross-compiling NetBSD for arm

Post by Kyle Unic » Wed, 24 Apr 2002 23:09:42


Thanks,
I thought that the -a was for the target architecture and the -m was for the
local (running on) architecture.
Kyle



> >I am cross-compiling NetBSD for xscale on an i386 and I get the following
> >errors after some time of compiling.  Does anyone know how to fix this?

> >I execute the following command :

> >./build.sh -a arm -m i386 -D /usr/xscale/bin -O /usr/xscale/obj -T
> >/usr/xscale/tools

> Erm, -a and -m both specify the target system type.  You can't set the
> target MACHINE to i386 while setting the MACHINE_ARCH to arm -- it won't
> work.

> [ usually, MACHINE_ARCH is fully determined by MACHINE, but there are some
>   cases where there are two ABIs you could use on the same hardware (e.g.
>   sparc64 vs sparc on sparc64 hardware) ]

> --
> Ben Harris
> Unix Support, University of Cambridge Computing Service.
>   If I wanted to speak for the University, I'd be in

ucam.comp-serv.announce.
 
 
 

Cross-compiling NetBSD for arm

Post by Kyle Unic » Sat, 27 Apr 2002 01:27:02


Actually this has turned into an iterative process of debugging the build
for cross-compiling ARM on i386.  Most of the problems are in the headers,
and the fact the 386 assembly is used in macros for ARM type functions...
Kyle

> Thanks,
> I thought that the -a was for the target architecture and the -m was for
the
> local (running on) architecture.
> Kyle




> > >I am cross-compiling NetBSD for xscale on an i386 and I get the
following
> > >errors after some time of compiling.  Does anyone know how to fix this?

> > >I execute the following command :

> > >./build.sh -a arm -m i386 -D /usr/xscale/bin -O /usr/xscale/obj -T
> > >/usr/xscale/tools

> > Erm, -a and -m both specify the target system type.  You can't set the
> > target MACHINE to i386 while setting the MACHINE_ARCH to arm -- it won't
> > work.

> > [ usually, MACHINE_ARCH is fully determined by MACHINE, but there are
some
> >   cases where there are two ABIs you could use on the same hardware
(e.g.
> >   sparc64 vs sparc on sparc64 hardware) ]

> > --
> > Ben Harris
> > Unix Support, University of Cambridge Computing Service.
> >   If I wanted to speak for the University, I'd be in
> ucam.comp-serv.announce.

 
 
 

Cross-compiling NetBSD for arm

Post by Ben Harr » Sat, 27 Apr 2002 01:37:10




>Actually this has turned into an iterative process of debugging the build
>for cross-compiling ARM on i386.  Most of the problems are in the headers,
>and the fact the 386 assembly is used in macros for ARM type functions...

Erm, you shouldn't have any such problems.  I do cross-compiles from both
NetBSD/macppc and Linux/i386 to NetBSD/arm every few days, and while there
are often temporary glitches, they mostly work.

Tell me what the particular problems are, and I'll see if I can work out
what's going wrong.

--
Ben Harris
Unix Support, University of Cambridge Computing Service.
  If I wanted to speak for the University, I'd be in ucam.comp-serv.announce.

 
 
 

Cross-compiling NetBSD for arm

Post by Kyle Unic » Sat, 27 Apr 2002 08:27:23


Appreciate the efforts Ben.  This is the command I execute.
./build.sh -a arm -R /usr/xscale/release -D /usr/xscale/bin -O
/usr/xscale/obj -T /usr/xscale/tools
Most of the problems come when the directory
/usr/xscale/bin/usr/include/machine directory has a copy of the
/usr/src/sys/arch/i386/include directory instead of the
/usr/src/sys/arch/arm/include directory.
This causes problems with "struct reg", elf loader, bswap macros, profiling
macros.  What I have been doing is replacing the problem header in the
/usr/src/sys/arch/i386/include/ with the one from
/usr/src/sys/arch/arm/include directory.

I am trying to find the makefile that sets up these directories... but so
far no luck.
Kyle

2>&1 | tee log.txt



> >Actually this has turned into an iterative process of debugging the build
> >for cross-compiling ARM on i386.  Most of the problems are in the
headers,
> >and the fact the 386 assembly is used in macros for ARM type functions...

> Erm, you shouldn't have any such problems.  I do cross-compiles from both
> NetBSD/macppc and Linux/i386 to NetBSD/arm every few days, and while there
> are often temporary glitches, they mostly work.

> Tell me what the particular problems are, and I'll see if I can work out
> what's going wrong.

> --
> Ben Harris
> Unix Support, University of Cambridge Computing Service.
>   If I wanted to speak for the University, I'd be in

ucam.comp-serv.announce.
 
 
 

Cross-compiling NetBSD for arm

Post by Frederick Bruckm » Sat, 27 Apr 2002 11:08:34




Quote:> Appreciate the efforts Ben.  This is the command I execute.
> ./build.sh -a arm -R /usr/xscale/release -D /usr/xscale/bin -O
> /usr/xscale/obj -T /usr/xscale/tools

You need to supply an "-m" argument, or else set ${MACHINE}
in the environment. "-m" implies "-a", but not vice-versa.

--
Frederick

 
 
 

Cross-compiling NetBSD for arm

Post by Kyle Unic » Sat, 27 Apr 2002 13:41:45


Yes I am trying:
./build.sh -a arm -m evbarm -R....
We will let you know how it goes in a couple of hours.
Kyle



> > Appreciate the efforts Ben.  This is the command I execute.
> > ./build.sh -a arm -R /usr/xscale/release -D /usr/xscale/bin -O
> > /usr/xscale/obj -T /usr/xscale/tools

> You need to supply an "-m" argument, or else set ${MACHINE}
> in the environment. "-m" implies "-a", but not vice-versa.

> --
> Frederick

 
 
 

Cross-compiling NetBSD for arm

Post by Mike Pumfo » Sun, 28 Apr 2002 04:31:18




>I am cross-compiling NetBSD for xscale on an i386 and I get the following
>errors after some time of compiling.  Does anyone know how to fix this?

>I execute the following command :

>./build.sh -a arm -m i386 -D /usr/xscale/bin -O /usr/xscale/obj -T

                   ^^^^^^^
This is what is biting you. You need to specify a valid arm port name here.
e.g
acorn32
evbarm
hpcarm
netwinder
cats

Once you do this the -a argument will be unneccesary.

You are trying to compile with
MACHINE=i386
MACHINE_ARCH=arm

Since these both relate to the target architecture the combination you
specify makes little sense.

I have done a couple of cross builds from i386 to arm with
./build.sh -m acorn32 -D /misc/armroot -T /misc/tools

Mike

 
 
 

Cross-compiling NetBSD for arm

Post by Kyle Unic » Mon, 29 Apr 2002 09:04:57


Thanks... Yea that was the problem.  Actually it is build.sh -a arm -m
evbarm that works for me.



> >I am cross-compiling NetBSD for xscale on an i386 and I get the following
> >errors after some time of compiling.  Does anyone know how to fix this?

> >I execute the following command :

> >./build.sh -a arm -m i386 -D /usr/xscale/bin -O /usr/xscale/obj -T
>                    ^^^^^^^
> This is what is biting you. You need to specify a valid arm port name
here.
> e.g
> acorn32
> evbarm
> hpcarm
> netwinder
> cats

> Once you do this the -a argument will be unneccesary.

> You are trying to compile with
> MACHINE=i386
> MACHINE_ARCH=arm

> Since these both relate to the target architecture the combination you
> specify makes little sense.

> I have done a couple of cross builds from i386 to arm with
> ./build.sh -m acorn32 -D /misc/armroot -T /misc/tools

> Mike

 
 
 

Cross-compiling NetBSD for arm

Post by Mike Pumfo » Thu, 02 May 2002 03:57:08




>Thanks... Yea that was the problem.  Actually it is build.sh -a arm -m
>evbarm that works for me.

I think the -a arm is unnecessary but harmless. I should have guessed it
was evbarm based on the xscale in your compile tools path.

Glad you got it going.

Mike

 
 
 

1. ARM cross compile problem

Hi I would like to transfer some app server to ARM embedded system , we got
error not found tcpd.h .

This file looks like from TCP Wrapper RPM , uClibc does not has it .

How can I resolve it , find another function and C library , or get and
compiler its tarball to make install ?

Thank for your teaching

2. DMA and CURRENT->buffer

3. How hard is it to cross compile to Linux/ARM?

4. ATI Rage Fury Maxx and X?

5. cross compiling for embedded ARM

6. Looking for driver for 3D Blaster Annihilator 2

7. cross compile ncurses for arm

8. sharing files between RH6.0 & WIN98

9. ARM cross compiling

10. NetBSD kernel cross compiling

11. Cross-compiling Linux -> NT ?

12. cross-compiling kernel 2.4.x for MIPS ?

13. Cross-Compiling