Cross compile Guest Addons for different amd64 distribution

Discussions related to using the OSE version of VirtualBox.

Cross compile Guest Addons for different amd64 distribution

Postby Menion » 18. Jan 2018, 17:56

Hi all
I am planning to deploy some routers image that run on a JEOS Linux distribution in a VirtualBox container
This is a kind of normal, Linux system, based on kernel 4.9.x. The target is shrink so it is not possible to compile kernel modules on target
That is why I am trying to compile on another host machine the guest addons.
Of course I have available the toolchains, headers file with autoconf.h and auto.conf that produced the kernel that is running in the final image that I will run in virtualbox as guest
I have extracted the vbox additions and tried to compile them. CROSS_COMPILE and ARCH is managed as expected, the problem is with the KERNEL directory
Normally the out of tree modules, rely on the KDIR environment variable to point the kernel against the compilation shall occur, while the vbox Makefiles, in Makefile.include.header, apparently use the KERN_DIR and KERN_VER variables.
Unfortunately I have not been able to make everything pointing to the correct kernel headers directory, without manually adjusting the KERN_DIR in the Makefile, since it seems that specifying the KERN_DIR you are forced to stick the headers unders the "build" directory, while KERN_VER pretend to find the headers under /lib/modules/%KERN_VER
Maybe I am just following the wrong path and there is something easier to accomplish the task
Can you help on this?
Posts: 17
Joined: 5. Nov 2014, 13:49

Re: Cross compile Guest Addons for different amd64 distribution

Postby socratis » 18. Jan 2018, 19:15

I can't help you with your question, but I will move it from the "Linux Guests" to the "OSE" section.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
Site Moderator
Posts: 25221
Joined: 22. Oct 2010, 11:03
Location: Greece
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5

Return to VirtualBox OSE

Who is online

Users browsing this forum: No registered users and 1 guest