Author Topic: How To Set Up A Cross Compiler Environment  (Read 6421 times)

hollow5555

  • Newbie
  • *
  • Posts: 19
    • View Profile
How To Set Up A Cross Compiler Environment
« on: November 23, 2005, 11:57:22 am »
I'm looking for a way to develop and test applications for my zaurus sl-5500 on a linux box. I found the cross compilers, but they're based on older GCC versions. As luck has it, I have an older laptop that I'm trying to find a way to get Linux onto. Unfortunately for me the newer kernels do NOT like my pcmcia slots, but I know for a fact that older kernels do, so I'll probably be installing an older version of linux to get it working and I thought this would be a perfect development environment for my zaurus as well as other uses I had planned for this old laptop.

So my question is, given that the zaurus cross compilers are based off of gcc 2.95, what linux distro and version is the easiest to configure with the cross compilers and can someone give me a quick overview. Reading through the stuff on the web was a little confusing since I'm not even sure what my starting point is yet.

Thanks!

lardman

  • Hero Member
  • *****
  • Posts: 4512
    • View Profile
    • http://people.bath.ac.uk/enpsgp/Zaurus/
How To Set Up A Cross Compiler Environment
« Reply #1 on: November 23, 2005, 12:52:06 pm »
As you will be using a seperate cross-compiler it doesn't matter what version of GCC you have on your laptop.

Personally I use Mandrake 10.2, with bitbake and Openembedded (which means my cross-compiler is GCC 3.x.x/4.0.0 anyway), but to cross-compile some kernels I still have to use a GCC 2.95.3 cross-toolchain which works fine.


Si
C750 OZ3.5.4 (GPE, 2.6.x kernel)
SL5500 OZ3.5.4 (Opie)
Nokia 770
Serial GPS, WCF-12, Socket Ethernet & BT, Ratoc USB
WinXP, Mandriva

frobnoid_

  • Newbie
  • *
  • Posts: 37
    • View Profile
How To Set Up A Cross Compiler Environment
« Reply #2 on: November 23, 2005, 12:59:32 pm »
Quote
So my question is, given that the zaurus cross compilers are based off of gcc 2.95, what linux distro and version is the easiest to configure with the cross compilers and can someone give me a quick overview. Reading through the stuff on the web was a little confusing since I'm not even sure what my starting point is yet.

Thanks!
[div align=\"right\"][a href=\"index.php?act=findpost&pid=104692\"][{POST_SNAPBACK}][/a][/div]

I set it up in the following way:
I installed the sharp SDK to /opt. (unzip, untar, copy)
I then created a script which sets up my environment to point to the compiler & utils in /opt and run it before I start doing zaurus development work. (sets PATH, QTDIR and QPEDIR)

Its all very distro-agnostic, so I'd select a distro based on whatever other criteria you would normally use.

hollow5555

  • Newbie
  • *
  • Posts: 19
    • View Profile
How To Set Up A Cross Compiler Environment
« Reply #3 on: November 23, 2005, 01:24:57 pm »
Quote
I set it up in the following way:
I installed the sharp SDK to /opt. (unzip, untar, copy)
I then created a script which sets up my environment to point to the compiler & utils in /opt and run it before I start doing zaurus development work. (sets PATH, QTDIR and QPEDIR)

Its all very distro-agnostic, so I'd select a distro based on whatever other criteria you would normally use.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=104697\"][{POST_SNAPBACK}][/a][/div]

Well yes but seeing as how i have no distro on the box right now and I know the easiest thing to do is set it up with one that has GCC 2.95, I still don't know which is the best path to take. That's really the answer I'm looking for, is suggestions on which distro/version would be simple to set up with the sharp compilers. Obviously if I have a fedora core 3 box, putting the cross compiler on it will be a pain since the GCC versions are incompatible, right? Or do I misunderstand that.

Thanks

frobnoid_

  • Newbie
  • *
  • Posts: 37
    • View Profile
How To Set Up A Cross Compiler Environment
« Reply #4 on: November 23, 2005, 01:54:03 pm »
Quote
Well yes but seeing as how i have no distro on the box right now and I know the easiest thing to do is set it up with one that has GCC 2.95, I still don't know which is the best path to take. That's really the answer I'm looking for, is suggestions on which distro/version would be simple to set up with the sharp compilers. Obviously if I have a fedora core 3 box, putting the cross compiler on it will be a pain since the GCC versions are incompatible, right? Or do I misunderstand that.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=104703\"][{POST_SNAPBACK}][/a][/div]

The native compiler version doesn't matter. You'll be compiling with the sharp (or whomever) provided compiler, and linking against the sharp compiled libs (compiled with gcc 2.95).
My machine uses gcc 3 natively, but 2.95 for cross compiles without any problems.

hollow5555

  • Newbie
  • *
  • Posts: 19
    • View Profile
How To Set Up A Cross Compiler Environment
« Reply #5 on: November 23, 2005, 02:27:20 pm »
Quote
The native compiler version doesn't matter. You'll be compiling with the sharp (or whomever) provided compiler, and linking against the sharp compiled libs (compiled with gcc 2.95).
My machine uses gcc 3 natively, but 2.95 for cross compiles without any problems.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=104706\"][{POST_SNAPBACK}][/a][/div]
ah... interesting. I thought I read that there is some incompatibility that comes if you do that. Guess I was misunderstanding. Sorry about that.