Re: [newbie] Compiling Drivers from CVS(was installing new hardware)

2003-07-15 Thread Derek Jennings
On Monday 14 Jul 2003 11:00 pm, Wade Waldron wrote:
 I have determined that I probably need an up to date version of the pegasus
 driver on my system.  I have downloaded the header file off the CVS on the
 internet.  I would like to add the new version of the driver to my system. 
 I am guessing that this requires me to compile it since I can not seem to
 find any other versions.  Can someone explain how I go about doing this and
 what will I need to do it?

 Wade

 Continuing from the conversation below

SNIP

Wade You need more than the headers you need the entire CVS.

Start off by opening a root terminal and typing

urpmi gcc kernel-source cvs 

That will install the gcc compiler. The source code of your kernel and the cvs 
software to get the driver off the net.

Next open a user terminal and type (all on 1 line)

cvs -d:pserver:[EMAIL PROTECTED]:/cvsroot/pegasus2 login

You will see the reply :

Logging in to :pserver:[EMAIL PROTECTED]:2401/cvsroot/pegasus2
CVS password:

Hit 'Enter' as the password. The CVS server is very unreliable you may have to 
try this several times.

Then type all on 1 line

cvs -z3 -d:pserver:[EMAIL PROTECTED]:/cvsroot/pegasus2 co -r 
pegasus_2_4 pegasus

Again you may need to try this several times but eventually you should see:-

cvs server: Updating pegasus
U pegasus/Makefile
U pegasus/pegasus.c
U pegasus/pegasus.h

The files are now downloaded and should be in the directory ~/pegasus  
(~ means your home directory)

Now enter
cd pegasus
ls  (to see the list of files)

You must now edit the file Makefile using whatever editor you like.
Edit the line
CFLAGS  = -Wp,-MD,.$(*F).d -D__KERNEL__ -I/usr/src/linux-2.4.20/include -Wall 
-Wstrict-prototypes -Wno-trigraphs -O2 -fomit-frame-pointer 
-fno-strict-aliasing -fno
-common -pipe -mpreferred-stack-boundary=2 -march=pentium3 -DMODULE 
-DKBUILD_BASENAME=$(*F)

to read
CFLAGS  = -Wp,-MD,.$(*F).d -D__KERNEL__ -I/usr/src/linux/include -Wall 
-Wstrict-prototypes -Wno-trigraphs -O2 -fomit-frame-pointer 
-fno-strict-aliasing -fno
-common -pipe -mpreferred-stack-boundary=2 -march=pentium3 -DMODULE 
-DKBUILD_BASENAME=$(*F)

Now enter

make

The file pegasus.o should appear

Now remove the file 
/lib/modules/2.4.21-0.13mdk/kernel/drivers/usb/pegasus.o.gz  (move it to 
somewhere safe in case you need it again) and replace it with pegasus.o

Thats it done. Now if you execute the command (in a root terminal)
modprobe pegasus 
the driver should load and will show up if you do 
lsmod

You will still need to edit that /etc/hotplug/usb.handmap file as I mentioned 
in my last post if you want the driver automatically loaded when you plug the 
adapter in.

Hope that all works -)

derek

-- 
--
www.jennings.homelinux.net


Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com


[newbie] Compiling Drivers from CVS(was installing new hardware)

2003-07-14 Thread Wade Waldron




I have determined that I probably need an up to 
date version of the pegasus driver on my system. I have downloaded the 
header file off the CVS on the internet. I would like toadd the new 
version of the driver to my system. I am guessing that this requires me to 
compile it since I can not seem to find any other versions. Can someone 
explain how I go about doing this and what will I need to do 
it?

Wade

Continuing from the conversation below

-

Thanks for identifying the driver source bascule.If you look at the 
latest source code for the driver http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/pegasus2/pegasus/pegasus.hyou 
can see the Microsoft adapter was added to the source 4 weeks and 5 days 
ago.From the latest source we can 
seeVENDOR_MICROSOFT 
0x045ePEGASUS_DEV( "Microsoft MN-110", VENDOR_MICROSOFT, 
0x007a,DEFAULT_GPIO_RESET | PEGASUS_II )Adding the 
linepegasus 
0x0003 0x045e 0x007a 
0x 
0x 
0x00 
0x00 
0x00 
0x00 
0x00 
0x00 
0x(That is all one line) to /etc/hotplug/usb.handmap 
should cause the driver to be loaded whenever the USB adapter is plugged 
in.If that does not work then you may have to compile the driver from 
CVS which is quite a lot more work for a newbie.derekOn 
Friday 11 Jul 2003 7:31 am, bascule wrote: wade, well seeing as 
how it's a microsoft piece of kit i'd guess that the odds of them 
realeasing drivers are vanishingly small, however according to: http://www.linux-usb.org/devices.html 
under 'network adapters' the top two entries looks promising, you will 
need to know what speed usb port you have, note the second entry seems 
to imply that you need a later kernel it's also not obvious what 
the actual driver names are from the devices listed there :) 
however assuming that a)the pegasus driver is what you want b) you have 
your usb system up and running then hopefully #modprobe pegasus 
(note done as root) will load the driver, if not you could try some of 
the other drivers listed under 
/lib/modules/2./kernel/drivers/usb/ use #modinfo 
modulename to see what sort of driver it is now 
the next bit i could be wrong! :) assuming the driver is correct then 
you will need to set up an interface using that device, assuming you 
haven't any already then i think you may be talking 'usb0' from 
something i read online if you do: # ifconfig -a you 
should hopefully see a refernce to usb0 or indeed to a net interface 
that didn't use to be there, if so then you need to set it up, i 
believe you will need to create a file under 
/etc/sysconfig/network-scripts/ called ifcgf-usb0 (assuming usb0 is the 
interface name) that has something like: 
BOOTPROTO=static BROADCAST=192.168.129.255 
IPADDR=192.168.129.1 NETMASK=255.255.255.0 
NETWORK=192.168.129.0 DEVICE=usb0 this assumes a static 
ip for the interface, you will have to adjust accordingly 
or DEVICE=usb0 USERCTL=no > 
BOOTPROTO=dhcp IPADDR= NETMASK= NETWORK=0.0.0.0 
BROADCAST=255.255.255.255 DHCP_CLIENT=/sbin/dhcpcd for a 
dhcp assigned ip i ripped that from my dhcp assigned interface on my 
mandrake firewall so i figure it should be the right format, not you 
would have to have /sbin/dhcpcd on your system then you 
should be able to do #ifup usb0 and if it works 
#ifconfig should show it up and running then you would need to 
add your pegasus module (or whatever it turns out to be) to your start 
up files, that would either be /etc/modules with a line: 
pegasus or /etc/modules.conf with a line: alias 
usb0 pegasus i'm not sure if both would work and if so which is 
better form for how wrong i am with this advice wait for others 
to comment! :) bascule On Friday 11 Jul 2003 
3:24 am, Wade Waldron wrote:  Microsoft MN-110 USB ethernet 
adapter.   Wade  - Original Message 
-  From: "Carroll Grigsby" [EMAIL PROTECTED]  To: 
[EMAIL PROTECTED] 
 Sent: Thursday, July 10, 2003 7:15 PM  Subject: Re: [newbie] 
Installing new hardwareOn Thursday 10 July 2003 
08:15 pm, Wade Waldron wrote:Okay, maybe some more 
background is needed. When I run the mandrake
configuration utility, and look under the listed hardware I have a  
  few unknown devices (like my network adapter). I have looked 
aroundand   found 
that my network adapter probably uses the pegasus 
driver. I wouldlike--