[Original] Step 1: Set the TFTP service and set dual network card under Linux

xiaoxiao2021-03-06  42

Preface: After buying the S3C44B0X board, start learning to develop based on UCLinux, from never contact in this area, there is no predecessor guide, so many related information is found online, but most of them are based on Windows development platforms, use A graphics GUI and TFTP are very convenient as an image file of the Image file, and CYWINs that simulate Unix C are installed under Windows. Personally like Linux, I hope ARM-based UCLinux development happens to my beloved Linux (ah, good meat :)), most of this information is abroad. Ok, cut into the topic:

First, set the TFTP service under Linux

Encounter problems:

There is a TFTP green software on Windows, then there are similar software on Linux, so I entered the Linux input TFTP command, hey, I really entered TFTP console, big happiness, be simple? ? ? If you enter the Help to see the command, I found that there is no LS command like normal VSFTP, and I don't know how to set the root directory of the image file, ... n The problem appeared, This TFTP is really a very special .

Solve the problem:

Find online with Linux Configuring TFTP-related documents, too difficult, foreign websites are hard to find, when you go to work, I have asked a master through MSN, and he immediately helped me in a foreign name in foreign countries. Cool website: http : //www.die.net/doc/linux/man/man8/tftpd.8.html found the MAN of the TFTP, it is really grateful, a lot of parameters, there is a big joy. So the command line input is similar to the following command: #TFTP -S, etc., error! how could be? Man has a parameter of the TFTP command. Depressed! I found N for N for a long time, and I found that TFTP was used in a forum in foreign countries. Hey, hey, this and ARM download the image file from the host? Isn't the same? Oh.

It turns out that TFTP is included in the xinetd service, its profile is /etc/xinetd.d/TFTP, as long as this configuration file is possible, as for the numerous parameters mentioned in Man, set, configure The document is as follows:

Service tftp {

Disable = no

Socket_type = DGRAM

Protocol = UDP

Wait = yes

User = root

Server = /usr/sbin/in.tftpd

Server_args = -s / usr / local / src / arm

PER_SOURCE = 11

CPS = 100 2

Flags = IPv4

}

Then reboot the Xinetd service:

#service xinetd Restart

The configuration of the TFTP is completed in the image file "Linux_rom.bin" copy to / usr / local / src / arm folder. At this time, the new problem appeared, how do I find the TFTP file under /etc/xinetd.d/? Isn't it installed? But I entered # rpm -q tftp said that I have installed TFTP-0.32-4.i386.rpm, and I saw the article on the Internet saying that the TFTP service is not installed by default, but isn't it clearly seen? Forget it, don't be chaotic, go to Redhat Network to search for RPM, you will clearly know that TFTP is divided into client and server, hey, I am loading the client, server-side TFTP-Server-0.32-4.i386.rpm To download and install. Said so much, summarize:

1. Install TFTP-Server-0.32-4.i386.rpm

2. Configure /etc/xinetd.d/TFTP

3.Service Xinetd Restart

4. Put the image file into the TFTP root directory

5. Open the development board switch in the case of the network, load the image file on the computer.

Second, Linux Configuring Dual NIC

The development board and Linux desktop are not a problem. They can connect to each other on a hub. But the poor us is poor, four people use a cheap broadband ROUTER, there is only four mouths, my one The board can do without the right to occupy someone else's computer port. Fortunately, my computer has two network cards. It has been connected with ARM under Windows. There is no problem, it should be a small dish under Linux. It is said to do it.

Set up two network cards in "Network Settings Control" (for online), Eth1 192.168.0.10 (for connecting to the ARM board), the result is not developing the board, strange. No network, TFTP is configured! ! ! (It is really angry, talking about it).

Next, I will not stop Enable, disable, I tried N times, and the result was a mess, and even Eth1 didn't, Eth0 has two IP: Eth0: 0 and Eth0: 1, mad. Forget it, all delete it. The result later Eth0, Eth1 did not, becomes Eth2, Eth3. Oh, it's really miserable. Later, I thought that the configuration of other NIC was stored in

/ etc / sysconfig / network-scripts / ifcfg-eth0 and

Etc / sysconfig / network-scripts / ifcfg-eth1, I change them correctly, then run

#ifconfig eth0 down

#ifconfig eth0 up

#ifconfig eth1 down

#ifconfig eth1 up

Can't be activated, the two network cards are like dead. It's over, I will find a router-level co-calculation tomorrow, it is just on the router. But think, since there is a resource, why not use it?

When you see the commands of IFUP and ifdown when you look at NetWork-Scripts, try it:

#ifdown eth0

#ifup eth0

#ifdown eth1

#ifup eth1

Confirm:

#ifconfig

Hahahahaha, Yang Sheng sigh, Eth0, Eth1, Lo is all activated, excitedly ping development board, pass :). Next, through the minicom connection development board, RESET successfully downloaded the Linux_rom.bin file from the Linux desktop, turned into a board with basic Linux function, and used the PING command to pass the desktop, It's too excited.

When you begin a sample, you are often some basic. Simple things blocked the way. As long as I ask more questions, the problem will always solve it, and then look back and see these records in the learning process. I also feel very helpful, very satisfied. Wanzhang high rise.

转载请注明原文地址:https://www.9cbs.com/read-65648.html

New Post(0)