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.
|Speed Up Your Web Site with Varnish||Jun 19, 2013|
|Non-Linux FOSS: libnotify, OS X Style||Jun 18, 2013|
|Containers—Not Virtual Machines—Are the Future Cloud||Jun 17, 2013|
|Lock-Free Multi-Producer Multi-Consumer Queue on Ring Buffer||Jun 12, 2013|
|Weechat, Irssi's Little Brother||Jun 11, 2013|
|One Tail Just Isn't Enough||Jun 07, 2013|
- Speed Up Your Web Site with Varnish
- Containers—Not Virtual Machines—Are the Future Cloud
- Linux Systems Administrator
- Lock-Free Multi-Producer Multi-Consumer Queue on Ring Buffer
- Senior Perl Developer
- Technical Support Rep
- Non-Linux FOSS: libnotify, OS X Style
- UX Designer
- RSS Feeds
- It is quiet helping
2 hours 11 min ago
2 hours 28 min ago
- Reachli - Amplifying your
3 hours 44 min ago
4 hours 33 min ago
- good point!
4 hours 36 min ago
- Varnish works!
4 hours 45 min ago
- Reply to comment | Linux Journal
5 hours 14 min ago
- Reply to comment | Linux Journal
7 hours 40 min ago
- Reply to comment | Linux Journal
11 hours 40 min ago
- Yeah, user namespaces are
12 hours 57 min ago
Free Webinar: Hadoop
How to Build an Optimal Hadoop Cluster to Store and Maintain Unlimited Amounts of Data Using Microservers
Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Some of key questions to be discussed are:
- What is the “typical” Hadoop cluster and what should be installed on the different machine types?
- Why should you consider the typical workload patterns when making your hardware decisions?
- Are all microservers created equal for Hadoop deployments?
- How do I plan for expansion if I require more compute, memory, storage or networking?