summaryrefslogtreecommitdiff
path: root/net-dialup/speedtouch-usb
diff options
context:
space:
mode:
Diffstat (limited to 'net-dialup/speedtouch-usb')
-rw-r--r--net-dialup/speedtouch-usb/Manifest6
-rw-r--r--net-dialup/speedtouch-usb/files/README253
-rw-r--r--net-dialup/speedtouch-usb/metadata.xml6
-rw-r--r--net-dialup/speedtouch-usb/speedtouch-usb-3.0.1.2-r3.ebuild92
4 files changed, 357 insertions, 0 deletions
diff --git a/net-dialup/speedtouch-usb/Manifest b/net-dialup/speedtouch-usb/Manifest
new file mode 100644
index 000000000000..2dbadc050de2
--- /dev/null
+++ b/net-dialup/speedtouch-usb/Manifest
@@ -0,0 +1,6 @@
+AUX README 9246 SHA256 b7b1c920772c76410234b84185beffe02c9d05d8457a04d2bf9dc459bb8e6695 SHA512 5b08cc8323de5bf0c0e528266e18a85c28e13bfaa462b3abeda9a2abaa0063b9872153bc97b2be88e489c949ddabd65f7d19a39600f9c0d2375e40d511c0ee2a WHIRLPOOL 3112962d4b53c4f38fb5d487092eeef6c3c44ae73db40406ac863e67cadf93f8886cdf65c9841534bb7e968fb51dcd98606b20bd723918ec3338f42c5452e18d
+DIST SpeedTouch330_firmware_3012.zip 769125 SHA256 1f4ef294f9ac52fc01781f0bba15ab1e686f692dac11ecdcbfedfbf580b19afc SHA512 d4ec1b609eb58b15b0c569fc2c96e453517f6a8141c706f342549093c2c7bbdc09bbc3f05ecf75f3018e54f03a974b84e625fb9401f02d4f4143b721eee0b3c3 WHIRLPOOL 21771a9412bd0346405ed161cbe201cfb7c58c522caac7eeae0f9ad79f4fd5ef1913a09af6b83c464c177a9445a1ffcb621a913bc95ba1b2b26d80ee1cd2889f
+EBUILD speedtouch-usb-3.0.1.2-r3.ebuild 3092 SHA256 c93a8019fa23ca60b903590cd1daecc94da4242c1c7f6bc399942d10b8f359bf SHA512 d4a316bca29c6d9c6ad3c3f109eb19c1cd951a001245b229cfd88ab586b559d8e27999656ee2663056cb6602a598f6775b52cccd93d9da7f88021f3f011283a6 WHIRLPOOL 9e3bbdf918cd3ffe878e967fea32d10165a98d13064e25eee2094dcc0be2b7eb5b7ee16afc00bb57a99856df3d809b31ea1748634369c01fd98b2b09c8790644
+MISC ChangeLog 2504 SHA256 c7be5ad73b6d2bdcb5374a28af6c51c48098704b425a19174d8afefb4131a07e SHA512 66a49c4b9f6b01ce679f277084cff31b28cbdd251cb62597b2f82940537ba3020fed32e312ae9251b16d6b7c232fa1094de82779890ef06e9d440f596d427826 WHIRLPOOL aceb5fa3377cd106ced23a15ab44102fa082cbc6bc161892d92e4b68bba751e3a6b876227c0c1aee1f341b0ef9539392b896f0a831e55720e5e5e14fb0bad21a
+MISC ChangeLog-2015 2375 SHA256 47a6a38464f50853c8a8f75968fbb6ce222558fccd85edbda1d9f4fb2afeaf2e SHA512 3d934a26f985cfbae00d440697cb753dbe7973998a4c916d7a5be8c27160dddc1828ca1d9deb1cb4605e293b068e474888495bbaede685e360b898718440d253 WHIRLPOOL db4a16133d0b16946fcf32ed4f5d043e6125ff043fde7747241aa61696503f2065ea7c4a798e4bcde6648e1e24c1e76efd78c5d323d6c47405ac76a89711e1c6
+MISC metadata.xml 304 SHA256 d7cc8d2ab2456a68c99add381216f79159d3315ed24d40f409ffeb4d5b6e2e29 SHA512 9618d6334a65643fa426e3074c3ee566a1db0e380dcbf00a432d54c0877efb639ce35b09477d0de3b313ec56ae7d84382382e5d260b2df240dd7eaa32b1e65f7 WHIRLPOOL 8df1fa3b88e7ae30f7dbfa63d0a4b9bd9ef0392656ca188c28c6555f13cd2a17087de63a98619f9ba2228ee1977c61cb29cab7011521f0e3b2feb12b69510b24
diff --git a/net-dialup/speedtouch-usb/files/README b/net-dialup/speedtouch-usb/files/README
new file mode 100644
index 000000000000..8df4e231ed3f
--- /dev/null
+++ b/net-dialup/speedtouch-usb/files/README
@@ -0,0 +1,253 @@
+Introduction
+============
+
+This ebuild enables kernel-space support for Alcatel/Thomson SpeedTouch
+USB modems, which first appeared in kernel 2.6.10.
+
+Configuration
+=============
+
+Most SpeedTouch USB modems are connected via the ATM protocol, rather
+than Ethernet. For ATM, run the following:
+ euse -E atm && emerge net-dialup/ppp net-dialup/speedtouch-usb
+
+It is necessary to choose an interface number for the connection. This
+is arbitrary - the only requirement is that the connection number is
+not already in use. The first available number is 0, and it is usual to
+choose the lowest unused number. For the purposes of this document, 0
+will be chosen.
+
+Add the following lines from the appropriate section below to
+/etc/conf.d/net, then customize them as per the inline comments.
+
+
+a) PPPoATM configuration:
+
+config_ppp0='ppp' # Runs /lib/rcscripts/net/pppd.sh
+# The 2 numbers represent the VPI & VCI of your ISP, and they are separated
+# by a dot. Choose here, or ask your ISP:
+# http://www.linux-usb.org/SpeedTouch/faq/index.html#q12
+link_ppp0='0.38'
+plugins_ppp0='pppoa'
+# 'man pppd' shows other options. Compression is disabled because it is
+# rarely taken advantage of, and may interfere with the connection.
+# Add option 'usepeerdns' to populate /etc/resolv.conf
+pppd_ppp0='updetach noauth debug defaultroute noaccomp nobsdcomp noccp
+ nodeflate nopcomp novj novjccomp child-timeout 60'
+username_ppp0='username@isp.com' # ADSL login, assigned by your ISP
+password_ppp0='password' # ADSL password, assigned by your ISP
+
+# If the kernel modules are not built-in, then they must be loaded
+# before starting the PPP daemon:
+function preup() {
+ if [[ "$1" = "ppp0" ]] ; then
+ modprobe -q speedtch
+ return 0
+ fi
+}
+
+
+b) PPPoE configuration:
+
+# Configure first the RFC2684 bridge interface
+config_nas0='null'
+# Use "-e 0" for LLC mux or "-e 1" for VC mux.
+# The 2 numbers after "-a" represent the VPI & VCI of your ISP, and
+# they are separated by a dot. Ask your ISP about those numbers.
+br2684ctl_nas0='-e 0 -a 0.38'
+
+config_ppp0='ppp' # Runs /lib/rcscripts/net/pppd.sh
+link_ppp0='nas0' # The name of the RFC2684 bridge interface
+plugins_ppp0='pppoe'
+# 'man pppd' shows other options. Compression is disabled because it is
+# rarely taken advantage of, and may interfere with the connection.
+# Add option 'usepeerdns' to populate /etc/resolv.conf
+pppd_ppp0='updetach noauth debug defaultroute noaccomp nobsdcomp noccp
+ nodeflate nopcomp novj novjccomp child-timeout 60'
+username_ppp0='username@isp.com' # ADSL login, assigned by your ISP
+password_ppp0='password' # ADSL password, assigned by your ISP
+
+depend_ppp0() {
+ need net.nas0
+}
+
+# If the kernel modules are not built-in, then they must be loaded
+# before starting the RFC2684 bridge:
+function preup() {
+ if [[ "$1" = "nas0" ]] ; then
+ modprobe -q speedtch
+ return 0
+ fi
+}
+
+
+
+Configuration continued
+=======================
+
+Create a symlink for the new network interface, for it to be enabled by
+baselayout:
+ cd /etc/init.d && ln -sfn net.lo net.ppp0
+If you use PPPoE, you should also create the symlink for the RFC2684
+bridge interface:
+ cd /etc/init.d && ln -sfn net.lo net.nas0
+
+The "debug" option adds some extra commentary from pppd regarding the
+connection to /var/log/messages, e.g.:
+"sent [LCP ConfReq id=0x1 <magic 0x7bea6ef1>]". It is wise to keep the
+option on permanently, due to its usefulness when debugging.
+
+Set RC_NET_STRICT_CHECKING="yes" in /etc/conf.d/rc, to prevent Internet
+services in /etc/init.d/ from starting before the Internet connection
+is established. Other options are to start/stop programs in
+/etc/ppp/ip-{up,down}.local, and to customize initscript dependencies
+as described in:
+ http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=2&chap=4
+
+
+Starting the Connection
+=======================
+
+To start manually, with the modem connected:
+ /etc/init.d/net.ppp0 start
+
+To start automatically when the PC boots:
+ rc-update add net.ppp0 default
+
+
+Kernel Configuration
+====================
+
+The ebuild, during an emerge, checks that the required kernel modules
+are present.
+
+Note that in the list below, "[*]" means that the option is compiled
+into the kernel, whereas "[M]" means that the option can either be
+compiled into the kernel, or as a module. Compiling them into the
+kernel is recommended, to guarantee that the modules are already loaded
+when they are needed, and it will improve the bootup time by a couple
+of seconds.
+
+In "make menuconfig", you can press "/" and search on e.g. "speedtouch"
+to see exactly where an option is - the location of an option and its
+dependencies can change between kernel versions.
+
+Check that the following kernel options are configured as shown (this
+list includes the prerequisites, e.g. USB_SPEEDTOUCH depends on USB):
+
+ Code maturity level options --->
+ [*] Prompt for development and/or incomplete code/drivers
+ - CONFIG_EXPERIMENTAL
+
+ General setup --->
+ [*] Kernel Userspace Events - CONFIG_KOBJECT_UEVENT
+ (for kernels < 2.6.16 *ONLY*)
+
+ Device Drivers --->
+ Generic Driver Options --->
+ [ ] Select only drivers that don't need compile-time external
+ firmware (*unselected*) - CONFIG_STANDALONE
+ [*] Hotplug firmware loading support - CONFIG_FW_LOADER
+
+ Networking --->
+ [*] Networking support - CONFIG_NET
+ Networking options --->
+ [*] Packet socket - CONFIG_PACKET
+ [M] Asynchronous Transfer Mode (ATM) - CONFIG_ATM
+ [M] RFC1483/2684 Bridged protocols - CONFIG_ATM_BR2684 (only needed for PPPoE)
+
+ Device Drivers --->
+ Network device support --->
+ [*] Network device support - CONFIG_NETDEVICES
+ [*] PPP (point-to-point protocol) support - CONFIG_PPP
+ [M] PPP Deflate compression - CONFIG_PPP_DEFLATE (only useful if
+ compression is supported - rare)
+ [M] PPP BSD-Compress compression - CONFIG_PPP_BSDCOMP (only useful
+ if compression is supported - rare)
+ [M] PPP over Ethernet - CONFIG_PPPOE (only needed for PPPoE)
+ [M] PPP over ATM - CONFIG_PPPOATM (only needed for PPPoATM)
+ USB support --->
+ [*] Support for Host-side USB - CONFIG_USB
+ [*] USB device filesystem - CONFIG_USB_DEVICEFS
+ [M] (O or U)HCI HCD support
+ USB DSL modem support --->
+ [M] USB DSL modem support - CONFIG_USB_ATM
+ [M] Speedtouch USB support - CONFIG_USB_SPEEDTOUCH
+
+
+
+Troubleshooting
+===============
+
+Try "emerge speedtouch-usb" again, because the ebuild checks that the
+required kernel modules are present (showing a warning message if
+appropriate), and creates the firmware files and symlinks in
+/lib/firmware/
+
+If the modem is unresponsive, then run "/etc/init.d/net.ppp0 stop" and
+unplug the modem for 30 seconds, to drain its memory. Then reconnect
+the modem to the PC and run "/etc/init.d/net.ppp0 start"
+
+To check the modem's connection progress, run:
+ tail -f /var/log/messages
+/var/log/messages should show e.g.:
+
+usb n-n: new full speed USB device using xxxx_hcd and address n
+usb n-n: found stage 1 firmware speedtch-1.bin
+usb n-n: found stage 2 firmware speedtch-2.bin
+pppd[nnn]: Plugin pppoatm.so loaded.
+pppd[nnn]: pppd n.n.n started by root, uid 0
+pppd[nnn]: Using interface ppp0
+pppd[nnn]: Connect: ppp0 <--> n.nn
+ADSL line is synchronising
+DSL line goes up
+ADSL line is up (nnn Kib/s down | nnn Kib/s up)
+pppd[nnn]: CHAP authentication succeeded
+pppd[nnn]: local IP address nnn.nnn.nnn.nnn
+pppd[nnn]: remote IP address nnn.nnn.nnn.nnn
+
+
+If the authentification fails, then check username_ppp0 and
+password_ppp0.
+
+If the ADSL connection is not established, then check the options in
+pppd_ppp0. "man pppd" explains all the options in that file.
+
+If the ADSL connection seems to have worked, but no websites can be
+contacted, then check that /etc/resolv.conf is populated, and possibly
+add the "usepeerdns" option (to use the ISP's DNS) to pppd_ppp0 in
+/etc/conf.d/net .
+
+If the problem is still not resolved, post to the Gentoo Forums
+at http://forums.gentoo.org/. If there is no answer, then
+file a bug at http://bugs.gentoo.org/ .
+
+
+Compression
+===========
+
+Some ISPs require compression to be disabled in order for the
+connection to work, so the default configuration described above
+disables compression. Few ISPs support ADSL compression anyway. If you
+are lucky enough to have an ISP which *does* support compression
+(Google is your best friend for determining this), then compression can
+be enabled by following these steps:
+
+* Compile the kernel modules CONFIG_PPP_DEFLATE and CONFIG_PPP_BSDCOMP
+(only one is strictly necessary - pppd prefers "deflate" compression).
+Add them to /etc/modules.autoload.d/kernel-2.6 or /etc/conf.d/net above
+the "pppoatm" line, if they are not built-in.
+* Remove the following options in pppd_ppp0:
+ noaccomp nobsdcomp noccp nodeflate nopcomp novj novjccomp
+* Ensure that "debug" is in the pppd_ppp0 options, to check that
+compression is being utilized. Note that "module registered" in
+/var/log/messages only confirms that the kernel module is loaded -
+it does not indicate that the connection is compressed.
+
+
+Links
+=====
+
+SpeedTouch ebuilds: https://packages.gentoo.org/packages/search?q=speedtouch
+SpeedTouch hardware: http://www.speedtouch.com/support.htm
+SpeedTouch firmware: http://www.speedtouch.com/driver_upgrade_lx_3.0.1.2.htm
diff --git a/net-dialup/speedtouch-usb/metadata.xml b/net-dialup/speedtouch-usb/metadata.xml
new file mode 100644
index 000000000000..f7a6559b0fc3
--- /dev/null
+++ b/net-dialup/speedtouch-usb/metadata.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<!-- maintainer-needed -->
+<longdescription>Firmware and configuration instructions for the kernel-space driver for Alcatel SpeedTouch USB modems.</longdescription>
+</pkgmetadata>
diff --git a/net-dialup/speedtouch-usb/speedtouch-usb-3.0.1.2-r3.ebuild b/net-dialup/speedtouch-usb/speedtouch-usb-3.0.1.2-r3.ebuild
new file mode 100644
index 000000000000..4cbf0542da62
--- /dev/null
+++ b/net-dialup/speedtouch-usb/speedtouch-usb-3.0.1.2-r3.ebuild
@@ -0,0 +1,92 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit eutils linux-info
+
+DESCRIPTION="Firmware and configuration instructions for Alcatel SpeedTouch USB modems"
+HOMEPAGE="http://www.speedtouch.com/"
+SRC_URI="http://www.speedtouch.com/download/drivers/USB/SpeedTouch330_firmware_${PV//./}.zip"
+
+# Taken from http://www.speedtouch.com/driver_upgrade_lx_3.0.1.2.htm
+LICENSE="SpeedTouch-USB-Firmware"
+SLOT="0"
+KEYWORDS="~amd64 x86"
+
+RDEPEND="net-dialup/ppp"
+DEPEND="app-arch/unzip"
+
+S="${WORKDIR}"
+
+src_install() {
+ local FILE_VER="${PV#*.}"
+ FILE_VER="${PV%%.*}.${FILE_VER//./}" # {major_ver}.{minor_digits}
+
+ # Extract the "stage 1" portion of the firmware
+ dd if=KQD6_${FILE_VER} of=speedtch-1.bin.2 \
+ ibs=1 obs=991 count=991 skip=36 &> /dev/null \
+ || die "Extraction of stage 1 firmware (step 1) failed"
+
+ dd if=ZZZL_${FILE_VER} of=speedtch-1.bin.4 \
+ ibs=1 obs=935 count=935 skip=32 &> /dev/null \
+ || die "Extraction of stage 1 firmware (step 2) failed"
+
+ # Extract the "stage 2" portion of the firmware
+ dd if=KQD6_${FILE_VER} of=speedtch-2.bin.2 \
+ ibs=1 obs=762650 count=762650 skip=1027 &> /dev/null \
+ || die "Extraction of stage 2 firmware (step 1) failed"
+
+ dd if=ZZZL_${FILE_VER} of=speedtch-2.bin.4 \
+ ibs=1 obs=775545 count=775545 skip=967 &> /dev/null \
+ || die "Extraction of stage 2 firmware (step 2) failed"
+
+ # Copy to the firmware directory
+ insinto /lib/firmware
+ insopts -m 600
+ doins speedtch-{1,2}.bin.{2,4}
+
+ # Symlinks for other revisions of the modem
+ pushd "${D}/lib/firmware" >/dev/null || die
+ for n in 1 2 ; do
+ for rev in 0 1 ; do
+ ln -sfn speedtch-${n}.bin.2 speedtch-${n}.bin.${rev}
+ done
+ # Seems like a reasonable guess, for revision 3
+ ln -sfn speedtch-${stub}${n}.bin.4 speedtch-${n}.bin.3
+ done
+ popd >/dev/null || die
+
+ # Documentation necessary to complete the setup
+ dodoc "${FILESDIR}/README"
+}
+
+pkg_postinst() {
+ [[ -e /etc/hotplug/usb.usermap ]] && egrep -q " 0x06[bB]9 +0x4061 " /etc/hotplug/usb.usermap && \
+ ewarn "Please remove the SpeedTouch line from /etc/hotplug/usb.usermap"
+
+ # Check kernel configuration
+ local CONFIG_CHECK="~FW_LOADER ~NET ~PACKET ~ATM ~NETDEVICES ~USB_DEVICEFS ~USB_ATM ~USB_SPEEDTOUCH \
+ ~PPP ~PPPOATM ~PPPOE ~ATM_BR2684"
+ local WARNING_PPPOATM="CONFIG_PPPOATM:\t is not set (required for PPPoA links)"
+ local WARNING_PPPOE="CONFIG_PPPOE:\t is not set (required for PPPoE links)"
+ local WARNING_ATM_BR2684="CONFIG_ATM_BR2684:\t is not set (required for PPPoE links)"
+ check_extra_config
+ echo
+
+ # Check user-space for PPPoA support
+ if ! has_version net-dialup/ppp[atm] ; then
+ ewarn "Run the following command if connecting via PPPoA protocol:"
+ ewarn " euse -E atm && emerge net-dialup/ppp"
+ echo
+ fi
+ # Check user-space for PPPoE support
+ if ! has_version net-dialup/linux-atm ; then
+ ewarn "Run the following command if connecting via PPPoE protocol:"
+ ewarn " emerge net-dialup/linux-atm"
+ echo
+ fi
+
+ ewarn "To complete the installation, you must read the documentation in"
+ ewarn " ${ROOT}usr/share/doc/${PF}"
+}