For creating kernel dynamic modules, needs a module library.

If you have no problem while compiling modules in kernel directory [means
while kernel building time].
Create a directory in drivers folder, copy the *.c file write the Makefile
& Kconfig for that.
Once kernel building was done, push that .ko to android fs.

Above procedure is little bit hard, but gives a fruitful result with
defined procedure.

Regards,
Jagan.

On Sat, Jan 28, 2012 at 10:38 AM, Kenneth Ko <ko.harm...@gmail.com> wrote:

> > KERNELDIR :=/home/johnson/rowboat-android/kernel
>
> You may want to try KERNEL_DIR rather than KERNELDIR.
>
> --Ken
>
> On Wed, Jan 25, 2012 at 1:29 AM, Johnson Pinto <johnsonpin...@gmail.com>
> wrote:
> > Hi,
> > Am using rowboat version of android. I want to build kernel module
> > 'hello.c'
> >
> > my android kernel is in the path ~/rowboat-android/kernel
> > I had extracted arm compiler in the path ~/tools/arm/arm-2008q3
> >
> > My module and makefile is in the path ~/Desktop/test_kernelmod/
> >
> > My makefile is:
> >
> >    obj-m := mymod.o
> >    COMPILER :=/home/johnson/rowboat-android/prebuilt/linux-x86/
> > toolchain/arm-eabi-4.4.0/bin/arm-eabi-
> >    CROSS_COMPILE := $(COMPILER)
> >    ARCH := arm
> >    KERNELDIR :=/home/johnson/rowboat-android/kernel
> >
> >    PWD := $(shell pwd)
> >
> > default:
> >        make -C $(KERNEL_DIR) M=$(PWD) ARCH=$(ARCH) CROSS_COMPILE=$
> > (COMPILER) modules
> >
> > clean:
> >        rm *.o; rm *.ko
> >
> >
> >
> > I tried all the options by changing the KERNELDIR, and also the
> > COMPILER path but of no use..
> > I get the errror as :
> > make: *** M=/home/johnson/Desktop/test_kernelmod: No such file or
> > directory.  Stop.
> > make: *** [default] Error 2
> >
> > Can anyone say how to compile it ? what all changes to be made to
> > Makefile ?
> >
> > Thanks,
> > Johnson
> >
> > --
> > unsubscribe: android-kernel+unsubscr...@googlegroups.com
> > website: http://groups.google.com/group/android-kernel
>
> --
> unsubscribe: android-kernel+unsubscr...@googlegroups.com
> website: http://groups.google.com/group/android-kernel
>

-- 
unsubscribe: android-kernel+unsubscr...@googlegroups.com
website: http://groups.google.com/group/android-kernel

Reply via email to