Transplant third-party programs lrzsz and tree on the fl2440 Development Board

Source: Internet
Author: User

There are several situations for porting third-party programs

1. If the source code contains a MAKEFILE file, directly change the makefile, modify CC, As, LD, cflags, inst_path ..

2. The source code package does not have a MAKEFILE file, but there is a Configure/config file:

1. Set CC, LD, As, ldflags, AR, ranlib, and other environment variables.

Cc =/opt/buildroot-2011.11/ARM920T/usr/bin/ARM-Linux-gcc ar =/opt/buildroot-2011.11/ARM920T/usr/bin/ARM-Linux-ar LD =/OPT /buildroot-2011.11/ARM920T/usr/bin/ARM-Linux-LD as =/opt/buildroot-2011.11/ARM920T/usr/bin/ARM-Linux-as ranlib =/opt/buildroot-2011.11/ARM920T /usr/bin/ARM-Linux-ranlib. /configure -- Host = arm-Linux

Specify the cross-compiler path, link path, as, AR, etc.

2. Make

3. Make install

3. There is no Configure/config or makefile, but there will be an autogen. Sh script

 

Sh autogen. Sh --> Generate the configure file
Then follow the second step.

 

 

 

 

 

Transplant lrzsz

1. Download lrzsz package from the Internet (http://download.chinaunix.net/download.php? Resourceid = 6293 & id = 12772)

[[Email protected] thirdparty] $ ls
Lrzsz-0.12.20.tar.gz

2. Extract

[[Email protected] thirdparty] $ tar-xzf lrzsz-0.12.20.tar.gz
[[Email protected] thirdparty] $ ls
Lrzsz-0.12.20 lrzsz-0.12.20.tar.gz

3. Enter lrzsz-0.12.20

4. Generate the MAKEFILE file

[[Email protected] lrzsz-0.12.20] $ cc =/opt/buildroot-2011.11/ARM920T/usr/bin/ARM-Linux-gcc ar =/opt/buildroot-2011.11/ARM920T/usr/bin/ARM -Linux-ar LD =/opt/buildroot-2011.11/ARM920T/usr/bin/ARM-Linux-LD as =/opt/buildroot-2011.11/ARM920T/usr/bin/ARM-Linux- ranlib =/opt/buildroot-2011.11/ARM920T/usr/bin/ARM-Linux-ranlib. /configure -- Host = arm-Linux

5.

 

6. [[email protected] lrzsz-0.12.20] $ make

7.

8. We can see that lsz and lrz are running on arm.

9. Move lsz and lrz TO THE DEVELOPMENT BOARD

Put it in the TFTP directory first

[[Email protected] SRC] $ CP lsz lrz/TFTP

Download from the Development Board

>: TFTP-Gr lsz 192.168.1.3

>: TFTP-Gr lrz 192.168.1.3

Modify permissions

>: Chmod 777 lsz lrz

 

10. Test

Lszrz is successfully transplanted to a third-party program.

 

 

Porting tree program to fl2440 Development Board

1. The first step is to download the compressed package from the Internet.

2. Extract

[[Email protected] tree] $ tar-xzf tree-1.5.1.tar.gz
[[Email protected] tree] $ ls
Tree-1.5.1.tar.gz tree-1.5.1

3. [[email protected] tree] $ CD tree-1.5.1

4. Modify related settings

[[Email protected] tree-1.5.1] $ sudo Vim makefile

Set cc = gcc

Change

Cc =/opt/buildroot-2011.11/ARM920T/usr/bin/ARM-Linux-gcc

5. Compile

[[Email protected] tree-1.5.1] $ sudo make

6. upload to the TFTP Server

[[Email protected] tree-1.5.1] $ sudo CP tree/TFTP

7. Download TO THE DEVELOPMENT BOARD

 

8. Test

 

The Tree Command is successfully transplanted to the fl2440 Development Board.

 

Transplant third-party programs lrzsz and tree on the fl2440 Development 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.