Thread (24 messages) 24 messages, 8 authors, 2017-03-19

Problem in First-Patch-Tutorial

From: SIMRAN SINGHAL <hidden>
Date: 2017-03-19 08:53:43

# modinfo iio_dummy_evgen.ko
filename:
/home/simran/git/kernels/staging/drivers/iio/dummy/iio_dummy_evgen.ko
license:        GPL v2
description:    IIO dummy driver
author:         Jonathan Cameron [off-list ref]
srcversion:     A8AC238EC07833E018CAF7B
depends:        industrialio
intree:         Y
vermagic:       4.11.0-rc1+ SMP mod_unload modversions


$ uname -r
4.10.0-rc3+

So, this shows that I need to compile module iio_dummy_evgen.ko for
kernel version 4.11.0-rc1, so for this I need to build system and
source tree for this version.

So, I am trying this:-
 make -C /lib/modules/4.11.0-rc1+/build M=drivers/iio/dummy/ iio_dummy_evgen.ko

But I don't know why I am getting this error:-
make: Entering directory '/home/simran/git/kernels/staging'
make[1]: *** No rule to make target 'iio_dummy_evgen.o'.  Stop.
Makefile:1664: recipe for target 'iio_dummy_evgen.ko' failed
make: *** [iio_dummy_evgen.ko] Error 2
make: Leaving directory '/home/simran/git/kernels/staging'


On Tue, Mar 14, 2017 at 12:19 AM,  [off-list ref] wrote:
On Mon, 13 Mar 2017 15:38:07 +0530, SIMRAN SINGHAL said:
quoted
quoted
quoted
# modinfo iio_dummy_evgen.ko
filename:
quoted
quoted
quoted
vermagic:       4.11.0-rc1+ SMP mod_unload modversions


$ uname -r
4.10.0-rc3+
quoted
Greg, I got that I have to build the module against the kernel I am using.
But, How can I do this?
You can do this in two different ways:

1) You're running a 4.10.0-rc3+ kernel.  Get the matching 4.10.0-rc3+ source
tree and build the module against that.

2) You built the module from a 4.11.0-rc1+ tree.  Build a kernel from that tree,
boot that, and then try to load the module.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help