LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1344|回复: 6

本人新手,那位大虾帮我看一下这份安装说明?

[复制链接]
发表于 2007-8-1 11:57:09 | 显示全部楼层 |阅读模式
************************************************
  A. Compiler command:

     A-1: For normal single processor kernel
          "gcc -DMODULE -D__KERNEL__ -I/usr/src/linux/include -Wall
            -Wstrict-prototypes -O6 -c ST268.c"

     A-2: For single processor and set version info on all module symbol
          "gcc -DMODULE -DMODVERSIONS -D__KERNEL__ -I/usr/src/linux/include
            -Wall -Wstrict-prototypes -O6 -c ST268.c"

     A-3: For multiple processors(SMP) and set ver. info. on all module symbol
          "gcc -D__SMP__ -DMODULE -DMODVERSIONS -D__KERNEL__ -I/usr/src/linux
           /include -Wall -Wstrict-prototypes -O6 -c ST268.c"

             Note: O of -O6 is a capital "o", not a "0".
            

  B. How to compile driver
  
     B-1: Login by supervisor
     B-2: Copy ST268.c and Makefile into your HD. You can make a new directoty
          to put.
     B-3: Keep driver source file name as "ST268.c" and makefile name as
          "Makefile"
     B-4: You can type the following command to compile driver. Please according
               to your system to pick one.
                     make org        ;;Without SMP support
                     make mod        ;;Set version info on all module symbol
                     make smp        ;;symmetric multi-processing(SMP) support
                     make smp_mod        ;;SMP & Set version info on module

               Or you can type above compiler command to compile driver.
                    
               Note: Please check you must have the right kernel source on
                   "/usr/src/linux".


  C. The following steps teach you how to activate NIC:

     C-1: A simple and temporary method

        1. Used the upper compiler command to compile ST268.c

        2. Insert ST268 module into kernel
           "insmod ST268.o"           ;;Auto Detection Mode (Suggest)
           "insmod ST268.o mode=0"    ;;Force 10M Half Duplex
           "insmod ST268.o mode=1"    ;;Force 100M Half Duplex
           "insmod ST268.o mode=4"    ;;Force 10M Full Duplex
           "insmod ST268.o mode=5"    ;;Force 100M Full Duplex

           NOTE: You can type "man insmod" to see more description.

        3. Config a ST268 network interface
           "ifconfig eth0 172.22.3.18"
                          ^^^^^^^^^^^ Your IP address

           NOTE: 1. You can type "man ifconfig" to see more description.
                 2. If eth0 has been used, you should use eth1 instead.

        4. Activate the IP routing table. For some distributions, it is not
           necessary. You can type "route" to check.

           "route add default netmask 255.255.255.0 eth0"

           NOTE: 1. You can type "man route" to see more description.
                 2. If eth0 has been used, you should use eth1 instead.

        5. Well done. Your ST268 adapter actived now.

        Note. This is a temporary method. After you reboot the system, you
              will lost the setting.


     C-2: For Redhat, You can use the following to Activate NIC
       
        1.  login your system used the superuser.
        2.  copy ST268.o into        /lib/modules/2.4.x/kernel/drivers/net/
        3.  add the new line with "alias eth0 ST268" in "/etc/module.conf".
        4.  execute "netconfig -d eth0".
        5.  Fill your IP address, netmask and gateway
        6.  press <ok> to confirm and exit this setting
        7   reboot

        Note. If eth0 has been used, you should use eth1 instead.

***************************************************

本人用的是st268 usb网卡,for linux的驱动文件夹内由readme.txt、st268.h、st268.c和makefile 这4个文件,没有st268.o文件啊?
还有,这个说明到底是什么意思?到底应该如何安装?

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?注册

x
发表于 2007-8-1 12:09:52 | 显示全部楼层
不是说得很明白嘛?你需要自己编译驱动的:
A说的是gcc编译命令
B说的是如何编译,给出了编译命令,或者用A中的编译器命令也行;需要注意的是要安装kernel-devel
C说的是如何激活配置网卡
仔细看看,一步步来就行了
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-8-1 14:05:49 | 显示全部楼层
那我首先应做什么?
在哪里可以编译?怎么编译?
回复 支持 反对

使用道具 举报

