Using rz and sx Commands — Downloading Files to Target Board via Serial Terminal
The newly downloaded Linux source code does not include the super terminal commands by default and must be added manually. After adding them, the development board can transfer files from a PC through a serial port.
Steps:
-
Download the software rzsz-3.48.tar.gz from http://freeware.sgi.com/source/rzsz/rzsz-3.48.tar.gz.
-
Extract:
tar zxvf rzsz-3.48.tar.gz -
Install:
cd src
vi Makefile
ModifyCC=arm-linux-gcc
Save and exit
Runmake posixNote: This software installation differs from standard GNU software — there is no configure step or
make installprocess.
I'm using an S3C2410 cross-compiler; for different platforms, only the cross-compiler needs to be changed.After running
make posix, if the compilation succeeds, run thelscommand and you will see many new files:COPYING gz minirb.c rc rz.c sz undos.doc zmodem.h crc.c mailer.rz minirb.doc README rz.doc sz.c zcommand zmr.c crc.doc Makefile rb rx sb sz.doc zcommandi zupl.t crctab.c Makefile~ rbsb.c rz sx undos.c zm.cCopy
rb,rx,rc,rz,sb,sx,sz,zcommand, andzcommandito thebindirectory of your root file system. Then copy the following libraries from your cross-compilation toolchain —ld-2.5.so,libc-2.5.so,libcrypt.so.1,libgcc_s.so.1,libm.so.6,ld-linux.so.3,libcrypt-2.5.so,libc.so.6,libm-2.5.so(the version numbers may differ, but as long as these files are present, it's acceptable) — into thelibdirectory of the root file system. Rebuild the root file system, download it to the development board, reboot, and test therzandszcommands.
Command Usage:
sz /filename — Open Windows HyperTerminal, right-click and select "Receive File", set the destination directory, and confirm.
rz — In HyperTerminal, right-click and select "Send File" to transmit the file.
In my actual operation, I used the ldd command to check the dynamic libraries that rz and similar commands depend on. I found that they did not depend on any dynamic libraries. I only checked rz and sx; I'm not sure about the others. Therefore, when building the file system, I did not copy the aforementioned dynamic libraries into the lib directory.
Finally, testing with the rz command worked successfully.
Note:
If a command does not work, use the ldd command to check whether it depends on any dynamic libraries, and then port those libraries to the file system. Then it should work~~haha~~