Installation of plug-and-play devices in Linux

Source: Internet
Author: User


Plug and Play, under Linux? It's not easy. You should change to an out-of-the-box plug-and-play device. This was what Linux experts told me when I first came into contact with Linux. However, I think there is always a solution. After unremitting efforts, I found two methods. First, start from DOS, initialize the device, and load it to Linux with loadlin. But this is not what I dream of, because each time it takes a lot of time to start. I kept searching, and one day I found what I needed, an application called isapnptools.

Currently, isapnptools is available in most releases. Install it if it is in your suite. If you don't have it in your release kit, go to the http://www.roestock.demon.co.uk/isapnptools/ to download a copy, unzip it and copy isapnp and pnpdump to the/sbin directory.

The following is the actual situation. All the plug-and-play devices you want to install are installed and logged on as ROOT. Then run the following command/sbin/pnpdump>/etc/isapnp. conf. This will write all plug-and-play device information on your machine into the file/etc/isapnp. in conf, the following is/etc/isapnp on my machine. part of the conf file:

# $ Id: plugnplay.html, v 1.1.1.1 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 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)
# Skip the sound card section
# Skip the modem card section

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

(WAITFORKEY)

There are three plug-and-play devices in my system: NE2000 compatible nic and Yamaha OPL ~ SA2 sound card and a USR 56 K modem. Because the file is too long, I skipped the sound card and modem part.

Next, allocate the required resources to each device. There are many ways to achieve this. The first and simplest way is to install WIN95 or WIN98 on the same machine, you can view the resources of plug-and-play devices in WINDOWS, and write down the resources for using Linux. If your machine does not have other operating systems, use the second method. That is, manually allocate resources, as long as the resources of each device do not conflict with each other. Before manually allocating resources, you 'd better first look at the used interrupt list and I/O column list, which are located in/proc/interrupts,/proc/ioports,/proc/dma respectively. Once you have determined the resources used by each device, you can allocate them.

It is very easy to select resources allocated to each device. You only need to remove the comment before the resources required by your device. Lines describing resources are easy to find, because they always start with INT, IO, or DMA. Before these rows, It is the description of the resources you can use. You can select a group, because a row like the following shows the difference in priority.

# Start dependent functions: priority preferred

After removing the annotation Number of the required resource, you must also remove the annotation number on line (act y) to tell ISAPNP to activate the device.

Below is a sample of my/etc/isapnp. conf edited and removed from the comment line:

READPORT 0x0203)
(Isolate preserve)
(IDENTIFY *)
(VERBOSITY 2)
(CONFLICT (io fatal) (irq fatal) (dma fatal) (mem fatal) # or WARNING

(CONFIGURE AXE2201/3229569797 (LD 0
(IO 0 (SIZE 32) (BASE 0x0240 ))
(INT 0 (IRQ 3 (MODE + E )))
(Act y)
))

(CONFIGURE YMH0020/2156265473 (LD 0
(IO 0 (SIZE 16) (BASE 0x0220 ))
(IO 1 (SIZE 8) (BASE 0x0530 ))
(IO 2 (SIZE 4) (BASE 0x0388 ))
(IO 3 (SIZE 2) (BASE 0x0330 ))
(IO 4 (SIZE 2) (BASE 0x0370 ))
(INT 0 (IRQ 5 (MODE + E )))
(DMA 0 (CHANNEL 0 ))
(DMA 1 (CHANNEL 1 ))
(Act y)
))

(CONFIGURE YMH0020/2156265473 (LD 1
(IO 0 (SIZE 1) (BASE 0x0201 ))
(NAME "YMH0020/2156265473 [1] {OPL3-SA2 Sound Chip }")
(Act y)
))

(CONFIGURE USR3090/1179010630 (LD 0
(IO 0 (SIZE 8) (BASE 0x02f8 ))
(INT 0 (IRQ 3 (MODE + E )))
(NAME "USR3090/1179010630 [0] {U. S. Robotics 56 K Voice INT }")
(Act y)
))

(WAITFORKEY)

If you like it, keep the remaining comments. The next step is to test whether your configuration is correct. Run the following command/sbin/isapnp/etc/isapnp. conf to display some information on the screen. The sample is as follows:

Board 1 has Identity c5 c0 7f 53 05 01 22 05 07: AXE2201
Serial No 3229569797 [checksum c5]
Board 2 has Identity 5a 80 86 00 01 20 00 a8 65: YMH0020
Serial No 2156265473 [checksum 5a]
Board 3 has Identity e8 46 46 46 90 30 72 56: USR3090
Serial No 1179010630 [checksum e8]

If there is a problem with your configuration file or a resource conflict occurs, it will tell you. Do not worry about the problem. Search for the cause from the beginning and try again step by step. If everything is safe, you must also ensure that your plug-and-play device can be authenticated at startup. Unfortunately, the initial script execution methods for many release suites are different. If your release kit contains isapnptools, you may already have the correct initial script. If not, write one in the format of/etc/rc. d/init. d.

The last step is to allow your kernel to support plug-and-play devices. Currently, the only way for the kernel to support plug-and-play devices set by isapnp is to compile them into modules. Therefore, for every device that is considered as a plug-and-play device, be sure to compile it into a module supported by the kernel.

Now, you don't have to worry about your new devices being accepted by Linux. Just enjoy the fun that Linux brings to you.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.