No need to change any make file.

Make 1 directory out side the kernel tree, then 

Write you own make file, for compiling that module.

& Then compile it. You will get ur ko in ur directory.

 

There is a sample I have used for usb serial gadget

 

------

obj-m := $(MOD).o

 

$(MOD)-objs :=    ../../../linux-2.6.17/drivers/usb/gadget/serial.o \

                  ../../../linux-2.6.17/drivers/usb/gadget/epautoconf.o
\

                  ../../../linux-2.6.17/drivers/usb/gadget/config.o \

                  ../../../linux-2.6.17/drivers/usb/gadget/usbstring.o

 

 

CFLAGS += -I$(PWD/Includes  -D _HOST_DEBUG_

 

KDIR := ../../../linux-2.6.17

PWD := $(shell pwd)

 

default:

            $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules

 

clean:

            rm *.o *.ko *.mod.c .*.cmd Modules.symvers .tmp_versions/*

            rmdir .tmp_versions

----

 

 

Regards

Vivek

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of pragnesh radadia
Sent: Monday, June 16, 2008 9:25 AM
To: [email protected]
Cc: Veda Tripathi
Subject: Re: Help needed regarding Makefile os an external loadable
module

 

I think Makefile only require modification if you add new sourcecode
file.

----- Original Message ----
From: Veda Tripathi <[EMAIL PROTECTED]>
To: [email protected]
Sent: Monday, 16 June, 2008 8:15:17 AM
Subject: Help needed regarding Makefile os an external loadable module

Hi all,
I have been trying to build ext3 as an external loadable module after
adding some code in inode.c I mistakenly assumed that the Makefile
doesn't require any change. Now I have discovered that Makefiles for
external modules are written differently. I know how to write a simple
Makefile for external modules (even with many source files) without any
configuration options. But in above case how to write or what changes
should be done in the Makefile of ext3?

I already have been through Documentation present in the source tree but
not much discussion about config options in case of external modules
there.

I would appreciate any help.

Thanx and Regards

Veda





________________________________

Check out the all-new face of Yahoo! India. Click here.
<http://in.rd.yahoo.com/tagline_frontpage_2/*http:/in.yahoo.com/?wm=n/> 

Reply via email to