First, let's talk about the sti7105 platform of St. Now you want to directly access the Internet on the target board, such as ping www.sohu.com. The target board is connected to a LAN that can directly access the internet. The gateway is 192.168.1.1, and the target board IP is 192.168.1.150. First, we need an Internet IP address for testing. Run NSLookup www.sohu.com in Windows cmd to obtain several IP addresses of souhu. For example, "121.14.0.19" can be pinged directly to 121.14.0.19 on the terminal of the target board! No route is set. Set the route as follows: Route add default GW 192.168.1.1 on Ping 121.14.0.19. It can be the same. Now, we have connected to the internet! Configure DNS. To implement DNS, you must install B
IND package. Here, because the development package provided by St already exists, it will not be written into cross-compilation.Mainly configure it. /Etc/hosts:
Edit:127.0.0.1 localhost. localdomain localhost/etc/host. conf: Edit order hosts, bind/etc/resolv. conf // as follows to add a DNS domain name resolution server. #
# Resolv. conf this file is the resolver configuration file
# See resolver (5 ).
# Nameserver 202.96.134.20.
After the nameserver 202.96.128.68 is saved, we can run NSLookup www.sohu.com to check whether the IP address of the souhu network can be displayed in windows. If it is displayed successfully, DNS can work properly. Run: Ping www.sohu.com. Attached
, Bind cross-Compilation:
CD binding-9.6.1
Build_cc = GCC. /configure -- Host = arm-None-Linux-gnueabi -- prefix =/home/Terry/workdir/applications/common-lib/bind-9.6.1/install_arm/-- enable-epoll = No -- With-randomdev =
From: http://www.cublog.cn/u3/109710/showart_2149674.html