>From the LinModems discussion group:
SM56 users on non-RH distros may also want to follow these instructions.
Stay tuned...
--
Jan Michael Ibanez <[EMAIL PROTECTED]>
Asia Online
--- Begin Message ---
Thanks to Motorola, and JM Ibanez alerting us of the release,
functionality may now be recovered under Linux for the these modems
The intent of this message is to give an explicit example of Jacques
suggestion earlier.
That is, further extending the utility of the new Motorola resource to
other than the few RedHat kernels for which Motorola provides installers at
http://www.motorola.com/softmodem/sm56_download.htm
*Linux Drivers* <http://www.motorola.com/softmodem/sm56_download.htm#top>
*OS* *Modem Type* *Release* *Size* *Download*
RedHat 7.3 DF/PCI 6.05.00 684KB sm56-06.05.00-1.rh7.i386.rpm
<http://www.motorola.com/softmodem/public_download/Linux/sm56-06.05.00-1.rh7.i386.rpm>
RedHat 8.0 DF/PCI 6.05.00 711KB sm56-06.05.00-1.rh8.i386.rpm
<http://www.motorola.com/softmodem/public_download/Linux/sm56-06.05.00-1.rh8.i386.rpm>
RedHat 9.0 DF/PCI 6.05.00 713KB sm56-06.05.00-1.rh9.i386.rpm
<http://www.motorola.com/softmodem/public_download/Linux/sm56-06.05.00-1.rh9.i386.rpm>
The action:
# rpm -i sm56-06.05.00.rh9.i386.rpm
installs
/ usr
|-- share
| |-- doc
| | `-- HTML
| | `-- en
| | `-- sm56/ with documuentation
| `-- man
| `-- man4
| `-- sm56.4
`-- tmp
|-- sm56.lib
|-- wrp2.4.18-3.o
|-- wrp2.4.18.o
|-- wrp2.4.20.o
`-- wrp2.4.22.o
and then runs a script with the following actions:
1) Checks to see if the current kernel-version is CLEANLY supported by
the resource.
If so, a scriplet with basically the following intent is run within
/usr/tmp/ , which could be called "mkversion"
-----
#!/bin/sh
# to make executable
# chmod +x mkversion
cd /usr/tmp/
echo
echo Files like the following should be displayed, though version
numbers may differ:
echo " sm56.lib wrp2.4.18-3.o wrp2.4.18.o wrp2.4.20.o
wrp2.4.22.o"
sleep 3
ls
echo
sleep 3
echo " Now reading the current kernel version and assembling version.c"
echo "echo '// Generated file' > version.c
echo '#define UTS_RELEASE "'`uname -r`'"' >> version.c
echo 'const char __module_kernel_version[]
__attribute__((section(".modinfo"))) = "kernel_version=" UTS_RELEASE;'
>> version.c
echo '#ifdef MODVERSIONS' >> version.c
echo 'const char __module_using_checksums[]
__attribute__((section(".modinfo"))) = "using_checksums=1";' >> version.c
echo '#endif' >> version.c
echo '#define MODULE_LICENSE(license) \' >> version.c
echo ' static const char __module_license[]
__attribute__((section(".modinfo"))) = \' >> version.c
echo ' "license=" license' >> version.c
echo 'MODULE_LICENSE("Proprietary");' >> version.c
echo '' >> version.c
echo Displaying version.c
echo
cat version.c
echo
## end mkversion
This is basically the incorporation of the current kernel-version
designation into a licence statement.
The next action is to convert version.c to a binary version.o with:
gcc -D__KERNEL__ -DMODULE -Wall -O -fomit-frame-pointer -o
version.o -c version.c
which does NOT depend on kernel-source being installed.
If all components were version matched, then the modem driver could be
linked together with:
ld -r -o sm56.o version.o sm56.lib $KWRAPPER
where $KWRAPPER is one of the supplied: wrp2.4.18-3.o wrp2.4.18.o
wrp2.4.20.o wrp2.4.22.o
The problem is that many of Motorola modem Users will have non-RedHat
distros and other kernel-versions,
the numerical labels with the wrp2.4.NN-EXT.o.
Here as Jacques suggests, is where fixscript may help.
It can be downloaded from: http://linmodems.technion.ac.il/resources.html
A specific example. My current kernel is a custom:
# uname -r
2.4.21-scsi
probably closest to 2.4.22 among the supplied wrp2.4.NN-EXT.o
On my System there is a /usr/local/bin/fixscript. So just to allow
shorthand , defining
FIX= /usr/local/bin/fixscript
then, run the script with:
$FIX wrp2.4.22.o wrp2.4.21-scsi.o
doing tty_register_driver_R536a8785 trunc=tty_register_driver
new=tty_register_driver_Re1286c40
doing register_chrdev_R798ae190 trunc=register_chrdev
new=register_chrdev_Re965df89
doing irq_stat_R95cc1909 trunc=irq_stat new=irq_stat_R0cd798d7
doing boot_cpu_data_R4a8db2ac trunc=boot_cpu_data
new=boot_cpu_data_R0657d037
doing tty_unregister_driver_R88d97e89 trunc=tty_unregister_driver
new=tty_unregister_driver_R3ae1fea3
which was successfull technically. Note that is a purely cosemetic fix,
does not guarantee functionality,
and should only be used when there is no better option.
It just renames (thanks to Mark Spieth) 2.4.22 kernel symbols into
2.4.21-scsi symbol counterparts ,
with implicit prayer to your favorite Daemon that functionality will be
OK too.
Then the sm56.0 driver is assembled with:
ld -r -o sm56.o version.o sm56.lib wrp2.4.21-scsi.o
The rest of the original Motorola script copies sm56.o into place and
makes nodes. Below this residual script section is named sm56install.
I have commented out a few removes, which might be troublesome during
trials.
#!/bin/sh
# make executable with
# chmod +x sm56install
# copy sm56.o
cp -fv sm56.o /lib/modules/`uname -r`/kernel/drivers/char/sm56.o
echo "Installing sm56."
if [ -e /dev/sm56 ]; then
echo "/dev/sm56 removed"
rm -f /dev/sm56
fi
mknod /dev/sm56 c 24 0
if [ -e /dev/motomem ]; then
echo "/dev/motomem removed"
rm -f /dev/motomem
fi
mknod /dev/motomem c 28 0
chmod a+w /dev/motomem
rm -f /dev/modem
ln -s /dev/sm56 /dev/modem
#modules.conf:
if [ -e /etc/modules.conf ]; then
MODFILE="/etc/modules.conf"
else
MODFILE="/etc/conf.modules"
fi
echo "Adding SM56 to $MODFILE..."
grep -v sm56 $MODFILE > /etc/modules.tmp
echo 'alias char-major-24 sm56' >> /etc/modules.tmp
echo "options sm56 country=1" >> /etc/modules.tmp
mv -f $MODFILE $MODFILE~
mv -f /etc/modules.tmp $MODFILE
/sbin/depmod -a
#installation clean up
cd /usr/tmp
# rm sm56.lib
rm version.c
rm version.o
rm sm56.o
# rm wrp2.4.18.o
# rm wrp2.4.20.o
# rm wrp2.4.18-3.o
# rm wrp2.4.22.o
#end
echo "Installation successful. "
echo "Remember to read the sm56 MAN page for documentation:"
echo " man sm56"
echo ""
echo "Please restart the system."
### end
Restarting the system is perhaps overkill in Linux but will do no harm.
Please do read the all the Motorola provided sm56 documentation.
The above could be more automated, but I will leave that scriptng to
somone with Motorola hardware
The first functionality tests I would recommend are
0) Install the wvdial.rpm
1) Open a console within which to watch kernel messages with command:
# tail -f /var/log/messages
Open a second console for commands
# insmod sm56
There is trouble if there are any "unresolved symbols" warnings, or your
System crashes. If not
# wvdialconf /etc/wdial.conf
should follow the /dev/modem link and test the basic sanity of the
sm56.0 driver + hardware combination.
If successfull, edit /etc/wvdial.conf and try a dial out with:
# wvdial
or alternatively, setup the kppp dialer, which handles some dialout
details better for some Linux distros.
MarvS
Jacques Goldberg wrote:
About http://www.motorola.com/softmodem/sm56_download.htm
Exceedingly interesting ! Many many thanks
First, it shows something which I did not know earlier, unfortunately: an
earlier version for 2.4 kernels.
Second, the technique used: a wrapper. See www.linuxant.com which offers
a wrapper to directly use Windows drivers (the page does not say if this
is the technique used for their Conexant Linux drivers).
Third, it shows nothing specific to RedHat! I would bet it will work with
any distro with supported kernel (2.4.18, 2.4.20, 2.4.22)
Fourth, it would be interesting to see what happens with some other
kernel than 2.4.18, 2.4.20, 2.4.22 : perhaps fixscript could help there.
Fifth, for those who do not have an rpm-based distro, it seems to me
trivial to make on an rpm-based system a tarball by cutting and pasting
from cat sm56-06.05.00-1.rh7.i386.rpm
Jacques
---------------
To Motorola SM56 users,
I was recently informed that Motorola has newer, updated drivers on
their website. I suggest that Motorola SM56 users download the new
driver, instead of using the kludged legacy binary. Motorola is
distributing modules compatible with the 2.4.18, 2.4.20, and 2.4.22
versions of the kernel, specifically for RedHat 7.3, 8, and 9.
New downloads are available at:
http://www.motorola.com/softmodem/sm56_download.htm
Please email me if you have any problems.
JM Ibanez
[EMAIL PROTECTED]
http://www.livejournal.com/~cyberlizard/
--- End Message ---
--
Philippine Linux Users' Group (PLUG) Mailing List
[EMAIL PROTECTED] (#PLUG @ irc.free.net.ph)
Official Website: http://plug.linux.org.ph
Searchable Archives: http://marc.free.net.ph
.
To leave, go to http://lists.q-linux.com/mailman/listinfo/plug
.
Are you a Linux newbie? To join the newbie list, go to
http://lists.q-linux.com/mailman/listinfo/ph-linux-newbie