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

[plamo:02840] Re: network



From: "H.ISHIKAWA" <ishikawa.hirotoshi@mos.nttcom.co.jp>
Subject: [plamo:02839] Re: network
Date: Thu, 3 Jun 1999 14:15:33 +0900

> 以上の事を試してみたのですが、2種類ダウンロードしたファイルのどちらも、
> 今の自分のカーネルとはバージョンがあわないので、再コンパイルをして下さい
> とのメッセージがでてしまいました(T.T) そんなわけで、コンパイルのしかたも
> わからないので、現在本で調べているのですが、なかなかわかりません(^_^;)
> まさか、コンパイルの仕方まで、ここで質問するわけにはいきませんよねぇ(笑)
> もうちょっと、勉強してみますね。 

ftp://ftp.cirrus.com/pub/drivers/ethernet/linux102_tar.gz

の中の記述通り、以下のとおりでいいのでは?

------------------------------------------------
3.0 LOADING THE DRIVER AS A MODULE
===============================================================================

If the driver is compiled as a loadable module, you can load the driver module
with the 'insmod' command.  Many of the adapter's configuration parameters can 
be specified as command-line arguments to the load command.  This facility 
provides a means to override the EEPROM's settings or for interface 
configuration when an EEPROM is not used.

Example:

    insmod cs89x0.o io=0x200 irq=0xA media=aui

This exmaple loads the module and configures the adapter to use an IO port base
address of 200h, interrupt 10, and use the AUI media connection.  The following
configuration options are available on the command line:

* io=###              - specify IO address (200h-360h)
* irq=##              - specify interrupt level
* mmode=#####         - specify memory base address
* dma=#               - specify dma channel
* media=rj45          - specify media type
   or media=2
   or media=aui
   or medai=auto
* duplex=f            - specify forced half/full/autonegotiate duplex
   or duplex=h
   or duplex=auto
* debug=#             - debug level

NOTES:
* If an EEPROM is present, any specified command-line parameter will override
the corresponding configuration value stored in EEPROM.

* If no "io" or "mmode" parameter is specified on the command-line, the driver
will scan for the adapter.  When scanning, the driver only reads I/O ports.  
This sometimes is not sufficient, (e.g. after a warm boot).  If you wish to 
allow the driver to perform a more aggressive scan (one write to the IO base 
addresses to reset the data port pointer) you can specify an I/O address with 
an address value one greater than the configured address.  Example, to scan for
an adapter located at IO base 0x300, specify an IO address of 0x301.  Only 
ports between 200h and 360h at 20h intervals are scanned.  

* The "duplex=auto" parameter is only supported for the CS8920.

* The minimum command-line configuration required if an EEPROM is not present
is:

  * io or mmode base address
  * irq 
  * media type (no autodetect)

The following addtional parameters are CS89XX defaults (values used with no 
EEPROM or command-line argument).

  * DMA Burst = enabled
  * IOCHRDY Enabled = enabled
  * UseSA = enabled
  * CS8900 defaults to half-duplex if not specified on command-line
  * CS8920 defaults to autoneg if not specified on command-line
  * Use reset defaults for other config parameters

* You can use ifconfig to set the adapter's Ethernet address.
-----------------------------------


コンパイルに関しては、

4.1がモジュールとして作成する場合、

4.2がドライバをカーネルに組み込みする場合です。


まずは4.1で試してみて、そのうち、組み込みに挑戦してみればいいのでは
ないでしょうか。

-------------------------------------------------------
4.1 COMPILING THE DRIVER AS A LOADABLE MODULE

To compile the driver into a loadable module, use the following command 
(single command line, without quotes):

"gcc -D__KERNEL__ -I/usr/src/linux/include -I/usr/src/linux/net/inet -Wall 
-Wstrict-prototypes -O2 -fomit-frame-pointer -DMODULE -DCONFIG_MODVERSIONS 
-c cs89x0.c"


4.2 COMPILING THE DRIVER INTO THE KERNEL

To compile the driver directly into the kernel requires editing four 
configuration files, copying the source file to the /linux/drivers/net
directory and then running the make utility to rebuild the kernel.

1. Edit the following configuration files by adding the statements as
indicated.  (When possible, try to locate the added text to the section of the
file containing similar statements).

a.) In /usr/src/linux/drivers/net/CONFIG, add

CS89x0_OPTS"   =

Example:

 WD_OPTS        = #-DWD_SHMEM=0xDD000
 EL2_OPTS       = #-DEL2_AUI
 CS89x0_OPTS    =                
 NE_OPTS        =
 HP_OPTS        =
 PLIP_OPTS      =


b.) In /usr/src/linux/drivers/net/Config.in, add:

tristate 'CS89x0 support' CONFIG_CS89x0

Example:

     if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
       tristate 'ICL EtherTeam 16i/32 support' CONFIG_ETH16I
     fi

     tristate 'CS89x0 support' CONFIG_CS89x0

     tristate 'NE2000/NE1000 support' CONFIG_NE2000
     if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
       tristate 'NI5210 support' CONFIG_NI52


c.) In /usr/src/linux/drivers/net/Makefile, add the following lines: 

ifeq ($(CONFIG_CS89x0),y)
L_OBJS += cs89x0.o
else
  ifeq ($(CONFIG_CS89x0),m)
  M_OBJS += cs89x0.o
  endif
endif


d.) In /linux/drivers/net/Space.c file, add the line:

extern int cs89x0_probe(struct device *dev);


Example:

 extern int ultra_probe(struct device *dev);
 extern int wd_probe(struct device *dev);
 extern int el2_probe(struct device *dev);

 extern int cs89x0_probe(struct device *dev);

 extern int ne_probe(struct device *dev);
 extern int hp_probe(struct device *dev);
 extern int hp_plus_probe(struct device *dev);


Also add:

 #ifdef CONFIG_CS89x0
        && cs89x0_probe(dev)
 #endif


2.) Copy the driver source files (cs89x0.c and cs89x0.h) and this README file 
into the /usr/src/linux/drivers/net directory.


3.) Run 'make config' followed by 'make dep' and finally 'make' to rebuild 
the kernel. 
-------------------------------------

別に難しくはないですよね?(^_^)

ところで当該カード上のチップは何だったのでしょうか。。。
----+----1----+----2----+----3----+----4----+----5----+----6----+----+--
Shigeo Sagai                sagai@criepi.denken.or.jp

Follow-Ups
[plamo:02841] Re: network, Shigeo Sagai
References
[plamo:02839] Re: network, H.ISHIKAWA

[検索ページ] [メール一覧]
Plamo ML 公開システム