Zmodem for GP2X
---------------

This is a port of lrzsz to the GP2X handheld.  The intended use is for 
transferring files to and from the GP2X while connected via a USB-serial 
connection.  (See http://www.mindstab.net/wordpress/archives/75 for details 
on this.)

lrzsz is an implementation of the Zmodem file transfer protocol, released under 
the GNU General Public License (GPL).  For more info, see:

     http://www.ohse.de/uwe/software/lrzsz.html 

If you just want to use my compiled binaries, copy "lrz" and "lsz" to your SD 
card, and run them from the GP2X bash prompt while connected via minicom.  Then, 
use minicom's send and receive commands (Ctrl-A/S, Ctrl-A/R), selecting Zmodem.  
(You'll need lrzsz or an equivalent installed on the Linux host side as well.)  
In fact, if you have minicom configured correctly, you won't even have to do 
Ctrl-A/R for GP2X-to-host transfers, since minicom will automatically detect 
the Zmodem transfer.

Oh, you'll note that I'm assuming you run desktop Linux on the host side.  
Windows desktop users will have to fend for themselves, but I'm sure it's 
similar enough for you to muddle through somehow.


Building from source
--------------------

This port used the following source:

     http://www.ohse.de/uwe/releases/lrzsz-0.12.20.tar.gz

I'm using the ooPo toolchain for cross-compiling:

     http://www.oopo.net/consoledev/

All I needed to change was "config.sub", adding gp2x as a basic machine type.  
The supplied patch file will make the change for you.

The following configure/make sequence worked for me, after I unpacked the source 
into a "myports" subdirectory in the $GP2XDEV structure.

     cd $GP2XDEV/myports/lrzsz-0.12.20
     LDFLAGS="-static" CC=gp2x-gcc ./configure --prefix=$GP2XDEV --build=`uname -m` --host=gp2x
     make
     make install

The binaries end up in $GP2XDEV/bin.  Note that only two "real" binaries are created: 
lrz and lsz.  The others (lrx, lsz, lrb, lsb) are hard links.  You don't really need 
the other aliases for the commands unless you really need the older Xmodem/Ymodem 
protocols.


Jim "bjimba" Russell
8 Feb 2006
http://bjimba.blogspot.com
