forked from pool/virtualbox
build against kernel 6.15
This commit is contained in:
23
kernel-6-15-EXTRA_CFLAGS.patch
Normal file
23
kernel-6-15-EXTRA_CFLAGS.patch
Normal file
@@ -0,0 +1,23 @@
|
||||
From: Jiri Slaby <jslaby@suse.cz>
|
||||
Subject: Use ccflags-y instead of EXTRA_CFLAGS
|
||||
References: kernel-6.15 build fix
|
||||
Patch-mainline: no
|
||||
|
||||
EXTRA_CFLAGS were removed in:
|
||||
e966ad0edd00 kbuild: remove EXTRA_*FLAGS support
|
||||
|
||||
So set ccflags-y (supported in new kernels) too (support also old kernels).
|
||||
---
|
||||
src/VBox/Installer/linux/Makefile-footer.gmk | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
--- a/src/VBox/Installer/linux/Makefile-footer.gmk
|
||||
+++ b/src/VBox/Installer/linux/Makefile-footer.gmk
|
||||
@@ -115,6 +115,7 @@ VBOXMOD_EXT := ko
|
||||
|
||||
# build defs
|
||||
EXTRA_CFLAGS += $(VBOXMOD_CFLAGS) $(addprefix -I,$(KERN_INCL) $(VBOXMOD_INCL)) $(VBOXMOD_0_KFLAGS) $(KDEBUG)
|
||||
+ccflags-y += $(EXTRA_CFLAGS)
|
||||
$(VBOXMOD_0_TARGET)-y := $(VBOXMOD_OBJS)
|
||||
obj-m += $(VBOXMOD_0_TARGET).o
|
||||
|
39
kernel-6-15-fb_probe.patch
Normal file
39
kernel-6-15-fb_probe.patch
Normal file
@@ -0,0 +1,39 @@
|
||||
From: Jiri Slaby <jslaby@suse.cz>
|
||||
Subject: drm_fb_helper_funcs::fb_probe is gone
|
||||
References: kernel-6.15 build fix
|
||||
Patch-mainline: no
|
||||
|
||||
drm_fb_helper_funcs::fb_probe was dropped in:
|
||||
41ff0b424d81 drm/fb-helper: Remove struct drm_fb_helper.fb_probe
|
||||
|
||||
This patch is incomplete -- it only makes the code to compile. So it
|
||||
needs a rewrite similar to:
|
||||
9fa154f40eb6 drm/{i915,xe}: Run DRM default client setup
|
||||
|
||||
---
|
||||
src/VBox/Additions/linux/drm/vbox_fb.c | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
--- a/src/VBox/Additions/linux/drm/vbox_fb.c
|
||||
+++ b/src/VBox/Additions/linux/drm/vbox_fb.c
|
||||
@@ -56,6 +56,7 @@
|
||||
# define VBOX_FBDEV_INFO(_helper) _helper.fbdev
|
||||
#endif
|
||||
|
||||
+#if RTLNX_VER_MAX(6,15,0)
|
||||
#if RTLNX_VER_MAX(4,7,0) && !RTLNX_RHEL_MAJ_PREREQ(7,4)
|
||||
/**
|
||||
* Tell the host about dirty rectangles to update.
|
||||
@@ -412,9 +413,12 @@ static int vboxfb_create(struct drm_fb_h
|
||||
|
||||
return 0;
|
||||
}
|
||||
+#endif
|
||||
|
||||
static struct drm_fb_helper_funcs vbox_fb_helper_funcs = {
|
||||
+#if RTLNX_VER_MAX(6,15,0)
|
||||
.fb_probe = vboxfb_create,
|
||||
+#endif
|
||||
};
|
||||
|
||||
#if RTLNX_VER_MAX(4,3,0) && !RTLNX_RHEL_MAJ_PREREQ(7,3)
|
49
kernel-6-15-mkdir.patch
Normal file
49
kernel-6-15-mkdir.patch
Normal file
@@ -0,0 +1,49 @@
|
||||
From: Jiri Slaby <jslaby@suse.cz>
|
||||
Subject: inode_operations::mkdir returns struct dentry *
|
||||
References: kernel-6.15 build fix
|
||||
Patch-mainline: no
|
||||
|
||||
inode_operations::mkdir returns struct dentry * (and not int) since:
|
||||
88d5baf69082 Change inode_operations.mkdir to return struct dentry *
|
||||
|
||||
Adapt.
|
||||
---
|
||||
src/VBox/Additions/linux/sharedfolders/dirops.c | 13 +++++++++++--
|
||||
1 file changed, 11 insertions(+), 2 deletions(-)
|
||||
|
||||
--- a/src/VBox/Additions/linux/sharedfolders/dirops.c
|
||||
+++ b/src/VBox/Additions/linux/sharedfolders/dirops.c
|
||||
@@ -1088,7 +1088,9 @@ static int vbsf_inode_create(struct inod
|
||||
* @param mode file mode
|
||||
* @returns 0 on success, Linux error code otherwise
|
||||
*/
|
||||
-#if RTLNX_VER_MIN(6,3,0) || RTLNX_RHEL_RANGE(9,6, 9,99) || defined(DOXYGEN_RUNNING)
|
||||
+#if RTLNX_VER_MIN(6,15,0)
|
||||
+static struct dentry *vbsf_inode_mkdir(struct mnt_idmap *idmap, struct inode *parent, struct dentry *dentry, umode_t mode)
|
||||
+#elif RTLNX_VER_MIN(6,3,0) || RTLNX_RHEL_RANGE(9,6, 9,99) || defined(DOXYGEN_RUNNING)
|
||||
static int vbsf_inode_mkdir(struct mnt_idmap *idmap, struct inode *parent, struct dentry *dentry, umode_t mode)
|
||||
#elif RTLNX_VER_MIN(5,12,0)
|
||||
static int vbsf_inode_mkdir(struct user_namespace *ns, struct inode *parent, struct dentry *dentry, umode_t mode)
|
||||
@@ -1098,14 +1100,21 @@ static int vbsf_inode_mkdir(struct inode
|
||||
static int vbsf_inode_mkdir(struct inode *parent, struct dentry *dentry, int mode)
|
||||
#endif
|
||||
{
|
||||
+ int ret;
|
||||
TRACE();
|
||||
AssertMsg(!(mode & S_IFMT) || (mode & S_IFMT) == S_IFDIR, ("0%o\n", mode));
|
||||
- return vbsf_create_worker(parent, dentry, (mode & ~S_IFMT) | S_IFDIR,
|
||||
+
|
||||
+ ret = vbsf_create_worker(parent, dentry, (mode & ~S_IFMT) | S_IFDIR,
|
||||
SHFL_CF_ACT_CREATE_IF_NEW
|
||||
| SHFL_CF_ACT_FAIL_IF_EXISTS
|
||||
| SHFL_CF_ACCESS_READWRITE
|
||||
| SHFL_CF_DIRECTORY,
|
||||
false /*fStashHandle*/, false /*fDoLookup*/, NULL /*phHandle*/, NULL /*fCreated*/);
|
||||
+#if RTLNX_VER_MIN(6,15,0)
|
||||
+ return ERR_PTR(ret);
|
||||
+#else
|
||||
+ return ret;
|
||||
+#endif
|
||||
}
|
||||
|
||||
|
27
kernel-6-15-mode_valid.patch
Normal file
27
kernel-6-15-mode_valid.patch
Normal file
@@ -0,0 +1,27 @@
|
||||
From: Jiri Slaby <jslaby@suse.cz>
|
||||
Subject: drm_connector_helper_funcs::mode_valid() takes const mode
|
||||
References: kernel-6.15 build fix
|
||||
Patch-mainline: no
|
||||
|
||||
Since:
|
||||
26d6fd81916e drm/connector: make mode_valid take a const struct drm_display_mode
|
||||
|
||||
Adapt.
|
||||
---
|
||||
src/VBox/Additions/linux/drm/vbox_mode.c | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
--- a/src/VBox/Additions/linux/drm/vbox_mode.c
|
||||
+++ b/src/VBox/Additions/linux/drm/vbox_mode.c
|
||||
@@ -665,7 +665,11 @@ static int vbox_mode_valid(struct drm_co
|
||||
#else
|
||||
static enum drm_mode_status vbox_mode_valid(struct drm_connector *connector,
|
||||
#endif
|
||||
+#if RTLNX_VER_MIN(6,15,0)
|
||||
+ const struct drm_display_mode *mode)
|
||||
+#else
|
||||
struct drm_display_mode *mode)
|
||||
+#endif
|
||||
{
|
||||
return MODE_OK;
|
||||
}
|
65
kernel-6-15-timer.patch
Normal file
65
kernel-6-15-timer.patch
Normal file
@@ -0,0 +1,65 @@
|
||||
From: Jiri Slaby <jslaby@suse.cz>
|
||||
Subject: Adapt to new timer interfaces
|
||||
References: kernel-6.15 build fix
|
||||
Patch-mainline: no
|
||||
|
||||
New interface must be used since:
|
||||
8fa7292fee5c treewide: Switch/rename to timer_delete[_sync]()
|
||||
|
||||
So:
|
||||
s/del_timer/timer_delete/
|
||||
s/del_timer_sync/timer_delete_sync/
|
||||
|
||||
(new interfaces available since 6.2 -- bb663f0f3c39 and 9b13df3fb64e)
|
||||
|
||||
|
||||
hrtimer_init() unavailable since:
|
||||
9779489a31d7 hrtimers: Delete hrtimer_init()
|
||||
|
||||
So:
|
||||
hrtimer_init() + .function set ---> hrtimer_setup()
|
||||
|
||||
(hrtimer_setup() available since 6.13 -- 908a1d775422)
|
||||
---
|
||||
src/VBox/Runtime/r0drv/linux/timer-r0drv-linux.c | 12 ++++++++++++
|
||||
1 file changed, 12 insertions(+)
|
||||
|
||||
--- a/src/VBox/Runtime/r0drv/linux/timer-r0drv-linux.c
|
||||
+++ b/src/VBox/Runtime/r0drv/linux/timer-r0drv-linux.c
|
||||
@@ -422,7 +422,11 @@ static void rtTimerLnxStopSubTimer(PRTTI
|
||||
}
|
||||
else
|
||||
#endif
|
||||
+#if RTLNX_VER_MIN(6,2,0)
|
||||
+ timer_delete(&pSubTimer->u.Std.LnxTimer);
|
||||
+#else
|
||||
del_timer(&pSubTimer->u.Std.LnxTimer);
|
||||
+#endif
|
||||
|
||||
rtTimerLnxSetState(&pSubTimer->enmState, RTTIMERLNXSTATE_STOPPED);
|
||||
}
|
||||
@@ -470,7 +474,11 @@ static void rtTimerLnxDestroyIt(PRTTIMER
|
||||
hrtimer_cancel(&pTimer->aSubTimers[iCpu].u.Hr.LnxTimer);
|
||||
else
|
||||
#endif
|
||||
+#if RTLNX_VER_MIN(6,2,0)
|
||||
+ timer_delete_sync(&pTimer->aSubTimers[iCpu].u.Std.LnxTimer);
|
||||
+#else
|
||||
del_timer_sync(&pTimer->aSubTimers[iCpu].u.Std.LnxTimer);
|
||||
+#endif
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1626,8 +1634,12 @@ RTDECL(int) RTTimerCreateEx(PRTTIMER *pp
|
||||
#ifdef RTTIMER_LINUX_WITH_HRTIMER
|
||||
if (pTimer->fHighRes)
|
||||
{
|
||||
+#if RTLNX_VER_MIN(6,13,0)
|
||||
+ hrtimer_setup(&pTimer->aSubTimers[iCpu].u.Hr.LnxTimer, rtTimerLinuxHrCallback, CLOCK_MONOTONIC, HRTIMER_MODE_ABS);
|
||||
+#else
|
||||
hrtimer_init(&pTimer->aSubTimers[iCpu].u.Hr.LnxTimer, CLOCK_MONOTONIC, HRTIMER_MODE_ABS);
|
||||
pTimer->aSubTimers[iCpu].u.Hr.LnxTimer.function = rtTimerLinuxHrCallback;
|
||||
+#endif
|
||||
}
|
||||
else
|
||||
#endif
|
@@ -1,3 +1,15 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Apr 9 09:02:26 UTC 2025 - Jiri Slaby <jslaby@suse.cz>
|
||||
|
||||
- build with kernel 6.15, add:
|
||||
* kernel-6-15-EXTRA_CFLAGS.patch
|
||||
* kernel-6-15-fb_probe.patch -- this disables fb_probe and needs
|
||||
a rewrite similar to "9fa154f40eb6 drm/{i915,xe}: Run DRM default
|
||||
client setup". Good luck.
|
||||
* kernel-6-15-mkdir.patch
|
||||
* kernel-6-15-mode_valid.patch
|
||||
* kernel-6-15-timer.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Mar 28 10:06:19 UTC 2025 - Jan Engelhardt <jengelh@inai.de>
|
||||
|
||||
|
@@ -126,6 +126,11 @@ Patch10: fix_for_leap15.5.patch
|
||||
Patch11: cxx17.patch
|
||||
Patch12: host-source.patch
|
||||
Patch14: kernel-6-14.patch
|
||||
Patch15: kernel-6-15-EXTRA_CFLAGS.patch
|
||||
Patch16: kernel-6-15-timer.patch
|
||||
Patch17: kernel-6-15-mkdir.patch
|
||||
Patch18: kernel-6-15-mode_valid.patch
|
||||
Patch19: kernel-6-15-fb_probe.patch
|
||||
#
|
||||
# Common BuildRequires for both virtualbox and virtualbox-kmp
|
||||
BuildRequires: %{kernel_module_package_buildreqs}
|
||||
|
Reference in New Issue
Block a user