Debian 8에 USB2Lan 드라이버(Jessy) 설치

Debian 8에 USB2Lan 드라이버(Jessy) 설치

데비안 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이나 다른 Linux가 필요하다면 그렇게 할 수 있습니다! 웹민 지원하면 인터넷에는 안되는데...

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

그런 다음 다시 시도해 보세요. 이렇게 하면 작동합니다.

관련 정보