Trouble in building module SpeedTouch (for ADSL modem)

René Bourion yellowdog-general@lists.terrasoftsolutions.com
Wed Dec 18 11:20:01 2002


Original message 1:

Date: Mon, 16 Dec 2002 12:53:54 -0500 (EST)
From: "nathan r. hruby" <nathan@drama.uga.edu>
To: yellowdog-general@lists.terrasoftsolutions.com
Subject: Re: Trouble in building module SpeedTouch (for ADSL modem)
Reply-To: yellowdog-general@lists.terrasoftsolutions.com

On Mon, 16 Dec 2002, René Bourion wrote:

> 
> [root@localhost SpeedTouch]# cd /opt/SpeedTouch
> [root@localhost SpeedTouch]# make
> gcc -O2 -Wstrict-prototypes  -fomit-frame-pointer -fno-strict-aliasing -p=
ipe
> -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 t=
hat
> in the makefile, but I did not succeed.
>  

You need to change both the -DCPU and -march flags to be ppc.  There might
be other stuff as well, I dunno, though the malloc.h -> slab.h thing has
caused people trouble with other things, you may want to go ahead and
edit speedtouch.c to reflect this, or at least be prepared to go back and
change it it the driver doesn't work.

Note that there's no promise that it will work once compiled - clearly
it's designed on x86 so there may be some specific assumptions made in the
driver based the arch being x86 which just won't work on PPC
.........................................................

Original message 2:

Date: Mon, 16 Dec 2002 13:17:22 -0500
From: Ken Schweigert <ken@byte-productions.com>
To: yellowdog-general@lists.terrasoftsolutions.com
Subject: Re: Trouble in building module SpeedTouch (for ADSL modem)
Reply-To: yellowdog-general@lists.terrasoftsolutions.com

On Mon, Dec 16, 2002 at 06:12:32PM +0100, René Bourion wrote:
> 
> [root@localhost SpeedTouch]# cd /opt/SpeedTouch
>............................................
> 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 t=
hat
> in the makefile, but I did not succeed.
> 
> R.B.

René,

I'm not a makefile guru, but here's what I would try.  Edit the CFLAGS line
and
just delete the entries for -DCPU and -march.  gcc should be smart enough to
know which architecture to build.

If this doesn't work, can you provide the link to the HOWTO for installing
it?

If it does work, please let us know.

-- 
Ken Schweigert, Network Administrator
Byte Productions, LLC
http://www.byte-productions.com

...............................................

Yes indeed. 

Thank you Nathan and Ken. I deleted the entries for -DCPU and -march as
suggested, and it did not embarrass gcc. And I edited speedtouch.c to
replace malloc. with slab.h.

As a result, speedtouch installed quite nicely. But that is not the end of
my story. Before I go on, I will give the link to the HOWTO:

http://linux-usb.sourceforge.net/SpeedTouch/howto.html

The next step is to install mgmt. This does not work either:

[root@localhost root]# cd /opt/mgmt
[root@localhost mgmt]# make
Warning: Object was compiled with egcs-2.91.66, not 2.95.4.
Warning: Object was compiled with libc-2.1.92, you APPEAR to be using
libc-2.2.5
gcc mgmt.o -o speedmgmt
/usr/bin/ld: mgmt.o: Relocations in generic ELF (EM: 3)
mgmt.o: could not read symbols: File in wrong format
collect2: ld returned 1 exit status
make: *** [speedmgmt] Error 1
[root@localhost mgmt]#

Here I have no clue at all; have you an idea?

R. B.