eric_jia的个人空间 https://blog.eetop.cn/208662 [收藏] [复制] [分享] [RSS]

空间首页 动态 记录 日志 相册 主题 分享 留言板 个人资料

日志

boa服务器的配置

已有 1975 次阅读| 2008-7-10 20:24 |个人分类:精品

 
问:boa服务器怎样配置?

caopengly答:
To enable network support, in uClinux-dist kernel config,
Networking -->
[*] Networking support
Networking options --->
<*> Packet socket
<*> Unix domain sockets
[*] TCP/IP networking

Device Drivers -->Network device support ─>
[*] Network device support
[*] Ethernet (10 or 100Mbit)


[*] SMC 91C9x/91C1xxx support            # only if you use Altera Nios dev board with SMC91111,
[ ] Opencores (Igor) Emac support                
[ ] MoreThanIP 10_100_1000 Emac support
[ ] DM9000 support 
[*] DM9000A with checksum offloading   # only if you use DE2 with DM9000A

If you use Altera's Nios dev board, select "SMC 91C9x/91C1xxx support"  . linux-2.6.x/drivers/net/smc91x.c .
If you use DE2 board, you should enable "DM9000A with checksum offloading" . linux-2.6.x/drivers/net/dm9ks.c .


If you use Altera Stratix dev board, you must change the irq number of the ether chip to a non-zero in SOPC builder and rebuild.

Then rebuild the kernel, and boot nios2 uclinux. It should detect the SMC 91111 or DM9000 device as eth0.


Every board should have a unique ethernet hardware address. In file linux-2.6.x/arch/nios2nommu/kernel/setup.c, kernel get the hw addr from the flash on Altera dev board. You may use 'ifconfig' to find out. If you use custom boards, you need to change setup.c or use ifconfig to set hw address.
ifconfig eth0 hw ether 00:07:ed:0a:03:29      #  hardware MAC address 00:07:ed:0a:03:<random 00-ff>


Then config the ip address and router.
ifconfig eth0 192.168.1.10      # static ip
route add default gw 192.168.1.254     # gateway
Or, use dhcp client
ifconfig eth0 up
dhcpcd &


To set name server (DNS) , create the file /etc/resolv.conf , with a line of your name server, eg
nameserver 192.168.1.254
Or if you use DHCP, the dhcpcd will create this file.
Refer to the end of NFSFileSytem wiki page for a sample dhcpd.conf.

You may use "ntpdate" to get date & time from internet. Set TZ  env to your timezone, eg "TZ=CST-8" for east China. Or edit the file vendors/Altera/nios2nommu/TZ , which will be /etc/TZ as the cache of TZ env.
/> TZ=CST-8
/> ntpdate pool.ntp.org
Looking for host pool.ntp.org and service ntp
host found : 71.237.179.90
13 Dec 11:05:33 ntpdate[20]: step time server 71.237.179.90 offset 222059037.166530 sec
/> date
Wed Dec 13 11:05:39 2006

The telnetd and ftpd should be invoked by inetd with the default config. The BOA is standalone.
/> inetd &   # start inetd to invoke telnetd and ftpd services
[15]
/> boa &   # start httpd with cgi-demo
[16]
/> netstat -a
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State
tcp        0      0 *:http                  *:*                     LISTEN
tcp        0      0 *:ftp                   *:*                     LISTEN
tcp        0      0 *:telnet                *:*                     LISTEN
Active UNIX domain sockets (servers and established)
Proto RefCnt Flags       Type       State         I-Node Path

You may add these setup for ethernet to the file vendors/Altera/nios2nommu/rc (which will become /etc/rc ) in uClinux-dist dir, follow the setup for "lo" . So that the ethernet will be configed by init.

With dm9ks driver in DE2 the ftpd transfer rate is around 1.5-1.7 MByte/s.

Jumbo s support is enabled by changing the MTU to a larger than the default of 1500.  Use the ifconfig command to increase the MTU size.
eg,   ifconfig eth<x> mtu 6000 up



点赞

评论 (0 个评论)

facelist

您需要登录后才可以评论 登录 | 注册

  • 关注TA
  • 加好友
  • 联系TA
  • 0

    周排名
  • 0

    月排名
  • 0

    总排名
  • 0

    关注
  • 1

    粉丝
  • 0

    好友
  • 0

    获赞
  • 5

    评论
  • 访问数
关闭

站长推荐 上一条 /2 下一条


小黑屋| 手机版| 关于我们| 联系我们| 在线咨询| 隐私声明| EETOP 创芯网
( 京ICP备:10050787号 京公网安备:11010502037710 )

GMT+8, 2024-12-22 09:04 , Processed in 0.015911 second(s), 11 queries , Gzip On, Redis On.

eetop公众号 创芯大讲堂 创芯人才网
返回顶部