Trouble in building module SpeedTouch (for ADSL modem)
René Bourion
yellowdog-general@lists.terrasoftsolutions.com
Mon Dec 16 10:11:01 2002
Hello!
I have an ADSL connection that works well on my iMac running Mac OS 9, using
a modem called Alcatel SpeedTouch. I now want the same service with YDL 2.3.
There is a detailed Howto for installing it on Linux, which I am trying to
follow.
I have come upon a snag in building the SpeedTouch module. Here is the
message:
[root@localhost SpeedTouch]# cd /opt/SpeedTouch
[root@localhost SpeedTouch]# make
gcc -O2 -Wstrict-prototypes -fomit-frame-pointer -fno-strict-aliasing -pipe
-fno-strength-reduce -DCPU=686 -march=i686 -Wall -DMODULE -D__KERNEL__
-DLINUX
-I/usr/src/linux/include/ -I../sarlib// -c
speedtouch.c -o speedtouch.o
cc1: Invalid option `arch=i686'
In file included from speedtouch.c:13:
/usr/src/linux/include/linux/malloc.h:4: warning: #warning linux/malloc.h is
deprecated, use linux/slab.h instead.
make: *** [speedtouch.o] Error 1
[root@localhost SpeedTouch]#
One would think that the references to "686" are not correct for the
PowerPC; I therefore tried to replace them with "ppc" or something like that
in the makefile, but I did not succeed.
Could someone suggest the right way to correct the makefile in order to make
the thing work? I should be most grateful.
R.B.
(I include below a full copy of the makefile)
#
## Makefile for SpeedTouch USB ADSL Modem
#
#include kernel config
ifeq (`uname -s` , Linux)
include /usr/src/linux/.config
endif
# sarlib path
SARLIB:=../sarlib/
#make parameters
CC=gcc
CFLAGS := -O2 -Wstrict-prototypes -fomit-frame-pointer -fno-strict-aliasing
-pipe -fno-strength-reduce -DCPU=686 -march=i686 -Wall -DMODULE -D__KERNEL__
-DLINUX
INCLUDES := -I/usr/src/linux/include/ -I$(SARLIB)/
VERSION :=$(shell cat VERSION)
KVERSION := $(shell cat VERSION | tr '.' ',');
MODULES= speedtouch.o $(SARLIB)/sarlib.o
LINUXVERSION := $(shell cat /usr/include/linux/version.h | grep UTS_RELEASE
|
cut -d '"' -f 2)
DBGMODULES= speeddebug.o $(SARLIB)/sarlibdbg.o
ifdef CONFIG_SMP
CFLAGS += -D__SMP__
endif
ifdef CONFIG_MODVERSIONS
CFLAGS += -DMODVERSIONS -include speedtouch.ver
endif
all: module debug
debug: speeddbg.o
module: speedtch.o
test: sartest
#
## SARLib entries
#
$(SARLIB)/sarlib.o: $(SARLIB)/sarlib.c $(SARLIB)/sarlib.h
make -C $(SARLIB)/
$(SARLIB)/sarlibdbg.o: $(SARLIB)/sarlib.c $(SARLIB)/sarlib.h
make -C $(SARLIB)/
#
## Speed Touch USB entries
#
version.h: VERSION
@ ( \
echo "#ifndef _SPEEDTOUCH_VERSION_H_"; \
echo "#define _SPEEDTOUCH_VERSION_H_"; \
echo "const char *udsl_version=\""$(VERSION)"\";"; \
echo "#endif"; \
) > version.h
speedtouch.ver:
$(CC) $(INCLUDES) -E speedtouch.c -D__GENKSYMS__ | genksyms -w -k
$(LINUXVERSION)
speedtouch.o: speedtouch.c Makefile version.h
$(CC) $(CFLAGS) $(INCLUDES) -c speedtouch.c -o $@
speeddebug.o: speedtouch.c Makefile version.h
$(CC) $(CFLAGS) $(INCLUDES) -DDEBUG -c speedtouch.c -o $@
speedtch.o: $(MODULES)
$(LD) -r -o $@ $- $(MODULES)
speeddbg.o: $(DBGMODULES)
$(LD) -r -o $@ $- $(DBGMODULES)
sartest: testsarlib.c
$(CC) -lz -ggdb testsarlib.c -o sartest
package: clean
(cd ..; tar zcvf speedtouch-$(VERSION).tar.gz SpeedTouch/COPYING
SpeedTouch/COPYING.GPL SpeedTouch/ChangeLog SpeedTouch/INSTALL
SpeedTouch/Makefile SpeedTouch/VERSION SpeedTouch/speedtouch.c );
@sync;
binpackage: speeddbg.o speedtch.o
(cd ..; tar zcvf SpeedTouch-`arch`.tgz SpeedTouch/speeddbg.o
SpeedTouch/speedtch.o);
@sync;
install: speedtch.o
mkdir -p /lib/modules/`uname -r`/kernel/drivers/usb
cp speedtch.o /lib/modules/`uname -r`/kernel/drivers/usb
/sbin/depmod -aq
clean:
/bin/rm -f speedtouch.o sarlib.o sartest speedtch.o speeddebug.o
speeddbg.o
version.h