Note that there are some explanatory texts on larger screens.

plurals
  1. POCustomize .mod.c MODULE_ALIAS in Linux Kernel Module
    text
    copied!<p>I need to modify a kernel module located in Linux 3.2.0. Within <code>drivers/staging/bcm</code>, the driver should support the device id <code>198F:015E</code>, instead in the <code>InterfaceInit.h</code> file, it was mentioned as <code>198F:15E</code>, I changed that to <code>015E</code> but still, after successful compilation, the new device id's are not being picked up by the kernel.</p> <p>Here is the output of <code>modinfo</code>:</p> <pre><code>filename: &lt;somewhere/&gt;bcm_wimax.ko license: GPL version: 5.2.45 description: Beceem Communications Inc. WiMAX driver srcversion: D6016018ABCFFD16AF31D22 alias: usb:v19D2p0007d*dc*dsc*dp*ic*isc*ip* alias: usb:v0489pE017d*dc*dsc*dp*ic*isc*ip* alias: usb:v19D2p0132d*dc*dsc*dp*ic*isc*ip* alias: usb:v198FpBCCDd*dc*dsc*dp*ic*isc*ip* alias: usb:v198Fp0220d*dc*dsc*dp*ic*isc*ip* alias: usb:v198Fp0210d*dc*dsc*dp*ic*isc*ip* alias: usb:v198Fp0300d*dc*dsc*dp*ic*isc*ip* depends: vermagic: 3.2.0-26-generic-pae SMP mod_unload modversions 686 parm: debug:Debug level (0=none,...,16=all) (uint) </code></pre> <p>My <code>198F:015E</code> is still not appearing! Strangely after beginning the compilation, I can see a file called bcm_wimax.mod.c getting generated inside the module source folder. Inside that, I found out the <code>modinfo</code> alias thing. Which looks like:</p> <pre class="lang-c prettyprint-override"><code> #include &lt;linux/module.h&gt; #include &lt;linux/vermagic.h&gt; #include &lt;linux/compiler.h&gt; MODULE_INFO(vermagic, VERMAGIC_STRING); struct module __this_module __attribute__((section(".gnu.linkonce.this_module"))) = { .name = KBUILD_MODNAME, .init = init_module, #ifdef CONFIG_MODULE_UNLOAD .exit = cleanup_module, #endif .arch = MODULE_ARCH_INIT, }; MODULE_INFO(staging, "Y"); static const struct modversion_info ____versions[] __used __attribute__((section("__versions"))) = { }; static const char __module_depends[] __used __attribute__((section(".modinfo"))) = "depends="; MODULE_ALIAS("usb:v198Fp0300d*dc*dsc*dp*ic*isc*ip*"); MODULE_ALIAS("usb:v198Fp0210d*dc*dsc*dp*ic*isc*ip*"); MODULE_ALIAS("usb:v198Fp0220d*dc*dsc*dp*ic*isc*ip*"); MODULE_ALIAS("usb:v198FpBCCDd*dc*dsc*dp*ic*isc*ip*"); MODULE_ALIAS("usb:v19D2p0132d*dc*dsc*dp*ic*isc*ip*"); MODULE_ALIAS("usb:v0489pE017d*dc*dsc*dp*ic*isc*ip*"); MODULE_ALIAS("usb:v19D2p0007d*dc*dsc*dp*ic*isc*ip*"); MODULE_INFO(srcversion, "D6016018ABCFFD16AF31D22"); </code></pre> <p>But I tried to modify <code>bcm_wimax.mod.c</code> but after compiling, the file got reverted back to it's original condition, removing my edits. How can I get to add my <code>198f:015e</code> to the module alias section?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload