Hi Marcelo, Thanks a lot for your tips, I'm progressing in sorting out how to create a minimal stand-alone dkms build tree. During my research, I've found that there are sometimes different includes with the same name (e.g.: util.h) example in the vsock module:>
> Olivier LAHAYE wrote: > > Then I had to patch docs/api/Makefile.am to add the -e > > 's,##{PROJECT_NAME}##,@PACKAGE_STRING@,' line and then I had to fix > > lib/wiper/wiperPosix.c to handle fgets return. > > Thanks for pointing out the PROJECT_NAME thing, I'll fix that. Dominique > also pointed out the fgets() issue (it seems Ubuntu's headers are still not > complaining about that function so I didn't catch it), I'll fix it > internally (it shouldn't be hard to work around so you get things to > compile). > > > - Put modules in a dkms package that build modules at boot if the kernel > > has been updated > > If you start with the latest open-vm-tools package, to create a working > kernel module package to each module, you'll have to do the following: > > . create a new <target> directory for the module source > . copy the module sources from their original locations into <target> > . copy the modules/linux/shared directory into <target> (you should end up > with a "shared" subdirectory) > . if one exists, copy the contents of modules/shared/<module> into <target> > . copy shared headers from lib/include into <target>/shared; these should > take care of all modules: > > backdoor_def.h > backdoor_types.h > guest_msg_def.h > includeCheck.h > vm_assert.h > vm_atomic.h > vm_basic_asm.h > vm_basic_asm_x86.h > vm_basic_asm_x86_64.h > vm_basic_defs.h > vm_basic_math.h > vm_basic_types.h > vm_device_version.h > vmware.h > vmware_pack_begin.h > vmware_pack_end.h > vmware_pack_init.h > dbllnklst.h > circList.h > x86cpuid.h > ./modules/linux/vsock/linux/util.h ./lib/include/util.h => in the vsock build if the include path is incorectly set, this could lead to a situation where the wrong include (lib/include/util.h) is used (either by a .c or a sub include) instead of the correct one. Le mardi 26 mai 2009 01:48:58 Marcelo Vanzin, vous avez écrit : > Hi Olivier, > [...] > > . for a few modules, you'll have to copy extra source files (and some > private header files) from lib/ into <target>; I think the worst case here > is vmhgfs. You can check each module's Makefile.kernel to figure out the > source files that need to be copied (there will be a section starting with > "ifdef OVT_SOURCE_DIR" where all object files are listed manually - you > just need to copy the corresponding .c file from lib/). > > Hopefully this can get you started. It helps a lot :-) Though, there is still work to identify all files......... a "make standalone_module_tree" rule in the autotool config would help so much.... > [...] > > I've also created an init file (/etc/init.d/vmtoolsd) that should be LSB > > compatible (see attachment). > > I think it would be great to have this file in the distribution, even if > just to serve as a starting point for packagers. If you haven't done so > yet, could you take a look at > http://open-vm-tools.sourceforge.net/contribute.php and follow the > instructions so we can get it into the official package? I had a look, unfortunately, this file was not originaly created by me. If my memory is correct, it is a updated version of fedora package vmware-guestd Though, anybody can create a similar file based on other init.d startup script. > > Maybe one day all thoses modules will go into the standard linux > > kernel.... who knows? > > Believe me, you're not the only people who want that to happen. :-) Strange ;-) Regards, -- Olivier LAHAYE CEA Saclay DRT-LIST-DETECS-SSTM ------------------------------------------------------------------------------ Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT is a gathering of tech-side developers & brand creativity professionals. Meet the minds behind Google Creative Lab, Visual Complexity, Processing, & iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian Group, R/GA, & Big Spaceship. http://www.creativitycat.com _______________________________________________ open-vm-tools-devel mailing list open-vm-tools-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/open-vm-tools-devel