Tutorials - Porteus - Portable Linux Learn how to install Porteus, about Porteus modules and getting porteus to work with wifi internet. http://www.porteus.org/tutorials/18-internet-connection.feed 2024-05-03T02:53:38+00:00 Joomla! - Open Source Content Management [HOWTO] Broadcom wifi under Porteus 2012-08-02T19:55:20+00:00 2012-08-02T19:55:20+00:00 http://www.porteus.org/tutorials/18-internet-connection/144-howto-broadcom-wifi-under-porteus.html fanthom <div class="feed-description"><p>As you probably know, Broadcom wifi chipsets are the most problematic in the linux world.<br />Starting with the Porteus-1.2 release we are going to provide 4 drivers which should cover all broadcom wifi cards.</p> <p><br />The broadcom-sta driver will be&nbsp;placed in 000-kernel.xzm along with the b43, b43-legacy and bcma drivers. The last three are blacklisted by default as broadcom-sta supports the majority of wifi NIC's. Unfortunately older chipsets are not working properly with broadcom-sta so b43, b43-legacy and bcma must&nbsp;come to the rescue.<br />Here is an example of a wifi card that is not working with the broadcom-sta driver:</p> <dl><dd><code>lspci -knn<br />0c:00.0 Network controller [0280]: Broadcom Corporation BCM4311 802.11b/g WLAN [14e4:4311] (rev 01)<br />Subsystem: Dell Wireless 1390 WLAN Mini-Card [1028:0007]<br />Kernel modules: wl, ssb</code></dd></dl> <p><br /><br /></p> <dl class="codebox"><dt>&nbsp;</dt></dl><dl><dd><code>dmesg<br />[&nbsp; &nbsp; 5.878844] wl: module license 'unspecified' taints kernel.<br />[&nbsp; &nbsp; 5.878849] Disabling lock debugging due to kernel taint<br />[&nbsp; &nbsp; 5.892862] wl 0000:0c:00.0: PCI INT A -&gt; GSI 17 (level, low) -&gt; IRQ 17<br />[&nbsp; &nbsp; 5.892872] wl 0000:0c:00.0: setting latency timer to 64<br />[&nbsp; &nbsp; 5.895866] eth%d: 5.100.82.112 driver failed with code 21<br /></code></dd></dl> <p><br /><br />Here is an example of a card that is working correctly with broadcom-sta:</p> <dl class="codebox"><dt>&nbsp;</dt></dl><dl><dd><code>lspci -knn<br />0c:00.0 Network controller [0280]: Broadcom Corporation BCM4312 802.11b/g LP-PHY [14e4:4315] (rev 01)<br />Subsystem: Dell Wireless 1395 WLAN Mini-Card [1028:000b]<br />Kernel driver in use: wl<br />Kernel modules: wl, ssb</code></dd></dl> <p>&nbsp;</p> <dl><dd><code>dmesg<br />[&nbsp; &nbsp; 6.916353] wl: module license 'unspecified' taints kernel.<br />[&nbsp; &nbsp; 6.916357] Disabling lock debugging due to kernel taint<br />[&nbsp; &nbsp; 6.928402] wl 0000:0c:00.0: PCI INT A -&gt; GSI 17 (level, low) -&gt; IRQ 17<br />[&nbsp; &nbsp; 6.928416] wl 0000:0c:00.0: setting latency timer to 64<br />[&nbsp; &nbsp; 6.990065] lib80211_crypt: registered algorithm 'TKIP'<br />[&nbsp; &nbsp; 6.990369] eth1: Broadcom BCM4315 802.11 Hybrid Wireless Controller 5.100.82.112</code></dd></dl> <p><br /><br />As you can see "Dell Wireless 1390" is unlucky while "Dell Wireless 1395" works just fine.<br /><br />What to do if your NIC is not working with the broadcom-sta driver?<br />The solution is quite simple as Porteus comes with other drivers which should do the job. The only thing which must be done is to blacklist 'wl' driver (our broadcom-sta) and unblacklist the rest.&nbsp; To do this, create a file (plain text) at /mnt/sdXY/porteus/rootcopy/etc/modprobe.d/b43_blacklist.conf with following content:</p> <dl class="codebox"><dt><code>&nbsp;&nbsp;&nbsp; blacklist wl</code></dt></dl> <p><br />This file will override the original one from 000-kernel.xzm and the b43 (or b43-legacy, or bcma) driver will take priority over 'wl'.<br />By default Porteus-1.2 ships only with open-source firmware for the b43 driver which supports a&nbsp;limited number of chipsets. You can still extract non-free firmware for b43 driver with the help of b43-fwcutter as described in this HOWTO:<br /><a class="postlink" href="http://linuxwireless.org/en/users/Drivers/b43#Other_distributions_not_mentioned_above">link</a> <br /><br />here is sample dmesg output when broadcom chipset is served by the b43 driver:</p> <dl><dd><code>dmesg | grep b43<br />[&nbsp; &nbsp; 8.070964] b43-pci-bridge 0000:0c:00.0: PCI INT A -&gt; GSI 17 (level, low) -&gt; IRQ 17<br />[&nbsp; &nbsp; 8.070975] b43-pci-bridge 0000:0c:00.0: setting latency timer to 64<br />[&nbsp; &nbsp; 8.326540] b43-phy0: Broadcom 4311 WLAN found (core revision 10)<br />[&nbsp; &nbsp; 8.444650] Registered led device: b43-phy0::tx<br />[&nbsp; &nbsp; 8.444670] Registered led device: b43-phy0::rx<br />[&nbsp; &nbsp; 8.444691] Registered led device: b43-phy0::radio<br />[&nbsp; &nbsp;11.554040] b43-phy0: Loading firmware version 666.2 (2011-02-23 01:15:07)</code></dd></dl> <p><br /><br />Hopefully all broadcom problems will finally be gone in Porteus-1.2.</p></div> <div class="feed-description"><p>As you probably know, Broadcom wifi chipsets are the most problematic in the linux world.<br />Starting with the Porteus-1.2 release we are going to provide 4 drivers which should cover all broadcom wifi cards.</p> <p><br />The broadcom-sta driver will be&nbsp;placed in 000-kernel.xzm along with the b43, b43-legacy and bcma drivers. The last three are blacklisted by default as broadcom-sta supports the majority of wifi NIC's. Unfortunately older chipsets are not working properly with broadcom-sta so b43, b43-legacy and bcma must&nbsp;come to the rescue.<br />Here is an example of a wifi card that is not working with the broadcom-sta driver:</p> <dl><dd><code>lspci -knn<br />0c:00.0 Network controller [0280]: Broadcom Corporation BCM4311 802.11b/g WLAN [14e4:4311] (rev 01)<br />Subsystem: Dell Wireless 1390 WLAN Mini-Card [1028:0007]<br />Kernel modules: wl, ssb</code></dd></dl> <p><br /><br /></p> <dl class="codebox"><dt>&nbsp;</dt></dl><dl><dd><code>dmesg<br />[&nbsp; &nbsp; 5.878844] wl: module license 'unspecified' taints kernel.<br />[&nbsp; &nbsp; 5.878849] Disabling lock debugging due to kernel taint<br />[&nbsp; &nbsp; 5.892862] wl 0000:0c:00.0: PCI INT A -&gt; GSI 17 (level, low) -&gt; IRQ 17<br />[&nbsp; &nbsp; 5.892872] wl 0000:0c:00.0: setting latency timer to 64<br />[&nbsp; &nbsp; 5.895866] eth%d: 5.100.82.112 driver failed with code 21<br /></code></dd></dl> <p><br /><br />Here is an example of a card that is working correctly with broadcom-sta:</p> <dl class="codebox"><dt>&nbsp;</dt></dl><dl><dd><code>lspci -knn<br />0c:00.0 Network controller [0280]: Broadcom Corporation BCM4312 802.11b/g LP-PHY [14e4:4315] (rev 01)<br />Subsystem: Dell Wireless 1395 WLAN Mini-Card [1028:000b]<br />Kernel driver in use: wl<br />Kernel modules: wl, ssb</code></dd></dl> <p>&nbsp;</p> <dl><dd><code>dmesg<br />[&nbsp; &nbsp; 6.916353] wl: module license 'unspecified' taints kernel.<br />[&nbsp; &nbsp; 6.916357] Disabling lock debugging due to kernel taint<br />[&nbsp; &nbsp; 6.928402] wl 0000:0c:00.0: PCI INT A -&gt; GSI 17 (level, low) -&gt; IRQ 17<br />[&nbsp; &nbsp; 6.928416] wl 0000:0c:00.0: setting latency timer to 64<br />[&nbsp; &nbsp; 6.990065] lib80211_crypt: registered algorithm 'TKIP'<br />[&nbsp; &nbsp; 6.990369] eth1: Broadcom BCM4315 802.11 Hybrid Wireless Controller 5.100.82.112</code></dd></dl> <p><br /><br />As you can see "Dell Wireless 1390" is unlucky while "Dell Wireless 1395" works just fine.<br /><br />What to do if your NIC is not working with the broadcom-sta driver?<br />The solution is quite simple as Porteus comes with other drivers which should do the job. The only thing which must be done is to blacklist 'wl' driver (our broadcom-sta) and unblacklist the rest.&nbsp; To do this, create a file (plain text) at /mnt/sdXY/porteus/rootcopy/etc/modprobe.d/b43_blacklist.conf with following content:</p> <dl class="codebox"><dt><code>&nbsp;&nbsp;&nbsp; blacklist wl</code></dt></dl> <p><br />This file will override the original one from 000-kernel.xzm and the b43 (or b43-legacy, or bcma) driver will take priority over 'wl'.<br />By default Porteus-1.2 ships only with open-source firmware for the b43 driver which supports a&nbsp;limited number of chipsets. You can still extract non-free firmware for b43 driver with the help of b43-fwcutter as described in this HOWTO:<br /><a class="postlink" href="http://linuxwireless.org/en/users/Drivers/b43#Other_distributions_not_mentioned_above">link</a> <br /><br />here is sample dmesg output when broadcom chipset is served by the b43 driver:</p> <dl><dd><code>dmesg | grep b43<br />[&nbsp; &nbsp; 8.070964] b43-pci-bridge 0000:0c:00.0: PCI INT A -&gt; GSI 17 (level, low) -&gt; IRQ 17<br />[&nbsp; &nbsp; 8.070975] b43-pci-bridge 0000:0c:00.0: setting latency timer to 64<br />[&nbsp; &nbsp; 8.326540] b43-phy0: Broadcom 4311 WLAN found (core revision 10)<br />[&nbsp; &nbsp; 8.444650] Registered led device: b43-phy0::tx<br />[&nbsp; &nbsp; 8.444670] Registered led device: b43-phy0::rx<br />[&nbsp; &nbsp; 8.444691] Registered led device: b43-phy0::radio<br />[&nbsp; &nbsp;11.554040] b43-phy0: Loading firmware version 666.2 (2011-02-23 01:15:07)</code></dd></dl> <p><br /><br />Hopefully all broadcom problems will finally be gone in Porteus-1.2.</p></div> [HOWTO] Connect faster while using NetworkManager 2012-08-02T19:45:20+00:00 2012-08-02T19:45:20+00:00 http://www.porteus.org/tutorials/18-internet-connection/143-howto-connect-faster-while-using-networkmanager.html fanthom <div class="feed-description"><p>Here are two tips how to connect faster while using NetworkManager.<br />Credits goes to the ArchWiki team.<br /><a class="postlink" href="https://wiki.archlinux.org/index.php/NetworkManager">link</a><br /><br /><span style="font-weight: bold;">Disabling IPv6</span><br /><br />Slow connection or reconnection to the network may be due to superfluous IPv6 queries in NetworkManager. If there is no IPv6 support on the local network, connecting to a network may take longer than normal while Network Manager tries to establish an IPv6 connection that eventually times out. The solution is to disable IPv6 within NetworkManager which will make network connection faster. This has to be done once for every network you connect to.<br /><br />Right-click on the network status icon.<br />Click on "Edit Connections".<br />Go to the "Wired" or "Wireless" tab, as appropriate.<br />Select the name of the network.<br />Click on "Edit".<br />Go to the "IPv6 Settings" tab.<br />In the "Method" dropdown, choose "Ignore".<br />Click on "Save". <br /><br /><span style="font-weight: bold;">Speed up DHCP by disabling ARP probing in dhcpcd</span><br /><br />dhcpcd contains an implementation of a recommendation of the DHCP standard (RFC2131 section 2.2) to check via ARP if the assigned IP address is really not taken. This seems mostly useless in home networks, so you can save about 5 seconds on every connect by adding the following line to /etc/dhcpcd.conf:<br /><br /></p> <dl class="codebox"><dt><code>noarp</code></dt></dl> <p>This is equivalent to passing --noarp to dhcpcd, and disables the described ARP probing, speeding up connections to networks with DHCP.</p></div> <div class="feed-description"><p>Here are two tips how to connect faster while using NetworkManager.<br />Credits goes to the ArchWiki team.<br /><a class="postlink" href="https://wiki.archlinux.org/index.php/NetworkManager">link</a><br /><br /><span style="font-weight: bold;">Disabling IPv6</span><br /><br />Slow connection or reconnection to the network may be due to superfluous IPv6 queries in NetworkManager. If there is no IPv6 support on the local network, connecting to a network may take longer than normal while Network Manager tries to establish an IPv6 connection that eventually times out. The solution is to disable IPv6 within NetworkManager which will make network connection faster. This has to be done once for every network you connect to.<br /><br />Right-click on the network status icon.<br />Click on "Edit Connections".<br />Go to the "Wired" or "Wireless" tab, as appropriate.<br />Select the name of the network.<br />Click on "Edit".<br />Go to the "IPv6 Settings" tab.<br />In the "Method" dropdown, choose "Ignore".<br />Click on "Save". <br /><br /><span style="font-weight: bold;">Speed up DHCP by disabling ARP probing in dhcpcd</span><br /><br />dhcpcd contains an implementation of a recommendation of the DHCP standard (RFC2131 section 2.2) to check via ARP if the assigned IP address is really not taken. This seems mostly useless in home networks, so you can save about 5 seconds on every connect by adding the following line to /etc/dhcpcd.conf:<br /><br /></p> <dl class="codebox"><dt><code>noarp</code></dt></dl> <p>This is equivalent to passing --noarp to dhcpcd, and disables the described ARP probing, speeding up connections to networks with DHCP.</p></div> [SCRIPT] Make module for Agere Pinball modems agrsm06pci 2011-01-12T05:03:00+00:00 2011-01-12T05:03:00+00:00 http://www.porteus.org/tutorials/18-internet-connection/79-script-make-module-for-agere-pinball-modems-agrsm06pci.html Tonio <div class="feed-description"><p><span style="font-size: 10pt;" mce_style="font-size: 10pt;"><em>Note:&nbsp; This script is for Porteus V&nbsp;1.0.</em></span></p> <p>You'll need to download the source file for the driver (agrsm06pci).&nbsp; As of 06/15/2011, it could be found <a href="http://linmodems.technion.ac.il/packages/ltmodem/11c11040/">here</a>.<br /><br />Cut + paste main code below and save as: <strong><em>agrsm06pci.pbuild</em></strong></p> <p>Make it executable:<strong><em> chmod +x agrsm06pci.pbuild</em></strong></p> <p>Run the script: <strong><em>./agrsm06pci.pbuild<br /></em></strong><br />Note:&nbsp; It should be run in the same directory as the tar.gz source file.<br /><br /></p> <p class="code"><code>#!/bin/sh<br /><br />#&nbsp;porteus build script for agrsm06pci<br /><br />CWD=$PWD<br /><br />ARCH=$(uname -m)<br />ARCH=${ARCH:-i486}<br /><br />TMP=/tmp/packages<br />PKG=$TMP/_pkg_<br /><br />#get ready when slax's gonna change the module's extension<br />#just like slackware did since version 13<br /><br />pkgext=xzm<br />#SLAXMAJOR=$(awk '{print $2}' /etc/slax-version | cut -d'.' -f1)<br />#don't know yet what it's gonna be<br />#if [ $SLAXMAJOR -ge 7 ]; then<br /># pkgext=lzm<br />#fi<br /><br />#archive expected in format agrsm06pci-*.tar.gz<br />if [ $(ls agrsm06pci-*.tar.gz 2&gt;/dev/null | wc -l) -ne 1 ]; then<br />echo "couldn't find the source archive"<br />exit 1<br />fi<br />archive=$(ls agrsm06pci-*.tar.gz)<br /><br />src=$(tar tf $archive| head -n1 | tr -d \/)<br /><br />VERSION=$(echo ${archive%.tar.gz} | sed 's?^agrsm06pci-??' | \<br />sed 's?-[a-z]\{3,\}$??' | sed 's?-?_?g')<br /><br />LIB=""<br />case "$ARCH" in<br />i386) CFLAGS="-O3 -march=i386 -mcpu=i686";;<br />i486) CFLAGS="-O3 -march=i486 -mtune=i686";;<br />i686) CFLAGS="-O3 -march=i686 -mtune=i686";;<br />athlon-xp) CFLAGS="-O3 -march=athlon-xp -pipe -fomit-frame-pointer";;<br />x86_64) CFLAGS="-O3"; LIB=64;;<br />esac<br /><br />#should we include the architexture in the name?<br />#MODNAME=agrsm06pci-${VERSION}-$ARCH.$pkgext<br />MODNAME=agrsm06pci-$VERSION.$pkgext<br /><br />description()<br />{<br />cat &lt; /dev/null<br />find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \<br />xargs strip --strip-unneeded 2&gt; /dev/null<br /><br />}<br /><br />generatelist()<br />{<br />(cd $PKG<br />LIST=$PKG/usr/src/slaxbuilds/agrsm06pci/pkglist.txt<br />rm -f $LIST<br />find * | while read f<br />do<br />if [ -d "$f" ]; then<br />echo "${f}/" &gt;&gt; $LIST<br />fi<br />if [ -L "$f" ]; then<br />echo "$f -&gt; $(readlink -n $f)" &gt;&gt; $LIST<br />elif [ ! -d "$f" ]; then<br />echo "$f" &gt;&gt; $LIST<br />fi<br />done<br />)<br />}<br /><br />if [ -e $TMP ]; then<br />rm -Rf $TMP/*<br />fi<br />mkdir -p $TMP<br /><br />cd $TMP<br /><br />tar zxvf $CWD/$archive || exit 1<br /><br />cd $src || exit 1<br /><br /># permissions || exit 1<br /><br />#make module || exit 1<br />make || exit 1<br /><br />clear<br /><br />mkdir -p $PKG<br />#make install || exit 1<br />./agrinst || exit 1<br /><br />mkdir -p $PKG/usr/lib/AgereSoftModem<br />cp AgereMdmDaemon $PKG/usr/lib/AgereSoftModem/<br />mkdir -p $PKG/lib/modules/`uname -r`/kernel/drivers/char/<br />cp /lib/modules/`uname -r`/kernel/drivers/char/agr* $PKG/lib/modules/`uname -r`/kernel/drivers/char/<br />mkdir -p $PKG/etc/rc.d/<br />cp agr_softmodem $PKG/etc/rc.d/rc.agr_softmodem<br />chmod +x $PKG/etc/rc.d/rc.agr_softmodem<br />depmod -a<br /><br />strip<br /><br />#normally this is not necessary<br />(cd $PKG/usr<br />if [ -d share/man ]; then<br />mv share/man .<br />fi<br />)<br />(cd $PKG/usr<br />if [ -d share/doc ]; then<br />mv share/doc .<br />fi<br />)<br /><br />#we might want to copy README* LICENCE etc to $PKG/usr/doc/agrsm06pci-$VERSION<br />mkdir -p $PKG/usr/doc/agrsm06pci-$VERSION<br />cp README* LICENSE $PKG/usr/doc/agrsm06pci-$VERSION<br /><br /># copy this script and some info to /usr/src/pbuilds/agrsm06pci<br />mkdir -p $PKG/usr/src/pbuilds/agrsm06pci<br /><br />cp $CWD/agrsm06pci.pbuild $PKG/usr/src/pbuilds/agrsm06pci<br /><br />description &gt; $PKG/usr/src/puilds/agrsm06pci/readme.txt<br /><br />generatelist<br /><br />clear<br />echo<br />cd $CWD<br />rm -f $MODNAME<br /><br /># use this one if you are using Slax 6.1.X<br />#mksquashfs $PKG $MODNAME -b 256K -lzmadic 256K || exit 33<br />#Use this one if you are using Porteus<br />dir2xzm $PKG $MODNAME<br />chmod a-wx $MODNAME<br />chmod a+r $MODNAME<br /><br />echo<br />echo " agrsm06pci"<br />echo<br />description<br />echo<br />echo "module $MODNAME successfully created in $CWD"<br />echo<br />echo "removing stuff from install"<br />rm -rf /usr/lib/AgereSoftModem/<br />rm -rf /lib/modules/`uname -r`/kernel/drivers/char/agr*<br /><br />rm -Rf $TMP/*</code></p></div> <div class="feed-description"><p><span style="font-size: 10pt;" mce_style="font-size: 10pt;"><em>Note:&nbsp; This script is for Porteus V&nbsp;1.0.</em></span></p> <p>You'll need to download the source file for the driver (agrsm06pci).&nbsp; As of 06/15/2011, it could be found <a href="http://linmodems.technion.ac.il/packages/ltmodem/11c11040/">here</a>.<br /><br />Cut + paste main code below and save as: <strong><em>agrsm06pci.pbuild</em></strong></p> <p>Make it executable:<strong><em> chmod +x agrsm06pci.pbuild</em></strong></p> <p>Run the script: <strong><em>./agrsm06pci.pbuild<br /></em></strong><br />Note:&nbsp; It should be run in the same directory as the tar.gz source file.<br /><br /></p> <p class="code"><code>#!/bin/sh<br /><br />#&nbsp;porteus build script for agrsm06pci<br /><br />CWD=$PWD<br /><br />ARCH=$(uname -m)<br />ARCH=${ARCH:-i486}<br /><br />TMP=/tmp/packages<br />PKG=$TMP/_pkg_<br /><br />#get ready when slax's gonna change the module's extension<br />#just like slackware did since version 13<br /><br />pkgext=xzm<br />#SLAXMAJOR=$(awk '{print $2}' /etc/slax-version | cut -d'.' -f1)<br />#don't know yet what it's gonna be<br />#if [ $SLAXMAJOR -ge 7 ]; then<br /># pkgext=lzm<br />#fi<br /><br />#archive expected in format agrsm06pci-*.tar.gz<br />if [ $(ls agrsm06pci-*.tar.gz 2&gt;/dev/null | wc -l) -ne 1 ]; then<br />echo "couldn't find the source archive"<br />exit 1<br />fi<br />archive=$(ls agrsm06pci-*.tar.gz)<br /><br />src=$(tar tf $archive| head -n1 | tr -d \/)<br /><br />VERSION=$(echo ${archive%.tar.gz} | sed 's?^agrsm06pci-??' | \<br />sed 's?-[a-z]\{3,\}$??' | sed 's?-?_?g')<br /><br />LIB=""<br />case "$ARCH" in<br />i386) CFLAGS="-O3 -march=i386 -mcpu=i686";;<br />i486) CFLAGS="-O3 -march=i486 -mtune=i686";;<br />i686) CFLAGS="-O3 -march=i686 -mtune=i686";;<br />athlon-xp) CFLAGS="-O3 -march=athlon-xp -pipe -fomit-frame-pointer";;<br />x86_64) CFLAGS="-O3"; LIB=64;;<br />esac<br /><br />#should we include the architexture in the name?<br />#MODNAME=agrsm06pci-${VERSION}-$ARCH.$pkgext<br />MODNAME=agrsm06pci-$VERSION.$pkgext<br /><br />description()<br />{<br />cat &lt; /dev/null<br />find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \<br />xargs strip --strip-unneeded 2&gt; /dev/null<br /><br />}<br /><br />generatelist()<br />{<br />(cd $PKG<br />LIST=$PKG/usr/src/slaxbuilds/agrsm06pci/pkglist.txt<br />rm -f $LIST<br />find * | while read f<br />do<br />if [ -d "$f" ]; then<br />echo "${f}/" &gt;&gt; $LIST<br />fi<br />if [ -L "$f" ]; then<br />echo "$f -&gt; $(readlink -n $f)" &gt;&gt; $LIST<br />elif [ ! -d "$f" ]; then<br />echo "$f" &gt;&gt; $LIST<br />fi<br />done<br />)<br />}<br /><br />if [ -e $TMP ]; then<br />rm -Rf $TMP/*<br />fi<br />mkdir -p $TMP<br /><br />cd $TMP<br /><br />tar zxvf $CWD/$archive || exit 1<br /><br />cd $src || exit 1<br /><br /># permissions || exit 1<br /><br />#make module || exit 1<br />make || exit 1<br /><br />clear<br /><br />mkdir -p $PKG<br />#make install || exit 1<br />./agrinst || exit 1<br /><br />mkdir -p $PKG/usr/lib/AgereSoftModem<br />cp AgereMdmDaemon $PKG/usr/lib/AgereSoftModem/<br />mkdir -p $PKG/lib/modules/`uname -r`/kernel/drivers/char/<br />cp /lib/modules/`uname -r`/kernel/drivers/char/agr* $PKG/lib/modules/`uname -r`/kernel/drivers/char/<br />mkdir -p $PKG/etc/rc.d/<br />cp agr_softmodem $PKG/etc/rc.d/rc.agr_softmodem<br />chmod +x $PKG/etc/rc.d/rc.agr_softmodem<br />depmod -a<br /><br />strip<br /><br />#normally this is not necessary<br />(cd $PKG/usr<br />if [ -d share/man ]; then<br />mv share/man .<br />fi<br />)<br />(cd $PKG/usr<br />if [ -d share/doc ]; then<br />mv share/doc .<br />fi<br />)<br /><br />#we might want to copy README* LICENCE etc to $PKG/usr/doc/agrsm06pci-$VERSION<br />mkdir -p $PKG/usr/doc/agrsm06pci-$VERSION<br />cp README* LICENSE $PKG/usr/doc/agrsm06pci-$VERSION<br /><br /># copy this script and some info to /usr/src/pbuilds/agrsm06pci<br />mkdir -p $PKG/usr/src/pbuilds/agrsm06pci<br /><br />cp $CWD/agrsm06pci.pbuild $PKG/usr/src/pbuilds/agrsm06pci<br /><br />description &gt; $PKG/usr/src/puilds/agrsm06pci/readme.txt<br /><br />generatelist<br /><br />clear<br />echo<br />cd $CWD<br />rm -f $MODNAME<br /><br /># use this one if you are using Slax 6.1.X<br />#mksquashfs $PKG $MODNAME -b 256K -lzmadic 256K || exit 33<br />#Use this one if you are using Porteus<br />dir2xzm $PKG $MODNAME<br />chmod a-wx $MODNAME<br />chmod a+r $MODNAME<br /><br />echo<br />echo " agrsm06pci"<br />echo<br />description<br />echo<br />echo "module $MODNAME successfully created in $CWD"<br />echo<br />echo "removing stuff from install"<br />rm -rf /usr/lib/AgereSoftModem/<br />rm -rf /lib/modules/`uname -r`/kernel/drivers/char/agr*<br /><br />rm -Rf $TMP/*</code></p></div> [SCRIPT] Module creator for Smartlink modems 2011-01-12T04:57:19+00:00 2011-01-12T04:57:19+00:00 http://www.porteus.org/tutorials/18-internet-connection/78-script-module-creator-for-smartlink-modems.html Tonio <div class="feed-description"><p>&nbsp;</p> <p><strong><em>NOTE:&nbsp; This script is written for Porteus V1.0</em></strong><br /><br />Cut + paste main code below and save as <strong><em>'slmodem.pbuild'</em></strong></p> <p>Make it executable: <strong><em>chmod +x slmodem.pbuild</em></strong></p> <p>Run the script: <strong><em>./slmodem.pbuild<br /></em></strong></p> <p>&nbsp;</p> <p class="code"><code><br />#!/bin/bash<br />#<br /># slmodemd package for Smartlink Modems<br /># Download both packages (slmodem and ungrab-winmodem) with wget, ncomment if internet<br /># connection is not present put a "#" before wget commands<br />#<br />#wget http://linmodems.technion.ac.il/packages/smartlink/slmodem-2.9.11-20110321.tar.gz<br />#sleep 2<br />#wget http://linmodems.technion.ac.il/packages/smartlink/ungrab-winmodem-20090716.tar.gz <br />#sleep 2<br />PKG=slmodem-2.9.11-20110321<br />TMP=/tmp/slmodem$$<br />PKG2=ungrab-winmodem-20090716<br />TMP2=/tmp/ungrab-winmodem$$<br /><br />#set -e<br /><br />tar -zxvf $PKG*<br />tar -zxvf $PKG2*<br /># copy rc.slmodemd fromm script/slackware packages and make changes to work in porteus<br />cd $PKG/scripts/slackware/<br />sed -i '8 s|/dev/slusb0|/dev/slamr0|g' rc.slmodemd<br />sed -i '8 a /sbin/depmod -a' rc.slmodemd<br />sed -i '9 a sleep 3' rc.slmodemd<br />sed -i '13 a if !&nbsp;[[ -e $SLMODEMD_DEVICE&nbsp;]] &amp;&gt; /dev/null; then \' rc.slmodemd<br />sed -i '14 a {\' rc.slmodemd<br />sed -i '15 a \\t mkdir -p /dev' rc.slmodemd<br />sed -i '16 a \\t mknod -m 600 /dev/slamr0 c 242 0 ; mknod -m 600 /dev/slamr1 c 242 1 ;' rc.slmodemd<br />sed -i '17 a \\t mknod -m 600 /dev/slamr2 c 242 2 ; mknod -m 600 /dev/slamr3 c 242 3 ;' rc.slmodemd<br />sed -i '18 a \\t echo -n' rc.slmodemd<br />sed -i '19 a \\t mknod -m 600 /dev/slusb0 c 243 0 ; mknod -m 600 /dev/slusb1 c 243 1 ;' rc.slmodemd<br />sed -i '20 a \\t mknod -m 600 /dev/slusb2 c 243 2 ; mknod -m 600 /dev/slusb3 c 243 3 ;' rc.slmodemd<br />sed -i '21 a \\t echo -n ||' rc.slmodemd<br />sed -i '22 a \\t {' rc.slmodemd<br />sed -i '23 a \\t echo "failed."' rc.slmodemd<br />sed -i '24 a \\t exit -1' rc.slmodemd<br />sed -i '25 a \\t }' rc.slmodemd<br />sed -i '26 a }' rc.slmodemd<br />sed -i '27 a fi' rc.slmodemd<br />sed -i '28 a\' rc.slmodemd<br />sed -i '28 a \\t cat /proc/modules | grep 'ungrab_winmodem' &gt;/dev/null ||' rc.slmodemd<br />sed -i '29 a \\t {' rc.slmodemd<br />sed -i '30 a \\t echo -n "Ungrabbing winmodem from kernel ... "' rc.slmodemd<br />sed -i '31 a \\t modprobe ungrab-winmodem &amp;&amp; echo "done." ||' rc.slmodemd<br />sed -i '32 a \\t {' rc.slmodemd<br />sed -i '33 a \\t echo "failed."' rc.slmodemd<br />sed -i '34 a \\t exit -1' rc.slmodemd<br />sed -i '35 a \\t }' rc.slmodemd<br />sed -i '36 a \\t }' rc.slmodemd<br />sed -i '37 a \\t cat /proc/modules | grep 'slamr' &gt;/dev/null ||' rc.slmodemd<br />sed -i '38 a \\t {' rc.slmodemd<br />sed -i '39 a \\t echo -n "Loading SmartLink Modem driver into kernel ... "' rc.slmodemd<br />sed -i '40 a \\t modprobe slamr &amp;&amp; echo "done." ||' rc.slmodemd<br />sed -i '41 a \\t {' rc.slmodemd<br />sed -i '42 a \\t echo "failed."' rc.slmodemd<br />sed -i '43 a \\t exit -1' rc.slmodemd<br />sed -i '44 a \\t }' rc.slmodemd<br />sed -i '45 a \\t }' rc.slmodemd<br /># end of long sed expression<br />mkdir -p $TMP/etc/rc.d/<br />cp rc.slmodemd $TMP/etc/rc.d/<br />chmod +x $TMP/etc/rc.d/rc.slmodemd<br />cd ..<br />cd ..<br /># return to base directory<br />sleep 3<br /><br />make KERNEL_DIR=/lib/modules/`uname -r`/build<br />make all<br />make install DESTDIR=$TMP<br />sleep 3<br />cd ..<br /><br /># take care of ungrab-winmodem<br />cd $PKG2<br />make<br />make install<br />mkdir -p $TMP/lib/modules/`uname -r`/extra<br />cp -ra /lib/modules/`uname -r`/extra/ungrab-winmodem.ko $TMP/lib/modules/`uname -r`/extra<br />sleep 5<br />rm -Rf $TMP2<br /><br /># delete slamr.ko and ungrab-winmodem.ko<br />rm -rf /lib/modules/`uname -r`/extra/slamr.ko<br />rm -rf /lib/modules/`uname -r`/extra/ungrab-winmodem.ko<br /><br /># copy build script<br />cd ..<br />mkdir -p $TMP/usr/src/pbuilds/<br />cp $0 $TMP/usr/src/pbuilds/<br />find $TMP -type d | xargs chmod -v 755<br />find $TMP | grep .gz | xargs gunzip<br />find $TMP | xargs file | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded<br /><br />dir2xzm $TMP $PKG.xzm<br />rm -Rf $TMP<br />rm -Rf $PKG<br />rm -Rf $PKG2<br />chmod 755 $PKG.xzm<br /></code></p></div> <div class="feed-description"><p>&nbsp;</p> <p><strong><em>NOTE:&nbsp; This script is written for Porteus V1.0</em></strong><br /><br />Cut + paste main code below and save as <strong><em>'slmodem.pbuild'</em></strong></p> <p>Make it executable: <strong><em>chmod +x slmodem.pbuild</em></strong></p> <p>Run the script: <strong><em>./slmodem.pbuild<br /></em></strong></p> <p>&nbsp;</p> <p class="code"><code><br />#!/bin/bash<br />#<br /># slmodemd package for Smartlink Modems<br /># Download both packages (slmodem and ungrab-winmodem) with wget, ncomment if internet<br /># connection is not present put a "#" before wget commands<br />#<br />#wget http://linmodems.technion.ac.il/packages/smartlink/slmodem-2.9.11-20110321.tar.gz<br />#sleep 2<br />#wget http://linmodems.technion.ac.il/packages/smartlink/ungrab-winmodem-20090716.tar.gz <br />#sleep 2<br />PKG=slmodem-2.9.11-20110321<br />TMP=/tmp/slmodem$$<br />PKG2=ungrab-winmodem-20090716<br />TMP2=/tmp/ungrab-winmodem$$<br /><br />#set -e<br /><br />tar -zxvf $PKG*<br />tar -zxvf $PKG2*<br /># copy rc.slmodemd fromm script/slackware packages and make changes to work in porteus<br />cd $PKG/scripts/slackware/<br />sed -i '8 s|/dev/slusb0|/dev/slamr0|g' rc.slmodemd<br />sed -i '8 a /sbin/depmod -a' rc.slmodemd<br />sed -i '9 a sleep 3' rc.slmodemd<br />sed -i '13 a if !&nbsp;[[ -e $SLMODEMD_DEVICE&nbsp;]] &amp;&gt; /dev/null; then \' rc.slmodemd<br />sed -i '14 a {\' rc.slmodemd<br />sed -i '15 a \\t mkdir -p /dev' rc.slmodemd<br />sed -i '16 a \\t mknod -m 600 /dev/slamr0 c 242 0 ; mknod -m 600 /dev/slamr1 c 242 1 ;' rc.slmodemd<br />sed -i '17 a \\t mknod -m 600 /dev/slamr2 c 242 2 ; mknod -m 600 /dev/slamr3 c 242 3 ;' rc.slmodemd<br />sed -i '18 a \\t echo -n' rc.slmodemd<br />sed -i '19 a \\t mknod -m 600 /dev/slusb0 c 243 0 ; mknod -m 600 /dev/slusb1 c 243 1 ;' rc.slmodemd<br />sed -i '20 a \\t mknod -m 600 /dev/slusb2 c 243 2 ; mknod -m 600 /dev/slusb3 c 243 3 ;' rc.slmodemd<br />sed -i '21 a \\t echo -n ||' rc.slmodemd<br />sed -i '22 a \\t {' rc.slmodemd<br />sed -i '23 a \\t echo "failed."' rc.slmodemd<br />sed -i '24 a \\t exit -1' rc.slmodemd<br />sed -i '25 a \\t }' rc.slmodemd<br />sed -i '26 a }' rc.slmodemd<br />sed -i '27 a fi' rc.slmodemd<br />sed -i '28 a\' rc.slmodemd<br />sed -i '28 a \\t cat /proc/modules | grep 'ungrab_winmodem' &gt;/dev/null ||' rc.slmodemd<br />sed -i '29 a \\t {' rc.slmodemd<br />sed -i '30 a \\t echo -n "Ungrabbing winmodem from kernel ... "' rc.slmodemd<br />sed -i '31 a \\t modprobe ungrab-winmodem &amp;&amp; echo "done." ||' rc.slmodemd<br />sed -i '32 a \\t {' rc.slmodemd<br />sed -i '33 a \\t echo "failed."' rc.slmodemd<br />sed -i '34 a \\t exit -1' rc.slmodemd<br />sed -i '35 a \\t }' rc.slmodemd<br />sed -i '36 a \\t }' rc.slmodemd<br />sed -i '37 a \\t cat /proc/modules | grep 'slamr' &gt;/dev/null ||' rc.slmodemd<br />sed -i '38 a \\t {' rc.slmodemd<br />sed -i '39 a \\t echo -n "Loading SmartLink Modem driver into kernel ... "' rc.slmodemd<br />sed -i '40 a \\t modprobe slamr &amp;&amp; echo "done." ||' rc.slmodemd<br />sed -i '41 a \\t {' rc.slmodemd<br />sed -i '42 a \\t echo "failed."' rc.slmodemd<br />sed -i '43 a \\t exit -1' rc.slmodemd<br />sed -i '44 a \\t }' rc.slmodemd<br />sed -i '45 a \\t }' rc.slmodemd<br /># end of long sed expression<br />mkdir -p $TMP/etc/rc.d/<br />cp rc.slmodemd $TMP/etc/rc.d/<br />chmod +x $TMP/etc/rc.d/rc.slmodemd<br />cd ..<br />cd ..<br /># return to base directory<br />sleep 3<br /><br />make KERNEL_DIR=/lib/modules/`uname -r`/build<br />make all<br />make install DESTDIR=$TMP<br />sleep 3<br />cd ..<br /><br /># take care of ungrab-winmodem<br />cd $PKG2<br />make<br />make install<br />mkdir -p $TMP/lib/modules/`uname -r`/extra<br />cp -ra /lib/modules/`uname -r`/extra/ungrab-winmodem.ko $TMP/lib/modules/`uname -r`/extra<br />sleep 5<br />rm -Rf $TMP2<br /><br /># delete slamr.ko and ungrab-winmodem.ko<br />rm -rf /lib/modules/`uname -r`/extra/slamr.ko<br />rm -rf /lib/modules/`uname -r`/extra/ungrab-winmodem.ko<br /><br /># copy build script<br />cd ..<br />mkdir -p $TMP/usr/src/pbuilds/<br />cp $0 $TMP/usr/src/pbuilds/<br />find $TMP -type d | xargs chmod -v 755<br />find $TMP | grep .gz | xargs gunzip<br />find $TMP | xargs file | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded<br /><br />dir2xzm $TMP $PKG.xzm<br />rm -Rf $TMP<br />rm -Rf $PKG<br />rm -Rf $PKG2<br />chmod 755 $PKG.xzm<br /></code></p></div> [SCRIPT] Make module for PCTEL modems 2011-01-12T04:40:50+00:00 2011-01-12T04:40:50+00:00 http://www.porteus.org/tutorials/18-internet-connection/77-script-make-module-for-pctel-modems.html Tonio <div class="feed-description"><p>Pctel Modems have linux drivers see this page for more information<br style="padding: 0px; margin: 0px;" /><br style="padding: 0px; margin: 0px;" /><a style="direction: ltr; unicode-bidi: embed; text-decoration: none; color: #105289; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: #368ad2; padding: 0px; margin: 0px;" href="http://linmodems.technion.ac.il/packages/pctel/welcome.html">http://linmodems.technion.ac.il/package ... lcome.html</a><br style="padding: 0px; margin: 0px;" /><br style="padding: 0px; margin: 0px;" />If you see the welcome page above, you will see I participated a bit in the helping of getting the driver to work, but if it were not for Porteus &amp; community, it would not have been possible either, I tested code without being harmed.</p> <p><em><strong>NOTE:&nbsp; This script has been written for Porteus V1.0</strong></em><br /><br />Copy + paste main code and save as <strong><em>pctel.pbuild.sh</em></strong></p> <p>Make it executable with: <em><strong>chmod +x pctel.pbuild.sh</strong></em></p> <p>Change into the folder and run script with<em>: <strong>./pctel.pbuild.sh</strong></em></p> <p><em><strong>&nbsp;</strong></em></p> <p class="code"><code>bash-4.1# cat pctel.pbuild<br />#!/bin/bash<br /><br />PKG=pctel-0.9.7-9-rht-11<br />TMP=/tmp/pctel-$$<br /><br /># download the source from linmodems page, uncomment if you want to download pctel source<br />#wget http://linmodems.technion.ac.il/packages/pctel/pctel-0.9.7-9-rht-11.tar.gz<br />#set -e<br /><br />tar -zxvf $PKG*<br />sleep 2;<br />cd $PKG/src<br />sed -i '88 a #if LINUX_VERSION_CODE &lt; KERNEL_VERSION(2,6,37)' linmodem-2.6.c<br />sed -i '90 a #else' linmodem-2.6.c<br />sed -i '91 a static DEFINE_SEMAPHORE(linmodem_sem);' linmodem-2.6.c<br />sed -i '92 a #endif' linmodem-2.6.c<br />sed -i '1207 a #if LINUX_VERSION_CODE &lt; KERNEL_VERSION(2,6,37)' linmodem-2.6.c<br />sed -i '1209 a #else' linmodem-2.6.c<br />sed -i '1210 a static DEFINE_SEMAPHORE(serial_sem);' linmodem-2.6.c<br />sed -i '1211 a #endif' linmodem-2.6.c<br />sleep 3;<br /><br /># run ./configure -auto for the type of modem you have<br /># you can have pct789,,,cm8738, i8xx, sis, via686a<br />./configure -auto # otherwise change this to your modem type :)<br />make<br />make install DESTDIR=$TMP<br />#mkdir -p $TMP/lib/modules/`uname -r`/misc/<br />#cp -ra /lib/modules/`uname -r`/misc/*.ko $TMP/lib/modules/`uname -r`/misc/<br />mkdir -p $TMP/etc/udev/rules.d/<br />echo "KERNEL==\"ttyS_PCTEL0\", SYMLINK=\"modem\"" &gt; $TMP/etc/udev/rules.d/70-pctel.rules<br />sleep 3<br />rm -rf /lib/modules/`uname -r`/misc/pctel.o<br />rm -rf /lib/modules/`uname -r`/misc/ptserial.o<br />sleep 3<br />cd ../../<br /><br />mkdir -p $TMP/etc/rc.d/<br />echo "#!/bin/bash " &gt;&gt; $TMP/etc/rc.d/rc.pctel<br />echo "#==========================================================" &gt;&gt; $TMP/etc/rc.d/rc.pctel<br />echo "# Startup script for PCTEL modem modules " &gt;&gt; $TMP/etc/rc.d/rc.pctel<br />echo "# " &gt;&gt; $TMP/etc/rc.d/rc.pctel<br />echo "# copied from <!-- m --><a class="postlink" href="#pctel">http://kristol.org/david/dell-i8200/#pctel</a><!-- m --> " &gt;&gt; $TMP/etc/rc.d/rc.pctel<br />echo "# and modified for Slax Linux Live/Porteus LiveCD by " &gt;&gt; $TMP/etc/rc.d/rc.pctel<br />echo "# Antonio A. Olivares " &gt;&gt; $TMP/etc/rc.d/rc.pctel<br />echo "# <!-- e --><a href="mailto:olivares14031@gmail.com">olivares14031@gmail.com</a><!-- e -->, <!-- e --><a href="mailto:discuss@linmodems.org">discuss@linmodems.org</a><!-- e --> " &gt;&gt; $TMP/etc/rc.d/rc.pctel<br />echo "#==========================================================" &gt;&gt; $TMP/etc/rc.d/rc.pctel<br />echo " " &gt;&gt; $TMP/etc/rc.d/rc.pctel<br />echo "/sbin/depmod -a " &gt;&gt; $TMP/etc/rc.d/rc.pctel<br />echo " " &gt;&gt; $TMP/etc/rc.d/rc.pctel<br />echo "if [-e /dev/modem] &amp;&gt; /dev/null; then" &gt;&gt; $TMP/etc/rc.d/rc.pctel<br />echo " { " &gt;&gt; $TMP/etc/rc.d/rc.pctel<br />echo " echo \"Linking /dev/ttyS_PCTEL0 to /dev/modem to let kppp access modem\" " &gt;&gt; $TMP/etc/rc.d/rc.pctel<br />echo " ln -s /dev/ttyS_PCTEL0 /dev/modem " &gt;&gt; $TMP/etc/rc.d/rc.pctel<br />echo " } " &gt;&gt; $TMP/etc/rc.d/rc.pctel<br />echo "fi " &gt;&gt; $TMP/etc/rc.d/rc.pctel<br />echo " " &gt;&gt; $TMP/etc/rc.d/rc.pctel<br />echo "# See how we were called. " &gt;&gt; $TMP/etc/rc.d/rc.pctel<br />echo " case \"\$1\" in " &gt;&gt; $TMP/etc/rc.d/rc.pctel<br />echo " start) " &gt;&gt; $TMP/etc/rc.d/rc.pctel<br />echo " echo -n \"Starting pctel . . .\" " &gt;&gt; $TMP/etc/rc.d/rc.pctel<br />echo " modprobe linmodem" &gt;&gt; $TMP/etc/rc.d/rc.pctel<br />echo " modprobe pctel" &gt;&gt; $TMP/etc/rc.d/rc.pctel<br />echo " modprobe pctel_hw" &gt;&gt; $TMP/etc/rc.d/rc.pctel<br />echo " echo \"done\" " &gt;&gt; $TMP/etc/rc.d/rc.pctel<br />echo " ;;" &gt;&gt; $TMP/etc/rc.d/rc.pctel<br />echo " stop)" &gt;&gt; $TMP/etc/rc.d/rc.pctel<br />echo " echo -n \"Shutting down pctel . . .\"" &gt;&gt; $TMP/etc/rc.d/rc.pctel<br />echo " modprobe -r pctel" &gt;&gt; $TMP/etc/rc.d/rc.pctel<br />echo " modprobe -r pctel_hw" &gt;&gt; $TMP/etc/rc.d/rc.pctel<br />echo " modprobe -r linmodem" &gt;&gt; $TMP/etc/rc.d/rc.pctel<br />echo " echo \"done\"" &gt;&gt; $TMP/etc/rc.d/rc.pctel<br />echo " ;;" &gt;&gt; $TMP/etc/rc.d/rc.pctel<br />echo " status)" &gt;&gt; $TMP/etc/rc.d/rc.pctel<br />echo " ;;" &gt;&gt; $TMP/etc/rc.d/rc.pctel<br />echo " restart)" &gt;&gt; $TMP/etc/rc.d/rc.pctel<br />echo " \$0 stop" &gt;&gt; $TMP/etc/rc.d/rc.pctel<br />echo " \$0 start" &gt;&gt; $TMP/etc/rc.d/rc.pctel<br />echo " ;;" &gt;&gt; $TMP/etc/rc.d/rc.pctel<br />echo " *)" &gt;&gt; $TMP/etc/rc.d/rc.pctel<br />echo " echo \"Usage: pctel {start|stop|restart|status}\" " &gt;&gt; $TMP/etc/rc.d/rc.pctel<br />echo " exit 1" &gt;&gt; $TMP/etc/rc.d/rc.pctel<br />echo " esac" &gt;&gt; $TMP/etc/rc.d/rc.pctel<br />echo " " &gt;&gt; $TMP/etc/rc.d/rc.pctel<br />echo " exit 0" &gt;&gt; $TMP/etc/rc.d/rc.pctel<br />chmod +x $TMP/etc/rc.d/rc.pctel<br /><br /># copy build script<br />mkdir -p $TMP/usr/src/pbuilds/<br />cp $0 $TMP/usr/src/pbuilds/<br />find $TMP -type d | xargs chmod -v 755<br />find $TMP | grep .gz | xargs gunzip<br />find $TMP | xargs file | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded<br /><br /><br />dir2xzm $TMP $PKG.xzm<br />rm -Rf $TMP<br />rm -Rf $PKG<br />chmod 755 $PKG.xzm<br /></code></p> <p><strong><em>Thanks Tonio !!</em></strong></p></div> <div class="feed-description"><p>Pctel Modems have linux drivers see this page for more information<br style="padding: 0px; margin: 0px;" /><br style="padding: 0px; margin: 0px;" /><a style="direction: ltr; unicode-bidi: embed; text-decoration: none; color: #105289; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: #368ad2; padding: 0px; margin: 0px;" href="http://linmodems.technion.ac.il/packages/pctel/welcome.html">http://linmodems.technion.ac.il/package ... lcome.html</a><br style="padding: 0px; margin: 0px;" /><br style="padding: 0px; margin: 0px;" />If you see the welcome page above, you will see I participated a bit in the helping of getting the driver to work, but if it were not for Porteus &amp; community, it would not have been possible either, I tested code without being harmed.</p> <p><em><strong>NOTE:&nbsp; This script has been written for Porteus V1.0</strong></em><br /><br />Copy + paste main code and save as <strong><em>pctel.pbuild.sh</em></strong></p> <p>Make it executable with: <em><strong>chmod +x pctel.pbuild.sh</strong></em></p> <p>Change into the folder and run script with<em>: <strong>./pctel.pbuild.sh</strong></em></p> <p><em><strong>&nbsp;</strong></em></p> <p class="code"><code>bash-4.1# cat pctel.pbuild<br />#!/bin/bash<br /><br />PKG=pctel-0.9.7-9-rht-11<br />TMP=/tmp/pctel-$$<br /><br /># download the source from linmodems page, uncomment if you want to download pctel source<br />#wget http://linmodems.technion.ac.il/packages/pctel/pctel-0.9.7-9-rht-11.tar.gz<br />#set -e<br /><br />tar -zxvf $PKG*<br />sleep 2;<br />cd $PKG/src<br />sed -i '88 a #if LINUX_VERSION_CODE &lt; KERNEL_VERSION(2,6,37)' linmodem-2.6.c<br />sed -i '90 a #else' linmodem-2.6.c<br />sed -i '91 a static DEFINE_SEMAPHORE(linmodem_sem);' linmodem-2.6.c<br />sed -i '92 a #endif' linmodem-2.6.c<br />sed -i '1207 a #if LINUX_VERSION_CODE &lt; KERNEL_VERSION(2,6,37)' linmodem-2.6.c<br />sed -i '1209 a #else' linmodem-2.6.c<br />sed -i '1210 a static DEFINE_SEMAPHORE(serial_sem);' linmodem-2.6.c<br />sed -i '1211 a #endif' linmodem-2.6.c<br />sleep 3;<br /><br /># run ./configure -auto for the type of modem you have<br /># you can have pct789,,,cm8738, i8xx, sis, via686a<br />./configure -auto # otherwise change this to your modem type :)<br />make<br />make install DESTDIR=$TMP<br />#mkdir -p $TMP/lib/modules/`uname -r`/misc/<br />#cp -ra /lib/modules/`uname -r`/misc/*.ko $TMP/lib/modules/`uname -r`/misc/<br />mkdir -p $TMP/etc/udev/rules.d/<br />echo "KERNEL==\"ttyS_PCTEL0\", SYMLINK=\"modem\"" &gt; $TMP/etc/udev/rules.d/70-pctel.rules<br />sleep 3<br />rm -rf /lib/modules/`uname -r`/misc/pctel.o<br />rm -rf /lib/modules/`uname -r`/misc/ptserial.o<br />sleep 3<br />cd ../../<br /><br />mkdir -p $TMP/etc/rc.d/<br />echo "#!/bin/bash " &gt;&gt; $TMP/etc/rc.d/rc.pctel<br />echo "#==========================================================" &gt;&gt; $TMP/etc/rc.d/rc.pctel<br />echo "# Startup script for PCTEL modem modules " &gt;&gt; $TMP/etc/rc.d/rc.pctel<br />echo "# " &gt;&gt; $TMP/etc/rc.d/rc.pctel<br />echo "# copied from <!-- m --><a class="postlink" href="#pctel">http://kristol.org/david/dell-i8200/#pctel</a><!-- m --> " &gt;&gt; $TMP/etc/rc.d/rc.pctel<br />echo "# and modified for Slax Linux Live/Porteus LiveCD by " &gt;&gt; $TMP/etc/rc.d/rc.pctel<br />echo "# Antonio A. Olivares " &gt;&gt; $TMP/etc/rc.d/rc.pctel<br />echo "# <!-- e --><a href="mailto:olivares14031@gmail.com">olivares14031@gmail.com</a><!-- e -->, <!-- e --><a href="mailto:discuss@linmodems.org">discuss@linmodems.org</a><!-- e --> " &gt;&gt; $TMP/etc/rc.d/rc.pctel<br />echo "#==========================================================" &gt;&gt; $TMP/etc/rc.d/rc.pctel<br />echo " " &gt;&gt; $TMP/etc/rc.d/rc.pctel<br />echo "/sbin/depmod -a " &gt;&gt; $TMP/etc/rc.d/rc.pctel<br />echo " " &gt;&gt; $TMP/etc/rc.d/rc.pctel<br />echo "if [-e /dev/modem] &amp;&gt; /dev/null; then" &gt;&gt; $TMP/etc/rc.d/rc.pctel<br />echo " { " &gt;&gt; $TMP/etc/rc.d/rc.pctel<br />echo " echo \"Linking /dev/ttyS_PCTEL0 to /dev/modem to let kppp access modem\" " &gt;&gt; $TMP/etc/rc.d/rc.pctel<br />echo " ln -s /dev/ttyS_PCTEL0 /dev/modem " &gt;&gt; $TMP/etc/rc.d/rc.pctel<br />echo " } " &gt;&gt; $TMP/etc/rc.d/rc.pctel<br />echo "fi " &gt;&gt; $TMP/etc/rc.d/rc.pctel<br />echo " " &gt;&gt; $TMP/etc/rc.d/rc.pctel<br />echo "# See how we were called. " &gt;&gt; $TMP/etc/rc.d/rc.pctel<br />echo " case \"\$1\" in " &gt;&gt; $TMP/etc/rc.d/rc.pctel<br />echo " start) " &gt;&gt; $TMP/etc/rc.d/rc.pctel<br />echo " echo -n \"Starting pctel . . .\" " &gt;&gt; $TMP/etc/rc.d/rc.pctel<br />echo " modprobe linmodem" &gt;&gt; $TMP/etc/rc.d/rc.pctel<br />echo " modprobe pctel" &gt;&gt; $TMP/etc/rc.d/rc.pctel<br />echo " modprobe pctel_hw" &gt;&gt; $TMP/etc/rc.d/rc.pctel<br />echo " echo \"done\" " &gt;&gt; $TMP/etc/rc.d/rc.pctel<br />echo " ;;" &gt;&gt; $TMP/etc/rc.d/rc.pctel<br />echo " stop)" &gt;&gt; $TMP/etc/rc.d/rc.pctel<br />echo " echo -n \"Shutting down pctel . . .\"" &gt;&gt; $TMP/etc/rc.d/rc.pctel<br />echo " modprobe -r pctel" &gt;&gt; $TMP/etc/rc.d/rc.pctel<br />echo " modprobe -r pctel_hw" &gt;&gt; $TMP/etc/rc.d/rc.pctel<br />echo " modprobe -r linmodem" &gt;&gt; $TMP/etc/rc.d/rc.pctel<br />echo " echo \"done\"" &gt;&gt; $TMP/etc/rc.d/rc.pctel<br />echo " ;;" &gt;&gt; $TMP/etc/rc.d/rc.pctel<br />echo " status)" &gt;&gt; $TMP/etc/rc.d/rc.pctel<br />echo " ;;" &gt;&gt; $TMP/etc/rc.d/rc.pctel<br />echo " restart)" &gt;&gt; $TMP/etc/rc.d/rc.pctel<br />echo " \$0 stop" &gt;&gt; $TMP/etc/rc.d/rc.pctel<br />echo " \$0 start" &gt;&gt; $TMP/etc/rc.d/rc.pctel<br />echo " ;;" &gt;&gt; $TMP/etc/rc.d/rc.pctel<br />echo " *)" &gt;&gt; $TMP/etc/rc.d/rc.pctel<br />echo " echo \"Usage: pctel {start|stop|restart|status}\" " &gt;&gt; $TMP/etc/rc.d/rc.pctel<br />echo " exit 1" &gt;&gt; $TMP/etc/rc.d/rc.pctel<br />echo " esac" &gt;&gt; $TMP/etc/rc.d/rc.pctel<br />echo " " &gt;&gt; $TMP/etc/rc.d/rc.pctel<br />echo " exit 0" &gt;&gt; $TMP/etc/rc.d/rc.pctel<br />chmod +x $TMP/etc/rc.d/rc.pctel<br /><br /># copy build script<br />mkdir -p $TMP/usr/src/pbuilds/<br />cp $0 $TMP/usr/src/pbuilds/<br />find $TMP -type d | xargs chmod -v 755<br />find $TMP | grep .gz | xargs gunzip<br />find $TMP | xargs file | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded<br /><br /><br />dir2xzm $TMP $PKG.xzm<br />rm -Rf $TMP<br />rm -Rf $PKG<br />chmod 755 $PKG.xzm<br /></code></p> <p><strong><em>Thanks Tonio !!</em></strong></p></div> [SCRIPT] for creating martian_modem(Agere LT Modem) module 2011-01-12T04:24:50+00:00 2011-01-12T04:24:50+00:00 http://www.porteus.org/tutorials/18-internet-connection/76-script-for-creating-martianmodemagere-lt-modem-module.html Tonio <div class="feed-description"><p><em><strong>Note: This script has been written for Porteus V1.0</strong></em><br /><br />How to make the script executable before use:</p> <p class="code">chmod +x martian.pbuild</p> <p>How to run the script after making executable:</p> <p class="code">./path/to/martian.pbuild</p> <p>Copy the text below and paste it into a text file, saving it as '<strong>martian.pbuild</strong>'</p> <p>NOTE: If you receive a stdin error from gunzip, try removing this line, near the end of the script: "find $TMP | grep .gz |xargs gunzip". Delete all of the associated files and try again.</p> <p>&nbsp;</p> <p class="code"><code>#!/bin/bash<br /><br />PKG=martian-full-20100123<br />TMP=/tmp/martian$<br /># uncomment if you want wget to download source<br />#wget http://linmodems.technion.ac.il/packages/ltmodem/kernel-2.6/martian/martian-full-20100123.tar.gz<br /><br />#set -e<br /><br />tar -zxvf $PKG*<br />mkdir -p $TMP/etc/rc.d/<br />cd $PKG/scripts/<br />sed -i '25 s|DEVICE="/dev/ttySM0"|DEVICE="/dev/modem"|g' martian<br />sed -i '25 a /sbin/depmod -a\' martian<br />sed -i '26 a sleep 3\' martian<br />sed -i '27 a /sbin/modprobe martian_dev' martian<br />#sed -i '28 s|echo "kernel module is not loaded!"|/sbin/modprobe martian_dev|g' martian<br />cp martian $TMP/etc/rc.d/rc.martian<br />chmod +x $TMP/etc/rc.d/rc.martian<br />cd ../<br />#cd $PKG<br />make all<br />make install<br /><br />mkdir -p $TMP/lib/modules/`uname -r`/extra/<br />cp -ra /lib/modules/`uname -r`/extra/martian_dev.ko $TMP/lib/modules/`uname -r`/extra/<br />mkdir -p $TMP/usr/sbin/<br />cp -ra /usr/sbin/martian_modem $TMP/usr/sbin/<br />mkdir -p $TMP/usr/lib/debug/usr/sbin/<br />cp -ra /usr/lib/debug/usr/sbin/martian_modem.debug $TMP/usr/lib/debug/usr/sbin/<br /><br />rm -rf /lib/modules/`uname -r`/extra/martian_dev.ko<br /><br /># copy build script<br />cd ..<br />mkdir -p $TMP/usr/src/pbuilds/<br />cp $0 $TMP/usr/src/pbuilds/<br />find $TMP -type d | xargs chmod -v 755<br />find $TMP | grep .gz | xargs gunzip<br />find $TMP | xargs file | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded<br /><br />dir2xzm $TMP $PKG.xzm<br />rm -Rf $TMP<br />rm -Rf $PKG</code></p> <p>&nbsp;</p></div> <div class="feed-description"><p><em><strong>Note: This script has been written for Porteus V1.0</strong></em><br /><br />How to make the script executable before use:</p> <p class="code">chmod +x martian.pbuild</p> <p>How to run the script after making executable:</p> <p class="code">./path/to/martian.pbuild</p> <p>Copy the text below and paste it into a text file, saving it as '<strong>martian.pbuild</strong>'</p> <p>NOTE: If you receive a stdin error from gunzip, try removing this line, near the end of the script: "find $TMP | grep .gz |xargs gunzip". Delete all of the associated files and try again.</p> <p>&nbsp;</p> <p class="code"><code>#!/bin/bash<br /><br />PKG=martian-full-20100123<br />TMP=/tmp/martian$<br /># uncomment if you want wget to download source<br />#wget http://linmodems.technion.ac.il/packages/ltmodem/kernel-2.6/martian/martian-full-20100123.tar.gz<br /><br />#set -e<br /><br />tar -zxvf $PKG*<br />mkdir -p $TMP/etc/rc.d/<br />cd $PKG/scripts/<br />sed -i '25 s|DEVICE="/dev/ttySM0"|DEVICE="/dev/modem"|g' martian<br />sed -i '25 a /sbin/depmod -a\' martian<br />sed -i '26 a sleep 3\' martian<br />sed -i '27 a /sbin/modprobe martian_dev' martian<br />#sed -i '28 s|echo "kernel module is not loaded!"|/sbin/modprobe martian_dev|g' martian<br />cp martian $TMP/etc/rc.d/rc.martian<br />chmod +x $TMP/etc/rc.d/rc.martian<br />cd ../<br />#cd $PKG<br />make all<br />make install<br /><br />mkdir -p $TMP/lib/modules/`uname -r`/extra/<br />cp -ra /lib/modules/`uname -r`/extra/martian_dev.ko $TMP/lib/modules/`uname -r`/extra/<br />mkdir -p $TMP/usr/sbin/<br />cp -ra /usr/sbin/martian_modem $TMP/usr/sbin/<br />mkdir -p $TMP/usr/lib/debug/usr/sbin/<br />cp -ra /usr/lib/debug/usr/sbin/martian_modem.debug $TMP/usr/lib/debug/usr/sbin/<br /><br />rm -rf /lib/modules/`uname -r`/extra/martian_dev.ko<br /><br /># copy build script<br />cd ..<br />mkdir -p $TMP/usr/src/pbuilds/<br />cp $0 $TMP/usr/src/pbuilds/<br />find $TMP -type d | xargs chmod -v 755<br />find $TMP | grep .gz | xargs gunzip<br />find $TMP | xargs file | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded<br /><br />dir2xzm $TMP $PKG.xzm<br />rm -Rf $TMP<br />rm -Rf $PKG</code></p> <p>&nbsp;</p></div>