Greetings all - I am just getting into the Linux arm world in anticipation
of (soon) receiving my EP7212 eval board. The EP721X embedded processors 
are based on ARM 720T cores and are available from Cirrus Logic (info
available at http://www.maverickinside.com/ and http://www.cirrus.com/).

In the mean time I have perused the FAQs, etc to determine what cross
devel suite I need to get setup and what kernels are out there. If anyone
can assist me; ie let me know I am on the wrong path, have the wrong
files/patches/etc I would appreciate it. Here is what I have done so far:

GCC Cross Devel Suite
---------------------

Based on Phil B's cross devel howto: http://www.tazenda.demon.co.uk/phil/arm-tools.html
and other various sites I have put together the following GCC/Glibc cross devel suite
('--target=arm-linux' was used for all compilation):

- binutils-2.10.tar.gz (no patches applied)
- gcc-2.95.1.tar.gz with
  - gcc-2.95-diff-990730.gz 
  - gcc-fold-const.patch.gz 
  - change the link modes, ie change '#if 0' on line 31
       to '#if 1' in gcc/config/arm/linux-elf.h
- glibc-2.1.3.tar.gz with the following add-ons
  - glibc-linuxthreads-2.1.3.tar.gz
  - glibc-crypt-2.1.tar.gz

With this suite I am able to compile and link the Linux kernel, statically
and dynamically linked Linux apps, and standalone apps.

Linux kernel
------------

I have found at least three patches/distros, all for/based on the stock 
2.2.1 Linux kernel:

- the 'jsdiff' patch 2.2.1 by Julian Schroeder from Cirrus's web site
  (http://www.maverickinside.com/sub.cfm?CategoryID=5&SubcategoryID=9)
- the 'Royal Linux' 2.2.1 distro by ISD Corp 
  (http://www.isdcorp.com/royallinux/rl_arm.shtml)
- the 'cb26-benw3' patch 2.2.1 by Ben Williamson
  (ftp://ftp.netwinder.org/users/b/benw/ep7211/)

I have compiled and linked Julian's patch-based kernel, I have not tried
the Royal Linux version (yet) and I am not able to put together (and locate
for that matter) all the patches necessary for Ben's kernel (anyone had
any luck?).

I have created a howto based on my work so far, I will put it on my site 
soon - it's attached to this email in case anyone is interested.

I would appreciate ANY help anyone can provide me. I am interested in getting
1) a complete (and preferably latest-and-greatest, yet that works) GCC/Glibc
cross devel environment, and of course 2) the latest kernel that I can use
on a 720T core/EP721X processors.

Thanks in advance!

- Rod

--

============ Geek Technology at its best: http://nuked.org ===============
``````````````````````````````````````````````````````````````````````````
Rod Moffitt  ICQ# 6696644    Linux: multi-platform, multi-tasking,
[EMAIL PROTECTED]                multi-user, fast & free! http://www.linux.org
PGP RSA KeyID 570A0731       Protect your privacy!     http://www.pgpi.com
http://rodmoffitt.org        Net, s/w & h/w consulting: http://vissitt.com
..........................................................................
========= Where loved ones are remembered: http://memoriam.org ===========

      "How could this be a problem in a country where we have Intel and
       Microsoft?"  --Al Gore on Y2K



ARM-Linux GCC/Glibc/Linux cross-devel How-to (version 0.1) 09/06/2000)

   Rod Moffitt
   [EMAIL PROTECTED]
   http://rodmoffitt.org

1) The target tools directory (aka 'PREFIX' for all the tools) is 
   /usr/local/arm/xdev. The source tarballs for all the tools, etc 
   is /usr/local/arm/gz.

   mkdir /usr/local/arm
   mkdir /usr/local/arm/src
   mkdir /usr/local/arm/xdev
   mkdir /usr/local/arm/gz
   mv <FILES> /usr/local/arm/gz

2) binutils: untar, compile and install binutils

   mkdir /usr/local/arm/armbuild
   cd /usr/local/arm/armbuild
   tar xvzf ../gz/binutils-2.10.tar.gz 
   cd binutils-2.10
   ./configure --target=arm-linux --prefix=/usr/local/arm/xdev
   make
   make install
   make clean
   setenv PATH /usr/local/arm/xdev/bin:$PATH
   rehash

   # /usr/local/arm/xdev/arm-linux will have been created with 
   # the tools under /usr/local/arm/arm-linux/bin and other
   # directories

3) kernel installation - install and patch the kernel.

   cd /usr/local/arm/src
   tar xvzf ../gz/linux-2.2.1.tar.gz 
   mv linux linux-2.2.1
   ln -s linux-2.2.1 linux
   
   mkdir ep72xxlinux
   cd ep72xxlinux/
   unzip /usr/local/arm/gz/ep72xxlinux.zip 

   cd /usr/local/arm/src/linux
   zcat /usr/local/arm/src/ep72xxlinux/jsdiff.gz | patch -p0
   cd ..
   mv linux-2.2.1/ linux-2.2.1-jsdiff
   ln -sf linux-2.2.1-jsdiff linux
   rm -rf linux/include/asm linux/include/asm-arm/arch linux/include/asm-arm/proc

