当前位置: 首页 > 图文教程 > 操作系统 > Unix/Linux > Linux下即插即用设备的安装

Unix/Linux
FreeBSD完全入门手册
FreeBSD中启用3D加速功能的方法
光盘安装OpenBSD3.6的方法
硬盘安装OpenBSD 3.6的方法
FreeBSD局域网内升级Ports Tree及Port的安装
FreeBSD 数据备份和迁移方法
让root用户telnet到FreeBSD的方法
OPENBSD-3.8上快速安装和配置apache+mysql+php+ssl
用OpenBSD 3.8 release自带的FTPD架设FTP服务器
freebsd 常用命令
FreeBSD系统SSH配置详解
FreeBSD 6.2用freebsd-update升级过程
FreeBSD双线负载均衡NAT服务器配置方法
FreeBSD系统下读写 NTFS分区
Freebsd7.0 Apache2.2+MySQL5+PHP5安装和配置方法
freebsd6.2 nginx+php+mysql+zend系统优化防止ddos攻击
FreeBSD5.2.1上建立功能完整的邮件服务器(POSTFIX)
FreeBSD学习经验
FREEBSD系统优化精华
FreeBSD su Sorry问题解决办法

Unix/Linux 中的 Linux下即插即用设备的安装


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-11-01   浏览: 66 ::
收藏到网摘: n/a

  即插即用,在Linux底下?不好办,你还是换老的非即插即用设备吧。这是我初次接触Linux时,那些Linux高手们告诉我的。可是,我觉得总该有办法的。经过不懈的努力,我发现了两种方法。一是先从DOS启动,初始化设备后,再用loadlin加载到Linux中。但这不是我所梦寐以求的,因为每次需要大量时间来启动。我继续不停的寻找,终于有一天,我找到了我需要的东西,一个称为isapnptools的应用程序。

  现在,大多数发行套件中都有isapnptools。如果你的套件中有,安装它即可。如果你的发行套件中没有它,到http://www.roestock.demon.co.uk/isapnptools/ 去下载一份,解压后把isapnp 和 pnpdump 拷贝到目录 /sbin中即可。

  下面就是实战阶段了。需要准备的就是把你所有要装的即插即用设备全部装好,以ROOT身份登陆。然后运行以下命令/sbin/pnpdump > /etc/isapnp.conf,这会把你机器上所有的即插即用设备信息写入文件/etc/isapnp.conf中,下面是我的机器上的/etc/isapnp.conf文件的一部分:

# $Id: plugnplay.html,v 1.1.1.1 1998/12/26 04:41:14 jack Exp $

# This is free software, see the sources for details.

# This software has NO WARRANTY, use at your OWN RISK

#

# For details of this file format, see isapnp.conf(5)

#

# For latest information on isapnp and pnpdump see:

# http://www.roestock.demon.co.uk/isapnptools/

#

# Compiler flags: -DREALTIME -DNEEDSETSCHEDULER

#

# Trying port address 0203

# Board 1 has serial identifier c5 c0 7f 53 05 01 22 05 07

# Board 2 has serial identifier 5a 80 86 00 01 20 00 a8 65

# Board 3 has serial identifier e8 46 46 46 46 90 30 72 56


# (DEBUG)

(READPORT 0x0203)

(ISOLATE PRESERVE)

(IDENTIFY *)

(VERBOSITY 2)

(CONFLICT (IO FATAL)(IRQ FATAL)(DMA FATAL)(MEM FATAL)) # or WARNING


# Card 1: (serial identifier c5 c0 7f 53 05 01 22 05 07)

# Vendor Id AXE2201, Serial Number 3229569797, checksum 0xC5.

# Version 1.0, Vendor version 0.0

# ANSI string -->Ethernet PnP ISA Card /S <--

#

# Logical device id AXE2201

# Device support I/O range check register

#

# Edit the entries below to uncomment out the configuration required.

# Note that only the first value of any range is given, this may be 

# changed if required

# Don't forget to uncomment the activate (ACT Y) when happy


(CONFIGURE AXE2201/3229569797 (LD 0

# Compatible device id PNP80d6

# Logical device decodes 10 bit IO address lines

# Minimum IO base address 0x0240

# Maximum IO base address 0x0380

# IO base alignment 32 bytes

# Number of IO addresses required: 32

# (IO 0 (SIZE 32) (BASE 0x0240))

# IRQ 3, 5, 9, 10, 11, 12 or 15.

# High true, edge sensitive interrupt

# (INT 0 (IRQ 3 (MODE +E)))

# (ACT Y)

))

# End tag... Checksum 0x00 (OK)

# 略去声卡部分

#略去modem卡部分


# Returns all cards to the "Wait for Key" state

(WAITFORKEY)


  我的系统中共有三个即插即用设备,分别是NE2000兼容网卡,Yamaha OPL~SA2声卡和一个USR 56K modem。由于文件太长,我略去了声卡和modem部分。

  接下来就是为每个设备分配所需资源。有许多方法可以实现。第一种,也是最简单的方法就是,如果你在同一台机器上也装了WIN95或WIN98,通过控制面板的系统的属性页,可以看到在WINDOWS系统下各即插即用设备的资源,记下用到Linux即可。如果你的机器中没有其它的操作系统,采用第二种方法。即手动分配资源,只要各设备资源不发生冲突就行。手动分配资源以前,最好先看一下已经使用的中断列表、I/O列列表,它们分别位于/proc/interrupts、/proc/ioports、/proc/dma。一旦你确定了各设备使用的资源,就可以分配了。

  选择分配给每个设备的资源非常简单。你只要去掉你的设备所需资源前的注释号即可。描述资源的行很容易找到,因为它们总是以INT, IO或 DMA开头。在这些行之前是