免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2386 | 回复: 2
打印 上一主题 下一主题

幫忙解決網卡及gcc問題 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-07-24 17:42 |只看该作者 |倒序浏览
一塊Attansic L2 10/100的網卡,在主板光盤上找到LINUX驅動,上面有個redme文件,如下:
Linux* Base Driver for the Attansic(R) L2 Gigabit Ethernet Adapter
==========================================================================
Contents
========
- In This Release
- Building and Installation
- Command Line Parameters
- Additional Configurations
- Known Issues
- Support
In This Release
===============
This file describes the Linux* Base Driver for the Attansic(R) L2 Fast
Ethernet Adapter, version 1.0.x. This driver supports the 2.4.x and 2.6.x kernels.
This driver is only supported as a loadable module at this time. Attansic is not
supplying patches against the kernel source to allow for static linking of
the driver. For questions related to hardware requirements, refer to the
documentation supplied with your Attansic(R) adapter. All hardware
requirements listed apply to use with Linux.
Building and Installation
=========================
To build a binary RPM* package of this driver, run 'rpmbuild -tb
<filename.tar.gz>'. Replace <filename.tar.gz> with the specific filename of
the driver.
NOTE: For the build to work properly, the currently running kernel MUST match
      the version and configuration of the installed kernel sources. If you
      have just recompiled the kernel reboot the system now.
      RPM functionality has only been tested in Red Hat distributions.
1. Move the base driver tar file to the directory of your choice. For example,
   use /home/username/atl2 or /usr/local/src/atl2.
2. Untar/unzip archive:
     tar zxf atl2-x.x.x.tar.gz
3. Change to the driver src directory:
     cd atl2-x.x.x/src/
4. Compile the driver module:
     make install
   The binary will be installed as:
     /lib/modules/<KERNEL VERSION>/kernel/drivers/net/atl2.[k]o
   The install locations listed above are the default locations. They might
   not be correct for certain Linux distributions. For more information,
   see the ldistrib.txt file included in the driver tar.
5. Install the module:
     insmod atl2 <parameter>=<value>
6. Assign an IP address to the interface by entering the following, where
   x is the interface number:
     ifconfig ethx <IP_address>
7. Verify that the interface works. Enter the following, where <IP_address>
   is the IP address for another machine on the same subnet as the interface
   that is being tested:
     ping  <IP_address>
Command Line Parameters
=======================
If the driver is built as a module, the  following optional parameters are
used by entering them on the command line with the modprobe or insmod command
using this syntax:
     modprobe atl2 [<option>=<VAL1>,<VAL2>,...]
     insmod atl2 [<option>=<VAL1>,<VAL2>,...]
For example, with two L001 PCIE adapters, entering:
     insmod atl2 TxMemSize=80,128
loads the atl2 driver with 8KB TX memory for the first adapter and 10KB TX memory
for the second adapter.
The default value for each parameter is generally the recommended setting,
unless otherwise noted.
    NOTES: A descriptor describes a data buffer and attributes related to the
           data buffer. This information is accessed by the hardware.
MediaType
Valid Range: 0-4
0    - auto-negotiate at all supported speeds
1    - only link at 100Mbps Full Duplex
2    - only link at 100Mbps Half Duplex
3    - only link at 10Mbps Full Duplex
4    - only link at 10Mbps Half Duplex
Default Value: 0
    MediaType forces the line speed/duplex to the specified value in
    megabits per second(Mbps). If this parameter is not specified or is set
    to 0 and the link partner is set to auto-negotiate, the board will
    auto-detect the correct speed.
IntModTimer
Valid Range: 50-65000
Default Value: 100
    This value represents the minmum interval between interrupts controller
    generated.
RxMemBlock
Valid Range: 16-512
Default Value: 64
    This value is the number of receice memory block allocated by the driver.
    Increasing this value allows the driver to buffer more incoming packets.
    Each memory block is 1536 bytes.
    NOTE: Depending on the available system resources, the request for a
    higher number of receive descriptors may be denied.  In this case,
    use a lower number.
TxMemSize
Valid Range: 4-64
Default Value: 8
    This value is the number KB of transmit memory allocated by the driver.
    Increasing this value allows the driver to queue more transmits.
    NOTE: Depending on the available system resources, the request for a
    higher number of transmit descriptors may be denied.  In this case,
    use a lower number.
FlashVendor
Valid Range: 0-2
Default Value: 0
    This value standards on vendor of spi flash used by the adapter.
    0 for Atmel, 1 for SST, 2 for ST
   
Additional Configurations
=========================
  Configuring the Driver on Different Distributions
  -------------------------------------------------
  Configuring a network driver to load properly when the system is started is
  distribution dependent. Typically, the configuration process involves adding
  an alias line to /etc/modules.conf as well as editing other system startup
  scripts and/or configuration files. Many popular Linux distributions ship
  with tools to make these changes for you. To learn the proper way to
  configure a network device for your system, refer to your distribution
  documentation. If during this process you are asked for the driver or module
  name, the name for the Linux Base Driver for the Attansic L2 is atl2
  
  As an example, if you install the atl2 driver for two L2 adapters
  (eth0 and eth1) and set the speed and duplex to 10full and 100half, add the
  following to modules.conf:
       alias eth0 atl2
       alias eth1 atl2
       options atl2 Speed=10,100 Duplex=2,1
  Viewing Link Messages
  ---------------------
  Link messages will not be displayed to the console if the distribution is
  restricting system messages. In order to see network driver link messages
  on your console, set dmesg to eight by entering the following:
       dmesg -n 8
  NOTE: This setting is not saved across reboots.

Known Issues
============
NOTE: For distribution-specific information, see the ldistrib.txt file
      included in the driver tar.
  Driver Compilation
  ------------------
  When trying to compile the driver by running make install, the following
  error may occur:
      "Linux kernel source not configured - missing version.h"
  To solve this issue, create the version.h file by going to the Linux source
  tree and entering:
      make include/linux/version.h.

按上面的操作,在安裝gcc時發現有個依賴,但仍可以繼續安裝,如下:


安裝完成後,繼續按redme執行,到第5步開始看不懂,就是根本就不知道如何操作,我按他寫的命令,在那個目錄終端上輸入:insmod atl2.ko沒什麼錯,也不會提示什麼,再執行就會出錯誤.下面是操作後查找到的那個.ko的文件:


然後我到網絡里仍找不到硬件.


哪位英雄能幫我解釋一下上面的redme的流程及操作.或者有直接的驅動.先謝了

论坛徽章:
0
2 [报告]
发表于 2007-07-24 22:49 |只看该作者
请贴出详细的错误提示。

[ 本帖最后由 swordfish.cn 于 2007-7-24 22:51 编辑 ]

论坛徽章:
0
3 [报告]
发表于 2007-07-24 22:56 |只看该作者

  1. ls /lib/modules/`uname -r`/kernel/drivers/net/atl2.ko
  2. depmods
复制代码

这个文件存在么?如果存在,按readme 文件的要求在/etc/modprobe.conf 添加

  1.        alias eth0 atl2
  2.        options atl2 Speed=10,100 Duplex=2,1
复制代码

然后执行

  1. modprobe eth0
  2. ifconfig eth0 192.168.10.99
复制代码
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP