Linux installation of Plug and Play devices _unix Linux

Source: Internet
Author: User

Plug and Play, under Linux? It's not easy to do, you should change the old non-Plug and Play devices. This is the first time I contacted Linux, those Linux masters told me. However, I think there is always a way. After unremitting efforts, I found two methods. First, start from DOS, initialize the device, then load the Loadlin into Linux. But it's not what I dreamed of, because it takes a lot of time to get started. I kept on searching, and finally one day, I found what I needed, an application called Isapnptools.

Isapnptools is now available in most distribution kits. If you have it in your kit, install it. If you do not have it in your release kit, go to http://www.roestock.demon.co.uk/isapnptools/to download a copy, unzip the ISAPNP and Pnpdump to the directory/sbin.

Here is the actual combat phase. All you have to do is install all of your Plug and Play devices and log in as root. Then run the following command/sbin/pnpdump >/etc/isapnp.conf, which will write all the Plug and Play device information on your machine to the file/etc/isapnp.conf, the following is the/etc/on my machine Part of the isapnp.conf file:

# $Id: Plugnplay.html,v 1.1.1.1 1998/12/26 04:41:14 Jack Exp $
# This are free software, and the sources for details.
# This software has NO WARRANTY and use at your OWN RISK
#
# for details about this file format, isapnp.conf (5)
#
# for latest information on ISAPNP and Pnpdump:
# 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 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.
# that ' only ' the ' the '
# changed if required
# Don ' t forget to uncomment of the Activate (ACT Y) when happy

(CONFIGURE axe2201/3229569797 (LD 0
# Compatible Device ID PNP80D6
# Logical device Decodes bit IO address lines
# Minimum IO Base Address 0x0240
# Maximum IO Base Address 0x0380
# IO Base Alignment bytes
# Number of IO addresses required:32
# (IO 0 (SIZE) (BASE 0x0240))
# IRQ 3, 5, 9, ten, one, or 15.
# High True, edge sensitive interrupt
# (INT 0 (IRQ 3 (MODE +e))
# (ACT Y)
))
# end Tag ... Checksum 0x00 (OK)
# Omit part of sound card
# Omit the modem card section

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

(Waitforkey)

There are three Plug and Play devices in my system, namely, NE2000 compatible NIC, Yamaha OPL~SA2 sound card and a USR 56K modem. Because the file is too long, I omitted the sound card and the modem part.

The next step is to allocate the required resources for each device. There are many ways to achieve this. The first and easiest way to do this is if you have a WIN95 or WIN98 on the same machine, you can see the resources of each Plug and Play device in the Windows system by using the Control Panel's system's property page to write down the Linux. If there is no other operating system in your machine, use the second method. That is, manually allocating resources, as long as the device resources do not conflict on the line. Before you assign resources manually, it is a good idea to look at the list of interrupts and I/O columns that are already in use, located in/proc/interrupts,/proc/ioports, and/PROC/DMA. Once you have identified the resources used by each device, you can allocate it.

Selecting the resources assigned to each device is simple. You just have to remove the annotation number before the resource you need for your device. The lines that describe the resources are easy to find because they always start with int, IO, or DMA. Before these lines are the descriptions of the resources you can use. You can choose a group, because a line like the one below shows that they have the distinction of precedence.

# Start Dependent functions:priority preferred

After you remove the comment number for the resource you want, you must also remove the annotation number on the line (ACT Y) to tell ISAPNP to activate the device.

Here's a sample of my/etc/isapnp.conf after editing and removing 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) (BASE 0x0240))
(INT 0 (IRQ 3 (MODE +e))
(ACT Y)
))

(CONFIGURE ymh0020/2156265473 (LD 0
(IO 0 (SIZE) (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 56K Voice INT}")
(ACT Y)
))

(Waitforkey)

If you like, keep the rest of the notes also OK. The next step is to test that your configuration is correct. Use the following command to/sbin/isapnp/etc/isapnp.conf, the screen will appear with some information, the sample is as follows:

Board 1 has Identity c5 c0 7f 07:axe2201
Serial No 3229569797 [checksum c5]
Board 2 has Identity 5a A8 65:ymh0020
Serial No 2156265473 [checksum 5a]
Board 3 has Identity E8 56:usr3090
Serial No 1179010630 [checksum E8]

If there is a problem with your profile or a resource conflict occurs, it will tell you. Do not worry about the problem, start from the beginning to find the cause, step-by-step again. If everything goes well, you must also make sure that your Plug and Play device is authenticated at startup. Unfortunately, the initial script execution for many release suites is different. If you have isapnptools in your release suite, you may already have the correct initial script. If not, follow the format in/ETC/RC.D/INIT.D and write one yourself.

The final step is to have your kernel support Plug and Play devices. Currently, the only way the kernel supports a Plug and Play device set by ISAPNP is to compile them into modules. So, for every device that is considered Plug and play, be sure to compile it as a kernel-supported module.

Well, don't worry about your new device not being accepted by Linux, just enjoy the fun Linux brings 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.