[x] Welcome to LinuxSolved.com Linux help forums, here we are a community of Linux users helping each other. It is helpful to both ie. new linux users as well experienced one. We always have our experts to help you and ofcourse members help each other, so you can ask for help any time by Registering.: Click to Register

Welcome, Guest. Please login or register.
Did you miss your activation email?


Login with username, password and session length

Linux Forums - Linux Help,Advice & support community:LinuxSolved.com  |  Forum  |  Linux Software  |  Linux Application  |  Topic: NIC Driver Installation:How to compile module for it?
The LinuxSolved.com GNU/Linux User Communit - Forum
Welcome to LinuxCommunity You have just arrived to a friendly linux community which is helping Linux Users from Years.. You can be its part if you have not already joined it. Registration is FREE and is gateway to unlimited help and support to all your linux related needs. If you are an GNU/Linux supporter then you have come to the right place.
Pages: [1]
  Print  
Author Topic: NIC Driver Installation:How to compile module for it?  (Read 419 times)
0 Members and 1 Guest are viewing this topic.
Ujjwol
Linux Learner
***
Offline Offline

Posts: 54


View Profile
« on: November 05, 2007, 12:28:40 PM »

I have recently brought a NIC Card and the driver file i got was
 readme.txt                This file.
    sc92031.c                 The linux core driver source code file
    Makefile                  Makefile for generating driver object file
and i have attached the readme file here..
-Start of ReadMe File------------------------------------------------------------------
*************************************************
**   Silan SC92031 PCI  Fast Ethernet Adapter  **
**                                             **
**   LINUX driver                              **
*************************************************

Introduction:
=============

    The instructions are for linux driver installation. You must
    compile the source code to generate sc92031.o and use insmod command to
    insert sc92031.o as module.

Contents of the Subdirectory:
=============================

    readme.txt                This file.
    sc92031.c                 The linux core driver source code file
    Makefile                  Makefile for generating driver object file
   
Kernel Supported
================
    This driver support linux kernel version 2.4.x/2.5.x now.

Installation
============
    1) Create a temporary directory:
        # mkdir /temp

    2) Change to the temporary directory:
        #cd /temp

    3) Copy driver (sl_linux.tgz) from CD-ROM to the temporary directory, and follow the commands:
       # mount -t iso9660 /dev/cdrom /mnt
       # cp /mnt/sl_linux.tgz /temp

    4) untar the archive file:
       # tar xzvf sl_linux.tgz
       # cd sc92031
   
    5) Compile the driver source files and it will generate sc92031.o, and
       copy it to correct driver installation path (The installation directory
       is different in different kernel versions. In 2.4.x kernel, the path is
       /lib/modules/KERNEL_VERSION/kernel/drivers/net/, and in 2.2.x kernel,
       the path is /lib/modules/KERNEL_VERSION/net/)
       # make install

    6) Check configuration file (/etc/modules.conf or /etc/conf.modules,it
       depend on your Linux distribution) for loading kernel modules. Make sure
       there is the following content in the configuration file, where # is
       interface number :
        alias eth# sc92031
 
    7) Reboot now:
        shutdown -r now

    Cool Install your driver module (If the driver module is in the wrong place,
       an error message will appear, and say that can't find the driver
       module):
        insmod sc92031.o

    Cool Use ifconfig command to assign the IP address, where # is network
       interface number:
        ifconfig eth# <IP>

    9) Check the interface works:
        ping <remote_host_IP>

Uninstallation
==============
    Please enter the following commands to uninstall your driver:
      # make uninstall

Module Parameter:
=================
The following parameters can be set when we install the driver module. You can add this parameters when
you execute 'insmod' command to install the driver
      # insmod sc92031.o  work_node =0x00

work_mode
  work_mode is used for setting the speed and duplex mode of NIC.Value is as followed:
        Autoselect 0x00
   M10-half   0x01
   M10-full   0x02
   M100-half  0x04
   M100-full  0x08
    
If you want to use other modes,it can be changed by the following steps:
        # ifdown eth0
        # rmmod sc92031
        # insmod sc92031.o work_mode= ****
---End of Readme File---------------------------------------------------------------------
 
 And the thing is,
 i cannot perform installation step 5 i.e, cannot produce sc92031.o from sc92031.c by compiling i don't know how :-(
 please anybody tell me how i going to do it..
 Thanks in Advance....
 and perform step 6 where to add in first /last ..
 I am confused..
 Ujjwol..
« Last Edit: November 05, 2007, 02:36:38 PM by Ricky » Logged
Ricky
LST CareTaker
Specially Skilled
*****
Offline Offline

Gender: Male
Posts: 2187


View Profile
« Reply #1 on: November 05, 2007, 02:37:16 PM »

It is pretty simple, you need to create makefile and then make.
you see this link :
http://www.cyberciti.biz/tips/compiling-linux-kernel-module.html , it has detailed instructions.
Logged
Ujjwol
Linux Learner
***
Offline Offline

Posts: 54


View Profile
« Reply #2 on: November 07, 2007, 08:32:22 PM »

It is pretty simple, you need to create makefile and then make.
you see this link :
http://www.cyberciti.biz/tips/compiling-linux-kernel-module.html , it has detailed instructions.
ya i did use the make file I got in the driver cd the compilation process displayes error
do i need to make makefile myself
Logged
Ricky
LST CareTaker
Specially Skilled
*****
Offline Offline

Gender: Male
Posts: 2187


View Profile
« Reply #3 on: November 08, 2007, 06:07:24 PM »

If it is in driver cd then you should use that one or try following as it is told in link I gave !
Logged
Linux Forums - Linux Help,Advice & support community:LinuxSolved.com
   

 Logged
Pages: [1]
  Print  
 
Jump to:  

Welcome, Guest. Please login or register.
Did you miss your activation email?
October 10, 2008, 03:45:55 PM

Login with username, password and session length
Navigation
Recent Discussions
[Today at 03:18:26 PM]

[October 09, 2008, 05:17:47 PM]

[October 08, 2008, 04:32:08 AM]

[October 07, 2008, 05:16:33 AM]

[October 06, 2008, 03:09:51 AM]

[October 04, 2008, 03:33:03 AM]

[October 03, 2008, 06:21:18 AM]

[October 03, 2008, 05:31:19 AM]

[October 03, 2008, 05:28:14 AM]

[October 03, 2008, 05:27:13 AM]
Members
Total Members: 6099
Latest: totwire
Stats
Total Posts: 8203
Total Topics: 2224
Online Today: 12
Online Ever: 111
(June 28, 2007, 06:47:29 AM)
Users Online
Users: 0
Guests: 8
Total: 8
Privacy Policy| Powered by SMF 1.1.4 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks
Theme & TinyPortal v0.9.8 © Bloc