Hi again, thanks for to the people who replied to my
questions on memory footprint for amr linux. As I
said in a previous email, I'm a newbie and a small
group of us are working to port linux to a Brutus
(16mb memory version). From there we hope to move it
to board based on the sa110. In any case, we built
the tool chain as per directions on the intel website
and the tool chain document by Chris Rutter, and I suspect
we did something wrong. The arm-linux-gcc will not
compile a simple "hello world" program (just a printf,
really). Here is the diagnostic:
# arm-linux-gcc hello.c -o helloarm -v
Reading specs from /usr/local/arm/lib/gcc-lib/arm-linux/egcs-2.91.60/specs
gcc version egcs-2.91.60 19981201 (egcs-1.1.1 release)
/usr/local/arm/lib/gcc-lib/arm-linux/egcs-2.91.60/cpp -lang-c -v -undef -D__
GNUC__=2 -D__GNUC_MINOR__=91 -Dunix -Darm -Dlinux -D__ELF__ -D__unix__ -D__a
rm__ -D__linux__ -D__ELF__ -D__unix -D__arm -D__linux -Asystem(unix) -Asyste
m(posix) -Acpu(arm) -Amachine(arm) -D__CHAR_UNSIGNED__ -D__ARM_ARCH_3__ -D__
APCS_32__ hello.c /tmp/ccX2CUjm.i
GNU CPP version egcs-2.91.60 19981201 (egcs-1.1.1 release) (ARM GNU/Linux
with ELF)
#include "..." search starts here:
#include <...> search starts here:
/usr/local/arm/lib/gcc-lib/arm-linux/egcs-2.91.60/include
/usr/local/arm/arm-linux/include
End of search list.
hello.c:1: stdio.h: No such file or directory
It seems to be looking in the wrong place for the .h files as well as other
things. They
are there, but just not in the dirs it looks for. We executed the "make
install" a the various
steps of the build process as per the doucmentation so we are
suspect we blew it someplace in the build.
Here's a a summary of what we did.
1) Built binutils using binutils-2.9.1.0.21.tar.gz. We found no
patches for this version and applied no others. We executed
%./configure --target=arm-linux --prefix=/usr/local/arm
%make
%make install
2) Built the egcs C compiler. We used kernel source form linux-2.2.12.tar.gz
and applied patch from patch-2_2_12-rmk1.gz. This kernel source tree is
where
the kernel headers will come from for building the c compiler. We used
the egcs-1.1.1.tar.gz distribution but could not find the patch specified
for this
version.
To build and install, we did:
%./configure --target=arm-linux --prefix=/usr/local/arm
%make -i LANGUAGES=c
%make -i LANGUAGES=c install
Executing
%./gcc/xgcc -dumpmachine
arm-linux
works so we know the compiler was built
3) Built GLIBC library
First we went to our linux-2.2.12 source tree (in
/usr/src/linux-2.2.2/linux)
and edited the make file thusly:
ARCH:=arm
CROSS_COMPILE = arm-linux-
and built the kernel using
%make config (took all the defaults here)
%make zImage
the GLIB archives as specifed where all available so we did something like:
mkdir /usr/local/arm/glibc
%mkdir /usr/local/arm/glibc/arm-linux-glibc
and unziped the stuff...
%cd /home/~user~/armbuild/
%gzip -dc /home/~user~/gz/glibc-2.1.tar.gz | tar xvf -
%cd glibc-2.1
%gzip -dc /home/~user~/gz/glibc-linuxthreads-2.1.tar.gz | tar xvf -
%gzip -dc /home/~user~/gz/glibc-crypt-2.0.111.tar.gz | tar xvf -
%make
%make install
And this ran to completion (about 2.5 hours)
4) Built the EGCS C++ Compiler thusly:
%cd /home/~user~/armbuild/egcs-1.1.1
%./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
%make LANGUAGES="c c++"
%make LANGUAGES="c c++" install
5) Tried to run the hello.c program at this point and failed
as noted above.
If I need to rebuild something (or all of it, that is ok). But how do
I "uninstall". Can I just do a make clean? How about removing just removing
the source and build dirs, unzipping/untaring again and doing the build and
install?
Thanks for any help--
Dave Borja
MMT Corp
unsubscribe: body of `unsubscribe linux-arm' to [EMAIL PROTECTED]