[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: new ethernet card



Hi,

On Mon, 18 Jun 2001, Adri wrote:

> Hello all,
> 
> the old ethernet card I had was not supported under Win2000 and another one 
> was not supported under linux.
> 
> So, now I have a new ethernet card. It's Cnet PR0200(B). It's not in the 
> supported hardware list but the bundled disk contains the source of the 
> driver for linux and a readme file.
> 
> Now:
> 
> "
>    A. Compiler command:
> 
>       A-1: For normal single processor kernel
>            "gcc -DMODULE -D__KERNEL__ -I/usr/src/linux/net/inet -Wall
>              -Wstrict-prototypes -O6 -c dmfe.c"
> 
>       A-2: For single processor and enable kernel module version function
>            "gcc -DMODULE -DMODVERSIONS -D__KERNEL__ -I/usr/src/linux/net/inet
>              -Wall -Wstrict-prototypes -O6 -c dmfe.c"
> 
> 	Note: O of -O6 is a capital o, not a "0".
> "
> 
> What does "enable version function" mean ?
> 
If you compile a kernel, you can choose to use modversions or not. I do
not know exactly what it does, but it seems that these kernels keep a list
of all modules and depencies. I think it is best to check first wether or
not your current compiled kernel has MODVERSIONS enabled. For that, look
in you .config file, for example:
cat /boot/config-2.2.17 | grep 'CONFIG_MODVERSIONS'  	 or
cat /usr/src/linux/.config | grep 'CONFIG_MODVERSIONS'

If yes, use option 2.

	
> "
>    B. How to compile driver
> 
>       B-1: Login by supervisor
> 
> [I hope they mean root with supervisor, don't they?]
> 
>       B-2: Copy dmfe.c and Makefile into your HD. You can make a new directoty
>            to put.
>       B-3: Keep driver source file name as "dmfe.c" and makefile name as
> 	  "Makefile"
>       B-4: You can type the following command to compile driver. Please 
> according
>       	  to your system to pick one.
>       		make org	;;
>       		make mod	;;Set version info on all module symbol
>       		make smp	;;symmetric multi-processing(SMP) support
>       		make smp_mod	;;SMP & Set version into on module
>       	
>       	  Or you can type above compiler command to compile driver.
>       		
>       	Note: Please check you must have the right kernel source on
>       	      "/usr/src/linux".
> "
> 
> I think make mod is my option, isn't it?
> 
I think so. What is org? BTW: you do not have to be root when compiling.
Only for installation you need to be root.

> "
>   C. The following steps teach you how to activate NIC:
> 
>       C-1: A simple and temporary method
> 
>          1. Used the upper compiler command to compile dmfe.c
> 
>          2. Insert dmfe module into kernel
>             "insmod dmfe"        ;;Auto Detection Mode (Suggest)
>             "insmod dmfe mode=0" ;;Force 10M Half Duplex
>             "insmod dmfe mode=1" ;;Force 100M Half Duplex
>             "insmod dmfe mode=4" ;;Force 10M Full Duplex
>             "insmod dmfe mode=5" ;;Force 100M Full Duplex
>             "insmod dmfe mode=100" ;;Force 1M HomeRun
>             "insmod dmfe mode=200" ;;Force 1M LongRun
> 
>          3. Config a dm9102 network interface
>             "ifconfig eth0 172.22.3.18"
>                            ^^^^^^^^^^^ Your IP address
> 
>          4. Activate the IP routing table. For some distributions, it is not
>             necessary. You can type "route" to check.
> 
>             "route add default eth0"
> 
> 
>          5. Well done. Your DM9102 adapter actived now.
> 
> 	Note. This is a temporary method. After you reboot the system, you
> 	      will lost the setting.
> "
> 
> Will it loose the settings? So how do I configure the whole stuff steadly ?

Copy dmfe.o to /lib/modules/<kernelver>/net.
As root: run modconf and select your module there, with the options. 
If modconf does not see your module, then: echo 'dmfe mode=5' > /etc/modules
Then edit /etc/network/interfaces:

iface eth0 inet static
        address 192.168.1.1
        netmask 255.255.255.0
        network 192.168.1.0
        gateway 192.168.1.



Then you can do 'ifup eth0'.

> 
> "
>     D. Object files description:
>      1. dmfe_r62.o:		For Redhat 6.2, kernel version 2.2.14-5.0
> 	2. dmfer61c.o:		For Redhat 6.1+CLE0.8, kernel 2.2.12-20
> 	3. dmfe_r60.o:		For Redhat 6.0, Kernel 2.2.5-15
> 	4. dmfe_m70.o:		For Mandrake 7.0, Kernel 2.2.14-15mdk
> 	5. dmfe_m61.o:		For Mandrake 6.1, Kernel 2.2.13-7mdk
> 	6. dmfer60c.o:		For RedHat6.0+CLE0.8, kernel 2.2.5-15CLE
> 	7. dmfe_k240t1.o:	For Kernel240test1. Without SMP and
> 				did not set version on kernel module.
> 	8. dmfe_k240t4.o:	For Kernel240test4. Without SMP and
> 				did not set version on kernel module.
> 
>          If you can make sure your kernel version, you can rename
>          to dmfe.o and directly use it without re-compiling.
> "
> Does this mean that there's no source for my 2.2 kernel ?
> 
These are object files for compiled kernels. You need to take step A and B
as described above. But before that, you need to install your current
kernel source. If you have potato, it is probably 2.2.17 (check your /boot
directory). To install kernel source:
apt-get install kernel-source-2.2.17

I do not remember preciesely how this continues, but ASAICR: 
tar -xvzf /usr/src/kernel-source-2.2.17.tgz	or
tar -xvIf /usr/src/kernel-source-2.2.17.tar.bz2
 and then rename:
mv /usr/src/kernel-source-2.2.17 /usr/src/linux

Copy you r current config file:
cp /boot/Config-2.2.17 /usr/src/linux/.config
cd /usr/src/linux
make oldconfig
make dep


Now you can proceed with steps A and B and C.


> Could you suggest me a better procedure to do the whole thing?
> 
Done.

Greetz,
Sebastiaan

--
  NT is the OS of the future. The main engine is the 16-bit Subsystem
  (also called MS-DOS Subsystem). Above that, there is the windoze 95/98
  16-bit Subsystem. Anyone can see that 16+16=32, so windoze NT is a 
  *real* 32-bit system.



Reply to: