forked from pool/virtualbox
This commit is contained in:
parent
41af935351
commit
24bac2814b
@ -1,87 +1,7 @@
|
||||
This patch file makes the necessary changes to the VirtualBox 5.1.30 sources
|
||||
to allow the kernel modules to build with kernel 4.15.
|
||||
|
||||
The API changes are of several types:
|
||||
|
||||
1. The timer initialization routine init_timer_pinned() no longer exists, and
|
||||
is replaced by timer_setup().
|
||||
2. The timer callback routine calling sequence is changed as is the technique
|
||||
for getting the timer information from the callback parameters.
|
||||
3. The calling sequence for drm_encoder_find() is changed.
|
||||
4. The calling sequence for the .get and .set members of the module_param_call()
|
||||
calls have changed.
|
||||
|
||||
This patch is released under the MIT license when appropriate, GPLv2 otherwise.
|
||||
|
||||
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
|
||||
|
||||
This patch file makes the necessary changes to the VirtualBox 5.1.30 sources
|
||||
to allow the kernel modules to build with kernel 4.15.
|
||||
|
||||
The API changes are of several types:
|
||||
|
||||
1. The timer initialization routine init_timer_pinned() no longer exists, and
|
||||
is replaced by timer_setup().
|
||||
2. The timer callback routine calling sequence is changed as is the technique
|
||||
for getting the timer information from the callback parameters.
|
||||
3. The calling sequence for drm_encoder_find() is changed.
|
||||
4. The calling sequence for the .get and .set members of the module_param_call()
|
||||
calls have changed.
|
||||
|
||||
This patch is released under the MIT license when appropriate, GPLv2 otherwise.
|
||||
|
||||
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
|
||||
|
||||
Index: VirtualBox-5.2.2/src/VBox/Runtime/r0drv/linux/timer-r0drv-linux.c
|
||||
Index: VirtualBox-5.2.6/src/VBox/Additions/common/VBoxGuest/VBoxGuest-linux.c
|
||||
===================================================================
|
||||
--- VirtualBox-5.2.2.orig/src/VBox/Runtime/r0drv/linux/timer-r0drv-linux.c
|
||||
+++ VirtualBox-5.2.2/src/VBox/Runtime/r0drv/linux/timer-r0drv-linux.c
|
||||
@@ -715,6 +715,14 @@ static enum hrtimer_restart rtTimerLinux
|
||||
#endif /* RTTIMER_LINUX_WITH_HRTIMER */
|
||||
|
||||
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
|
||||
+/**
|
||||
+ * Timer callback for kernels 4.15 and later
|
||||
+ */
|
||||
+static void rtTimerLinuxStdCallback(struct timer_list *t)
|
||||
+{
|
||||
+ PRTTIMERLNXSUBTIMER pSubTimer = from_timer(pSubTimer, t, u.Std.LnxTimer);
|
||||
+#else
|
||||
/**
|
||||
* Timer callback function for standard timers.
|
||||
*
|
||||
@@ -723,6 +731,7 @@ static enum hrtimer_restart rtTimerLinux
|
||||
static void rtTimerLinuxStdCallback(unsigned long ulUser)
|
||||
{
|
||||
PRTTIMERLNXSUBTIMER pSubTimer = (PRTTIMERLNXSUBTIMER)ulUser;
|
||||
+#endif
|
||||
PRTTIMER pTimer = pSubTimer->pParent;
|
||||
|
||||
RTTIMERLNX_LOG(("stdcallback %p\n", pTimer));
|
||||
@@ -1584,13 +1593,17 @@ RTDECL(int) RTTimerCreateEx(PRTTIMER *pp
|
||||
else
|
||||
#endif
|
||||
{
|
||||
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 8, 0)
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
|
||||
+ timer_setup(&pTimer->aSubTimers[iCpu].u.Std.LnxTimer,rtTimerLinuxStdCallback, TIMER_PINNED);
|
||||
+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(4, 8, 0)
|
||||
init_timer_pinned(&pTimer->aSubTimers[iCpu].u.Std.LnxTimer);
|
||||
#else
|
||||
init_timer(&pTimer->aSubTimers[iCpu].u.Std.LnxTimer);
|
||||
#endif
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
|
||||
pTimer->aSubTimers[iCpu].u.Std.LnxTimer.data = (unsigned long)&pTimer->aSubTimers[iCpu];
|
||||
pTimer->aSubTimers[iCpu].u.Std.LnxTimer.function = rtTimerLinuxStdCallback;
|
||||
+#endif
|
||||
pTimer->aSubTimers[iCpu].u.Std.LnxTimer.expires = jiffies;
|
||||
pTimer->aSubTimers[iCpu].u.Std.u64NextTS = 0;
|
||||
}
|
||||
Index: VirtualBox-5.2.2/src/VBox/Additions/common/VBoxGuest/VBoxGuest-linux.c
|
||||
===================================================================
|
||||
--- VirtualBox-5.2.2.orig/src/VBox/Additions/common/VBoxGuest/VBoxGuest-linux.c
|
||||
+++ VirtualBox-5.2.2/src/VBox/Additions/common/VBoxGuest/VBoxGuest-linux.c
|
||||
--- VirtualBox-5.2.6.orig/src/VBox/Additions/common/VBoxGuest/VBoxGuest-linux.c
|
||||
+++ VirtualBox-5.2.6/src/VBox/Additions/common/VBoxGuest/VBoxGuest-linux.c
|
||||
@@ -1058,7 +1058,11 @@ void VGDrvNativeISRMousePollEvent(PVBOXG
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0)
|
||||
|
||||
@ -178,37 +98,22 @@ Index: VirtualBox-5.2.2/src/VBox/Additions/common/VBoxGuest/VBoxGuest-linux.c
|
||||
{
|
||||
strcpy(pszBuf, g_DevExt.fLoggingEnabled ? "enabled" : "disabled");
|
||||
return strlen(pszBuf);
|
||||
Index: VirtualBox-5.2.2/src/VBox/Additions/linux/drm/vbox_mode.c
|
||||
Index: VirtualBox-5.2.6/src/VBox/Additions/linux/drm/vbox_mode.c
|
||||
===================================================================
|
||||
--- VirtualBox-5.2.2.orig/src/VBox/Additions/linux/drm/vbox_mode.c
|
||||
+++ VirtualBox-5.2.2/src/VBox/Additions/linux/drm/vbox_mode.c
|
||||
@@ -398,11 +398,15 @@ static struct drm_encoder *vbox_best_sin
|
||||
*connector)
|
||||
{
|
||||
int enc_id = connector->encoder_ids[0];
|
||||
-
|
||||
--- VirtualBox-5.2.6.orig/src/VBox/Additions/linux/drm/vbox_mode.c
|
||||
+++ VirtualBox-5.2.6/src/VBox/Additions/linux/drm/vbox_mode.c
|
||||
@@ -401,8 +401,13 @@ static struct drm_encoder *vbox_best_sin
|
||||
|
||||
/* pick the encoder ids */
|
||||
if (enc_id)
|
||||
- return drm_encoder_find(connector->dev, enc_id);
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
|
||||
+ return drm_encoder_find(connector->dev, NULL, enc_id);
|
||||
+ return drm_encoder_find(connector->dev, NULL, enc_id);
|
||||
+#else
|
||||
return drm_encoder_find(connector->dev, enc_id);
|
||||
+ return drm_encoder_find(connector->dev, enc_id);
|
||||
+#endif
|
||||
|
||||
+ LogFunc(("vboxvideo: %d\n", __LINE__));
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Index: VirtualBox-5.2.2/configure
|
||||
===================================================================
|
||||
--- VirtualBox-5.2.2.orig/configure
|
||||
+++ VirtualBox-5.2.2/configure
|
||||
@@ -1538,7 +1538,7 @@ EOF
|
||||
INCQT5=`strip_I "$FLGQT5"`
|
||||
LIBDIR5=`pkg-config Qt5Core --variable=libdir`
|
||||
LIBQT5=`pkg-config Qt5Core --libs`
|
||||
- LIBQT5="-L$LIBDIR5 $LIBQT5"
|
||||
+ LIBQT5="-L$LIBDIR5 $LIBQT5 -std=c++11"
|
||||
TOOLQT5=`pkg-config Qt5Core --variable=prefix`
|
||||
TOOLQT5BIN=`pkg-config Qt5Core --variable=host_bins`
|
||||
if test_compile "$LIBQT5 $LIBPTHREAD $FLGQT5" qt5 qt5 nofatal; then
|
||||
|
@ -1,5 +1,5 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Jan 17 18:49:36 UTC 2018 - Larry.Finger@lwfinger.net
|
||||
Thu Jan 18 19:01:59 UTC 2018 - Larry.Finger@lwfinger.net
|
||||
|
||||
- Version bump to 5.2.6 (released 2018-01-15 by Oracle)
|
||||
|
||||
|
@ -38,7 +38,7 @@ Url: http://www.virtualbox.org/
|
||||
# so you don't need to repack virtualbox by hand, just add new release of VirtualBox-x.x.x.tar.bz2 and line below with
|
||||
# script virtualbox-patch-source.sh will do the job :)
|
||||
# WARNING: This is not a comment, but the real command to repack souce
|
||||
#%(bash %{_sourcedir}/virtualbox-patch-source.sh VirtualBox-%{version}.tar.bz2)
|
||||
##\%(bash %{_sourcedir}/virtualbox-patch-source.sh VirtualBox-%{version}.tar.bz2)
|
||||
Source0: VirtualBox-%{version}-patched.tar.bz2
|
||||
Source1: UserManual.pdf
|
||||
Source3: %{name}-60-vboxguest.rules
|
||||
@ -108,7 +108,7 @@ Patch115: vbox_fix_for_gcc7.patch
|
||||
# Fix for missing include needed for server 1.19
|
||||
Patch116: Fix_for_server_1.19.patch
|
||||
# Fix for removal of init_timer_pinned() in kernel 4.15
|
||||
#Patch117: fixes_for_4.15.patch
|
||||
Patch117: fixes_for_4.15.patch
|
||||
# Fix invalid use of internal headers
|
||||
Patch118: internal-headers.patch
|
||||
# Fix kernl API change in Leap 15
|
||||
@ -251,7 +251,7 @@ websrv GUI part for %{name}.
|
||||
|
||||
%package host-KMP
|
||||
Summary: Host kernel module for VirtualBox
|
||||
#%kernel_module_package -t %{_builddir}/virtualbox-kmp-template -p %{SOURCE7} -n %{name}-host -f %{SOURCE5} -x kdump um xen pae xenpae pv
|
||||
##\%kernel_module_package -t %{_builddir}/virtualbox-kmp-template -p %{SOURCE7} -n %{name}-host -f %{SOURCE5} -x kdump um xen pae xenpae pv
|
||||
Group: System/Emulators/PC
|
||||
Requires: %{kernel_module_package_buildreqs}
|
||||
|
||||
@ -402,7 +402,7 @@ as an "extpack" for VirtualBox. The implementation is licensed under GPL.
|
||||
%patch113 -p1
|
||||
%patch115 -p1
|
||||
%patch116 -p1
|
||||
#%patch117 -p1
|
||||
%patch117 -p1
|
||||
%patch118 -p1
|
||||
%if 0%{suse_version} == 1500
|
||||
%patch119 -p1
|
||||
@ -946,8 +946,8 @@ export DISABLE_RESTART_ON_UPDATE=yes
|
||||
%{_bindir}/VBoxClient
|
||||
%{_libdir}/VBoxOGL*.so
|
||||
%{_libdir}/VBoxEGL*.so
|
||||
#%{_libdir}/xorg/modules/drivers/vboxvideo_drv.so
|
||||
#%{_libdir}/dri/vboxvideo_dri.so
|
||||
##\%{_libdir}/xorg/modules/drivers/vboxvideo_drv.so
|
||||
##\%{_libdir}/dri/vboxvideo_dri.so
|
||||
%{_sysconfdir}/X11/xinit/xinitrc.d/vboxadd-xclient.sh
|
||||
|
||||
%files guest-tools
|
||||
|
Loading…
Reference in New Issue
Block a user