?? pcmcia-howto
字號:
For me, distributing binaries would be a significant hassle. It is complicated because some features can only be selected at compile time, and because the modules are somewhat dependent on having the ``right'' kernel configuration. So, I would probably need to distribute precompiled modules along with matching kernels. Beyond this, the greatest need for precompiled modules is when installing Linux on a clean system. This typically requires setting up drivers so they can be used in the installation process for a particular Linux distribution. Each Linux distribution has its own ideosyncracies, and it is not feasible for me to provide boot and root disks for even just the common combinations of drivers and distributions. PCMCIA support is included in virtually all modern Linux distributions, 11..99.. WWhhyy iiss tthhee ppaacckkaaggee ssoo ddaarrnneedd bbiigg?? Well, first of all, it isn't actually that large. Most of the package consists of drivers for specific cards. The utility programs add up to about 200K, and the scripts in /etc/pcmcia are about 130K. The core driver modules take up about 60K of system memory. The cardmgr daemon will generally be swapped out except when cards are inserted or removed. The total package size is comparable to DOS/Windows Card Services implementations. Compared to DOS ``point enablers'', this may still seem like a lot of overhead, especially for people that don't plan on using many of the features of PCMCIA, such as power management or hot swapping. Point enablers can be tiny because they generally support only one or a small set of cards, and also generally support a restricted set of host controllers. If someone were to write a genuinely ``generic'' modem enabler, it would end up incorporating much of the functionality of Card Services, to handle cards from different vendors and the full range of host controller variants. 22.. CCoommppiillaattiioonn aanndd iinnssttaallllaattiioonn 22..11.. PPrreerreeqquuiissiitteess aanndd kkeerrnneell sseettuupp Before starting, you should think about whether you really need to compile the PCMCIA package yourself. All common Linux distributions come with pre-compiled driver packages. Generally, you only need to install the drivers from scratch if you need a new feature of the current drivers, or if you've updated and/or reconfigured your kernel in a way that is incompatible with the drivers included with your Linux distribution. While compiling the package is not technically difficult, it does require some general Linux familiarity. The following things should be installed on your system before you begin: +o A 2.0, 2.2, or 2.4 series kernel source tree. +o An appropriate set of module utilities. +o (Optional) the ``XForms'' X11 user interface toolkit. You need to have a complete linux source tree for your kernel, not just an up-to-date kernel image. The driver modules contain some references to kernel source files. While you may want to build a new kernel to remove unnecessary drivers, installing PCMCIA does not require you to do so. Current ``stable'' kernel sources and patches are available from <ftp://ftp.kernel.org/pub/linux/kernel/v2.4>. Current module utilities can be found in the same locations. In the Linux kernel source tree, the Documentation/Changes file describes the versions of all sorts of other system components that are required for that kernel release. You may want to check through this and verify that your system is up to date, especially if you have updated your kernel. If you are using a development kernel, be sure that you are using the right combination of shared libraries and module tools. When configuring your kernel, if you plan on using a PCMCIA ethernet card, you should turn on networking support but turn off the normal Linux network card drivers, including the ``pocket and portable adapters''. The PCMCIA network card drivers are all implemented as loadable modules. Any drivers compiled into your kernel will only waste space. If you want to use SLIP, PPP, or PLIP, you do need to either configure your kernel with these enabled, or use the loadable module versions of these drivers. There is an unfortunate deficiency in the kernel config process in 1.2.X kernels, in that it is not possible to set configuration options (like SLIP compression) for a loadable module, so it is probably better to just link SLIP into the kernel if you need it. In order to use a PCMCIA token ring adapter, your kernel should be configured with ``Token Ring driver support'' (CONFIG_TR) enabled, though you should leave CONFIG_IBMTR off. If you want to use a PCMCIA IDE adapter, your kernel should be configured with CONFIG_BLK_DEV_IDE_PCMCIA enabled, for 2.0.* through 2.1.7 kernels. Older kernels do not support removeable IDE devices; newer kernels do not require a special configuration setting. If you will be using a PCMCIA SCSI adapter, then enable CONFIG_SCSI when configuring your kernel. Also, enable any top level drivers (SCSI disk, tape, cdrom, generic) that you expect to use. All low- level drivers for particular host adapters should be disabled, as they will just take up space. This package includes an X-based card status utility called cardinfo. This utility is based on a freely distributed user interface toolkit called the XForms Library. This library is available as a separate package with most Linux distributions. If you would like to build cardinfo, you should install XForms and all the normal X header files and libraries before configuring the PCMCIA package. This tool is completely optional. 22..22.. IInnssttaallllaattiioonn Here is a synopsis of the installation process: +o Unpack pcmcia-cs-3.1.?.tar.gz in /usr/src. +o Run ``make config'' in the new pcmcia-cs-3.1.? directory. +o Run ``make all'', then ``make install''. +o Customize the startup script and the option files in /etc/pcmcia for your site, if needed. If you plan to install any contributed client drivers not included in the core PCMCIA distribution, unpack each of them in the top-level directory of the PCMCIA source tree. Then follow the normal build instructions. The extra drivers will be compiled and installed automatically. Running ``make config'' prompts for a few configuration options, and checks out your system to verify that it satisfies all prerequisites for installing PCMCIA support. In most cases, you'll be able to just accept all the default configuration options. Be sure to carefully check the output of this command in case there are problems. The following options are available: LLiinnuuxx kkeerrnneell ssoouurrccee ddiirreeccttoorryy?? This is the location of the source tree for the kernel you want to use with PCMCIA. Often this is /usr/src/linux, but the default location depends on what Linux distribution you're using (or on where you've chosen to place your kernel source tree). BBuuiilldd ''ttrruussttiinngg'' vveerrssiioonnss ooff ccaarrdd uuttiilliittiieess?? Some of the support utilities (cardctl and cardinfo) can be compiled either in ``safe'' or ``trusting'' forms. The ``safe'' forms prevent non-root users from modifying card configurations. The ``trusting'' forms permit ordinary users to issue commands to suspend and resume cards, reset cards, and change the current configuration scheme. The default is to build the safe forms. IInncclluuddee 3322--bbiitt ((CCaarrddBBuuss)) ccaarrdd ssuuppppoorrtt?? This option must be selected if you wish to use 32-bit CardBus cards. It is not required for CardBus bridge support, if you only plan to use 16-bit PC Cards. IInncclluuddee PPnnPP BBIIOOSS rreessoouurrccee cchheecckkiinngg?? This builds additional code into the PCMCIA core module to communicate with a system's PnP BIOS to obtain resource information for built-in ``motherboard'' devices (serial and parallel ports, sound, etc), to help avoid resource conflicts. If enabled, some extra resource files will be created under /proc/bus/pccard, and the lspnp and setpnp tools can be used to view and manipulate PnP BIOS devices. However, this setting causes problems on some laptops and is not turned on by default. MMoodduullee iinnssttaallll ddiirreeccttoorryy?? The directory that new kernel modules will be installed into. Normally this should be the subdirectory of /lib/modules that matches your kernel version. HHooww ttoo sseett kkeerrnneell--ssppeecciiffiicc ooppttiioonnss?? There are a few kernel configuration options that affect the PCMCIA tools. The configuration script can deduce these from the running kernel (the default and most common case). Alternatively, if you are compiling for installation on another machine, it can read the configuration from a kernel source tree, or each option can be set interactively. The Configure script can also be executed non-interactively, for automatic builds or to quickly reconfigure after a kernel update. Some additional less-frequently-used options can be only be set from the command line. Running ``Configure --help'' lists all available options. Running ``make all'' followed by ``make install'' will build and then install the kernel modules and utility programs. Kernel modules are installed under /lib/modules/<version>/pcmcia. The cardmgr and cardctl programs are installed in /sbin. If cardinfo is built, it is installed in /usr/bin/X11. Configuration files will be installed in the /etc/pcmcia directory. If you are installing over an older version, your old config scripts will be backed up before being replaced. The saved scripts will be given an *.O extension. If you don't know what kind of host controller your system uses, you can use the probe utility in the cardmgr/ subdirectory to determine this. There are two major types: the Databook TCIC-2 type and the Intel i82365SL-compatible type. In a few cases, the probe command will be unable to determine your controller type automatically. If you have a Halikan NBD 486 system, it has a TCIC-2 controller at an unusual location: you'll need to edit rc.pcmcia to load the tcic module, and also set the PCIC_OPTS parameter to ``tcic_base=0x02c0''. On some old pre-PCI systems using Cirrus controllers, including the NEC Versa M, the BIOS puts the controller in a special suspended state at system startup time. On these systems, the probe command will fail to find any known host controller. If this happens, edit rc.pcmcia and set PCIC to i82365, and PCIC_OPTS to ``wakeup=1''. 22..33.. SSttaarrttuupp ooppttiioonnss The PCMCIA startup script recognizes several groups of startup options, set via environment variables. Multiple options should be separated by spaces and enclosed in quotes. Placement of startup options depends on the Linux distribution used. They may be placed directly in the startup script, or they may be kept in a separate option file. See the ``Notes about specific Linux distributions'' for specifics. The following variables can be set: PCMCIA This variable specifies whether PCMCIA support should be started up, or not. If it is set to anything other than ``yes'', then the startup script will be disabled. PCIC This identifies the PC Card Interface Controller driver module. There are two options: ``tcic'' or ``i82365''. Virtually all current controllers are in the ``i82365'' group. This is the only mandatory option setting. PCIC_OPTS This specifies options for the PCIC module. Some host controllers have optional features that may or may not be implemented in a particular system. In some cases, it is impossible for the socket driver to detect if these features are implemented. See the corresponding man page for a complete description of the available options. CORE_OPTS This specifies options for the pcmcia_core module, which implements the core PC Card driver services. See ``man pcmcia_core'' for more information. CARDMGR_OPTS This specifies options to be passed to the cardmgr daemon. See ``man cardmgr'' for more information. SCHEME If set, then the PC Card configuration scheme will be initialized to this at driver startup time. See the ``Overview of the PCMCIA configuration scripts'' for a discussion of schemes. The low level socket drivers, tcic and i82365, have various bus timing parameters that may need to be adjusted for certain systems with unusual bus clocking. Symptoms of timing problems can include card recognition problems, lock-ups under heavy loads, high error rates, or poor device performance. Only certain host bridges have adjustable timing parameters: check the corresponding man page to see what options are available for your controller. Here is a brief summary: +o ISA-bus Cirrus controllers have numerous configurable timing parameters. The most important seems to be the cmd_time flag, which determines the length of PCMCIA bus cycles. Fast 486 systems (i.e., DX4-100) seem to often benefit from increasing this from 6 (the default) to 12 or 16. +o The Cirrus PD6729 PCI controller has the fast_pci flag, which should be set if the PCI bus speed is greater than 25 MHz. +o For Vadem VG-468 controllers, the async_clock flag changes the relative clocking of PCMCIA bus and host bus cycles. Setting this flag adds extra wait states to some operations. However, I have yet to hear of a laptop that needs this.
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -