All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Baluta <daniel.baluta@gmail.com>
To: sayli karnik <karniksayli1995@gmail.com>
Cc: Alison Schofield <amsfield22@gmail.com>,
	 outreachy-kernel <outreachy-kernel@googlegroups.com>
Subject: Re: [Outreachy kernel] IIO Experiment #1 Build Dummy Help
Date: Mon, 3 Oct 2016 21:02:15 +0300	[thread overview]
Message-ID: <CAEnQRZAqrXG5HRqMROPa4P4sWXMK=iF=6c4=Dr+H=Unn+BWDaQ@mail.gmail.com> (raw)
In-Reply-To: <CAKG5xWg2hiraHxsSF0tDAFOcRXwqW97mQknrnP69Jbe4=MLQeA@mail.gmail.com>

On Mon, Oct 3, 2016 at 8:48 PM, sayli karnik <karniksayli1995@gmail.com> wrote:
> On Mon, Oct 3, 2016 at 10:53 PM, Daniel Baluta <daniel.baluta@gmail.com> wrote:
>> On Mon, Oct 3, 2016 at 8:14 PM, sayli karnik <karniksayli1995@gmail.com> wrote:
>>> Hello,
>>> I encountered 'Invalid format error' while inserting the iio_dummy_evgen module.
>>>
>>> On Sun, Oct 2, 2016 at 1:22 AM, Alison Schofield <amsfield22@gmail.com> wrote:
>>>> If you have questions about building the modules in IIO Experimenting
>>>> Task #1, please post here.
>>>>
>>>
>>> I ran:
>>> sudo insmod drivers/iio/dummy/iio_dummy_evgen.ko
>>> I got:
>>> insmod: ERROR: could not insert module
>>> drivers/iio/dummy/iio_dummy_evgen.ko: Invalid module format
>>>
>>> dmesg output after insmod:
>>> [36856.453312] iio_dummy_evgen: no symbol version for module_layout
>>>
>>> What I learned so far:
>>> The error arises because the kernel booted in and the one the driver
>>> belongs to are different.
>>> A post on Google says this is because the vermagic strings don't match.
>>> ( 'modinfo' gives different vermagic strings for drivers in different kernels)
>>> So I tried copying my running kernel's Makefile into the driver's
>>> Makefile. But the error persists.
>>>
>>> I also tried:
>>> export KBUILD_SRC=<location of the running kernel's source>
>>> But that didn't help either.
>>>
>>> Any ideas?
>>
>>
>> Well, are you using a virtual machine? Can you update your kernel?
> No I'm not using a virtual machine. I'll try updating my kernel!
> Do you suggest that I should boot into the kernel that
> iio_dummy_evgen.ko belongs to?

Yes. Another option would be to compile your module out of tree
using the kernel headears of your running kernel.

To do that, you should check which version is your running kernel
with uname -a, then find the correct headers under /boot (most likely).

Then use Makefile and Kbuild similar with these ones:

ocw.cs.pub.ro/courses/_export/code/so2/laboratoare/lab02?codeblock=3
ocw.cs.pub.ro/courses/_export/code/so2/laboratoare/lab02?codeblock=2

thanks,
Daniel.


  reply	other threads:[~2016-10-03 18:02 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-01 19:52 IIO Experiment #1 Build Dummy Help Alison Schofield
2016-10-03 17:14 ` [Outreachy kernel] " sayli karnik
2016-10-03 17:23   ` Daniel Baluta
2016-10-03 17:48     ` sayli karnik
2016-10-03 18:02       ` Daniel Baluta [this message]
2017-03-23  8:28         ` sayli karnik
2016-10-09 23:19 ` Elizabeth Ferdman
2016-10-11  8:44   ` Daniel Baluta
2016-10-11 17:24     ` Elizabeth Ferdman
2016-10-14 16:06       ` Daniel Baluta
2016-10-15 21:07         ` Elizabeth Ferdman
2016-10-16  1:29           ` Elizabeth Ferdman
2016-10-16  2:04           ` Eva Rachel Retuya
2016-10-16 21:23             ` Elizabeth Ferdman
2016-10-16 23:49               ` Eva Rachel Retuya
2017-03-23 14:21                 ` SIMRAN SINGHAL
2017-03-23 14:39                   ` Daniel Baluta
2017-03-23 14:50                     ` SIMRAN SINGHAL

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAEnQRZAqrXG5HRqMROPa4P4sWXMK=iF=6c4=Dr+H=Unn+BWDaQ@mail.gmail.com' \
    --to=daniel.baluta@gmail.com \
    --cc=amsfield22@gmail.com \
    --cc=karniksayli1995@gmail.com \
    --cc=outreachy-kernel@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.