The HyperNews Linux KHG Discussion Pages

## How to add a driver to the kernel ?

  Forum: The Linux Kernel Hackers' Guide
  Re: Kernel Makefile Configuration: how? (Simon Green)
  Keywords: Makefile, configuration, drivers, epic100
  Date: Mon, 22 Dec 1997 07:08:52 GMT
  From: jacek Radajewski <jacek@usq.edu.au>

    Hi All,

    I am in the process of rebuilding our beowulf cluster system and have to include
    support for channel bonding and the epic100 SMC card.  So far the
    epic100.o module works fine, but I need to compile epic100.c into the
    kernel. (I need a monolithic kernel to boot clients of a floppy disk and
    mount / via NFS).  Anyway, I put an antry in .config "CONFIG_EPIC100=y",
    in drivers/net I put :

    ifeq ($(CONFIG_EPIC100),y)
    L_OBJS += epic100.o
    endif

    in the Makefile and compiled the kernel. (epic100.o did compile)

    I added an entry in /etc/lilo.conf :

    append="root=/dev/hda4 mem=256MB ether=0,0,eth0 ether=0,0,eth1
    ether=0,0,eth2"

    and ran lilo

    "I have 2 SMC cards and 3C900 for the outside world"

    When I rebooted the machine only 3C900 was detected, but I have no
    problems loading the module.

    Questions.

    1.  What did I do wrong in the kernel configuration ?
    2.  Is there any documentation available on how to add drivers to the
    kernel ?