Lrzsz ported to Arm-linux embedded board

Source: Internet
Author: User
Tags file transfer protocol

Special Note: SSH or serial port can use LRZSZ to communicate

Lrzsz is a UNIX communication package that provides Xmodem, Ymodem, and Zmodem file transfer protocols. Lrzsz, formerly the flagship software for Omen Technology, is now free and follows the GNU Open source Agreement.

Lrzsz suitable for such a development environment, a board, in addition to the serial port, no external output equipment, no SD card, no network cable, this time if you want to communicate with this board of interactive files, you need to use the serial port transmission. According to the modem the file Transfer Protocol: Xmodem, Ymodem, Zmodem classify it
    • Xmodem: Simple and general, transmission Information Unit is "package =128b", transmission speed is slow, suitable for the poor quality of the telephone line in the case of the use.
    • Ymodem: Xmodem Evolution, high efficiency and reliability "package =128*8b", a transmission can send or receive several files.
    • Zmodem: It is more efficient to send data in a continuous stream of data, unlike the previous two.
In the Ubuntu host can directly use RZ or SZ command and securecrt interaction files, if you want to upload the download file in the Development Board, you need to port the full version of the Lrzsz to the Development Board, using its full functionality.1 Download the source packageFirst download the latest version of Lrzsz, address: https://ohse.de/uwe/software/lrzsz.html. The following version of 0.12.20 For example, download the source package is: lrzsz-0.12.20.tar.gz.2 Copy and unzip the source packageCopy the downloaded source package to the Linux host and unzip it:
mkdir ~/cp lrzsz-0.12. . tar. GZ ~/~/tar zxvf lrzsz-0.12. . tar. gz

3 Configuration
$ cd lrzsz-0.12. $/export Path= $PATH:/usr/local/arm-2010q1/bin           # Cross-compilation tool path JOIN system environment variable! $ CC=arm-none-linux-gnueabi-gcc cflags=-o2./configure  # Configuration

here. The/configure must be placed behind or the cross-compilation tool cannot be recognized.

4 compiling the installationTo compile the installation command:
 make-j4                                        # Parallel compilation, compile at the same time using 4 CPUs, can increase the speed of compilation

After make completes, the Lrz and lsz two files are generated under the current directory src/.

5 Copy to target board and execute

The generated lrz and LSZ are copied to the/usr/sbin directory of the target board via a network, USB flash drive, SD card, etc., and executable permissions are added to the target version:

CP LRZ lsz/usr//usr/sbin/chmod +x lrz LSZ

Note: Since the command used by SECURECRT is RZ and SZ, LRZ and LSZ can be renamed.

6 Configuring the serial port

Before use, you need to set up a serial port:

7 Testing

On the target version, execute the LRZ command to transfer the file from the PC to the target version, and execute the LSZ command to upload the file from the target version to the PC:

$ lrz$ Lsz myfile



Lrzsz ported to Arm-linux embedded board

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.