Hi Rohan, You can try using the below code in the Makefile:
ifeq ($(KERNELRELEASE),) KERNELDIR ?= /home/<AndroidKernelDirectory> PWD := $(shell pwd) .PHONY: build clean build: $(MAKE) -C $(KERNELDIR) M=$(PWD) modules clean: rm -rf *.o *~ core .depend .*.cmd *.ko *.mod.c else $(info Building with KERNELRELEASE = ${KERNELRELEASE}) obj-m := hello.o endif Regards, Perumal On May 25, 1:57 pm, rohan raizada <rohan.raiza...@gmail.com> wrote: > Hi, > > I have written a small LKM for android. Now when i try to build it I > get the following error: > > make ARCH=arm > CROSS_COMPILE=../../../prebuilt/linux-x86/toolchain/arm-eabi-4.2.1/bin/arm-eabi- > -C /home/roaan/mydroid/common/kernel/ M=`pwd` modules > make: Entering directory `/home/roaan/mydroid/common/kernel' > make: *** No rule to make target `modules'. Stop. > make: Leaving directory `/home/roaan/mydroid/common/kernel > > The module that i want to build is hello.c in the current directory. > > Thanks, > Rohan. > > -- > 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