summaryrefslogtreecommitdiffstats
path: root/core/modules/vmware12
diff options
context:
space:
mode:
authorJonathan Bauer2018-05-04 13:40:58 +0200
committerJonathan Bauer2018-05-04 13:40:58 +0200
commit5dd4b2e5910bc65c299d52800f5764d056b45f7a (patch)
tree4a49a795159821c4c93e138fb37596ceb395e6cd /core/modules/vmware12
parent[rfs-stage31] If BIOS clock is local and NTP failed, read clock again (diff)
downloadmltk-5dd4b2e5910bc65c299d52800f5764d056b45f7a.tar.gz
mltk-5dd4b2e5910bc65c299d52800f5764d056b45f7a.tar.xz
mltk-5dd4b2e5910bc65c299d52800f5764d056b45f7a.zip
[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).
Diffstat (limited to 'core/modules/vmware12')
-rw-r--r--core/modules/vmware12/module.build15
1 files changed, 12 insertions, 3 deletions
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