Re: Module licence problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Feb 27, 2006, at 10:08 AM, Antonio Mancina wrote:

Hi all,
I have a source tree from which I want to build a module.
Obviously, in only one of these files I have the module_init(...)/module_exit(...) stuff, along with the MODULE_LICENCE("GPL"); macro.
This is a code excerpt:

#include <linux/kernel.h>    /* We're doing kernel work */
#include <linux/init.h>
#include <linux/version.h>    /* For KERNEL_VERSION macro */
#include <linux/module.h>    /* Specifically, a module */

....

MODULE_LICENSE("GPL");

....

/*
* Initialize the module - Register the character device
*/
static int qres_init_module(void)
{
  ...
}

/*
* Cleanup - unregister the appropriate file from /proc
*/
static void qres_cleanup_module(void)
{
   ...
}

module_init(qres_init_module);
module_exit(qres_cleanup_module);

The make process goes well: the module will finally be created. The problem arises when I try a modinfo on the module. This is the output:

filename:       qres_mod.ko
vermagic:       2.6.15-gensched 386 gcc-3.3
depends:
srcversion:     C25502BA9363CC7DA452088

Why is there no module licence specification?
Any help will be greatly appreciated. Thanks all!
Bye


Try testing if the qres_mod.ko module have in this .modinfo section the license entry:
objdump -j .modinfo -s  qres_mod.ko

On 2.6 kernel MODULE_LICENCE expands to __MODULE_INFO.. that is a null macro if MODULE is undefine
Are you sure you have compiled the module correctly?


--
Antonio Mancina
PhD Student @ Retis Lab
Scuola Superiore S.Anna - CNR
Pisa, Italy
a.mancina@xxxxxxxx

I hope it can help you

-----------
Oldani (sgrakkyu) Massimiliano

Antifork Research, Inc.
Metro Olografix


--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux