rzsz port

 

Unzip the rzsz file.

Use the tar xvzf command to decompress. Use the -C option to extract to the specified directory

[root@codeMonkey rzsz]# tar xvzf rzsz-3.48.tar.gz -C /root/ARM/

3. Modify the Makefile.

Modify lines 3 and 4 to read as follows:

CC=arm-linux-gcc
OFLAG= -O -DREGISTERED -static

Line 3 means to specify the cross compiler, and line 4 means to remove the "UNREGISTERED COPY" prompt and use static compilation.

Note: static compilation must be specified here!

Because I did not add the -static option for the first time, the compiled command was downloaded to the /usr/bin directory of the root file system. When executing the rz command, the system prompts that the command cannot be found! The transplanted Linux system generally does not have a transplanted library file, so the dynamically compiled program will prompt that it cannot be found. This also indirectly proves that the compilation under the Linux system is dynamic compilation by default.

Regarding the difference between static compilation and dynamic compilation, please Baidu yourself! No more explanation here

You can also refer to this article: http://blog.csdn.net/zhengqijun_/article/details/51849968

4. Execute make posix to generate executable program.

[root@codeMonkey src]# make posix
arm-linux-gcc   -O -DREGISTERED -static -DPOSIX -DMD=2 rz.c -o rz
size rz
   text	   data	    bss	    dec	    hex	filename
 501436	   2120	  17232	 520788	  7f254	rz
rm -f rb rx rc
ln rz rb
ln rz rx
ln rz rc
arm-linux-gcc   -O -DREGISTERED -static -DPOSIX sz.c -o sz
size sz
   text	   data	    bss	    dec	    hex	filename
 508884	   2176	  50096	 561156	  89004	sz
rm -f sb sx zcommand zcommandi
ln sz sb
ln sz sx
ln sz zcommand
ln sz zcommandi

 

Use the ls command to view

It can be found that many executable files have been generated, such as rz, sz, sx, etc.

 

5. Copy the generated executable file to the /usr/bin directory of the root file system

Use the cp command to assign

[root@codeMonkey src]# cp gz rb rc rx rz sb sx sz zcommand zcommandi ../../rootfs/usr/bin

6. Download to the development board and run.

After the Linux system starts successfully,

Execute the ../rz command to download the file to the board.

Execute the ./sz command to upload the file to the computer. Such as: ./sz ov5640_*

Set the directory in secureCRT,

Upload directory: upload the development board files to the computer

Download catalog: transfer computer files to the development board

 

 

 

Guess you like

Origin blog.csdn.net/qq_26690505/article/details/94737539