Agenda mipsel-linux ToolChain for Cygwin (Win32)

Introduction

I recently received my Agenda VR3 and wanted to develop/port some my own stuff to it. However my main workstation is running MS Windows 2000 professional, and I could not find a mipsel-linux toolchain for Win32, so I decided to give it a try an brew my own.

Credits

I first tried the instructions on http://www.tetracon-eng.net/Agenda/toolchain/: it failed on my WIN32 box, but it was an excellent starting point. Another helpfull page is at http://www.yk.rim.or.jp/~nanashi/agenda/ (I did not understand a single letter from the Japanese text, but the command-line instructions helped me out ).

Downloading pre-build binaries

If you are only interested in the final result and do not want to compile your own toolchain from source (what ? you do trust me ?), just download the pre-compiled binaries:

Download and install Cygwin-B20.1
My copy is available at http://users.skynet.be/fon/agenda/dist/cygwin-b20.1-full.exe
  (I got it from http://www.palmos.com/dev/tech/tools/gcc/dist/cygwin-b20.1-full.exe , indeed, I also program for the PalmOS)
Run the cygwin-b20.1-full.exe , and follow the instructions to install cygwin B20.

Download and install agenda-linux-toolchain-win32.tgz
Download http://users.skynet.be/fon/agenda/dist/agenda-linux-toolchain-win32.tgz (27.7 MB)
Start the bash shell (if you installed the cywin above, you should have 'Start/Programs/Cygnus Solutions/Cygwin B20' in your start-menu).
The toolchain expects to be installed in /usr , so we will have to mount the correct directory.
If you installed cywin into c:\cygnus , you would use the following command (watch the double back-slashes in the Win32 world, and the single normal slash on the cygwin end):
   mount -f c:\\cygnus\\cygwin-b20\\H-i586-cygwin32 /usr
   ls -l /usr/lib/gcc-lib/i586-cygwin32/egcs-2.91.57/specs


If you would have installed CygWin in d:\agenda\dev , it would look like:
   mount -f d:\\agenda\\dev\\cygwin-b20\\H-i586-cygwin32 /usr
   ls -l /usr/lib/gcc-lib/i586-cygwin32/egcs-2.91.57/specs


This last 'ls' command should show something like:
   -rw-r--r-- 1 544 everyone 2081 Dec 1 1998 /usr/lib/gcc-lib/i586-cygwin32/egcs-2.91.57/specs

If you get a 'No such file or directory', it means you did not mount the correct directory. In /usr , you should have a dir 'i586-cygwin32', 'libexec' , 'bin' and 'lib'.

Now you are ready to install the toolchain:
   cd /usr
   tar -zxvpf agenda-linux-toolchain-win32.tgz




NOTE: under win95 or 98, you need to change the extension of all the files under /usr/mipsel-linux/bin to *.exe. Otherwise it brings up nasty errors about not finding files. Thanks to dopple@why-bother-me.com for pointing this out. I'll fix this in the next binary distribution.

Test the toolchain:
Create a simple C program, hello.c :
  
   #include <stdio.h>
  
   int main()
   {
   printf("Hello Agenda!\n");
   return 0;
   }


now compile and strip it :
   mipsel-linux-gcc hello.c -o hello
   mipsel-linux-strip hello


start the PPP connection between your workstation and Agenda, and rsync hello to your agenda:
   rsync hello agenda::default/hello

Open a terminal window on your Agenda:
   chmod ug+x hello
   ./hello

Detailed toolchain build instructions

Ah, a real one: you want to build the toolchain yourself ? Follow me ...

© 2001 Filip Onkelinx. All trademarks and copyrights on this page are owned by their respective owners.