From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yakir Yang Subject: Re: HOW TO MAKE SAMPLES DIR IN THE MAINLINE KERNEL TO BE COMPILED AND CREATED ".KO" FILE IN THE SAME DIRECTORY Date: Thu, 20 Aug 2015 05:20:22 -0500 Message-ID: <55D5A9E6.1010509@rock-chips.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Sender: devicetree-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: ravi ranjan Mishra , linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, seanpaul-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org, Takashi Iwai , dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org, Andrzej Hajda , Gustavo Padovan , linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Vincent Palatin , linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, Kishon Vijay Abraham I , David Airlie , devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Pawel Moll , Ian Campbell , dianders-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org, Rob Herring , Mark Yao , linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Kyungmin Park , djkurtz-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org, Philipp Zabel , Kumar Gala , ajaynumb-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org, Andy Yan List-Id: linux-samsung-soc@vger.kernel.org Hi Ravi, I'm wondering is your e-mail come from eDP thread ? cause I see lots of cc guys some as eDP emails :) And for your question, I am not sure I understand rightly. Do you mean that your ".ko" module not in the same directory with driver source code? If it's your question, I think you can fix it by add SUBDIRS flag in your driver makefile. I test it on kernel 3.14, but I think it would be okay on mainline kernel, it works good in my side, I see hello.ko in my hello/ [~/work/kernel-3.14/hello] 7392h41m $ ls hello.c hello.ko hello.mod.c hello.mod.o hello.o Makefile modules.order Module.symvers # My test makefile obj-m := hello.o KERNEL_DIR := ~/work/kernel-3.14 PWD := $(shell pwd) all: make -C $(KERNEL_DIR) SUBDIRS=$(PWD) modules clean: rm *.o *.ko *.mod.c .PHONY:clean Wish can help, - Yakir On 08/20/2015 03:45 AM, ravi ranjan Mishra wrote: > Hi , > > i did make in the kernel directory but sample directory is not able to > compiled and generating .ko file in the same directory. > > can you please tell. > > Thanks, > Ravi -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html