发表于 2007-8-1 16:00:50 | 显示全部楼层
用的是什么系统?如果是Fedora 7,好像内核已经带了驱动。
回复 支持 反对

使用道具 举报

发表于 2007-8-1 17:54:04 | 显示全部楼层
说明里面说得很清楚啊,安装说明很清楚啊,第一步,就是编译,
************************************************
A. Compiler command:

A-1: For normal single processor kernel
"gcc -DMODULE -D__KERNEL__ -I/usr/src/linux/include -Wall
-Wstrict-prototypes -O6 -c ST268.c"

A-2: For single processor and set version info on all module symbol
"gcc -DMODULE -DMODVERSIONS -D__KERNEL__ -I/usr/src/linux/include
-Wall -Wstrict-prototypes -O6 -c ST268.c"

A-3: For multiple processors(SMP) and set ver. info. on all module symbol
"gcc -D__SMP__ -DMODULE -DMODVERSIONS -D__KERNEL__ -I/usr/src/linux
/include -Wall -Wstrict-prototypes -O6 -c ST268.c"

Note: O of -O6 is a capital "o", not a "0".


B. How to compile driver

B-1: Login by supervisor
B-2: Copy ST268.c and Makefile into your HD. You can make a new directoty
to put.
B-3: Keep driver source file name as "ST268.c" and makefile name as
"Makefile"
B-4: You can type the following command to compile driver. Please according
to your system to pick one.
make org ;;Without SMP support
make mod ;;Set version info on all module symbol
make smp ;;symmetric multi-processing(SMP) support
make smp_mod ;;SMP & Set version info on module

Or you can type above compiler command to compile driver.

Note: Please check you must have the right kernel source on
"/usr/src/linux".


C. The following steps teach you how to activate NIC:

C-1: A simple and temporary method

1. Used the upper compiler command to compile ST268.c

2. Insert ST268 module into kernel
"insmod ST268.o" ;;Auto Detection Mode (Suggest)
"insmod ST268.o mode=0" ;;Force 10M Half Duplex
"insmod ST268.o mode=1" ;;Force 100M Half Duplex
"insmod ST268.o mode=4" ;;Force 10M Full Duplex
"insmod ST268.o mode=5" ;;Force 100M Full Duplex

NOTE: You can type "man insmod" to see more description.

3. Config a ST268 network interface
"ifconfig eth0 172.22.3.18"
^^^^^^^^^^^ Your IP address

NOTE: 1. You can type "man ifconfig" to see more description.
2. If eth0 has been used, you should use eth1 instead.

4. Activate the IP routing table. For some distributions, it is not
necessary. You can type "route" to check.

"route add default netmask 255.255.255.0 eth0"

NOTE: 1. You can type "man route" to see more description.
2. If eth0 has been used, you should use eth1 instead.

5. Well done. Your ST268 adapter actived now.

Note. This is a temporary method. After you reboot the system, you
will lost the setting.


C-2: For Redhat, You can use the following to Activate NIC

1. login your system used the superuser.
2. copy ST268.o into /lib/modules/2.4.x/kernel/drivers/net/
3. add the new line with "alias eth0 ST268" in "/etc/module.conf".
4. execute "netconfig -d eth0".
5. Fill your IP address, netmask and gateway
6. press <ok> to confirm and exit this setting
7 reboot

Note. If eth0 has been used, you should use eth1 instead.


然后,正确编译以后加载,然后配置网卡,可以通过修改该/etc/modprobe.conf文件来系统启动的时候就自动加载网卡驱动。
后面是一个在Redhat的系统的简单说明。说明非常清楚,自己慢慢看吧
***************************************************
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-8-1 20:15:08 | 显示全部楼层
大虾们,对菜鸟的水平要有思想和心理的准备。
我是想问,我应该在shell命令行里输入什么?
是gcc st268.c -o st268.o吗?它提示说crc32.h找不到阿。
希望能把每一步都说清楚,谢谢啦。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-8-2 17:59:36 | 显示全部楼层
我是第一次编译,是不是输入:
gcc -DMODULE -D__KERNEL__ -I/usr/src/linux/include -Wall
-Wstrict-prototypes -O6 -c ST268.c
为什么还是出错?那位高手能不能帮我编译一下?
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表