First we need to get the required options compiled into the kernel. This is explained quite well in the Gentoo Handbook.(here) I'm going to assume that you (and Google) know how to build a kernel that supports all the other hardware you have. On this page I will just discuss the options you need to enable to get the Speedtouch kernel driver working.
You should compile a 2.6.10 kernel (or later) so it will be able to load the firmware without the assistance of modem_run.
When you configure the kernel, with many options you get the choice to compile the feature into the kernel or build it as a loadable module. If you're preparing a distribution like Mandrake or SuSE then modules make a lot of sense as they allow you to compile a small kernel that has many modules available that can be dynamically loaded so the kernel can adjust to whatever hardware it's installed on.
But you're not compiling a kernel to run on any machine. You're compiling a kernel to run on your own computer. If you need a feature, compile it into the kernel. If you don't need it, don't waste time compiling the module. Modules can cause problems, particularly if you use udev.
You need to know what sort of USB controller you have. If you have pciutils installed, lspci should tell you.
If not, try and find out which one you have from Google.
If it mentions EHCI as well as UHCI or OHCI then you can enable support for EHCI too. But the main thing is to enable support for either UHCI or OHCI, not both.
You'll need to know if your ISP uses PPPoA or PPPoE. When you get to configuring PPP you'll need to know the VPI/VCI numbers for your country/ISP. Those details can be found on this table
Genkernel is mostly functional nowadays, and so I tend to use it. If you have previously compiled a kernel with genkernel, and you use udev, then you should be able to execute the following. If you use devfs, then change as appropriate.
This will use the configuration from your last successful kernel build (or the default one if this is your first go with this particular kernel version), and then run make menuconfig. At time of writing, if you just emerge gentoo-sources, then you should get the kernel version 2.6.11-r9. Which is easily enough to support the firmware loading. You will need to enable the following options:-
Make sure you say yes to save the new kernel config when you exit, genkernel will then compile the kernel and initrd and copy them into /boot. You might need to edit Grub's grub.conf to point to your new kernel (and initrd).
The PPP ebuild pulls in linux-atm as long as you have atm in your USE variable, so edit /etc/make.conf, or alternatively add it to /etc/portage/package.use like this.
You should have already made sure to USE atm in the previous section so now we just need to emerge ppp. You may want to run with the -pv flags first, in case you would like to USE some other things, like ipv6 for example, once you are ready, install the packages with :-
You should check that you have hotplug installed :-
It should say you have an installed version under the sys-apps/hotplug section. If not, install it with :-
Download a copy of the firmware-extractor.
If you have a copy of the firmware that you know works with your modem, stick with that, otherwise
If you're not sure what revision your modem is, use the command
At the end of the first line it should say Rev= X.00
Where X is the version of the modem you have.
Put a copy of your firmware next to the firmware-extractor.tar.gz and rename it mgmt.o
That will split the firmware into speedtch-1.bin and speedtch-2.bin. To copy it into hotplugs firmware folder, enter roots password then
FIRMWARE_DIR, the place where hotplug keeps it's firmware, is defined in the script /etc/hotplug/firmware.agent
The default is /lib/firmware, you can check if the speedtch-{1,2}.bin files are there with the command
It is probably worth rebooting at this point, and seeing if your new kernel and firmware work. You can execute the command below to check your kernel messages, and you should get similar output to that below :-
Create a plain text file called either /etc/ppp/chap-secrets or /etc/ppp/pap-secrets with a text editor. If you don't know if your ISP uses chap or pap authentication put your a line like this in both files, it won't do any harm.
username@isp should be the username your ISP knows you by. Usually (but not always) it has an @isp bit at the end (it might be @bt, for example). Change password for the password you chose when you set up your internet account. Don't miss out the spaces in the ' * ' bit.
If your ISP is PPPoE skip down to the PPPoE section
Copy and paste this into a text editor then save it as /etc/ppp/peers/speedtch
Change username@isp for the username your ISP knows you by and change the 0.00 on the last line for the VP/VC values for your country/isp. In Britain it's 0.38, for example
See if it works by executing :-
It should connect you to the internet, you can disconnect again by sending the pppd process a TERM signal. If you have more than one pppd process, you should be sure to shut down the right one. So if your modem came up as device pppN then you should send the TERM signal to the PID found in the file /var/run/pppN.pid. e.g. if you are using ppp0, execute :-
To make all this happen at boot, move aside the default, and create an /etc/conf.d/net.ppp0 (or perhaps net.ppp{1,2} depending on your existing setup)
Next we need to add ppp0 to the startup scripts, execute :-
Now, change the permissions on /etc/ppp/{chap-secrets,pap-secrets,peers/speedtch} Open a root shell and copy this into it
When you reboot it should connect you to the internet.
Please report any problems to the mailing list
For PPPoE over ATM things are a slightly different because you'll need a copy of the br2684ctl bridging utility. Compile it with the command
Enter roots password and copy it somewhere. I would be inclined to copy it to /usr/local/sbin/ to avoid mixing it up with system installed files, but with portage it shouldn't matter too much.
Copy and paste this into a text editor then save it as /etc/ppp/peers/speedtch
Change username@isp for the username your ISP knows you by.
Next we'll make sure it works. Change VP.VC for the VPI/VCI numbers for your country/ISP. For example in South Africa it's 8.35. And execute the following
It should connect you to the internet, you can disconnect again by sending the pppd process a TERM signal. If you have more than one pppd process, you should be sure to shut down the right one. So if your modem came up as device pppN then you should send the TERM signal to the PID found in the file /var/run/pppN.pid. e.g. if you are using ppp0, execute :-
Getting gentoo to start pppd at boot is easy, but there is no provision for running the bridging util. Rather than hacking the net.pppN script, which will only cause problems when the gentoo scripts update, I thought it better to create a new startup script to do that. Need to ensure it runs before the ppp device is brought up, this can be done with the before command in the script.
Copy and paste this into a text editor then save it as /etc/init.d/br2684ctl
Again change VP.VC for the VPI/VCI numbers for your country/ISP. For example in South Africa it's 8.35
Next, configure your ppp device. Move aside the default, and create an /etc/conf.d/net.ppp0 (or perhaps net.ppp{1,2} depending on your existing setup)
Next we need to add ppp0 and br2684 to the startup scripts, execute :-
Now, change the permissions on /etc/ppp/{chap-secrets,pap-secrets,peers/speedtch}
Open a root shell and copy this into it
When you reboot it should connect you to the internet.
Please report any problems to the mailing list