Hi  "������",

This is what you may want to do:

1)      Make sure you also have a "clean" installation with all the tools
and compilers working properly. I started with a "fresh" installation of
RedHat v5.2 on a x86 PC.
2)      Read http://www.tazenda.demon.co.uk/phil/arm-tools.html
<http://www.tazenda.demon.co.uk/phil/arm-tools.html)> ,
http://ssdl-redstone.stanford.edu/~zskiraly/salinux/
<http://ssdl-redstone.stanford.edu/~zskiraly/salinux/>  and
http://inkvine.fluff.org/~chris/arm-tools.html
<http://inkvine.fluff.org/~chris/arm-tools.html> . Print a hard copy of
these pages so you can refer to it as you follow my instructions below.
3)      Expand binutils v2.9.1.0.19a (apply patch
binutils-2.9.1.0.19a-arm-diff-981230.gz), EGCS 1.1.1 (apply patch
egcs-1.1.1-arm-diff-990113.gz) and GLIBC 2.1 (expand add ons -
glibc-linuxthreads-2.1.tar.gz and glibc-crypt-2.0.111.tar.gz).
4)      Build and install BINUTILS, EGCS and GLIBC (GLIBC is optional - if
you make a mistake here your system is hosed). You won't be able to compile
the ARM cross GLIBC if you don't have the latest compilers.
5)      Cleanup BINUTILS, EGCS and GLIBC build directories by running "make
distclean" for each of them. You don't want anything left around that could
affect your "arm-linux" cross build that you're about to start.
6)      Create a destination subdirectory. I put it under "/usr/local/arm".
7)      Now build the BINUTILS. Run './configure --target=arm-linux
--prefix=/usr/local/arm', 'make' and 'make install'.
8)      Add your arm-linux BINUTILS to your path
(PATH=/usr/local/arm/bin:$PATH).
9)      Download one of the latest kernel versions and expand it. I
downloaded Linux v2.2.0 and expanded it under '/home/chagas/linux-2.2.0'.
Also download the ARM patch and apply it (you'll need it later). Now create
symbolic links following Phil Blundell's instructions. I created the
'/usr/local/arm/arm-linux/include' directory, then created 'asm' and 'linux'
symbolic links.
10)     You're now ready to build the EGCS "C" compiler. Under the EGCS
subdirectory run './configure --target=arm-linux --prefix=/usr/local/arm'.
As soon as you hit "enter" you'll see something "Configuring for a
i686-pc-linux-gnu host". Write down that information on a piece of paper.
You may need it later. By the time "configure" finishes running a 'Makefile'
has been created.
11)     Modify 'Makefile' to add -Dinhibit_libc in CFLAGS. I just noticed
that Phillip Blundell removed this requirement from his instructions. I'm
not sure if it matters if you leave it out.
12)     Run 'make -i LANGUAGES=c'
13)     Run 'make -i LANGUAGES=c install'. Your cross "C" compiler is now
built and installed.
14)     If your goal is to build ARM-Linux kernels only you're done. Proceed
if you want to build applications.
15)     You need to make sure you have the latest headers. So go under the
directory where you expanded the kernel (v2.2.0), fix the Makefile with
"ARCH := arm" and "CROSS_COMPILE = /usr/local/arm/bin/arm-linux-". Then ran
"make config" followed by "make zImage". It doesn't not matter if the build
is completely successful. You just want to get the headers. Verify if the
headers were created (search for 'version.h' under /include). It might be a
good idea to modify the symbolic links that were created earlier point them
to these new headers (i.e. ln -s /home/chagas/linux-2.2.0/linux/include/asm
asm  and ln -s /home/chagas/linux-2.2.0/linux/include/linux linux) but it
may not be necessary.
16)     Create a separate subdirectory to receive the built GLIBC libraries.
I created a subdirectory called "/usr/local/arm/glibc/arm-linux-glibc". This
will be your "prefix" when building GLIBC.
17)     Now build GLIBC. Run "CC=arm-linux-gcc ./configure arm-linux
--build=i686-pc-linux-gnu --prefix=/usr/local/arm/glibc/arm-linux-glibc
-enable-add-ons --with-headers=/home/chagas/linux-2.2.0/linux/include". Note
the headers now point to the right place. Your "-build" switch is your host
that I asked you to write on a piece of paper. Run "make" and "make
install". This process can take hours.
18)     You may now want to finish building EGCS to get the C++ compiler
built. Go back to 'egcs' and run "./configure --target=arm-linux
--prefix=/usr/local/arm
--with-headers=/usr/local/arm/glibc/arm-linux-glibc/include
--with-libs=/usr/local/arm/glibc/arm-linux-glibc/lib". Note the 'glibc'
library files got copied when running 'configure'. Run 'make LANGUAGES="c
c++" and 'make LANGUAGES="c c++".
19)     DONE!!!! You now have all the ELF cross development tools for ARM.


Please let me know if these instructions work for you and if you had to
modify them.

Regards,

