From 5dd4b2e5910bc65c299d52800f5764d056b45f7a Mon Sep 17 00:00:00 2001 From: Jonathan Bauer Date: Fri, 4 May 2018 13:40:58 +0200 Subject: [vmware12] build kernel modules manually ... ... if we are using the prepatched ones. This works around vmware-modconfig to fail at detecting the gcc version (7.3 in my tests) on newer ubuntu versions (and probably others). --- core/modules/vmware12/module.build | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'core/modules/vmware12') diff --git a/core/modules/vmware12/module.build b/core/modules/vmware12/module.build index 342b7297..b965d9cf 100644 --- a/core/modules/vmware12/module.build +++ b/core/modules/vmware12/module.build @@ -152,9 +152,18 @@ build() { rm -rf -- "\${SHORT}-only" fi done - export LD_LIBRARY_PATH=/usr/lib/vmware/lib/libglibmm-2.4.so.1/:/usr/lib/x86_64-linux-gnu/gtk-2.0/modules/:\$LD_LIBRARY_PATH - vmware-modconfig --console --build-mod -k "${TARGET_KERNEL_LONG}" vmnet /bin/gccw "${KERNEL_HEADERS_DIR}/include" vmplayer vmnet || perror "vmnet build failed" - vmware-modconfig --console --build-mod -k "${TARGET_KERNEL_LONG}" vmmon /bin/gccw "${KERNEL_HEADERS_DIR}/include" vmplayer vmmon || perror "vmmon build failed" + for KMOD in vmnet vmmon; do + # if we have prepatched directory, we can safely compile them manually + if cd "/prepatched/\${KMOD}-only"; then + LINUXINCLUDE="${KERNEL_HEADERS_DIR}/include" make || perror "manual build of \$KMOD failed." + KMOD_DIR="/lib/modules/${TARGET_KERNEL_LONG}/vmplayer" + mkdir -p "\$KMOD_DIR" 2>/dev/null || perror "Failed to mkdir \$KMOD_DIR" + cp -f "\$KMOD.ko" "\$KMOD_DIR" || perror "Failed to copy \$KMOD.ko to \$KMOD_DIR." + else + export LD_LIBRARY_PATH=/usr/lib/vmware/lib/libglibmm-2.4.so.1/:/usr/lib/x86_64-linux-gnu/gtk-2.0/modules/:\$LD_LIBRARY_PATH + vmware-modconfig --console --build-mod -k "${TARGET_KERNEL_LONG}" \${KMOD} $(which gcc) "${KERNEL_HEADERS_DIR}/include" vmplayer \${KMOD} || perror "vmware-modconfig build of \${KMOD} failed." + fi + done EOF # cleanup unneeded files -- cgit v1.2.3-55-g7522