Skip to contentSkip to conversation

cross-compile tools made easy ...

DISCUSSION Jun Sun 2 participants 2 messages Nov 29, 2000 MIPS

lore
Share & tools
lore

Jun Sun

author
#0 lore raw

I found myself building cross-compile toolchains a lot recently. So I spent sometime and wrote a script to do the whole darn thing in one shot.

If you want to build your own cross-compile tools, you can save some effort by just getting the tar balls and then typing "build".

It is not too much different from what is in Ralf's "Linux MIPS HOW-TO" cross-compile section. But the tarball offers some convenience by having all the sources and patches put together and all configurations, options lumped in one file.

You can find two tar balls at linux.junsun.net:

mips-xtool-1.1.tar.gz

	binutils 2.8.1 + egcs 1.1.2 + glibc 2.0.6
	(Thanks to Keith Wesolows for the glibc fix with egcs 1.1.2)

mips-xtool-0.1.tar.gz

	binutils 2.8.1 + egcs 1.0.3a + glibc 2.0.6

I did some minimal tests with kernel and building a couple of packages, and would very much like to know if you have any problems (Yes, that is the purpose. :-0)

Enjoy!

Jun

#1 lore raw

On that vein. I've got a trvial patch against the binutils in Debian (woody) for a cross binutils for big endian mips.

jamie:~$ dpkg -s binutils-mips
Package: binutils-mips
Status: install ok installed
Priority: extra
Section: devel
Installed-Size: 6364
Maintainer: Christopher C. Chimelis <[email protected]>
Source: binutils
Version: 2.10.1.0.2-1
Suggests: binutils (= 2.10.1.0.2-1)
Description: Binary utilities that support MIPS (Big Endian) targets.
 The programs in this package are used to manipulate binary and object
 files that may have been created on the MIPS (Big Endian) architecture.
 This package is primarily for MIPS developers and cross-compilers and is
 not needed by normal users or developers.

My version is compiled against glibc 2.1.3, so YMMV against 2.2.

Chris: Any chance I could persuade you to upload a binutils-mips to Woody? :)

Patch is below (and this patch does not build a mips target by default, you still need to do ./debian/rules TARGET=mips binary-cross).

debian/control +11 -0
diff -uNr binutils-2.10.1.0.2/debian/control binutils-2.10.1.0.2-mips/debian/control
@@ -85,6 +85,17 @@
  This package is primarily for MIPS developers and cross-compilers and is 
  not needed by normal users or developers.
 
+Package: binutils-mips
+Section: devel
+Architecture: any
+Priority: extra
+Suggests: binutils (= ${Source-Version})
+Description: Binary utilities that support MIPS (Big Endian) targets.
+ The programs in this package are used to manipulate binary and object
+ files that may have been created on the MIPS (Big Endian) architecture.  
+ This package is primarily for MIPS developers and cross-compilers and is 
+ not needed by normal users or developers.
+
 Package: binutils-avr
 Section: devel
 Architecture: any
debian/rules +1 -1
diff -uNr binutils-2.10.1.0.2/debian/rules binutils-2.10.1.0.2-mips/debian/rules
@@ -74,7 +74,7 @@
 # debian/control for each of these. For example, the cross binutils package
 # for powerpc is called binutils-powerpc.
 #
-ALL_TARGETS =     avr powerpc arm m68k mipsel
+ALL_TARGETS =     avr powerpc arm m68k mipsel mips
 
 # Targets NOT to build for. This is the set difference ALL_TARGETS - TARGETS
 #
Quoted 29 lines · Jun Sun

I found myself building cross-compile toolchains a lot recently. So I spent sometime and wrote a script to do the whole darn thing in one shot.

If you want to build your own cross-compile tools, you can save some effort by just getting the tar balls and then typing "build".

It is not too much different from what is in Ralf's "Linux MIPS HOW-TO" cross-compile section. But the tarball offers some convenience by having all the sources and patches put together and all configurations, options lumped in one file.

You can find two tar balls at linux.junsun.net:

mips-xtool-1.1.tar.gz

	binutils 2.8.1 + egcs 1.1.2 + glibc 2.0.6
	(Thanks to Keith Wesolows for the glibc fix with egcs 1.1.2)

mips-xtool-0.1.tar.gz

	binutils 2.8.1 + egcs 1.0.3a + glibc 2.0.6

I did some minimal tests with kernel and building a couple of packages, and would very much like to know if you have any problems (Yes, that is the purpose. :-0)

Enjoy!

Jun

Signature · 7 lines
Jamie Fifield

Software Designer		[email protected]
AMIRIX Systems Inc.		http://www.amirix.com/
Embedded Debian Project		http://www.emdebian.org/
77 Chain Lake Drive		902-450-1700 x247 (Phone)
Halifax, N.S. B3S 1E1		902-450-1704 (FAX)