After you've compiled and installed isapnptools, it is time to configure your devices. This is done by creating a configuration file explaining the device(s) and which resources it will use. The great thing about isapnptools is that it will build this file for you. Then you go in and play “multiple choice” (as the author puts it).
To create the configuration file, run the pnpdump program. It scans for all ISA plug-and-play devices and all possible configurations. These values are dumped to standard out (STDOUT) in the file format needed. Here is the command I use to create the file as root:
/sbin/pnpdump > /etc/isapnp.conf
The program failed on me a few times, but that was mainly due to other system errors. You should now have a configuration file in /etc if you used my command. The beginning of the file should look something like Listing 1. The rest of the configuration file will contain sections for the different devices it found. Now you need to choose which resources the device will use.
The configuration file may seem a bit confusing at first, but it needs only a little deciphering. The basic layout for a device section is shown in Listing 2. By default, a listing of all possible resources for that device will be within the device section. Basically, just uncomment the lines for the resources the device will use. The lines are commented with # marks.
Editing this file requires knowing a bit about the device to be configured. Typically, the user manual for the device will list which resources are required to use the device. In my case, with the Sound Blaster AWE32, I needed a Base I/O address, one IRQ, an 8-bit DMA channel, a 16-bit DMA channel and a MIDI synthesizer I/O address. Other resources are on my card, but I am not using them in this example.
The example device section in Listing 2 shows the resources I chose for my card. I chose 0x0220 for the Base I/O address, 5 for the IRQ channel, 1 for the 8-bit DMA channel, 5 for the 16-bit DMA channel and 0x0330 for the MIDI I/O.
Note that the I/O addresses are called IO 0 and IO 1, and the DMA channels are called DMA 0 and DMA 1. This may make it a little difficult to map the right values to the 8-bit DMA and 16-bit DMA. However, if you read your configuration file after running pnpdump and look at the default resource settings in the user manual for your device, you can easily match things up.
In my case, I know DMA 0 corresponds to the 8-bit DMA because only the 8-bit DMA can have a value of 1. So, the other setting must be the 16-bit DMA channel. The same goes for the IO settings; IO 0 must be the Base I/O address, because the MIDI I/O address can never be 0x0220.
Once you have uncommented the lines you need, make sure the (ACT Y) line is uncommented; otherwise, your device will not be configured.
You have now passed the hard part of PnP configuration under Linux. It is a good idea to test your PnP configuration before going any further. You want to make sure isapnp can properly initialize the card with the resources you have set. Assuming isapnp is in /sbin, execute this command to test your configuration:
If there are no error messages, your configuration should work fine. If you do get resource conflict errors, now would be a good time to go back and edit that configuration file. It is better to get it working now than have to fool with it later. Play around with the resource settings until you find those that don't produce errors when you test the configuration.
Now we are ready for the fun part. Most Linux distributions will come with the various device drivers compiled as modules. Refer to the kernel documentation for more information about modules. Basically, a module is just a device driver that can be added to an already-running kernel. This provides a lot of flexibility for the user, and it is modules that allow us to use PnP devices.
PnP devices must be initialized before the driver can be loaded, so using modules is a necessity. They are the only part of the kernel that can be loaded after the kernel boots.
Your distribution may already include a module for the device you want to use. In the case of sound cards, you might be compiling one from scratch. In my example, I use a Sound Blaster AWE32. The device driver included with my distribution is /lib/modules/2.0.35/misc/sound.o.
If you must recompile, be sure to set any resources for the driver according to those set in the isapnp.conf file. You can always pass the resource values when loading the module, but having the default ones is always nice.
To load the driver for my PnP sound card, I did this:
/sbin/isapnp /etc/isapnp.conf /sbin/modprobe sound.o io=0x0220 irq=5 dma=1\ dma1=5
If all goes well, you should have a driver loaded and working with that device. Check to make sure the module is loaded by typing:
/sbin/lsmodIf this is a sound card, try playing sound files. For network cards, try bringing up the device with ifconfig. At this point the device should be working.
|Using tshark to Watch and Inspect Network Traffic||Aug 31, 2015|
|Where's That Pesky Hidden Word?||Aug 28, 2015|
|A Project to Guarantee Better Security for Open-Source Projects||Aug 27, 2015|
|Concerning Containers' Connections: on Docker Networking||Aug 26, 2015|
|My Network Go-Bag||Aug 24, 2015|
|Doing Astronomy with Python||Aug 19, 2015|
- Using tshark to Watch and Inspect Network Traffic
- Problems with Ubuntu's Software Center and How Canonical Plans to Fix Them
- A Project to Guarantee Better Security for Open-Source Projects
- Concerning Containers' Connections: on Docker Networking
- Where's That Pesky Hidden Word?
- Firefox Security Exploit Targets Linux Users and Web Developers
- My Network Go-Bag
- Doing Astronomy with Python
- Build a “Virtual SuperComputer” with Process Virtualization
- diff -u: What's New in Kernel Development