Tushar,

You can tell the kernel to load a module even if it doesn't match
the version info.  Use insmod -f module.o

There were some changes made to the methods used in polling for
data some time around 2.0 or 2.2(I forget).  I'd suggest googling
for stand alone drivers that are similiar to the one you want to write.
Google on "linux driver example" or something like this.
Or you could just look at the actual history of the kernel source,
pick out a simple driver included to see what changed.
You should also learn how to compile and install a kernel.

Heres a simple module to get you started:

Makefile:
# Makefile for test module

KERNEL_INCLUDES=/usr/src/linux/include

CFLAGS= -D__KERNEL__ -DMODULE -O -Wall -I$(KERNEL_INCLUDES)

MODULES=simple.o

all: $(MODULES)

clean:
	rm -f *.o *~ core

install:
	cp simple.o /lib/modules/`uname -r`/misc

simple.c:
#include <linux/module.h>

int init_module(void)
{
  printk("<1>Hello, world\n");
  return 0;
}
void cleanup_module(void)
{
  printk("<1>Goodbye cruel world\n");
}


On Sat, Jan 24, 2004 at 06:55:00AM -0800, Tushar Rai wrote:
> 
> Jamie , 
>  i'm a university student and new in the field of device  drivers for
>  linux kernel,which i'm implementing  for my project. i'm refering the
> book LINUX DEVICE DRIVERS Ed.2.(O'Reilly) which is written according to
> LINUX KERNEL 2.0-2.4  but the system i'm working on has got KERNEL
> 2.4.20-8(Red Hat 9.0).....in which the  examples are not working...
> i wanted to know what kind of  modification  needed to run these examples
> or shall i have to change the kernel...The reply from O'Reilly was to downg
>rade the kernel .
> My question is : How to downgrade my kernel ? or 
> HOW TO DISABLE VERSION SUPPORT IN LINUX KERNEL .
> Please give the exact step by step procedure . 
>  
> Hoping to get a reply soon,
> Thanking you ,
>  Tushar
> CUSAT
> India
> 
> 
> 
> 
> 
> ---------------------------------
> Do you Yahoo!?
> Yahoo! SiteBuilder - Free web site building tool. Try it!
> _______________________________________________
> TCLUG Mailing List - Minneapolis/St. Paul, Minnesota
> http://www.mn-linux.org tclug-list at mn-linux.org
> https://mailman.real-time.com/mailman/listinfo/tclug-list


_______________________________________________
TCLUG Mailing List - Minneapolis/St. Paul, Minnesota
http://www.mn-linux.org tclug-list at mn-linux.org
https://mailman.real-time.com/mailman/listinfo/tclug-list