#42642 - 19/10/2001 10:27
DIY cross-toolchain kit
|
carpal tunnel
Registered: 13/07/2000
Posts: 4180
Loc: Cambridge, England
|
You will need:
* An x86 PC running Linux, bash, gcc, GNU make
* The file attached to this message
* The following tarballs, available from FTP sites the world over: binutils-2.10.1.tar.gz, gcc-2.95.3.tar.gz, glibc-2.1.3.tar.gz, glibc-crypt-2.1.tar.gz, glibc-linuxthreads-2.1.3.tar.gz, linux-2.4.3.tar.gz
* 90Mb free disc space, plus another 250Mb for the compilation process
You should:
* Untar armtools.tar.gz to create the 'armtools' directory
* Stick all the tarballs you've collected in that directory
* Edit the PREFIX in the Makefile to dictate where your toolchain ends up (suggestions are in the file)
* Run make. This will build and install your toolchain (so you should run it as a user that can write to $PREFIX). It takes about one trillion cycles (20min on 1GHz).
You will then have an ARM Linux cross-compiler that's the same version as we use for V2.0 car player software. When cross-compiling, add $PREFIX/bin to your path. (Don't do it when you're not cross-compiling, in case you get the wrong cpp.)
Peter
Attachments
41460-armtools.tar.gz (113 downloads)
|
Top
|
|
|
|
#42643 - 19/10/2001 10:55
Re: DIY cross-toolchain kit
[Re: peter]
|
carpal tunnel
Registered: 29/08/2000
Posts: 14496
Loc: Canada
|
Most of Peter's referenced .tar.gz files can be found at (among many other sites):
ftp://gatekeeper.dec.com/pub/GNU/
I have also just pulled down everything Peter suggested, and built a toolchain binary on my main machine. The tar'd and gzip'd result is a 24MB file, now available for download from my webserver at http://rtr.ca/empeg/ To use it, just prefix your PATH with the path of the 'bin' subdirectory underneath where you untar'd the toolchain to.
Edited by mlord on 19/10/01 08:05 PM.
|
Top
|
|
|
|
#42644 - 19/10/2001 11:05
Re: DIY cross-toolchain kit
[Re: peter]
|
enthusiast
Registered: 20/02/2001
Posts: 345
|
Thank you! (both of you.. )
_________________________
Synergy
[orange]mk2, 42G: [blue] mk2a, 10G[/blue][/green]
I tried Patience, but it took too long.
|
Top
|
|
|
|
#42645 - 19/10/2001 11:40
Re: DIY cross-toolchain kit
[Re: peter]
|
carpal tunnel
Registered: 23/08/2000
Posts: 3826
Loc: SLC, UT, USA
|
i move that this be entered into the Riocar.org FAQ and DL section. Do i hear a second..
(i'm becoming the "move this to riocar police"...heheh. Mainly because i hate having to search for something on the BBS a couple of weeks later when i might actually wanna use it.)
|| loren.cox ||
|
Top
|
|
|
|
#42646 - 19/10/2001 11:43
Re: DIY cross-toolchain kit
[Re: loren]
|
pooh-bah
Registered: 13/09/1999
Posts: 2401
Loc: Croatia
|
You do
Dragi "Bonzi" Raos
Zagreb, Croatia
Q#5196, MkII#80000376, 18GB green
_________________________
Dragi "Bonzi" Raos
Q#5196
MkII #080000376, 18GB green
MkIIa #040103247, 60GB blue
|
Top
|
|
|
|
#42647 - 20/10/2001 12:42
Re: DIY cross-toolchain kit
[Re: mlord]
|
carpal tunnel
Registered: 27/06/1999
Posts: 7058
Loc: Pittsburgh, PA
|
I tried to upgrade to this one (using your precompiled toolchain) but I'm getting this:
[root@spaz empeg]# make zImage
arm-empeg-linux-gcc -D__KERNEL__ -I/usr/src/empeg/include -Wall -Wstrict-prototypes -O2 -pipe -msoft-float -march=armv4 -mtune=strongarm110 -DUTS_MACHINE='"arm"' -c -o init/version.o init/version.c
arm-empeg-linux-gcc: installation problem, cannot exec `cpp0': No such file or directory
arm-empeg-linux-gcc: installation problem, cannot exec `cc1': No such file or directory
as: unrecognized option `-marmv4'
make: *** [init/version.o] Error 1
I can just go back to my old one but I would like to make sure I'm building on the same versions as the pros... Any idea why I'm getting this error? It's finding my cross-compiler but what are those cpp0 and cc1 files it can't find?
-Tony
MkII #554
|
Top
|
|
|
|
#42648 - 20/10/2001 14:14
Re: DIY cross-toolchain kit
[Re: tonyc]
|
carpal tunnel
Registered: 29/08/2000
Posts: 14496
Loc: Canada
|
You need to prefix your PATH with:
/path_to_unpacked_tar_gz_directory/bin
Once you do that, it should work. Don't forget to export the new PATH, and if your .bashrc or .bash_profile or something overrides the PATH, then be wary..
|
Top
|
|
|
|
#42649 - 20/10/2001 14:18
Re: DIY cross-toolchain kit
[Re: tonyc]
|
carpal tunnel
Registered: 29/08/2000
Posts: 14496
Loc: Canada
|
Here's a little script I use from within my empeg-kernel-source directory:
#!/bin/sh
export PATH="/usr/local/empeg-toolchain/bin:$PATH"
if [ -f .config ]; then
exec make zImage
fi
make mrproper && make oldconfig && make dep && make clean && make -j3 zImage
To build a kernel, I just to ./buildit (that's my name for the script) instead of typing 'make'.
|
Top
|
|
|
|
#42650 - 20/10/2001 14:33
Re: DIY cross-toolchain kit
[Re: mlord]
|
carpal tunnel
Registered: 27/06/1999
Posts: 7058
Loc: Pittsburgh, PA
|
Well I do have it in my path. I actually named the directory /usr/local/arm, so my PATH contains /usr/local/arm/bin
If you'll notice in the cut-n-paste I did, it's finding the arm-empeg-linux-gcc compiler, but it's failing with that goofy error that it can't exec cpp0 and cc1. I did a search and found the two files in /usr/local/arm/lib/gcc-lib/arm-empeg-linux/2.95.3 but I'm not sure why the compiler can't find them when my PATH is set correctly....
-Tony
MkII #554
|
Top
|
|
|
|
#42651 - 20/10/2001 15:08
Re: DIY cross-toolchain kit
[Re: tonyc]
|
carpal tunnel
Registered: 29/08/2000
Posts: 14496
Loc: Canada
|
Mmm.. are you sure it's finding the new toolchain, and not just fragments of an older one from elsewhere? I ask because of this message from your post:
as: unrecognized option `-marmv4'
To me, this indicates that the wrong toolchain is being run.
Usually a PATH issue. Really.
|
Top
|
|
|
|
#42652 - 20/10/2001 18:09
Re: DIY cross-toolchain kit
[Re: mlord]
|
carpal tunnel
Registered: 27/06/1999
Posts: 7058
Loc: Pittsburgh, PA
|
Well, I had completely removed the other toolchain but it still wasn't working. I just decided to build my own toolchain from sources and now I'm up and running. I'm not sure what it was, but it was probably something goofy I did, not a problem with your binaries. Thanks for the help.
-Tony
MkII #554
|
Top
|
|
|
|
#42654 - 06/10/2002 05:35
Re: DIY cross-toolchain kit
[Re: tonyc]
|
enthusiast
Registered: 10/10/2000
Posts: 350
Loc: Copenhagen SW, Denmark
|
I'm having a slight problem compiling this toolchain... actually, it seems like the documentation won't compile.
/bin/sh ../scripts/move-if-change summary-tmp summary.texi
touch stamp-summary
AWK=gawk /bin/sh libc-texinfo.sh 'intro.texi errno.texi memory.texi ctype.texi s
tring.texi charset.texi locale.texi message.texi search.texi pattern.texi io.tex
i stdio.texi llio.texi filesys.texi pipe.texi socket.texi terminal.texi math.tex
i arith.texi time.texi setjmp.texi signal.texi startup.texi process.texi job.tex
i nss.texi users.texi sysinfo.texi conf.texi' '../crypt/crypt.texi ../linuxthrea
ds/linuxthreads.texi' 'lang.texi header.texi install.texi maint.texi contrib.tex
i'
LANGUAGE=C LC_ALL=C makeinfo libc.texinfo
./stdio.texi:2491: First argument to cross-reference may not be empty.
./stdio.texi:2492: First argument to cross-reference may not be empty.
makeinfo: Removing output file `/home/jane/empegham/armtools/build-glibc/glibc-2
.1.3/manual/libc.info' due to errors; use --force to preserve.
make[3]: *** [libc.info] Error 2
make[3]: Leaving directory `/home/jane/empegham/armtools/build-glibc/glibc-2.1.3
/manual'
make[2]: *** [manual/subdir_install] Error 2
make[2]: Leaving directory `/home/jane/empegham/armtools/build-glibc/glibc-2.1.3
'
make[1]: *** [install] Error 2
make[1]: Leaving directory `/home/jane/empegham/armtools/build-glibc/build'
make: *** [arm-linux-glibc] Error 2
Any ideas? I don't have root access to the system.
Marius (Escort Cab + Mark II)
|
Top
|
|
|
|
#42655 - 06/10/2002 06:06
Re: DIY cross-toolchain kit
[Re: jane]
|
enthusiast
Registered: 10/10/2000
Posts: 350
Loc: Copenhagen SW, Denmark
|
Seems like I found the bug...
in libc's stdio.texi lines 2491 and 2492 the combination @ref{, is not allowed, I changed this to a valid first argument... seems like gcc has now started compiling, that probably means that libc was sucessful :-) *crossing fingers*
Marius (Escort Cab + Mark II)
|
Top
|
|
|
|
#42656 - 06/10/2002 13:31
Re: DIY cross-toolchain kit
[Re: jane]
|
carpal tunnel
Registered: 13/07/2000
Posts: 4180
Loc: Cambridge, England
|
in libc's stdio.texi lines 2491 and 2492 the combination @ref{, is not allowed, I changed this to a valid first argument...
What version of texinfo (makeinfo) have you got installed?
Peter
|
Top
|
|
|
|
#42657 - 06/10/2002 15:50
Re: DIY cross-toolchain kit
[Re: peter]
|
enthusiast
Registered: 10/10/2000
Posts: 350
Loc: Copenhagen SW, Denmark
|
$ makeinfo --version
makeinfo (GNU texinfo) 4.1
(But as I said, I got it working by changing those two lines)
Marius (Escort Cab + Mark II)
|
Top
|
|
|
|
#42658 - 07/10/2002 12:55
Re: DIY cross-toolchain kit
[Re: jane]
|
addict
Registered: 14/11/2000
Posts: 474
Loc: The Hague, the Netherlands
|
Same error here. Can you post a patch?
Thanks,
Pim
|
Top
|
|
|
|
#42659 - 07/10/2002 13:16
Re: DIY cross-toolchain kit
[Re: pim]
|
enthusiast
Registered: 10/10/2000
Posts: 350
Loc: Copenhagen SW, Denmark
|
Sure.... But as I stated, this is not a "fix", it's a "hack" to make it work. I'ts in the documentation, and I think there is a very small chance anybody will look at that.
Untar the glibc-packet, patch it and re-tar before doing a "make".
diff -ur glibc-2.1.3 glibc-2.1.3.new/
diff -ur glibc-2.1.3/manual/stdio.texi glibc-2.1.3.new/manual/stdio.texi
--- glibc-2.1.3/manual/stdio.texi Wed Feb 23 08:02:56 2000
+++ glibc-2.1.3.new/manual/stdio.texi Sun Oct 6 14:46:39 2002
@@ -2487,8 +2487,10 @@
If you are trying to read input that doesn't match a single, fixed
pattern, you may be better off using a tool such as Flex to generate a
lexical scanner, or Bison to generate a parser, rather than using
-@code{scanf}. For more information about these tools, see @ref{, , ,
-flex.info, Flex: The Lexical Scanner Generator}, and @ref{, , ,
+@code{scanf}. For more information about these tools, see @ref{Low-Level
+I/O, , ,
+flex.info, Flex: The Lexical Scanner Generator}, and @ref{Low-Level I/O, ,
+,
bison.info, The Bison Reference Manual}.
@node Input Conversion Syntax
Marius (Escort Cab + Mark II)
|
Top
|
|
|
|
#42660 - 09/07/2003 22:10
Re: DIY cross-toolchain kit
[Re: peter]
|
addict
Registered: 02/04/2002
Posts: 691
|
I'm a bit confused. I've built the toolchain before with this thread, but this time the makefile script is failing. I remember having to modify more than just the PREFIX setting. I've had to remove the @ infront of the echo and exit commands. And it keeps complaining that it can't find PREFIX, or FILES, or wildcard, or FILES_PRESENT
./Makefile: line 8: PREFIX:=/home/oliver/armtools: No such file or directory
./Makefile: line 17: FILES: command not found
... etc
I also had to add a comment on some lines that the script was stopping on. If someone could take a look at this script, and make sure its mosltly functional, that would be great!
Attachments
168178-Makefile (203 downloads)
_________________________
Oliver
mk1 30gb: 129 | mk2a 30gb: 040104126
|
Top
|
|
|
|
#42661 - 09/07/2003 23:01
Re: DIY cross-toolchain kit
[Re: oliver]
|
carpal tunnel
Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
|
Looks to me like you're trying to execute the Makefile instead of running make.
_________________________
Bitt Faulk
|
Top
|
|
|
|
#42662 - 10/07/2003 05:07
Re: DIY cross-toolchain kit
[Re: wfaulk]
|
addict
Registered: 03/03/2002
Posts: 687
Loc: Atlanta, Georgia
|
Uhm, also, why the ":" (colon) after the 'PREFIX'? I run RH7-8 and never had to put those there..
Me.
_________________________
Mike 'Fox' Morrey
128BPM@124MPH. Love it!
2002 BRG Mini Cooper
|
Top
|
|
|
|
#42663 - 10/07/2003 06:10
Re: DIY cross-toolchain kit
[Re: foxtrot_xray]
|
carpal tunnel
Registered: 13/07/2000
Posts: 4180
Loc: Cambridge, England
|
Uhm, also, why the ":" (colon) after the 'PREFIX'? For efficiency. Read "info make".
I run RH7-8 and never had to put those there.. Are you using make(1) with your RH7-8?
Peter
|
Top
|
|
|
|
#42664 - 10/07/2003 10:15
Re: DIY cross-toolchain kit
[Re: peter]
|
addict
Registered: 03/03/2002
Posts: 687
Loc: Atlanta, Georgia
|
In reply to:
For efficiency. Read "info make".
Huh. Eeenteristing. That makes makefiles even more confusing. My little makefile (for my project) is as about as simple as pie because it took me forever to get that far.
In reply to:
Are you using make(1) with your RH7-8?
As far as I know. Never replaced it, resides in /usr/bin/.. Grabbing the version gives me:
GNU Make version 3.79.1, by Richard Stallman and Roland McGrath.
Built for i386-redhat-linux-gnu
Copyright (C) 1988, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000
Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Not that I'm complaining, mind you. Just never had to change anything in a makefile to get it to work, therefore, never had to learn that much about them..
Me.
_________________________
Mike 'Fox' Morrey
128BPM@124MPH. Love it!
2002 BRG Mini Cooper
|
Top
|
|
|
|
#42665 - 10/07/2003 12:47
Re: DIY cross-toolchain kit
[Re: wfaulk]
|
addict
Registered: 02/04/2002
Posts: 691
|
Doh! My fault. Thanks for the pointer
_________________________
Oliver
mk1 30gb: 129 | mk2a 30gb: 040104126
|
Top
|
|
|
|
|
|