This commit is contained in:
gferg 2000-10-02 14:33:17 +00:00
parent 519df4b96a
commit f110e34a30
1 changed files with 341 additions and 99 deletions

View File

@ -13,7 +13,17 @@ section can be combined for all of them, methinks.
082400 - Reorganization, refined combined installation recipes
082500 - ppp2214.o link, post-install and pctel, module alignment is discretionary
082800 - MarvS patches, cleanup, some FAQ entries
083100 - Werner Heuser's/LiLAC suggestions: 3Com MiniPCI RFC, older kernels, setserial,
- MarvS's fixscript cleanup
090300 - Pavel says open source lucent driver is no longer under development.
Small other fixes.
092200 - Back to work: add in fixed fixscript
fix up FAQ quite a bit
092800 - Added conexant section
- added link to homepage for recent version
- fixed second ESS link
- fixscript fixed for esscom. Not pretty; hope to have a cleaner version
from Mark soon.
-->
@ -22,7 +32,7 @@ section can be combined for all of them, methinks.
<title>Linmodem-Mini-HOWTO (DRAFT) <!-- insert your title here -->
<author>Sean Walbran <tt/sean(at)walbran.org/ and Marvin Stodolsky <tt/stodolsk(at)erols.com/
<date>v0.20, 30 August 2000 <!-- always have a version number
<date>v0.26, 28 September 2000 <!-- always have a version number
and a date -->
<abstract> <!-- the abstract: a short and precise description -->
<nidx>template</nidx> <!-- add indexing keywords as you go along -->
@ -51,7 +61,7 @@ This is the Linux Linmodem Mini-HOWTO document. It is intended as
a quick reference
to help you find out if there is a way to get your (so-called) winmodem
working under Linux, and, if so, how to do it. You should understand
from the outset that there is probably <em>not</em> support for your winmodem:
from the outset that there is probably <em>no</em> support for your winmodem:
at this time,
there is limited support for such modems, often in the form of vendor-created
but vendor-unsupported,
@ -147,26 +157,29 @@ relevant files before any installation procedure.
<sect1>Credits
<p>
(Note: Should check with these people to make sure it's okay to
publish names and email addresses/web sites.)
A large amount of information contained in this document comes a variety
of great sources such as
<url url="http://www.kcdata.com/~gromitkc/winmodem.html" name="Rob Clark's site">,
<url url="http://www.linmodems.org/" name="Linmodems.org">,
and the mailing lists there, and
Werner Heuser's <url url="http://home.snafu.de/wehe"
name="LiLAC: Linux with LAptop Computers"> pages.
<p>
Thanks to Willie Green (willjr(at)lcc.net) for his fine contribution
of the ESS modem section.
of the ESS modem information.
<p>
Thanks to Mark Spieth (mark(at)digivation.com.au), who contributed
his "fixscript" for module kernel version editing to the Linmodem
Thanks to Mark Spieth (mark(at)digivation.com.au) for
discussions, advice, and the contribution of
his "fixscript" for module kernel version editing (originally to the Linmodem
mailing list
<url url="http://linmodems.org/cgi-bin/ezmlm-cgi?1:msp:1350:lpcibkabibmohmocijoj"
name="here">
, and which is included in the appendix to this document.
, and a newer version which is included in the appendix to this document).
<p>
The remaining information contained in this document comes a variety
of great sources such as
<url url="http://www.kcdata.com/~gromitkc/winmodem.html" name="Rob Clark's site">,
the good people at <url url="http://www.linmodems.org/" name="Linmodems.org">,
and on their mailing lists, and
Werner Heuser's <url url="http://home.snafu.de/wehe/modem_linux.html"
name="LiLAC: Linux Laptop Modem"> page.
Thanks to Werner Heuser <tt/wehe(at)snafu.de/ for tips on setting serial
parameters with older kernels, and a number of other good points.
<p>
Other individual credits are given in the body of the text where appropriate.
<p>
This document itself was created using the SGML HOWTO template
created by Stein Gojen, as described in the
@ -175,6 +188,11 @@ site.
<p>
<sect1> Updates and Corrections
<p>
The most recent HTML version of this document is available at
<url url="http://walbran.org/sean/linux/linmodem-howto.html">,
SGML at <url url="http://walbran.org/sean/linux/linmodem-howto.sgml">,
and some other formats in the same directory.
<p>
Do you have a Linmodem which works, but is not described here? Are you
developing a driver? Do you think something in this document is incorrect
or misleading? Do you think that your or someone else's work has been
@ -205,48 +223,94 @@ run on one's preferred operating system.
At the time of this writing, only a few winmodems will work under
Linux:
<p>
<itemize>
<item>Ambient Technology (formerly Cirrus Logic):
<sect2>Conexant/Rockwell HSF
<p>
There exists a driver at
<url url="http://www.olitec.com/pci56kv2.html"> which was only
recently (Sept. 2000) "discovered" by Denis Havlik (denis(at)mandrakesoft.com).
The page is in French,
but the installation commands are given on the page in boldface red text.
Essentially,
download the package, unpack it with <tt>tar -zxvf</tt>, and run
the installation script <tt>ins_all</tt>. Some things already
known about the driver include:
<itemize>
<item> It was compiled against the RedHat 6.2 kernel 2.2.14-5.0.
<item> It appears to be tuned for the French telephone system.
Mark Allen posted an <tt>.inf</tt> file for some other phone systems
to the linmodems mailing list at <url url="http://linmodems.org/cgi-bin/ezmlm-cgi?1:msp:1773:nlifphijcfgckncagkpa">. Also, you can try disabling
dial-tone detection with your dialer.
</itemize>
This driver has not yet been fully explored; check out the mailing list archives
at <url url="linmodems.org"> for further discussion and information.
<sect2>Ambient Technology (formerly Cirrus Logic)
<p>
Mikhail Moreyra has written a GPL'ed driver for the CL-MD5620DT chipset
which can do up to 33.6 kbps; however, this is <em>alpha</em> software
which can do up to 33.6 kbps; however, this is alpha software
and should be treated with due care. The driver can be obtained at
<url url="http://linmodems.org/CLModem-0.3.0.tar.gz"> <p>
Meanwhile,
<url url="http://linmodems.org/CLModem-0.3.0.tar.gz">. Recently,
Gabriel Gambetta (ggambett(at)internet.com.uy) issued a patched
version of the driver to allow standard AT modem commands;
you can get this version at Rob Clark's site
<url url="http://www.o2.net/~gromitkc/clm/CLModem-0.3.0+gg.tar.gz" name="here">.
<p>
In addition,
<url url="http://www.kcdata.com/~gromitkc/winmodem.html" name="Rob Clark's site">
reports
that Ambient may release Linux drivers for their MD563X HaM modems at
<url url="http://www.ambient.com"> at some undetermined point in the future.
<item>Lucent: There exists an unsupported, binary-only
<sect2>Lucent LT
<p>
There exists a manufacturer-unsupported, binary-only
kernel module compiled for the 2.2.12 Linux kernel released
for Lucent LT (PCI and ISA) modems. As discussed below, this
module will work with
minor complaints under kernel 2.2.14, and with some additional
effort under kernels up through 2.2.17
effort under kernels up through 2.2.17,
but the module does
not insert into the (still experimental) 2.40-test6 kernel.
The driver can be obtained at
<url url="http://linmodems.org/linux568.zip">
<p>
Open source tools for use with Lucent modems are under development
at <url url="http://www.close.u-net.com/ltmodem.html">
and <url url="http://www.suse.cz/development/ltmodem/">.
Some open source tools for use with Lucent modems are
available at <url url="http://www.close.u-net.com/ltmodem.html">.
Pavel Machek writes that "It is not too useful,
however: it is a hardware driver, and without a v.34 protocol stack, you
can't connect to your ISP. It is enough to turn your Lucent winmodem
into an answering machine, however."
<p>
<item>PCTel: Binary drivers for PCI, AMR, and Zoltrix Phantom
<sect2>PCTel
<p>
Binary drivers for PCI, AMR, and Zoltrix Phantom
can be found at
<url url="http://www.kcdata.com/~gromitkc/winmodem.html#drivers">
<p>
<item>ESS: Binary drivers for ES56T-PI (PCI) and ES56V-I (ISA)
<sect2>ESS
<p>
Binary drivers for ES56T-PI (PCI) and ES56V-I (ISA)
can be obtained at
<itemize>
<item>
ISA: <url url="ftp://ftp.esstech.com/pub/modem/isa/unsupported/56v-i/linux/kernel61/linux111.zip"> or
<item>
PCI: <url url="ftp://ftp.esstech.com/pub/modem/pci/unsupported/56t-pi/linux/kernel61/111.zip">.
</itemize>
</itemize>
PCI: <url url="ftp://ftp.esstech.com/pub/modem/pci/unsupported/56t-pi/linux/Kernel61/111.zip">.
man</itemize>
<p>
<sect2>3Com Mini-PCI
<p>
A request for comments was posted by a 3Com official
about the possible demand for a binary-only driver for their miniPCI combination
NIC/winmodem on the <url url="http://linmodems.org/cgi-bin/ezmlm-cgi?1:msp:1229:cilpipdmolabpbbbibgd"
name="Linmodems.org mailing list">. Though to my knowledge no driver has yet been
released, Werner Heuser's <url
url="http://home.snafu.de/wehe/minipci_linux.html" name="miniPCI page"> has more information
and links.
<p>
<sect1> How can I find out if my GeeWhiz 9.8.7 Modem / Laptop has one of these chipsets?
<p>
@ -258,10 +322,11 @@ installed hardware using commands like:
<item> PCI: <tt> cat /proc/pci </tt>
<item> ISA: <tt> pnpdump </tt>
<item> Internal PCMCIA: <tt> cardctl ident </tt>
<item> <tt>dmesg</tt>
</itemize>
<p>
The Device Manager under Windows can provide similar information, but it should be
noted that a manufacturers will often simply put its brand name on a built-in modem, so
noted that a manufacturer will often simply put its brand name on a built-in modem, so
this information may not be as useful as you might hope (e.g., what chipset does
a "Compaq Internal 56k" modem have?).
<p>
@ -441,7 +506,6 @@ try it the other.
ISA PNP devices...OK' on booting. If it fails, you have probably selected
an IRQ/DMA setting which is already in use; try another of the options
given in the <tt>pnpdump</tt> output.
<p>
(Note that it is probably not necessary to reboot, if you run <tt>isapnp</tt>
with the right flags. However, it's easiest for the beginner to simply reboot
at this point.)
@ -449,7 +513,8 @@ at this point.)
<p>
<sect1> PCI Modems
<p>
To access more information on cards with a PCI interface, utilities within the software package
To access more information than <tt>cat /proc/pci</tt> gives
for cards with a PCI interface, utilities within the software package
<tt>pciutils</tt> are useful, such as <tt>scanpci</tt> and <tt>lspci</tt>.
<p>
<sect1> Precompiled Modules and Kernel Versions: <tt>insmod -f</tt>, Fixscripting, and ppp.o
@ -488,11 +553,12 @@ Mark Spieth (mark(at)digivation.com.au) has contributed a script (see appendix)
which edits a binary module so that the version mismatch warning is eliminated,
allowing module insertion to proceed without the forcing flag, i.e. simply
<tt>insmod</tt> <em>module_name</em>. Continuing with the particular
example of <tt>ltmodem.o</tt>, generating an edited module with
example of <tt>ltmodem.o</tt>, if you save this file as <tt>fixscript</tt>, make it executable with <tt>chmod +x fixscript</tt>, and, as the root
user, generate an edited module with
<verb>
./fixscript ltmodem.o ltmodem14.o
</verb>
allows insertion under 2.2.14 without mismatch complaint by
, you can insert the module under 2.2.14 without mismatch complaints by
<verb>
insmod ltmodem14
</verb>
@ -520,7 +586,7 @@ module from 2.2.14 to 2.2.16 as
<verb>
./fixscript ppp.o ppp14to16.o
</verb>
, thus allowing "soft insertion" of both the ltmodem and ppp modules to obtain
thus allowing "soft insertion" of both the ltmodem and ppp modules to obtain
a functioning Linmodem under kernel version 2.2.16.
<p>
At some point, this chained use of outdated modules will probably reach a breaking
@ -542,11 +608,13 @@ is not covered here, since it is usually better described by its
own documentation, and varies more dramatically from package to
package and from time to time.
<p>
Installation instructions for the Conexant driver are given, to
the extent that they are known, above. This driver has not
yet been thoroughly explored.
<p>
You may wish to use the installation
script which may have accompanied your driver instead of following
the instructions given here, but all of the
scripts I have seen simply perform a subset of the following steps
in any case.
the instructions given here.
<p>
You should read
through the instructions given below before beginning, to get a feeling
@ -559,7 +627,7 @@ have been appropriately allocated using isapnptools. (See "ISA Plug-n-Play" abov
<p>
<sect1> Obtain the driver package
<p>
See "What Hardware is Supported" above for the approprate URL for the
See "Which Linmodem hardware is supported?" above for the approprate URL for the
driver for your hardware.
<p>
If necessary, unpack the driver package in an empty directory
@ -631,7 +699,6 @@ If the insertion was successful, it is worth proceeding further.
In the following, all steps except the final one are optional, but will
allow the modules to be inserted without forcing
and without version-mismatch warning messages.
<!-- STOPPED EDITING HERE -->
(Below, replace "ltmodem" with "esscom" if you have an ESS modem.)
<enum>
<item> Make a workplace, say <tt>mkdir /root/modem</tt> and <tt>cd /root/modem</tt>
@ -643,8 +710,9 @@ and without version-mismatch warning messages.
(it should insert without version warnings)
<item> Copy a functional ltmodem.o to the standard module location
with: <tt>cp ltmodem.o /lib/modules/`uname -r`/misc/ltmodem.o </tt>
( The `uname -r` specifies the version of currently running kernel. )
</enum>
The `uname -r` specifies the currently running module. The last three steps will
The last three steps will
have to be repeated when a new kernel is installed, and are ONLY effective during a session under the new kernel.
<p>
If you are running Linux kernel 2.2.15-x or newer, you need to obtain the
@ -690,7 +758,7 @@ or ESS modem, and your kernel is more recent than 2.2.15-x), use of a ppp.o from
sources will be necessary. A copy of this module is available
at <url url="http://walbran.org/sean/linux/stodolsk/ppp2214.o">.
<p>
It can be copied to the appropiate /var/lib/version/net directory
It can be copied to the appropiate /lib/modules/`uname -r`/net directory
as described below. To avoid forcing <tt>insmod -f ppp.o</tt>,
the mismatched ppp.o can be version fixed as described here for
the example of a kernel version 2.2.17 mismatch.
@ -704,7 +772,7 @@ mismatch complaint.
<item> If so, finally save the original module, found at (say) <tt>/lib/modules/2.2.17/net/ppp.o</tt> ,
by renaming it with:
<verb>
mv /lib/modules/2.2.17/net/ppp.o /lib/modules/2.2.17/net/ppp2217.o
mv /lib/modules/2.2.17/net/ppp.o /lib/modules/2.2.17/net/ppp2217.o
</verb>
and place the fixed pppfix.o with
<verb>
@ -728,7 +796,7 @@ If not already done copy the other module file(s) (such as <tt>ltmodem.o</tt>,<t
<item> Esscom users may wish to link /dev/ttyS14 to /dev/esscom for use with
ppp dialers which only recognize names of the ttyS* form, such as <tt>wvdial</tt>.
Note, however, that <tt>wvdial</tt> is reported to give a kernel panic on ppp-off
with this module under kernel 2.2.16 (and possibly others). This may not be a general situation however.
with this module under kernel 2.2.16 (and possibly others). This may not be a general situation, however.
</itemize>
</itemize>
If you wish to allow non-root users to dial out using this device,
@ -759,12 +827,64 @@ for a list of codes.
</itemize>
</itemize>
<p>
<sect1> Modifying your serial port configuration.
<p>
Every Linux distribution has a script file(s) governing the
use of its serial ports. Yours will probably have to be
modified to accommodate the new device. For example,
to use a PCI Lucent winmodem with a Debian installation, the following
Your Linux system will in many cases need to be informed of
the addition of the new "serial" device <tt>/dev/ttyS14</tt> or <tt>15</tt>.
<p>
<sect2> Older kernels (2.0.x)
<p>
The drivers available tend to have been compiled for a kernel version 2.2.x, with
x in the teens. However, if you are for some reason unable/unwilling to update
your kernel, Werner Heuser (wehe(at)snafu.de) points out the following tips for older kernels:
<p>
With 2.0.x kernels, the serial ports
are defined in the serial driver source itself, i.e.
<tt>/usr/src/linux/drivers/char/serial.c</tt>; after 2.1.98, these
moved to <tt>/usr/src/linux/include/asm-i386/serial.h</tt> and require
CONFIG_SERIAL_MANY_PORTS, MULTIPORT and SHARE_IRQ to be set during
kernel configuration. You should modify the appropriate line
for your device file, i.e. either of
<verb>
/* UART CLK PORT IRQ FLAGS */
...
{ 0, BASE_BAUD, 0x000, 0, 0 }, /* ttyS14 (spare; user configurable) */
{ 0, BASE_BAUD, 0x000, 0, 0 }, /* ttyS15 (spare; user configurable) */
</verb>
to read something like
<verb>
{ 0, BASE_BAUD, 0x0260, 3, STD_COM_FLAGS}},
</verb>
with the appropriate port/irq for your hardware.
When you boot the new kernel with these changes,
you should see a message like the following:
<verb>
Serial driver version 4.13 with no serial options enabled
tty00 at 0x03f8 (irq = 4) is a 16550A
tty14 at 0x0260 (irq = 3) is a 16550A
</verb>
<sect2> Newer kernels
<p>
With more modern Linux kernels, script files such as
<tt>/etc/serial.conf</tt> and the program <tt>setserial</tt>
are generally used to govern the parameters of serial ports; your
configuration will likely have to be modified to accommodate the new device, though
this apparently depends on your kernel/distribution of choice.
The best reference for such modifications is David S. Lawyer's excellent
<url url="http://www.linuxdoc.org/HOWTO/Serial-HOWTO.html" name="Serial
HOWTO">, in particular the section on
<url url="http://www.linuxdoc.org/HOWTO/Serial-HOWTO-8.html#set_serial"
name="Setserial">, where he notes, in particular, "Don't ever use setserial
with Laptops (PCMCIA)". The documentation with your distribution should
provide you with more information on the particular defaults and
initialization scripts used.
<p>
As an example, Sean's laptop with the Lucent LT modem, running
Red Hat 6.2/kernel 2.2.14-5, required no modifications to the (
in fact nonexistent) <tt>/etc/serial.conf</tt> whatsoever.
With Marvin's PCI Lucent winmodem with a Debian installation, however,
the following
section is needed in the file <tt>/etc/serial.conf</tt>:
<verb>
@ -780,8 +900,10 @@ section is needed in the file <tt>/etc/serial.conf</tt>:
# These are the ports used for either the Usenet Serial II
# board, or the Boca Board 4, 8, or 16 port boards.
</verb>
Conflicts for interrupt (IRQ) assignments must generally be avoided.
Information on your serial port properties can be displayed with:
<p>
Whatever your particular configuration, conflicts for interrupt
(IRQ) assignments are generally to be avoided.
Information on your serial port properties can be displayed with:
<verb>
setserial -agv /dev/ttyS*
</verb>
@ -798,10 +920,11 @@ which returns information like:
Flags: spd_normal skip_test
</verb>
Note: While Marvin's Debian system needs this addition, Sean's Red Hat
system didn't need any modification to the serial configuration. You
may wish to try yours with and without, and see if either works (better).
<sect1> Try it out with a minimal terminal program
<p>
At this point you probably want to try dialing out with a simple terminal
program like <tt>minicom</tt>.
<p>
<sect1> Configure your ppp dialer
<p>
The name and location of these scripts depend on the particular Linux distribution
@ -858,8 +981,65 @@ at
<p>
<sect1> I get a "device or resource busy" error.
<p>
If you have an ISA modem, did you use the isapnptools to allocate IRQ and DMA
<itemize>
<item> If you have an ISA modem, did you use the isapnptools to allocate IRQ and DMA
resources to the card? See "ISA Plug-n-Play", above, for more information.
<item> If you do <tt>setserial -agv /dev/ttyS*</tt>, does it return something
sane for your device file? If not, see the "Modifying your serial port configuration"
section above.
<item> Otherwise, double-check that you created the device file correctly,
and try to eliminate any IRQ conflicts you might have. If all looks well, but
it still doesn't work, check the <url url="http://Linmodems.org" name="Linmodems.org">
mailing list to see if someone
else has (and has perhaps fixed) the same problem, or try to fix it yourself
and inform others of your results.
</itemize>
<p>
<sect1> I get unresolved symbols when fixscripting/insmoding.
<p>
Unresolved symbols are a true danger of version mismatching and are,
in general, bad, but are also almost inevitable with binary modules.
If the fixscript reports unresolved symbols, or the module does not
work despite the unresolved symbols, you may be out of luck with
that kernel/module combination; however,
a few common cases involve symbols like:
<itemize>
<item> <tt>slhc_xxxx</tt>: You probably need to insmod the slhc
module before inserting the modem/ppp modules.
<item> <tt>printk, jiffies</tt>: Your kernel may be compiled with
SMP enabled. None of the binary modules are known to be SMP-safe, and will
probably only work on a single-processor machine with a single-processor
kernel, i.e. SMP disabled. You should try recompiling your kernel or
otherwise obtaining a version with SMP disabled. (Thanks to
Tom Reinertson (treinertson(at)uswest.net))
<item> <tt>tty_xxxx</tt> with esscom.o:
Earlier fixscripts were not able to handle the version-specific symbols
in this module. A preliminary, expanded fixscript has been included in
this version of the
HOWTO which should be able to fix this module as well. It assumes you
have a fairly recent version of the depmod utility; later versions
will improve the reliability and flexibility of these new parts of the fixscript
code. Look for more recent versions of this HOWTO
<url url="http://walbran.org/sean/linux/linmodem-howto.html"> to
see if the script has been improved.
</itemize>
If a module works in an unstable fashion,
it could be that, under some circumstances, you are avoiding those
symbols, while in others, you slam up against them. Try out different
ppp dialup programs (wvdial, kppp), which call a different set of functions
under similar conditions. It is also possible that the fixscript, which
was designed for the lucent module, is not "fixing" the symbols used
in your module. If you find no combination that works, consider "downgrading"
to a kernel which has a closer version match to that of the module.
<p>
<sect1> The <tt>ppp2214.o</tt> doesn't work with my SuSE (or other) kernel.
<p>
The 2.2.14 ppp.o trick appears to be sensitive to kernel versions
and configurations. Try to obtain one that matches your kernel as
well as possible, and if that doesn't work, try to obtain one from
any other source you can find. For SuSE 7.0, Christoph Hebeisen has
posted a 2.2.14 ppp.o pre-fixed for the SuSE 2.2.16 kernel at his
site, <url url="http://www.physcip.uni-stuttgart.de/heby/computer/ltmodem/"> , which should work.
<p>
<sect1> My PCTel modem doesn't work.
<p>
@ -870,11 +1050,12 @@ around (see the section "Which Linmodem hardware is supported?" above).
You might try one of the others and see if that helps.
</itemize>
<p>
<sect1> The modem dials and connects fine, but then it drops the connection.
<p>
In this case, the module is most likely installed correctly and is working,
but you may have a problem with your ppp configuration. See "Configure
This is an often-reported problem that may not have a solution.
<p>
It is possible that the module is installed correctly and is working,
but that you have a problem with your ppp configuration. See "Configure
your PPP dialer", above, for more information.
<p>
It has been reported that, with some kernel/module mismatches, a program
@ -882,10 +1063,18 @@ like <tt>kppp</tt> will give this error, while an alternative like <tt>wvdial</t
does not, for the same modules and hardware. You may wish to try a different
ppp dialer and see if that helps.
<p>
<sect1> The modem dials and connects fine, but I get a kernel panic on closing the connection.
If none of these helps, you may wish to consider trying to use a kernel version which
is closer to the module. Otherwise, try the mailing list at
<url url="http://Linmodems.org" name="Linmodems.org"> for help.
<p>
This has been reported with ESS modems and <tt>wvdial</tt>. In this case,
<tt>kppp</tt> may work better instead.
<sect1> I get a kernel panic on closing the connection or unloading the driver.
<p>
There are a couple of possible solutions to this, neither of which may work:
<itemize>
<item> Try a different ppp dialer (wvdial, kppp).
<item> Configure the module so that it stays in the kernel, i.e. so that it
is not unloaded.
</itemize>
<p>
<sect1> Nothing seems to work. To whom can I turn for help?
<p>
@ -1074,41 +1263,105 @@ kernel API discrepancies, but simply masquerades the module as having
been compiled under a different version. This allows the module's insertion
without warnings using a plain <tt>insmod</tt> call, but by no means guarantees
the module's functioning.
<p>
The script is given below, but is also available for download at
<url url="http://walbran.org/sean/linux/stodolsk/fixscript">
<p>
Note that the script must be made executable by something like
<tt>chmod +x fixscript</tt>.
<p>
The script:
<verb>
#!/bin/bash
#! /bin/bash
# To make this file executable: chmod +x fixscript
# This is a very slight edit of the ltfixscript contributed to
# the Linmodems Newslist
# From - Sun Jul 23 04:27:38 2000
# From: "Mark Spieth" <mark at digivation.com.au>
# To: <discuss@linmodems.org>
# Subject: ltmodem symbols and version fixed
# Date: Sun, 23 Jul 2000 12:39:44 +1000
# Organization: Digivation Pty Ltd
echo "Fixscript V1.21"
if [ -z "$1" -o -z "$2" ]; then
cat <<END
This script changes version number tags of binary
kernel modules to match the version of the currently
running kernel. It also renames any symbol that the
current kernel cannot resolve into their equivalent
resolvable symbols.
For inserting binary modules into kernels, the fixed
module can be inserted with:
insmod module
which is used in automated kernel module management,
rather than forcing module loading with:
insmod -f module
which is necessary when kernel and module versions
are not matched.
WARNING! This change is purely cosmetic, and the use
of version matched binaries whenever possible is
strongly advised. It may crash your kernel due to
inconsistencies in data structures between the kernel
as it stands and the headers used to originally compile
the module being fixed. No guarantees are given or implied
under any circumstances.
GNU objcopy version 2.9.5 or later is required;
this is provided as part of the binary utilities
packages such as the Debian binutils.deb
USAGE: fixscript input-file output-file
END
exit 1
fi
F=/tmp/objcopyscript
S=/tmp/syms
MI=/tmp/modinfo
DI=/tmp/depinfo
#new kernel version modinfo section
echo -ne "kernel_version="`uname -r`"\0" > $MI
depmod -e $1 | grep -vE "^ltmodem" > $S
echo "#!/bin/bash" > $F
echo "objcopy \\" >> $F
for i in `cat $S` ; do
echo -n doing $i
new=`awk '/ '$i'_R/ {
printf("%s", $2);
}' < /proc/ksyms`
echo " $new"
echo "--redefine=$i=$new \\" >> $F
#build the objcopy command
CMD="objcopy"
#for i in `depmod -e $1 | grep -vE "^$1:"` ; do
depmod -e $1 2>$DI
AWKSTR=\$2
for i in `awk "{print $AWKSTR}" $DI | grep _R` ; do
echo doing $i
i1=`echo $i | awk '{
gsub(/_R[0-9a-fA-F]+/,"");
printf("%s", $1);
}'`
echo "i1=" $i1
echo " trunc=\"$i1\""
searchstr=$i1"_R"
echo "searchstr=" $searchstr
new=`cat /proc/ksyms | grep $searchstr | awk "{print $AWKSTR}"`
echo " new=$new"
CMD="$CMD --redefine-sym=$i=$new"
done
echo "--remove-section=.modinfo \\" >> $F
echo "--add-section=.modinfo=$MI \\" >> $F
echo '$*' >> $F
cat $F
chmod a+x $F
$F $1 $2
rm -f $F $S $MI
#replace the modinfo section with the new one
CMD="$CMD --remove-section=.modinfo --add-section=.modinfo=$MI"
CMD="$CMD $*"
#run the command
echo "CMD:" $CMD
$CMD
#remove the section file
rm -f $MI
rm -f $DI
</verb>
<p>
<sect1> Coincident insertion and removal of ppp related modules (Marvin Stodolsky)
<p>
The Lucent driver installation script defaults
@ -1118,7 +1371,10 @@ insmod -f ltmodem
</verb>
to the end of the initialization script <tt>/etc/rc.d/rc.local</tt>. If
you have, i.e., an ESS modem, you could replace "ltmodem" with "esscom"
above to have your module automatically loaded on boot.
above to have your module automatically loaded on boot. Note, however,
that the initialization scripts differ with different Linux distributions,
so you will need to find, modify, or create the appropriate script(s) for your
particular setup.
<p>
However, many users prefer to run "lean kernels" which only have the auxiliary modules
inserted when necessary. Below are examples of scripts for starting and
@ -1317,17 +1573,3 @@ country_code country_name
</article>