File: mini-howto.txt

package info (click to toggle)
pcmciautils 018-18
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 488 kB
  • sloc: ansic: 3,901; lex: 222; makefile: 222; sh: 169; yacc: 105; xml: 24
file content (204 lines) | stat: -rw-r--r-- 7,157 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
Linux Kernel 2.6 PCMCIA - mini-HOWTO
====================================

   Last update: 08 November 2005.

Table of contents:

     * [1]Introduction
     * [2]Setup
          + [3]Determine the socket driver to use
          + [4]Resource database
          + [5]Dependencies
          + [6]Install pcmciautils
          + [7]The difficult cases: CIS overrides
     * [8]Usage


1. Introduction
---------------

   So, you'd like to get PCMCIA working on Linux kernel 2.6.13-rc1 or
   later? This short document intends to help you doing so; for
   additional questions please search the web, especially the help forums
   of your distribution, or ask on the [9]Linux-PCMCIA mailinglist. Also,
   the help texts in the Linux kernel configuration for the PCMCIA
   subsystem might point you into the correct direction -- so please read
   them.


2. Setup
--------

   Fortunately, several distributions have already included up-to-date
   pcmciautils and PCMCIA support into their products. Therefore, you may
   be able to rely on your distribution to set up the system correctly.

  2.1. Determine the socket driver to use
  ---------------------------------------

   At first, you need to determine which PCMCIA socket driver you need to
   use. On most modern notebooks, this is yenta-socket. Else, check the
   kernel configuration menu for the appropriate driver.

   Then, make sure it is either built into the kernel, or it is loaded
   during bootup. Previously, this was oftern handled by the pcmcia-cs
   startup script. As you won't use this package any longer, you can't
   rely on it any more to load the socket driver!

  2.2. Resource database?
  -----------------------

   Then, you need to find out whether you need a resource database. This
   contains the ioport and iomem region which PCMCIA cards may use.
   Fortunately, less and less systems require setting such a database up.

   2.2.1. The lucky ones
   ---------------------

     Sockets which are governed by these drivers do not need a resource
     database:
       * hd64465
       * Au1x00
       * SA1100
       * SA1111
       * PXA2xx
       * M32R_PCC
       * M32R_CFC
       * VRC4171
       * VRC4173

   2.2.2. The unlucky ones
   -----------------------

     These sockets always need a resource database:
       * i82365
       * tcic

   2.2.3. The complicated ones
   ---------------------------

     For the remaining socket drivers,
       * yenta-socket
       * pd6729
       * i82092

     you need to investigate a bit further. However, if you think that this
     is too complicated for you, just try it out without a resource
     database. If it doesn't work, you can still add the resource database
     later on.

     First you need to know if the system is of the x86 or x86_64
     architecture. If you don't know what this means, check wheter you have
     an apple printed on the backside of your notebook -- then the answer
     is no, else it is most probably yes.


     2.2.3.1. x86 and x86_64 architectures
     -------------------------------------

       Now you need to determine the PCI bus the device is on: search for the
       device using the lspci command. Then you'll see a number like
       0000:02:03.0 in front of the device. If the second "block" (which is
       02 in this example), is zero, you need a resource database, if it is
       not zero, you do not need it.

     2.2.3.2. other architectures
     ----------------------------

       On other architectures (including ppc and ppc64) you do not need a
       resource database for such sockets.

  2.3. Dependencies
  -----------------

   If you do not need a resource database, you do not run
   a modular kernel and you are lucky, you might not need any userspace
   tools at all.

   If you use a modular kernel, you also need module-init-tools 3.2-pre4
   or later.

   In addition, you either need the basic hotplug scripts installed, or a
   working udev environment.


  2.4. Installing pcmciautils
  ---------------------------

   Get the latest revision of pcmciautils. Then, you need to configure
   it. Therefore, open the file "Makefile" with an editor of your choice,
   and modify it accordingly:

   If you do not need a resource database, modify the line which starts
   with STARTUP to read

	STARTUP = false

   If you want to use udev instead of hotplug to manage the activation of
   pcmciautils, modify the line which starts with UDEV to read

	UDEV = true

   Issue the famous make command next. Then, if you already had PCMCIA
   running well, make a backup copy of /etc/pcmcia/config.opts. Then
   issue make install.

   If you need a resource database, you should use the version of
   /etc/pcmcia/config.opts you had up and running before (so restore the
   backup copy you just made). Else you can try to use the version which
   is distributed within pcmciautils and installed by default; however
   you might need to modify it for the specific needs of the
   architecture, socket and system you are using.


  2.5. The difficult cases: CIS overrides
  ---------------------------------------

   If the PCMCIA card you use needs a "CIS" override (sort of a
   "firmware" override) to work correctly, get the proper file out of
   [10]pcmcia-cs or from other sources, rename it from ".dat" to ".cis"
   and store it into /lib/firmware/.


3. Usage
--------

  3.1. devices
  ------------

   Plug the cards in, watch them appear in /sys/bus/pcmcia/devices/, use
   them. Don't forget to unmount block devices before ejecting a PCMCIA
   card!

   If you relied on the startup scripts in /etc/pcmcia/*, you should
   switch to the generic hotplug scripts in one of its variants (hotplug,
   hotplug-ng, and so on) or to udev rules. Most distributions already
   include this capability; if not, you might need to adapt them slightly
   depending on your distribution and configuration. Also check the udev
   documentation, for example if you want to name interfaces differently
   from the kernel's default setting.

  3.2. pccardctl (replaces cardctl)
  ---------------------------------

   And what about the command cardctl you might be used to? It is
   replaced by several new ways to achieve the same aims; if you want to
   update pccardctl to handle them all, please send patches to the
   [11]Linux-PCMCIA mailinglist.

	cardctl info            pccardctl info
	cardctl ident           pccardctl ident
	cardctl insert          pccardctl insert
	cardctl eject           pccardctl eject
	cardctl suspend         pccardctl suspend [>=2.6.15]
	cardctl resume          pccardctl resume  [>=2.6.15]
	cardctl suspend         echo -n "3" > /sys/class/pcmcia_socket/pcmcia_socket*/d
	evice/power/state
	cardctl resume          echo -n "0" > /sys/class/pcmcia_socket/pcmcia_socket*/d
	evice/power/state
	cardctl status          cat /sys/class/pcmcia/pcmcia_socket/*/*
	cardctl config          cat /sys/bus/pcmcia/devices/*/*
	cardctl scheme          -- not implemented, as incompatible to cardbus. Use
	                           other utilities (udev, nameif, ...) to achieve
        	                   the same aims --