From mboxrd@z Thu Jan 1 00:00:00 1970 From: lexa@cfotr.com (aleksey) Date: Wed, 18 Jul 2012 13:40:56 +0400 Subject: Problem with module spanning from multiple files In-Reply-To: References: <1342596877.3829.3.camel@calculate.local> <1342600852.3829.10.camel@calculate.local> Message-ID: <1342604456.3829.14.camel@calculate.local> To: kernelnewbies@lists.kernelnewbies.org List-Id: kernelnewbies.lists.kernelnewbies.org On Wed, 2012-07-18 at 11:27 +0200, Philipp Ittershagen wrote: > On Wed, Jul 18, 2012 at 10:40 AM, aleksey wrote: > > obj-m = test.o > > test-objs = test_sub.o > > all: > > $(MAKE) -C $(KDIR) M=$(shell pwd) modules > > > > > > But the problem is stay. i don't receive any message on module load. > > Apparently, the problem is the name of your obj-m target and the name > of the other object which should be build. This worked for me: > > > obj-m += mytest.o > > mytest-objs += test.o test_sub.o > > > Your kernel module will then be called mytest.ko and consists of > test.o and test_sub.o > Thank you. your advice helped me. I will read documentation more carefully, i promise. > Greetings, > > Philipp