Jason


        ----------
        From:  ������ [SMTP:[EMAIL PROTECTED]]
        Sent:  Wednesday, March 03, 1999 7:58 PM
        To:  Chagas, Jason
        Subject:  Re: HELP - Egcs 1.1.1

        Hi...

        I have a question..


        I use brutus.
        and I will compile ARM-linux.
        so, I installed binutils and EGCS and glibc..

        but.. when I install binutils,
        1> tar zxvf binutils-2.9.1.0.19a.tar.gz
          * I patched binutils.. (using
binutils-2.9.1.0.19a-arm-diff-981230)
        2> - Compile and install binutils-1.9.1.0.19a
          > ./configure --target=arm-linux --prefix=where_you_want
          > make
             errors...
                 ../bfd/.libs/libbfd.a : could not read symbols:
Inout/output error
                 make[1]: *** [size] Error 1
                 make[1]: Leaving directory
'/second/DOWN/binutils/binutils-2.9.1.0.19a/binutils'
                 make: *** [all-binutils] Error2

        hmm..
        I don't know.....  why not..
        help me..

        It is difficult to send my question to mailing list..
        please send me your mail that you sent to mailing list.



        >Tim,
        >
        >Did you find a solution for the problem you described? I followed
        >Christophe's instructions step by step and everything seemed to
work fine
        >(after a few minor ajustments, that is) until I go back to finish
building
        >'EGCS'. That's when it fails with the error:
        >
        >checking whether the C compiler
(/home/chagas/egcs/egcs-1.1.1/gcc/xgcc
        >-B/home/c
        >hagas/egcs/egcs-1.1.1/gcc/ -g -O2 ) works... no
        >configure: error: installation or configuration problem: C compiler
cannot
        >create executables.
        >make: *** [configure-target-libiberty] Error 1
        >
        >Note I tested 'xgcc' and seems to run ok:
        >
        >#./xgcc -v
        >Reading specs from
/usr/local/arm/lib/gcc-lib/arm-linux/egcs-2.91.60/specs
        >gcc version egcs-2.91.60 19990113/philb (egcs-1.1.1 release)
        >
        >Am I missing something?
        >
        >Jason
        >
        >
        > ----------
        > From:  [EMAIL PROTECTED]
        >[SMTP:[EMAIL PROTECTED]]
        > Sent:  Friday, February 19, 1999 3:38 AM
        > To:  Tim Lindquist
        > Cc:  [EMAIL PROTECTED]
        > Subject:  Re: HELP - Egcs 1.1.1
        >
        > Let me sum up stages and tell me where it fails, I'll help you
        >
        > - Compile and install binutils-1.9.1.0.19a
        > ./configure --target=arm-linux --prefix=where_you_want
        > make
        > make install
        > - add where_you_want/bin in your PATH
        > - Untar egcs, patch it, find . -name "*.rej"
        > - enter egcs dir, then ./configure --target=arm-linux --
        > prefix=wher_you_want_the_same
        > - modify makefile to add -Dinhibit-libc in CFLAGS
        > - make -i LANGUAGES=c
        > - make -i LANGUAGES=c install
        >
        > compile glibc, with 
        > prefix=/where_you_want_not_the_same_as_above
        > make, make install
        >
        > go back in egcs,
        > ./configure --prefix=same_place_as_first_time --with-
        > headers=/where_you_put_glibc/include --with-
        > libs=/where_you_put_glibc/lib --target=arm-linux
        > make LANGUAGES="c c++" 
        > make LANGUAGES="c c++" install
        >
        > DONE
        >
        > Christophe
        >
        >
        > > 
        > > > I'm having problems building a cross compiler on solaris.
        > > > When running  make, I get:
        > > >
        > > > checking whether the C compiler (arm-linux-gcc -g -O2 )
works...
        >no
        > > > configure: error: installation or configuration problem: C
        >compiler
        > > > cannot create executables.
        > > > gmake: *** [configure-target-libiberty] Error 1
        > > >
        > > > Before I got to this stage, I had the egcs-1.1.1 source,
        > > > and got 3 patch files for it that I applied consecutively:
        > > >
        > > > egcs-1.1.1-prerelease-2-arm-diff-981117.gz
        > > > egcs-1.1.1-prerelease-2-arm-diff-981117-981124
        > > > egcs-1.1.1-prerelease-2-arm-diff-981124-981125
        > > >
        > > > I got the following message during the final patch:
        > > >
        > > > patching file `gcc/f/intdoc.texi'
        > > > Reversed (or previously applied) patch detected!  Assume -R?
[y]
        > > >
        > > > I created an egcs-1.1.1-build dir, and from there ran:
        > > >
        > > >  ../egcs-1.1.1/configure --target=arm-linux
        > > > --prefix=/home/elph/tjl/work/sw/armlinux/
        > > >
        > > > and then ran make.
        > > >
        > > > What am I doing wrong?
        > > 
        >
        > unsubscribe: body of `unsubscribe linux-arm' to
        >[EMAIL PROTECTED]
        >unsubscribe: body of `unsubscribe linux-arm' to
[EMAIL PROTECTED]
        >
unsubscribe: body of `unsubscribe linux-arm' to [EMAIL PROTECTED]

Reply via email to