kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: Tomek The Messenger <tomekthemessenger@gmail.com>
Cc: kernelnewbies@kernelnewbies.org
Subject: Re: Writing framework in kernel
Date: Sun, 22 Mar 2020 17:37:35 +0100	[thread overview]
Message-ID: <20200322163735.GB96331@kroah.com> (raw)
In-Reply-To: <CAA4NGysHmQoN5Uz87LbssNSh6PD+rp1+j62ttcUMFq3ZhfOsuQ@mail.gmail.com>

On Sun, Mar 22, 2020 at 05:08:15PM +0100, Tomek The Messenger wrote:
> Hi
> I am writing some framework for my kernel drivers. I delegated to framework
> the code which is common amongs all kernel drivers. So my framework module
> core.c has none probe, remove functions. It has also none module_init,
> module_exit functions at those are not needed.
> 1.) When I do modprobe of my core.ko I got error:
> 15.092976] testframework_core: module license 'unspecified' taints kernel.
> [   15.129532] testframework_core : Unknown symbol regmap_write (err 0)
> [   15.129554] testframework_core : Unknown symbol devm_kmalloc (err 0)
> [   15.129573] rstctl_core testframework_core : Unknown symbol
> of_property_read_variable_u32_array (err 0)
> [   15.129598] testframework_core : Unknown symbol sysfs_remove_groups (err
> 0)
> etc
> 
> So I suppose I need to put in my core.c line:
> MODULE_LICENSE("GPL v2");
> at the end of file in order to get rid of above problems. I will check if
> it helps.

Yes, that is what you need to do here, you are trying to access symbols
that are GPL-only, and you did not specify the license of your module to
the kernel.

good luck!

greg k-h

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

      reply	other threads:[~2020-03-22 16:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-22 16:08 Writing framework in kernel Tomek The Messenger
2020-03-22 16:37 ` Greg KH [this message]

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=20200322163735.GB96331@kroah.com \
    --to=greg@kroah.com \
    --cc=kernelnewbies@kernelnewbies.org \
    --cc=tomekthemessenger@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).