Hi George:
Following is the procedure I used for building little endian and big endian
tool chain for strong ARM.
Because I did not have a simulator for strong ARM, the complier is not
tested yet.  I believe it will take a while to build a simulator. In order
to share the experience, I post the procedure to the arm linux-list per your
requirement. In building the toolchain, I also got very helpful information
from Nick Clifton [[EMAIL PROTECTED]], Philip Blundell
[[EMAIL PROTECTED]], and Erik Mouw [[EMAIL PROTECTED]  If there
is any error in the procedure, please let me know.

1. Little endian
   1.1 Code base
       binutils-2.9.5.0.29.tar.gz
       gcc-2.95.2.tar.gz
       gcc-2.95.2-diff-991022.gz 
       gcc-2.95.2-inhibitlibc-back-patch.gz
       gcc-2.95-libobjc.patch.gz
       glibc-2.1.3.tar.gz
       glibc-linuxthreads-2.1.3.tar.gz
       glibc-crypt-2.1.3.tar.gz (You have to be in US to download this file
from a US site)
       Linux-2.2.12.tar.gz
       linux-2.2.12rmk1-cvs990915.diff.gz
   1.2 untar all the *.tar.gz files, apply the patches to the corresponding
sourcs tree like
       your-dir/arm-build-src/binutils-2.9.5.0.29
       your-dir/arm-build-src/gcc-2.95.2
       your-dir/arm-build-src/glibc-2.1.3
       your-dir/arm-build-arc/linux-2.2.12
   1.3 Create build dircetory as following:
       your-dir/armbuild/binutils-2.9.5.0.29
       your-dir/armbuild/gcc-2.95.2
       your-dir/armbuild/glibc-2.1.3
       your-dir./armbuild/linux-2.2.12
   1.4 Create a /usr/local/arm for install the toolchain
       %mkdir /usr/local/arm
   1.5 %cd you-dir/armbuild/binutils-2.9.5.0.29
       %your-dir/arm-build-src/binutils-2.9.5.0.29/configure
--target=arm-linux --prefix=/usr/local/arm
       %make
       %make install
   1.6 Make linux kernel headers
         %cd your-dir/linux-2.1.2/linux
       %Make menuconfigure
       Select the ARM platform (I used SA110)
       %make dep
   1.7 Copy Linux header files
       %cd /usr/local/arm/arm-linux
         %mkdir include
       %cd include
       %copy -dR you-dir/linux-2.2.12/linxu/include/asm-arm asm
       %copy -dR you-dir/linux-2.2.12/linxu/include/linux linux
   1.8 Build gcc for c
       %cd your-dir/armbuild/gcc-2.9.2
       %your-dir/arm-build-src/gcc-2.95.2/configure --target=arm-linux
--prefix=/usr/local/arm
       %make LANGUAGES="c"
       %make install
   1.9 Build glibc
       %cd your-dir/armbuild/glibc-2.1.3
       %CC=arm-linuc-gcc you-dir/arm-build-src/glibc-2.1.3/configure
arm-linux --build=i686-pc-linux-gnu 
        --prefix=/usr/local/arm/arm-linux --enable-add-ons
       %make
       %make install
   1.10 Modify gcc-2.95.2/gcc/config/arm/t-linux  (From George France)
        Use your favorite editor to modify the file 't-linux' to remove
         '-Dinhibit_libc -D__gthr_posix_h' to the line that starts
         'TARGET_LIBGCC2_CFLAGS = -fomit-frame-pointer -fPIC.  This is
change the
         TARGET_LIBGCC2_CFLAGS = -fomit-frame-pointer -fPIC -Dinhibit_libc
         -D__gthr_posix_h
         To
          TARGET_LIBGCC2_CFLAGS = -fomit-frame-pointer - fPIC

    1.11 Modify basic.c file in /your-dir/arm-build-src/gcc-2.95.2/libchill
(From George France)
         inserting after line 40 a new line "#define PATH_MAX 4095".
    1.12 Re-build c and c++ 
       %cd your-dir/armbuild/gcc-2.9.2
       %your-dir/arm-build-src/gcc-2.95.2/configure --target=arm-linux
--prefix=/usr/local/arm
       %make LANGUAGES="c c++"
       %make install
    1.13 Compile Linux kernel
       Modify the Makefile to do
       CROSS_COMPILE=arm-linux-
       modify /linux/-2.2.12/arch/arm/vmlinux-armo.lds and vmlinux-armv.lds
        change elf32-arm to elf32-littlearm
       %make zImage
2. Big endian
   2.1 Code base
       binutils-2.9.5.0.29.tar.gz
       gcc-2.95.2.tar.gz
       gcc-2.95.2-diff-991022.gz 
       gcc-2.95.2-inhibitlibc-back-patch.gz
       gcc-2.95-libobjc.patch.gz
       glibc-2.1.3.tar.gz
       glibc-linuxthreads-2.1.3.tar.gz
       glibc-crypt-2.1.3.tar.gz (You have to be in US to download this file
from a US site)
       Linux-2.2.12.tar.gz
       linux-2.2.12rmk1-cvs990915.diff.gz
   2.2 untar all the *.tar.gz files, apply the patches to the corresponding
sourcs tree like
       your-dir/arm-build-src/binutils-2.9.5.0.29
       your-dir/arm-build-src/gcc-2.95.2
       your-dir/arm-build-src/glibc-2.1.3
       your-dir/arm-build-arc/linux-2.2.12
   2.3 Create build dircetory as following:
       your-dir/armbuild/binutils-2.9.5.0.29
       your-dir/armbuild/gcc-2.95.2
       your-dir/armbuild/glibc-2.1.3
       your-dir/armbuild/linux-2.2.12
   2.4 Create a /usr/local/arm for install the toolchain
       %mkdir /usr/local/arm
   2.5 %cd you-dir/armbuild/binutils-2.9.5.0.29
       %your-dir/arm-build-src/binutils-2.9.5.0.29/configure
--target=armv4b-unknow-linux 
        --prefix=/usr/local/arm
       %make
       %make install
   2.6 Make linux kernel headers
         %cd your-dir/linux-2.1.2/linux
       %Make menuconfigure
       Select the ARM platform (I used SA110)
       %make dep
   2.7 Copy Linux header files
       %cd /usr/local/arm/armv4b-unknow-linux
         %mkdir include
       %cd include
       %copy -dR you-dir/linux-2.2.12/linxu/include/asm-arm asm
       %copy -dR you-dir/linux-2.2.12/linxu/include/linux linux
   2.8 Build gcc for c (add -mbig-endian compile option)
       %cd your-dir/armbuild/gcc-2.9.2
       %your-dir/arm-build-src/gcc-2.95.2/configure
--target=armv4b-unknow-linux --prefix=/usr/local/arm
       %make LANGUAGES="c"
       %make install
   2.9 Build glibc (use -mbig-endian as the complie option)  
       %cd your-dir/armbuild/glibc-2.1.3
       %CC=arm-linuc-gcc you-dir/arm-build-src/glibc-2.1.3/configure
armv4b-unknow-linux --build=i686-
        pc-linux-gnu --prefix=/usr/local/arm/arm-linux --enable-add-ons
       %make
       %make install
   2.10 Modify gcc-2.95.2/gcc/config/arm/t-linux  (From George France)
        Use your favorite editor to modify the file 't-linux' to remove
         '-Dinhibit_libc -D__gthr_posix_h' to the line that starts
         'TARGET_LIBGCC2_CFLAGS = -fomit-frame-pointer -fPIC.  This is
change the
         TARGET_LIBGCC2_CFLAGS = -fomit-frame-pointer -fPIC -Dinhibit_libc
         -D__gthr_posix_h
         To
          TARGET_LIBGCC2_CFLAGS = -fomit-frame-pointer - fPIC

    2.11 Modify basic.c file in /your-dir/arm-build-src/gcc-2.95.2/libchill
(From George France)
         inserting after line 40 a new line "#define PATH_MAX 4095".
    2.12 Re-build c and c++ 
       %cd your-dir/armbuild/gcc-2.9.2
       %your-dir/arm-build-src/gcc-2.95.2/configure
--target=armv4b-unknow-linux --prefix=/usr/local/arm
       %make LANGUAGES="c c++"
       %make install
    2.13 Compile Linux kernel
       Modify the Makefile to do
       CROSS_COMPILE=armv4b-unknow-linux-
       modify /linux/-2.2.12/arch/arm/vmlinux-armo.lds and vmlinux-armv.lds
        change elf32-arm to elf32-bigarm
       add -mbig-endian as one of the complie options 
       %make zImage    

Regards.

David

------Impoertant note----------------
Opinions expressed are those of the author and do not represent my employer


unsubscribe: body of `unsubscribe linux-arm' to [EMAIL PROTECTED]
++        Please use [EMAIL PROTECTED] for           ++
++                        kernel-related discussions.                      ++

Reply via email to