Establish a tftp development environment for Embedded linux

Source: Internet
Author: User
The tftp development environment for Embedded linux-general Linux technology-Linux programming and kernel information. For details, refer to the following section. TFTP is the simplest network protocol used to download remote files. It is implemented through UDP. The tftp development environment for Embedded linux includes two aspects: one is tftp-server support for the linux server, and the other is tftp-client Support for the Embedded Target System. Because u-boot itself supports built-in tftp-client, you do not need to configure the Embedded Target System. The following describes the configuration of tftp-server on the linux server.

On the third CD of redhat 9.0, there is a tftp-server Installation rpm package.

(1) Installation

# Mount? T iso9660/dev/hdc/mnt/cdrom // attach a cd

# Rpm-ivh tftp-server-0.32-4.i386.rpm // Installation

# Umount/mnt/cdrom // unmount the disc

(2) modifying files

In linux, no matter which super-server, inetd or xinetd is used, the TFTP service is disabled by default, so you need to modify the file to enable the Service.

According to the installation method of (1), you can modify the file/etc/xinetd. d/tftp. It mainly sets the root directory of the TFTP server and enables the service. The modified file is as follows:

Service tftp

{Socket_type = dgram

Protocol = udp

Wait = yes

User = root

Server =/usr/sbin/in. tftpd

Server_args =-s/home/lqm/tftpboot-c

Disable = no

Per_source = 11

CPIs = 100 2

Flags = IPv4

}

Description: changed to server_args =-s. -C, where The directory can be changed to the root directory of your tftp-server. The parameter-s specifies the chroot, and-c specifies that files can be created.

(3) create the tftp root directory and start the tftp-server.

# Mkdir/home/lqm/tftpboot

# Chmod o + w/home/lqm/tftpboot

# Service xinetd restart

In this way, tftp-server is started. You can log on to the local machine to test the following command:

# Tftp your-ip-address

Tftp> get

Tftp> put

Tftp> q

#

For the tftp protocol, see the following website content: http://www.longen.org/S-Z/details-z/TFTPProtocol.htm
Related Article

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.