I've got a BeWan ADSL PCIst modem which I'm trying to install in Debian Etch. The driver consists of a binary blob and a GPL kernel wrapper. I'm using kernel version 2.6.18-4-686
The output from lspci is:
Code:
00:08.0 ATM network controller: STMicroelectronics ST70137 [Unicorn] ADSL DMT Transceiver (rev 10)
I first tried using the unicorn and unicorn-source packages from the non-free repository. The README.debian documents two methods for compiling.
Quote:
Originally Posted by README.Debian
- Using the make-kpkg(1) command provided by the kernel-package Debian
package. This will produce a corresponding unicorn-modules package for
the Debian kernel-image package that you are using. This is "the Debian
way". See the "modules_image" section of the make-kpkg(1) man page.
Notice that you have to be root to build the unicorn-modules, i don't know
why this is, fakeroot is not enough, but sudo will do the trick.
- Changing to the /usr/src/modules/unicorn/ directory and building as
the README file instructs using "make; make install". This will build
and install a module specific to the system you are building on and is
not under control of the packaging system.
|
I tried the two methods above and installing with module_assistant.
The output from make was:
Code:
for i in adsl_status unicorntest tools ; do make -C $i all ; done
make: *** adsl_status: No such file or directory. Stop.
make: *** unicorntest: No such file or directory. Stop.
make: *** tools: No such file or directory. Stop.
make: *** [applis] Error 2
It looks like the makefile hasn't been modified after the Debian maintainer split the package into unicorn and unicorn source.
The build log from module-assistant was:
Code:
Extracting the package tarball, /usr/src/unicorn.tar.gz, please wait...
/usr/bin/make debian/rules clean
make[1]: Entering directory `/usr/src/modules/unicorn'
make[1]: Nothing to be done for `debian/rules'.
for i in adsl_status unicorntest tools libm unicorn_pci unicorn_usb; do (if [ -d $i ]; then make -C $i clean; fi); done
make[2]: Entering directory `/usr/src/modules/unicorn/libm'
/bin/rm -f *~
/bin/rm -f *.s
/bin/rm -f *.o
/bin/rm -f *.a
make[2]: Leaving directory `/usr/src/modules/unicorn/libm'
make[2]: Entering directory `/usr/src/modules/unicorn/unicorn_pci'
/bin/rm -f unicorn_pcidrv.o ../msw/linrapi.o ../msw/msw.o ../msw/crc.o ../amu/amas.o ../amu/amu.o ../amu/bsp_pci.o ../unicorn_atm/unicorn_atmdrv.o
/bin/rm -f unicorn_pcidrv.o ../msw/linrapi.o ../msw/msw.o ../msw/crc.o ../amu/amas.o ../amu/amu.o ../amu/bsp_pci.o ../unicorn_eth/unicorn_ethdrv.o
/bin/rm -f unicorn_pci_atm.* unicorn_pci_eth.*
/bin/rm -f .*.cmd
/bin/rm -rf .tmp_versions
make[2]: Leaving directory `/usr/src/modules/unicorn/unicorn_pci'
make[2]: Entering directory `/usr/src/modules/unicorn/unicorn_usb'
/bin/rm -f unicorn_usbdrv.o ../msw/linrapi.o ../msw/msw.o ../msw/crc.o ../amu/amas.o ../amu/amu.o ../amu/bsp_usb.o ../unicorn_atm/unicorn_atmdrv.o
/bin/rm -f unicorn_usbdrv.o ../msw/linrapi.o ../msw/msw.o ../msw/crc.o ../amu/amas.o ../amu/amu.o ../amu/bsp_usb.o ../unicorn_eth/unicorn_ethdrv.o
/bin/rm -f unicorn_usb_atm.* unicorn_usb_eth.*
/bin/rm -f .*.cmd
/bin/rm -rf .tmp_versions
make[2]: Leaving directory `/usr/src/modules/unicorn/unicorn_usb'
make[1]: Leaving directory `/usr/src/modules/unicorn'
/usr/bin/make -f debian/rules binary-modules
make[1]: Entering directory `/usr/src/modules/unicorn'
export DH_OPTIONS='-punicorn-modules-2.6.18-4-686'
# Is this needed for setting up a Depends?
#echo "kpkg:Package-Version=0.9.2-1+2.6.18-4-686" \
# >> debian/unicorn.substvars
echo "kpkg:Kernel-Version=2.6.18-4-686" > \
debian/unicorn-modules-2.6.18-4-686.substvars
# The substvars mechanism seems slightly broken, hack to get around it
# stolen from the qce-ga package. Yaaaa!
sed -e 's/${kpkg\:Kernel\-Version}/2.6.18-4-686/' \
debian/control.in > debian/control
dh_testdir
dh_testroot
dh_clean -k
# Build and install the module
if [ 6 = 4 ]; then \
/usr/bin/make modules HPATH=/lib/modules/2.6.18-4-686/build/include KERNEL_SOURCES=/lib/modules/2.6.18-4-686/build; \
/usr/bin/make only_modules_install KERNEL_SOURCES=/lib/modules/2.6.18-4-686/build \
DESTDIR=/usr/src/modules/unicorn/debian/unicorn-modules-2.6.18-4-686 KVERS=2.6.18-4-686; \
elif [ 6 = 6 ]; then \
/usr/bin/make -C libm modules; \
/usr/bin/make -C /lib/modules/2.6.18-4-686/build SUBDIRS=/usr/src/modules/unicorn/unicorn_pci \
INSTALL_MOD_PATH=/usr/src/modules/unicorn/debian/unicorn-modules-2.6.18-4-686 modules modules_install; \
/usr/bin/make -C /lib/modules/2.6.18-4-686/build SUBDIRS=/usr/src/modules/unicorn/unicorn_usb \
INSTALL_MOD_PATH=/usr/src/modules/unicorn/debian/unicorn-modules-2.6.18-4-686 modules modules_install; \
fi
make[2]: Entering directory `/usr/src/modules/unicorn/libm'
gcc -O2 -Wstrict-prototypes -fomit-frame-pointer -fno-strict-aliasing -pipe -fno-strength-reduce -Wall -Wno-comment -c -o e_powf.o e_powf.c
gcc -O2 -Wstrict-prototypes -fomit-frame-pointer -fno-strict-aliasing -pipe -fno-strength-reduce -Wall -Wno-comment -c -o e_log10f.o e_log10f.c
gcc -O2 -Wstrict-prototypes -fomit-frame-pointer -fno-strict-aliasing -pipe -fno-strength-reduce -Wall -Wno-comment -c -o e_logf.o e_logf.c
gcc -O2 -Wstrict-prototypes -fomit-frame-pointer -fno-strict-aliasing -pipe -fno-strength-reduce -Wall -Wno-comment -c -o e_sqrtf.o e_sqrtf.c
gcc -O2 -Wstrict-prototypes -fomit-frame-pointer -fno-strict-aliasing -pipe -fno-strength-reduce -Wall -Wno-comment -c -o s_ceilf.o s_ceilf.c
gcc -O2 -Wstrict-prototypes -fomit-frame-pointer -fno-strict-aliasing -pipe -fno-strength-reduce -Wall -Wno-comment -c -o s_floorf.o s_floorf.c
gcc -O2 -Wstrict-prototypes -fomit-frame-pointer -fno-strict-aliasing -pipe -fno-strength-reduce -Wall -Wno-comment -c -o s_isinf.o s_isinf.c
gcc -O2 -Wstrict-prototypes -fomit-frame-pointer -fno-strict-aliasing -pipe -fno-strength-reduce -Wall -Wno-comment -c -o s_fabsf.o s_fabsf.c
gcc -O2 -Wstrict-prototypes -fomit-frame-pointer -fno-strict-aliasing -pipe -fno-strength-reduce -Wall -Wno-comment -c -o s_scalbnf.o s_scalbnf.c
gcc -O2 -Wstrict-prototypes -fomit-frame-pointer -fno-strict-aliasing -pipe -fno-strength-reduce -Wall -Wno-comment -c -o s_copysignf.o s_copysignf.c
gcc -O2 -Wstrict-prototypes -fomit-frame-pointer -fno-strict-aliasing -pipe -fno-strength-reduce -Wall -Wno-comment -c -o s_truncf.o s_truncf.c
gcc -O2 -Wstrict-prototypes -fomit-frame-pointer -fno-strict-aliasing -pipe -fno-strength-reduce -Wall -Wno-comment -c -o s_sinf.o s_sinf.c
gcc -O2 -Wstrict-prototypes -fomit-frame-pointer -fno-strict-aliasing -pipe -fno-strength-reduce -Wall -Wno-comment -c -o k_sinf.o k_sinf.c
gcc -O2 -Wstrict-prototypes -fomit-frame-pointer -fno-strict-aliasing -pipe -fno-strength-reduce -Wall -Wno-comment -c -o k_cosf.o k_cosf.c
gcc -O2 -Wstrict-prototypes -fomit-frame-pointer -fno-strict-aliasing -pipe -fno-strength-reduce -Wall -Wno-comment -c -o e_rem_pio2f.o e_rem_pio2f.c
gcc -O2 -Wstrict-prototypes -fomit-frame-pointer -fno-strict-aliasing -pipe -fno-strength-reduce -Wall -Wno-comment -c -o k_rem_pio2f.o k_rem_pio2f.c
gcc -O2 -Wstrict-prototypes -fomit-frame-pointer -fno-strict-aliasing -pipe -fno-strength-reduce -Wall -Wno-comment -c -o e_pow.o e_pow.c
gcc -O2 -Wstrict-prototypes -fomit-frame-pointer -fno-strict-aliasing -pipe -fno-strength-reduce -Wall -Wno-comment -c -o e_log10.o e_log10.c
gcc -O2 -Wstrict-prototypes -fomit-frame-pointer -fno-strict-aliasing -pipe -fno-strength-reduce -Wall -Wno-comment -c -o e_log.o e_log.c
gcc -O2 -Wstrict-prototypes -fomit-frame-pointer -fno-strict-aliasing -pipe -fno-strength-reduce -Wall -Wno-comment -c -o e_sqrt.o e_sqrt.c
gcc -O2 -Wstrict-prototypes -fomit-frame-pointer -fno-strict-aliasing -pipe -fno-strength-reduce -Wall -Wno-comment -c -o s_ceil.o s_ceil.c
gcc -O2 -Wstrict-prototypes -fomit-frame-pointer -fno-strict-aliasing -pipe -fno-strength-reduce -Wall -Wno-comment -c -o s_floor.o s_floor.c
gcc -O2 -Wstrict-prototypes -fomit-frame-pointer -fno-strict-aliasing -pipe -fno-strength-reduce -Wall -Wno-comment -c -o s_fabs.o s_fabs.c
gcc -O2 -Wstrict-prototypes -fomit-frame-pointer -fno-strict-aliasing -pipe -fno-strength-reduce -Wall -Wno-comment -c -o s_scalbn.o s_scalbn.c
gcc -O2 -Wstrict-prototypes -fomit-frame-pointer -fno-strict-aliasing -pipe -fno-strength-reduce -Wall -Wno-comment -c -o s_copysign.o s_copysign.c
gcc -O2 -Wstrict-prototypes -fomit-frame-pointer -fno-strict-aliasing -pipe -fno-strength-reduce -Wall -Wno-comment -c -o s_trunc.o s_trunc.c
gcc -O2 -Wstrict-prototypes -fomit-frame-pointer -fno-strict-aliasing -pipe -fno-strength-reduce -Wall -Wno-comment -c -o s_sin.o s_sin.c
gcc -O2 -Wstrict-prototypes -fomit-frame-pointer -fno-strict-aliasing -pipe -fno-strength-reduce -Wall -Wno-comment -c -o k_sin.o k_sin.c
gcc -O2 -Wstrict-prototypes -fomit-frame-pointer -fno-strict-aliasing -pipe -fno-strength-reduce -Wall -Wno-comment -c -o k_cos.o k_cos.c
gcc -O2 -Wstrict-prototypes -fomit-frame-pointer -fno-strict-aliasing -pipe -fno-strength-reduce -Wall -Wno-comment -c -o e_rem_pio2.o e_rem_pio2.c
e_rem_pio2.c: In function â__ieee754_rem_pio2â:
e_rem_pio2.c:178: warning: âzâ is used uninitialized in this function
gcc -O2 -Wstrict-prototypes -fomit-frame-pointer -fno-strict-aliasing -pipe -fno-strength-reduce -Wall -Wno-comment -c -o k_rem_pio2.o k_rem_pio2.c
ld -r -o libm.a e_powf.o e_log10f.o e_logf.o e_sqrtf.o s_ceilf.o s_floorf.o s_isinf.o s_fabsf.o s_scalbnf.o s_copysignf.o s_truncf.o s_sinf.o k_sinf.o k_c
osf.o e_rem_pio2f.o k_rem_pio2f.o e_pow.o e_log10.o e_log.o e_sqrt.o s_ceil.o s_floor.o s_fabs.o s_scalbn.o s_copysign.o s_trunc.o s_sin.o k_sin.o k_cos.o e
_rem_pio2.o k_rem_pio2.o
make[2]: Leaving directory `/usr/src/modules/unicorn/libm'
make[2]: Entering directory `/usr/src/linux-headers-2.6.18-4-686'
LD /usr/src/modules/unicorn/unicorn_pci/built-in.o
CC [M] /usr/src/modules/unicorn/unicorn_pci/unicorn_pcidrv.o
In file included from /usr/src/modules/unicorn/unicorn_pci/unicorn_pcidrv.c:25:
/usr/src/modules/unicorn/unicorn_pci/../amu/amas.h:373:5: warning: "WIN32" is not defined
/usr/src/modules/unicorn/unicorn_pci/../amu/amas.h:389:5: warning: "WIN32" is not defined
/usr/src/modules/unicorn/unicorn_pci/unicorn_pcidrv.c:57:5: warning: "BIG_ENDIAN" is not defined
/usr/src/modules/unicorn/unicorn_pci/unicorn_pcidrv.c:1781:5: warning: "NOT_USED" is not defined
/usr/src/modules/unicorn/unicorn_pci/unicorn_pcidrv.c:2159: error: expected â)â before string constant
/usr/src/modules/unicorn/unicorn_pci/unicorn_pcidrv.c:2161: error: expected â)â before string constant
/usr/src/modules/unicorn/unicorn_pci/unicorn_pcidrv.c:2162: error: expected â)â before string constant
/usr/src/modules/unicorn/unicorn_pci/unicorn_pcidrv.c:2164: error: expected â)â before string constant
/usr/src/modules/unicorn/unicorn_pci/unicorn_pcidrv.c:2165: error: expected â)â before string constant
/usr/src/modules/unicorn/unicorn_pci/unicorn_pcidrv.c:2167: error: expected â)â before string constant
/usr/src/modules/unicorn/unicorn_pci/unicorn_pcidrv.c:2169: error: expected â)â before string constant
/usr/src/modules/unicorn/unicorn_pci/unicorn_pcidrv.c:2170: error: expected â)â before string constant
/usr/src/modules/unicorn/unicorn_pci/unicorn_pcidrv.c:2171: error: expected â)â before string constant
/usr/src/modules/unicorn/unicorn_pci/unicorn_pcidrv.c:2172: error: expected â)â before string constant
/usr/src/modules/unicorn/unicorn_pci/unicorn_pcidrv.c:2173: error: expected â)â before string constant
/usr/src/modules/unicorn/unicorn_pci/unicorn_pcidrv.c:2174: error: expected â)â before string constant
/usr/src/modules/unicorn/unicorn_pci/unicorn_pcidrv.c:2175: error: expected â)â before string constant
/usr/src/modules/unicorn/unicorn_pci/unicorn_pcidrv.c:2176: error: expected â)â before string constant
/usr/src/modules/unicorn/unicorn_pci/unicorn_pcidrv.c:2177: error: expected â)â before string constant
/usr/src/modules/unicorn/unicorn_pci/unicorn_pcidrv.c:2180: error: expected â)â before string constant
/usr/src/modules/unicorn/unicorn_pci/unicorn_pcidrv.c:2185: error: expected â)â before string constant
/usr/src/modules/unicorn/unicorn_pci/unicorn_pcidrv.c:2190: error: expected â)â before string constant
make[3]: *** [/usr/src/modules/unicorn/unicorn_pci/unicorn_pcidrv.o] Error 1
make[2]: *** [_module_/usr/src/modules/unicorn/unicorn_pci] Error 2
make[2]: Leaving directory `/usr/src/linux-headers-2.6.18-4-686'
make[2]: Entering directory `/usr/src/linux-headers-2.6.18-4-686'
LD /usr/src/modules/unicorn/unicorn_usb/built-in.o
CC [M] /usr/src/modules/unicorn/unicorn_usb/unicorn_usbdrv.o
In file included from /usr/src/modules/unicorn/unicorn_usb/unicorn_usbdrv.c:25:
/usr/src/modules/unicorn/unicorn_usb/../amu/amas.h:373:5: warning: "WIN32" is not defined
/usr/src/modules/unicorn/unicorn_usb/../amu/amas.h:389:5: warning: "WIN32" is not defined
/usr/src/modules/unicorn/unicorn_usb/unicorn_usbdrv.c:2292: error: expected â)â before string constant
/usr/src/modules/unicorn/unicorn_usb/unicorn_usbdrv.c:2294: error: expected â)â before string constant
/usr/src/modules/unicorn/unicorn_usb/unicorn_usbdrv.c:2295: error: expected â)â before string constant
/usr/src/modules/unicorn/unicorn_usb/unicorn_usbdrv.c:2297: error: expected â)â before string constant
/usr/src/modules/unicorn/unicorn_usb/unicorn_usbdrv.c:2298: error: expected â)â before string constant
/usr/src/modules/unicorn/unicorn_usb/unicorn_usbdrv.c:2299: error: expected â)â before string constant
/usr/src/modules/unicorn/unicorn_usb/unicorn_usbdrv.c:2300: error: expected â)â before string constant
/usr/src/modules/unicorn/unicorn_usb/unicorn_usbdrv.c:2301: error: expected â)â before string constant
/usr/src/modules/unicorn/unicorn_usb/unicorn_usbdrv.c:2302: error: expected â)â before string constant
/usr/src/modules/unicorn/unicorn_usb/unicorn_usbdrv.c:2303: error: expected â)â before string constant
/usr/src/modules/unicorn/unicorn_usb/unicorn_usbdrv.c:2304: error: expected â)â before string constant
/usr/src/modules/unicorn/unicorn_usb/unicorn_usbdrv.c:2305: error: expected â)â before string constant
/usr/src/modules/unicorn/unicorn_usb/unicorn_usbdrv.c:2306: error: expected â)â before string constant
/usr/src/modules/unicorn/unicorn_usb/unicorn_usbdrv.c:2307: error: expected â)â before string constant
/usr/src/modules/unicorn/unicorn_usb/unicorn_usbdrv.c:2308: error: expected â)â before string constant
/usr/src/modules/unicorn/unicorn_usb/unicorn_usbdrv.c:2309: error: expected â)â before string constant
/usr/src/modules/unicorn/unicorn_usb/unicorn_usbdrv.c:2311: error: expected â)â before string constant
/usr/src/modules/unicorn/unicorn_usb/unicorn_usbdrv.c:2313: error: expected â)â before string constant
/usr/src/modules/unicorn/unicorn_usb/unicorn_usbdrv.c:2314: error: expected â)â before string constant
/usr/src/modules/unicorn/unicorn_usb/unicorn_usbdrv.c:2315: error: expected â)â before string constant
/usr/src/modules/unicorn/unicorn_usb/unicorn_usbdrv.c:2317: error: expected â)â before string constant
/usr/src/modules/unicorn/unicorn_usb/unicorn_usbdrv.c:2318: error: expected â)â before string constant
/usr/src/modules/unicorn/unicorn_usb/unicorn_usbdrv.c:2320: error: expected â)â before string constant
/usr/src/modules/unicorn/unicorn_usb/unicorn_usbdrv.c:2321: error: expected â)â before string constant
/usr/src/modules/unicorn/unicorn_usb/unicorn_usbdrv.c:2324: error: expected â)â before string constant
make[3]: *** [/usr/src/modules/unicorn/unicorn_usb/unicorn_usbdrv.o] Error 1
make[2]: *** [_module_/usr/src/modules/unicorn/unicorn_usb] Error 2
make[2]: Leaving directory `/usr/src/linux-headers-2.6.18-4-686'
make[1]: *** [binary-modules] Error 2
make[1]: Leaving directory `/usr/src/modules/unicorn'
make: *** [kdist_image] Error 2
I then tried downloading directly from Bewan's site. They provide a version slightly newer than the one in the Debian repos.
I was hopeful that this *might* work as the changelog said:
Code:
- Now works for kernel 2.6.14 and newer (skb_unlink parameter change)
The output from make this time was almost the same as last time.
The readme and
this page suggested building the modules individually. I tried compiling libm first and then unicorn_pci.
libm compiled fine but unicorn_pci had many errors like this:
Code:
/usr/src/unicorn/unicorn_pci/unicorn_pcidrv.c:2160: error: expected â)â before string constant
A search on Google showed that this was probably due to a kernel change. I found a patch used by Gentoo.
The patched fixed the previous errors and now I get this:
Code:
make CC=gcc -C /usr/src/linux SUBDIRS=/usr/src/unicorn/unicorn_pci modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.18-4-686'
CC [M] /usr/src/unicorn/unicorn_pci/unicorn_pcidrv.o
CC [M] /usr/src/unicorn/unicorn_pci/../msw/linrapi.o
make[2]: *** No rule to make target `/usr/src/unicorn/unicorn_pci/../msw/msw.o', needed by `/usr/src/unicorn/unicorn_pci/unicorn_pci_atm.o'. Stop.
make[1]: *** [_module_/usr/src/unicorn/unicorn_pci] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-2.6.18-4-686'
make: *** [modules] Error 2
Any help would be much appreciated