4) Install and compile gcc for 'c' language ONLY (for now).

   cd /usr/local/arm/xdev/include
   ln -s /usr/local/arm/src/linux/include/asm-arm asm
   ln -s /usr/local/arm/src/linux/include/linux linux
   cd /usr/local/arm/xdev/arm-linux
   mkdir include
   ln -s /usr/local/arm/src/linux/include/asm-arm asm
   ln -s /usr/local/arm/src/linux/include/linux linux

   # ensure the linux header files are setup correctly
   cd /usr/local/arm/src/linux
   make oldconfig
   make dep

   # untar and compile gcc
   cd /usr/local/arm/armbuild
   tar xvzf ../gz/gcc-2.95.1.tar.gz 
   cd gcc-2.95.1
   zcat ../../gz/gcc-2.95-diff-990730.gz | patch -p0

   # in the following specify 'gcc/fold-const.c' as the file
   # when patch prompts you)
   zcat ../../gz/gcc-fold-const.patch.gz | patch
   cd ..
   mv gcc-2.95.1 gcc-2.95.1-990730-fold-const
   cd gcc-2.95.1-990730-fold-const/

   # change the link modes, change '#if 0' on line 31
   # to '#if 1' in gcc/config/arm/linux-elf.h
   vim gcc/config/arm/linux-elf.h

   # since this is (most likely) the first time cross
   # gcc for arm has been installed on your system you
   # will need to hack out the use of libc headers since
   # they are not available on your system,
   # add ' -Dinhibit_libc -D__gthr_posix_h' to the end
   # of line 3 which starts with 'TARGET_LIBGCC2_CFLAGS'
   # of 'gcc/config/arm/t-linux', keep a backup of the 
   # line to be restored later when glibc is built, and 
   # thus the headers will be available
   vim gcc/config/arm/t-linux

   ./configure --target=arm-linux --prefix=/usr/local/arm/xdev --disable-threads
   make LANGUAGES="c"
   make LANGUAGES="c" install
   rehash

   # now it is possible to compile and link the linux kernel!
   cd /usr/local/arm/src/linux
   make Image

5) glibc warning: compiling & linking glibc takes A LONG time!

   mkdir /usr/local/arm/glibc
   mkdir /usr/local/arm/glibc/arm-linux-glibc
   cd /usr/local/arm/armbuild
   tar xvzf ../gz/glibc-2.1.3.tar.gz 
   cd glibc-2.1.3/
   tar xvzf ../../gz/glibc-linuxthreads-2.1.3.tar.gz 
   tar xvzf ../../gz/glibc-crypt-2.1.tar.gz 
   setenv CC arm-linux-gcc
   ./configure arm-linux --build=i686-pc-linux-gnu \
      --prefix=/usr/local/arm/glibc/arm-linux-glibc \
      --enable-add-ons
   # before we can proceed we need to setup some defines
   # that are only available in other environments, add the
   # following 4 '#defines' (doesn't matter where) to 
   # 'glibc-2.1.3/sysdeps/unix/sysv/linux/arm/ioperm.c'
   #   '#define BUS_ISA_PORT_BASE 0'
   #   '#define BUS_ISA_PORT_SHIFT 0'
   #   '#define CTL_BUS 0'
   #   '#define BUS_ISA 0'
   vim sysdeps/unix/sysv/linux/arm/ioperm.c
   make
   # hint: if you have problems with the 'manual' on 'make install'
   # edit Makeconfig to remove 'manual' from 'all-subdirs ='
   make install
   rehash

   # now tell gcc where the glibc includes and libs are
   # and at the same time compile all both c and c++
   cd /usr/local/arm/armbuild/gcc-2.95.1-990730-fold-const
   # first restore the libc hack that was added before
   vim gcc/config/arm/t-linux
   make clean
   # remove the old sys-include that was copied from the
   # previous 'make' of gcc, same applies to lib
   rm -rf /usr/local/arm/xdev/arm-linux/sys-include
   rm -rf /usr/local/arm/xdev/arm-linux/lib
   setenv CC /usr/bin/gcc
   ./configure --target=arm-linux --prefix=/usr/local/arm/xdev \
      --with-headers=/usr/local/arm/glibc/arm-linux-glibc/include \
      --with-libs=/usr/local/arm/glibc/arm-linux-glibc/lib
   # REMOVE 'check-libiberty' from 'CROSS_CHECK_MODULES' 
   # and 'install-libiberty' from 'INSTALL_MODULES' in Makefile
   # since there are differences between functions used in this
   # library and in glibc 2.1.3
   vim Makefile
   make LANGUAGES="c c++"
   make install LANGUAGES="c c++"
   unsetenv CC

   # now it is possible to compile and link c programs!
   
FINI!

Reply via email to