Post tutorials, HOWTO's and other useful resources here.
-
Tonio
- Contributor

- Posts: 276
- Joined: 28 Dec 2010, 16:37
- Distribution: Slackware,porteus,FreeBSD,Slax
- Location: 127.0.0.1
Post#1
by Tonio » 28 Dec 2010, 20:33
Cut + paste code below and save as:
Then
and
produces agrsm module in sq4 module.
Code: Select all
#!/bin/sh
# slax build script for agrsm06pci
# uncomment if you have download agrsm code from LinModems Resource Page
# wget http://linmodems.technion.ac.il/packages/ltmodem/11c11040/agrsm06pci-2.1.80~20100106.tar.gz
CWD=$PWD
ARCH=$(uname -m)
ARCH=${ARCH:-i486}
TMP=/tmp/packages
PKG=$TMP/_pkg_
#get ready when slax's gonna change the module's extension
#just like slackware did since version 13
pkgext=lzm
#SLAXMAJOR=$(awk '{print $2}' /etc/slax-version | cut -d'.' -f1)
#don't know yet what it's gonna be
#if [ $SLAXMAJOR -ge 7 ]; then
# pkgext=lzm
#fi
#archive expected in format agrsm06pci-*.tar.gz
if [ $(ls agrsm06pci-*.tar.gz 2>/dev/null | wc -l) -ne 1 ]; then
echo "couldn't find the source archive"
exit 1
fi
archive=$(ls agrsm06pci-*.tar.gz)
src=$(tar tf $archive| head -n1 | tr -d \/)
VERSION=$(echo ${archive%.tar.gz} | sed 's?^agrsm06pci-??' | \
sed 's?-[a-z]\{3,\}$??' | sed 's?-?_?g')
LIB=""
case "$ARCH" in
i386) CFLAGS="-O3 -march=i386 -mcpu=i686";;
i486) CFLAGS="-O3 -march=i486 -mtune=i686";;
i686) CFLAGS="-O3 -march=i686 -mtune=i686";;
athlon-xp) CFLAGS="-O3 -march=athlon-xp -pipe -fomit-frame-pointer";;
x86_64) CFLAGS="-O3"; LIB=64;;
esac
#should we include the architexture in the name?
#MODNAME=agrsm06pci-${VERSION}-$ARCH.$pkgext
MODNAME=agrsm06pci-$VERSION.sq4.$pkgext
description()
{
cat <<EOD
# write description for agrsm06pci
Vendor 11c1 is Lucent Technologies. Modem technologies were transferred to Agere Systems Inc,
which has now been incorporated into LSI Inc, http:/www.lsi.com .
Their Linux code developer/maintainer is Soumyendu Sarkar. Linuz support for a chipset and
its continued maintenance is typically only initiated at the request of a major chipset buyer,
or comparable sponsor. Several different modem chipset types with varying support under Linux are produced:
.
Device ID ChipType Linux drivers Comment
--------- ------------- -------------- -----------------------------
0620 Pinball agrsm In some HP desktop PCs
0630 SV92EX agrsm In some newer PCs
The agrsm code packages compile into a agrmodem.ko + agrserial.ko driver pair.
But there are specialized packages for the different chipsets. The following resources
can be accessed at: http://linmodems.technion.ac.il/packages/ltmodem/11c11040/ has resources.
EOD
}
permissions()
{
chown -R root:root .
find . -perm 664 -exec chmod 644 {} \;
find . -perm 600 -exec chmod 644 {} \;
find . -perm 444 -exec chmod 644 {} \;
find . -perm 400 -exec chmod 644 {} \;
find . -perm 440 -exec chmod 644 {} \;
find . -perm 777 -exec chmod 755 {} \;
find . -perm 775 -exec chmod 755 {} \;
find . -perm 511 -exec chmod 755 {} \;
find . -perm 711 -exec chmod 755 {} \;
find . -perm 555 -exec chmod 755 {} \;
}
strip()
{
(cd $PKG
find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \
xargs strip --strip-unneeded 2> /dev/null
find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \
xargs strip --strip-unneeded 2> /dev/null
)
}
generatelist()
{
(cd $PKG
LIST=$PKG/usr/src/slaxbuilds/agrsm06pci/pkglist.txt
rm -f $LIST
find * | while read f
do
if [ -d "$f" ]; then
echo "${f}/" >> $LIST
fi
if [ -L "$f" ]; then
echo "$f -> $(readlink -n $f)" >> $LIST
elif [ ! -d "$f" ]; then
echo "$f" >> $LIST
fi
done
)
}
if [ -e $TMP ]; then
rm -Rf $TMP/*
fi
mkdir -p $TMP
cd $TMP
tar zxvf $CWD/$archive || exit 1
cd $src || exit 1
permissions || exit 1
#make module || exit 1
make || exit 1
clear
mkdir -p $PKG
#make install || exit 1
./agrinst || exit 1
mkdir -p $PKG/usr/lib/AgereSoftModem
cp AgereMdmDaemon $PKG/usr/lib/AgereSoftModem/
mkdir -p $PKG/lib/modules/`uname -r`/kernel/drivers/char/
cp /lib/modules/`uname -r`/kernel/drivers/char/agr* $PKG/lib/modules/`uname -r`/kernel/drivers/char/
mkdir -p $PKG/etc/rc.d/
cp agr_softmodem $PKG/etc/rc.d/rc.agr_softmodem
chmod +x $PKG/etc/rc.d/rc.agr_softmodem
depmod -a
strip
#normally this is not necessary
(cd $PKG/usr
if [ -d share/man ]; then
mv share/man .
fi
)
(cd $PKG/usr
if [ -d share/doc ]; then
mv share/doc .
fi
)
#we might want to copy README* LICENCE etc to $PKG/usr/doc/agrsm06pci-$VERSION
mkdir -p $PKG/usr/doc/agrsm06pci-$VERSION
cp README* LICENSE $PKG/usr/doc/agrsm06pci-$VERSION
# copy this script and some info to /usr/src/slaxbuilds/agrsm06pci
mkdir -p $PKG/usr/src/slaxbuilds/agrsm06pci
cp $CWD/agrsm06pci.slaxbuild $PKG/usr/src/slaxbuilds/agrsm06pci
description > $PKG/usr/src/slaxbuilds/agrsm06pci/readme.txt
generatelist
clear
echo
cd $CWD
rm -f $MODNAME
#mksquashfs $PKG $MODNAME -b 256K -lzmadic 256K || exit 33
dir2lzm $PKG $MODNAME
chmod a-wx $MODNAME
chmod a+r $MODNAME
echo
echo " agrsm06pci"
echo
description
echo
echo "module $MODNAME successfully created in $CWD"
echo
echo "removing stuff from install"
rm -rf /usr/lib/AgereSoftModem/
rm -rf /lib/modules/`uname -r`/kernel/drivers/char/agr*
rm -Rf $TMP/*
Tonio
-
Tonio
- Contributor

- Posts: 276
- Joined: 28 Dec 2010, 16:37
- Distribution: Slackware,porteus,FreeBSD,Slax
- Location: 127.0.0.1
Post#2
by Tonio » 03 Jul 2011, 01:42
new changes, extension to .pbuild, sq4.lzm to xzm :
Document by Ahau found here with more precise directions:
http://porteus.org/info/docs/49-interne ... 06pci.html
Code: Select all
#!/bin/sh
# slax build script for agrsm06pci
# cheated :( used vonbiber's slaxgenerator script & modified to make it work
# in slax/slax-remix now in Porteus
# vonbiber's webpage http://vonbiber.byethost17.com
# check slax page for some slaxbuilds and the tool I used
# http://vonbiber.byethost17.com/slax/generator/index.html
#
CWD=$PWD
ARCH=$(uname -m)
ARCH=${ARCH:-i486}
TMP=/tmp/packages
PKG=$TMP/_pkg_
#get ready when slax's gonna change the module's extension
#just like slackware did since version 13
pkgext=xzm
#SLAXMAJOR=$(awk '{print $2}' /etc/slax-version | cut -d'.' -f1)
#don't know yet what it's gonna be
#if [ $SLAXMAJOR -ge 7 ]; then
# pkgext=lzm
#fi
#archive expected in format agrsm06pci-*.tar.gz
if [ $(ls agrsm06pci-*.tar.gz 2>/dev/null | wc -l) -ne 1 ]; then
echo "couldn't find the source archive"
exit 1
fi
archive=$(ls agrsm06pci-*.tar.gz)
src=$(tar tf $archive| head -n1 | tr -d \/)
VERSION=$(echo ${archive%.tar.gz} | sed 's?^agrsm06pci-??' | \
sed 's?-[a-z]\{3,\}$??' | sed 's?-?_?g')
LIB=""
case "$ARCH" in
i386) CFLAGS="-O3 -march=i386 -mcpu=i686";;
i486) CFLAGS="-O3 -march=i486 -mtune=i686";;
i686) CFLAGS="-O3 -march=i686 -mtune=i686";;
athlon-xp) CFLAGS="-O3 -march=athlon-xp -pipe -fomit-frame-pointer";;
x86_64) CFLAGS="-O3"; LIB=64;;
esac
#should we include the architexture in the name?
#MODNAME=agrsm06pci-${VERSION}-$ARCH.$pkgext
MODNAME=agrsm06pci-$VERSION.$pkgext
description()
{
cat < /dev/null
find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \
xargs strip --strip-unneeded 2> /dev/null
}
generatelist()
{
(cd $PKG
LIST=$PKG/usr/src/pbuilds/agrsm06pci/pkglist.txt
rm -f $LIST
find * | while read f
do
if [ -d "$f" ]; then
echo "${f}/" >> $LIST
fi
if [ -L "$f" ]; then
echo "$f -> $(readlink -n $f)" >> $LIST
elif [ ! -d "$f" ]; then
echo "$f" >> $LIST
fi
done
)
}
if [ -e $TMP ]; then
rm -Rf $TMP/*
fi
mkdir -p $TMP
cd $TMP
tar zxvf $CWD/$archive || exit 1
cd $src || exit 1
# permissions || exit 1
#make module || exit 1
make || exit 1
clear
mkdir -p $PKG
#make install || exit 1
./agrinst || exit 1
mkdir -p $PKG/usr/lib/AgereSoftModem
cp AgereMdmDaemon $PKG/usr/lib/AgereSoftModem/
mkdir -p $PKG/lib/modules/`uname -r`/kernel/drivers/char/
cp /lib/modules/`uname -r`/kernel/drivers/char/agr* $PKG/lib/modules/`uname -r`/kernel/drivers/char/
mkdir -p $PKG/etc/rc.d/
cp agr_softmodem $PKG/etc/rc.d/rc.agr_softmodem
chmod +x $PKG/etc/rc.d/rc.agr_softmodem
depmod -a
strip
#normally this is not necessary
(cd $PKG/usr
if [ -d share/man ]; then
mv share/man .
fi
)
(cd $PKG/usr
if [ -d share/doc ]; then
mv share/doc .
fi
)
#we might want to copy README* LICENCE etc to $PKG/usr/doc/agrsm06pci-$VERSION
mkdir -p $PKG/usr/doc/agrsm06pci-$VERSION
cp 1stReadme.txt LICENSE $PKG/usr/doc/agrsm06pci-$VERSION
# copy this script and some info to /usr/src/pbuilds/agrsm06pci
mkdir -p $PKG/usr/src/pbuilds/agrsm06pci
cp $CWD/agrsm06pci.pbuild $PKG/usr/src/pbuilds/agrsm06pci
# description does not generate a readme file, so I commented following line
#description > $PKG/usr/src/puilds/agrsm06pci/readme.txt
generatelist
clear
echo
cd $CWD
rm -f $MODNAME
# use this one if you are using Slax 6.1.X
# mksquashfs $PKG $MODNAME -b 256K -lzmadic 256K || exit 33
# Use this one if you are using Porteus
dir2xzm $PKG $MODNAME
chmod a-wx $MODNAME
chmod a+r $MODNAME
echo
echo " agrsm06pci"
echo
description
echo
echo "module $MODNAME successfully created in $CWD"
echo
echo "removing stuff from install"
rm -rf /usr/lib/AgereSoftModem/
rm -rf /lib/modules/`uname -r`/kernel/drivers/char/agr*
rm -Rf $TMP/*
Last edited by
Tonio on 07 Jul 2011, 19:08, edited 1 time in total.
Tonio
-
cttan
- Shogun

- Posts: 333
- Joined: 26 Jan 2011, 16:15
- Distribution: Porteus 3.2 and 4.0 64bit KDE
- Location: Malaysia
Post#3
by cttan » 06 Jul 2011, 07:19
I have this error while trying to compile using the script
*******************************************************
LD [M] /tmp/packages/agrsm06pci-2.1.80~20100106/agrmodem.o
ld: Relocatable linking with relocations from format elf32-i386 (/tmp/packages/agrsm06pci-2.1.80~20100106/agrmodemlib.o) to format elf64-x86-64 (/tmp/packages/agrsm06pci-2.1.80~20100106/agrmodem.o) is not supported
make[2]: *** [/tmp/packages/agrsm06pci-2.1.80~20100106/agrmodem.o] Error 1
make[1]: *** [_module_/tmp/packages/agrsm06pci-2.1.80~20100106] Error 2
make[1]: Leaving directory `/usr/src/linux-2.6.38.8'
make: *** [default] Error 2
*******************************************************
Pls help.
cttan
-
Tonio
- Contributor

- Posts: 276
- Joined: 28 Dec 2010, 16:37
- Distribution: Slackware,porteus,FreeBSD,Slax
- Location: 127.0.0.1
Post#4
by Tonio » 07 Jul 2011, 03:48
I did not encounter that error, but I ran the scripts in the RC3, will need to check it. Nonetheless, if the kernel is the same as in RC3, I have a working module that I can send to you, but that would mean that the kernel in RC3 is the same as the release in 1.0. I will check it out and return back tomorrow if possible.
Edit:
AAAH you are running 64 bit porteus. The module/script will only work with 32 bit porteus/32 bit linux distros
Code: Select all
/agrmodemlib.o) to format elf64-x86-64 (/tmp/packages/agrsm06pci-2.1.80~20100106/agrmodem.o) is not supported
Tonio
-
cttan
- Shogun

- Posts: 333
- Joined: 26 Jan 2011, 16:15
- Distribution: Porteus 3.2 and 4.0 64bit KDE
- Location: Malaysia
Post#5
by cttan » 07 Jul 2011, 13:40
Hi Tonio,
Can the module work in 64bit mode?
cttan
-
Tonio
- Contributor

- Posts: 276
- Joined: 28 Dec 2010, 16:37
- Distribution: Slackware,porteus,FreeBSD,Slax
- Location: 127.0.0.1
Post#6
by Tonio » 07 Jul 2011, 17:32
cttan wrote:Hi Tonio,
Can the module work in 64bit mode?
Try running scanModem in your 64 bit porteus and post it here to prove/disprove the following:
Take a look at page:
http://modemhelplinux.741.com/
if you need an example. Essentially you need to download scanModem.gz, then run the following commands:
http://linmodems.technion.ac.il/packages/scanModem.gz
Code: Select all
# gunzip scanModem.gz
# chmod +x scanModem
# ,/scanModem
Post a copy of Modemdata.txt in pastebin/similar or just look for a line that has:
Support type needed or chipset: agrsm
There is no agrsm software support for x86_64 systems, through the
modem may be
supported on Intel/i386 installations, which do more slowly servce
x86_64 processors.
and that will show what I mean. To use the modem, you would need porteus 32 bit and download crippled kernel sources and then run
and hopefully you don't see error messages

Tonio
-
cttan
- Shogun

- Posts: 333
- Joined: 26 Jan 2011, 16:15
- Distribution: Porteus 3.2 and 4.0 64bit KDE
- Location: Malaysia
Post#7
by cttan » 08 Jul 2011, 16:25
@Tonio
You are right! It is not supported on x86_64.
Support type needed or chipset: agrsm
Writing DOCs/Intel.txt
There is no agrsm software support for x86_64 systems, through the modem may be
supported on Intel/i386 installations, which do more slowly servce x86_64 processors.
Thank you very much!
cttan