个人工具

UbuntuHelp:InstallCxacruDriver

来自Ubuntu中文

跳转至: 导航, 搜索

This howto will help you to install the cxacru driver for the e-tech V2 ADSL USB modem that you will need in old versions (older then dapper drake) of Ubuntu

Step 1: obtain the drivers

A group of people in the sourceforge project is developing drivers for many USB ADSL modems. For my USB DSL modem (e-tech-V2 usb) with the conexant chip I found the following files (http://accessrunner.sourceforge.net/index.shtml): /drivers/usb/atm/cxacru.c /drivers/usb/atm/Kbuild /drivers/usb/atm/Kconfig /drivers/usb/atm/usbatm.c /drivers/usb/atm/usbatm.h

Step 2: recompile the linux-kernel

(unfortunately this is difficult without an internet connection) Step 2a: There is a HOWTO "Kernel Compilation for Newbies" at ubuntuforums.org. You need to do all obligatory steps mentioned there to recompile the kernel. The HOWTO aims at recompilation of the kernel to get a video card working, so a number of optional steps can be skipped. However, the HOWTO assumes Ubuntu has a working internet connection. Step 2b: This means that you cannot install all the packages you need to recompile the kernel. The files you need are somewhere in http://archive.ubuntu.com/ubuntu/ One of the packages you need is libncurses5-dev A trick to find the location is as follows: goto http://ftp.se.kde.org/ftpsearch.html Search for libncurses5-dev Now you get a reference to a location in the Debian FTP-archive. The Ubuntu archive has the same structure, so you can find libncurses5-dev in a similar location in the ubuntu archive. The packages downloaded this way wil have the extension .deb. They can be installed manually through the command:

dpkg -i (package.deb)

To get a feeling for how to use this workaround, read the section 'compile from a vanila kernel' in HOWTO "Kernel Compilation for Newbies" Step 2c: If you finished step 3 HOWTO "Kernel Compilation for Newbies" (congratulations if you got here), first exit menuconfig. Look for the place where usb_atm.c is in the source tree. This is provbably /usr/src/linux/drivers/usb/atm/usb_atm.c Here, rename the files usb_atm.c, usb_atm.h, Kbuild and Kconfig (add something like .old). Copy the new drivers to this location: /drivers/usb/atm/cxacru.c /drivers/usb/atm/Kbuild /drivers/usb/atm/Kconfig /drivers/usb/atm/usbatm.c /drivers/usb/atm/usbatm.h I renamed usbatm.c and usbatm.h to usb_atm.c and usb_atm.h, but I am not sure whether this is necessary. Now, type again

sudo make menuconfig

Now, in the submenu drivers-usb-atm I selected cxacru (the new driver!) and typed m (maybe * will do, I am not sure). Exit menuconfig and compile the kernel. Step 2d (optional): Everything should go well, but it did not in my case. I got the error-message:

Inconsistent kallsyms data
Try setting CONFIG_KALLSYMS_EXTRA_PASS
make: *** [vmlinux] Fout 1

I don't know how to set CONFIG_KALLSYMS_EXTRA_PASS, so I did a bad thing, namely edit the Makefile. I looked for the place in Makefile that checks the parameter CONFIG_KALLSYMS_EXTRA_PASS, and changed the IF statement such that it acts as if CONFIG_KALLSYMS_EXTRA_PASS is true. This worked. (I hope somebody edits this, and explains how to do this nicely) Step 2e (optional): Further in the proces I got the error message:

dpkg-gencontrol: error: package kernel-image-2.6.12-accessrunner not in control info
make[1]: *** [real_stamp_image] Fout 255
make[1]: Leaving directory `/usr/src/linux-source-2.6.12-10.25'
make: *** [kernel-image-deb] Fout 2

Here also I did a probably bad thing: I added something like this to debian/control

Package: kernel-image-2.6.12-accessrunner
Architecture: all
Section: devel
Priority: optional
Depends: 
Provides: ${kt-provides}
Description: Linux kernel image

I had to do this for two packages. (I hope somebody edits this, and explains how to do this nicely) Step 2f: Eventually you have new kernel packages. If you couldn't do it, send me a line at [email protected], and I will e-mail the two package files (25 MB) Step 3: Install the kernel-packages (see the HOWTO "Kernel Compilation for Newbies"). If you restart the computer, GRUB will give you the option to start the new kernel. After starting the new kernel and loggin in, check in Applications - System tools - System log. If everything went well you can see that the USB modem is detected and cxacru is activated. You also see messages from CXacru in /var/log/messages: Step 4: You have to obtain the firmware (see UsbAdslModem/AccessRunner and UsbAdslModem/e-techV2) and install it in: /lib/hotplug/firmware Note firmaware location: this differs from newer versions of Ubuntu If everything went well and you had the firmware in place you see

localhost kernel [4294759.585000] cxacru 1-1:1.0: ADSL line: training
localhost kernel [4294764.599000] cxacru 1-1:1.0: ADSL line: channel analysis
localhost kernel [4294769.585000] cxacru 1-1:1.0: ADSL line: up (384 Kib/s down | 128 Kib/s up)

Step 3a (optional): Initially I got errors:

localhost kernel [4300944.253000] cxacru 1-1:1.0: firmware unavailable (hotplug configuration problem?)
localhost kernel [4295543.593000] cxacru 1-1:1.0: poll status: error -5

The 1. problem was I put the firmware in a wrong location. The 2. problem may require newer firmware. Closing remark: Since USB ADSL modems are relatively cheap and easy to install, they will be used more and more. I hope that in future releases of Ubuntu (I installed version 2.6.10) the number of USB ADSL modems drivers in the 'default' setup will be increased, or at least that it will be easier to install the drivers. Recompiling the kernel without internet-connection is very difficult for a newby. On the other hand, placing the licensed firmware in the suitable location is relatively easy and can be done without complications by the user him- or herself.