[vbox-dev] Including virtualbox modules into kernel, failed at some point
klaus.espenlaub at oracle.com
Tue Aug 7 10:26:49 PDT 2012
On 07.08.2012 15:38, Aaron Lewis wrote:
> I was trying to build a static kernel, that will include virtualbox's
> module directly inside.
> Kernel version in use: 3.4.6 (on arch linux)
> So I tried to copy all vbox* files into drivers/ folder, modify
> drivers/Makefile, add 'obj-y += vboxnetflp/' (and do lines for all
> modules) , modify all obj-m part to obj-y, corrected include path for
> kernel headers, compile part completed successfully, but I failed at
> the linking step:
> Linux kernel seems to treat all vbox* as a single module, it tells me
> module init / cleanup function was redefinied multiple times:
> Suppressed output:
> 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'
That's expected, because no one so far has considered making these
driver modules part of the kernel. It'll need adaption (some #ifdef
stuff to make them either compiled-in or modular drivers).
> Detailed log attached.
> P.S: Please help, and I really hope these modules can be submitted
> into kernel mainline.
Definitely not out of the box. Static kernels are a very very tiny
minority these days.
More information about the vbox-dev