Create core modules for virtual boxes, not half modules

I tried to create virtual box kernel modules, I am almost done here, but at the last stage it stopped compiling because the kernel seems to treat all the vbox * modules as one:

drivers/vboxnetadp/built-in.o: In function `cleanup_module':
(.exit.text+0x0): multiple definition of `cleanup_module'
drivers/vboxdrv/built-in.o:(.exit.text+0x0): first defined here
drivers/vboxnetadp/built-in.o: In function `init_module':
(.init.text+0x0): multiple definition of `init_module'

.. suppressed output ...

make[1]: *** [drivers/built-in.o] Error 1
make: *** [drivers] Error 2

Any thoughts? Here is how I understood it:

I copied all the module sources to the drivers folder, edited the makefile, placed obj-y += vbox/and edited all the Makefile modules from vbox, changed obj-m to obj-y to make them built-in, pretty dirty hacks, but it worked.

EDIT

Why is this needed? I need to disable module loading on my machine, so no modules should be present, I created all the modules written by me independently, only what remains is now vbox

+5
1

, Stack Overflow, c-programming-language.

, , , ( ) . , , , .

, init_module (, net_init_module drv_init_module). , , "" - - , C...

0

All Articles