在 Debian 8 上安装 USB2Lan 驱动程序 (Jessy)

在 Debian 8 上安装 USB2Lan 驱动程序 (Jessy)

我已经安装了 Debian 8 netinst。获取 make、gcc、linux-source-3.16 ...

这是lsusb列表:

root@Filter:~/smsc7500# lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 002: ID 045e:0800 Microsoft Corp.
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
this one => Bus 001 Device 004: ID 0424:7500 Standard Microsystems Corp. LAN7500 Ethernet 10/100/1000 Adapter

我不把discover放在这里,没有必要。我已经尝试了很多,但我和模块不是朋友:)我需要制作文件.ko才能使这些在我的 Debian 上运行。

如果我需要旧的 Debian 或任何其他 Linux,我可以!它不在互联网上,如果它支持 webmin ...

Startech 认证 Linux 安装。

会发生什么:

root@Filter:~/smsc7500# make
make -C ~kernel/linux-source-3.16/lib/modules/3.16.0-4-686-pae/build SUBDIRS=/root/smsc7500 modules
make[1]: *** ~kernel/linux-source-3.16/lib/modules/3.16.0-4-686-pae/build: Aucun fichier ou dossier de ce type. Arrêt.
Makefile:18: recipe for target 'modules' failed
make: *** [modules] Error 2

这是自述文件:

============================================================================================
Linux v1.02.00 Driver Release Notes for SMSC LAN7500 USB 2.0 to Ethernet 10/100/1000 Adapter
============================================================================================

Contents:

1. Platforms and OS versions supported
2. Device support
3. Driver structure and file description
4. Building and installing the driver
5. Release history
6. Testing
7. Known issues
8. Driver initialization parameter
9. Debugging

1. Platforms and kernel versions supported
------------------------------------------

    - x86 (32 bit PC):  Built & minor tested with 2.6.31 and 2.6.32

2. Device support
-----------------

This release supports:
    -LAN7500 (VID = 0x424, PID = 0x7500) USB to Ethernet 10/100/1000 device

3. Driver structure and file description
----------------------------------------

    Driver module:

    smsc7500.ko:        lan7500 driver.

    Files:
        smsc7500usbnet.h    - usbnet header file
        smsc7500usbnet.c    - usbnet source file
        smsclan7500.h       - lan7500 hardware specific header file
        smsclan7500.c       - lan7500 hardware specific source file
        ioctl_7500.h        - ioctl header file definitions
        smsc7500version.h   - Driver version number header file.
    Makefile        - Makefile
    readme.txt      - This fil

3. MakeFile :

ifeq ($(EN_DEBUG), 1)
EXTRA_CFLAGS += -DUSE_DEBUG
endif

CURRENT := $(shell uname -r)
KDIR :=  ~kernel/linux-source-3.16/lib/modules/$(CURRENT)/build
PWD := $(shell pwd)
RM := rm
PLATFORM=
COMPILER=

obj-m      := smsc7500.o

smsc7500-objs := smsclan7500.o smsc7500usbnet.o

modules:
ifeq "$(PLATFORM)" ""
        $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules
else
        $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) ARCH=$(PLATFORM) CROSS_COMPILE=$(COMPILER) modules
endif

clean:
        $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) clean
        $(RM) -f Module.markers modules.order

.PHONY: modules clean


4. Building and installing the driver
-------------------------------------
    The following instructions work fine for a PC build environment, embedded
    platforms may need slight build modifications, consult your platform documentation.
    a. Obtain the kernel source tree for the platform in use and build it.
    b. run 'make' command to smsc7500.ko module
    c. load the module:
        insmod smsc7500.ko
    d. Plug in the lan7500 device into the USB port.
    e. Configure the ethernet interface eth<n> in the usual way for an ethernet device.

5.  Release history
-------------------
    v1.02.00 (08/06/2010)
    - Makefile changes

    v1.01.00 (07/27/2010)
    - Phy Rx clock fix

    v1.00.01 (07/21/2010)
    - Ethtool fixes
    - Added set_mac_address() for kernel less than 29

    v1.00.00 (05/18/2010)
    - Merged in to single module smsc7500.ko
    - ethtool bug fixes
    - Automdix crossover/straight cable support
    - Removed support for cmd7500
        - Removed unwanted warnings
        - Fixed statistics counter problem
    - Added more ethtool Options
    - Bug Fixes for suspend/resume issue

    v0.07.00 (04/02/2010)
    - ndo frame-work support
    - fixed compilation issues on 2.6.32

    v0.06.00 (11/25/2009, bug fixes)

    v0.05.00 (6/24/2009, initial release)

6. Testing
----------
   Developer testing before going to SQA.

7. Driver Initialization parameters
-----------------------------------

There are several possible parameters for each driver module

 a. smsc7500.ko
        - operational_mode:
            0:      low_latency mode. Device uses bulk in pipe continuous
                    reader for ethernet rx. This is the default mode.
            1:      low power mode. Device uses the interrupt pipe to
                    detect ethernet rx, only then submits bulk in's to
                    read rx data. Once no rx data available stops bulk in 
                    submissions.
        - rx_queue_size:    controls the size of the rx queue
                    default is 60
        - tx_queue_size:    controls the size of the tx queue
                    default is 60
        - link_mode:  A bit wise field that specifies any combination of 6 or fewer
                      link speeds
            0x01:   10HD
            0x02:   10FD
            0x04:   100HD
            0x08:   100FD
            0x10:   1000MFD
            0x20:   1000SFD
            0x40:   Symmetrical Pause
            0x80:   Asymmetrical Pause
            0x100:  Auto Negotiate
        - mac_addr_hi16 & mac_addr_lo32: allow Ethernet Mac address override.
        - scatter_gather: enabled kernel S/G support (needed for tx_Csum)
        - tx_Csum:  Default to 0. Set to 1 to enable hw tx checksum support
        - rx_Csum:  Default to 0. Set to 1 to enable hw rx checksum support
        - TurboMode: receive mode
            0:      One receive packet per bulk in transaction
            1:      Multiple receive packet per bulk in transaction
        - debug_mode: controls amount of debug verbosity (see debugging below)
    - auto_mdix: Auto-Mdix setting. Enabled by default.
        0 - Disabled straight cable
        1 - Disabled crossover cable
        2 - Enabled
        - linkdownsuspend:
            0:  Disabled.
            1:  Enabled with normal power savings (recommended for maximum compatibility)
            2:  Enabled with maximum power savings.

        - LinkActLedCfg: if ture, enable separate Link and Activity LEDs.

        - dynamicsuspend: if enabled, suspend device automatically if no
            traffic for 3 seconds, then waking up device if any Tx/Rx traffic.

        - netdetach: if enabled, detach device from USB bus if link is down, then re-
            attaching device to USB bus if link is back.

        - tso: tso support. default to 0, Set to 1 to enable. (need to enable tx_Csum and scatter_gather).

答案1

Makefile 找不到内核头文件。这很正常,因为它找错了地方。

编辑 makefile,并设置 KDIR 定义,使其真正有意义:

KDIR := /lib/modules/$(CURRENT)/build

然后再试一次。这应该能让它发挥作用。

相关内容