From 9b91bf41a9b6c2933b7757536fc9944e643602bf Mon Sep 17 00:00:00 2001 From: Matteo Bernardini Date: Sat, 23 May 2020 08:12:52 +0200 Subject: 20200523.1 global branch merge. Signed-off-by: Matteo Bernardini --- system/virtualbox-kernel/kernel_4.17.patch | 32 ++++++++++++++++++++++ .../virtualbox-kernel/virtualbox-kernel.SlackBuild | 8 ++++-- system/virtualbox-kernel/virtualbox-kernel.info | 6 ++-- 3 files changed, 40 insertions(+), 6 deletions(-) create mode 100644 system/virtualbox-kernel/kernel_4.17.patch (limited to 'system/virtualbox-kernel') diff --git a/system/virtualbox-kernel/kernel_4.17.patch b/system/virtualbox-kernel/kernel_4.17.patch new file mode 100644 index 0000000000..007bf737f2 --- /dev/null +++ b/system/virtualbox-kernel/kernel_4.17.patch @@ -0,0 +1,32 @@ +In kernel 4.17, pci_get_bus_and_slot() has been removed in favor of +pci_get_domain_bus_and_slot(). It appears that VirtualBox only uses +domain number 0, thus pci_get_domain_bus_and_slot(0, bus, devfn) +is a suitable replacement for pci_get_bus_and_slot(bus, devfn). + +The resulting code compiles; however, I do not use PCI passthru, which +I think means that I have not actually tested the code. + +This patch released under a combined MIT/GPLv2 license. + +Shamelessly copied by the patch from Larry Finger. + +Signed-off-by: Matteo Bernardini + +diff -Naur virtualbox-kernel-5.2.8.orig/vboxpci/linux/VBoxPci-linux.c virtualbox-kernel-5.2.8/vboxpci/linux/VBoxPci-linux.c +--- virtualbox-kernel-5.2.8.orig/vboxpci/linux/VBoxPci-linux.c 2018-03-14 20:33:31.000000000 +0100 ++++ virtualbox-kernel-5.2.8/vboxpci/linux/VBoxPci-linux.c 2019-04-16 23:18:10.607698000 +0200 +@@ -89,7 +89,14 @@ + #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 20) + # define PCI_DEV_GET(v,d,p) pci_get_device(v,d,p) + # define PCI_DEV_PUT(x) pci_dev_put(x) ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 17, 0) ++/* assume the domain number to be zero - exactly the same assumption of ++* pci_get_bus_and_slot() ++*/ ++# define PCI_DEV_GET_SLOT(bus, devfn) pci_get_domain_bus_and_slot(0, bus, devfn) ++#else + # define PCI_DEV_GET_SLOT(bus, devfn) pci_get_bus_and_slot(bus, devfn) ++#endif + #else + # define PCI_DEV_GET(v,d,p) pci_find_device(v,d,p) + # define PCI_DEV_PUT(x) do { } while (0) diff --git a/system/virtualbox-kernel/virtualbox-kernel.SlackBuild b/system/virtualbox-kernel/virtualbox-kernel.SlackBuild index d879686802..338da42bfc 100644 --- a/system/virtualbox-kernel/virtualbox-kernel.SlackBuild +++ b/system/virtualbox-kernel/virtualbox-kernel.SlackBuild @@ -2,7 +2,7 @@ # Slackware build script for virtualbox-kernel -# Copyright 2008-2019 Heinz Wiesinger, Amsterdam, The Netherlands +# Copyright 2008-2018 Heinz Wiesinger, Amsterdam, The Netherlands # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -25,8 +25,8 @@ # Modified by SlackBuilds.org PRGNAM=virtualbox-kernel -VERSION=${VERSION:-5.0.40} -BUILD=${BUILD:-2} +VERSION=${VERSION:-5.2.8} +BUILD=${BUILD:-1} TAG=${TAG:-_SBo} KERNEL=${KERNEL:-$(uname -r)} @@ -84,6 +84,8 @@ if [ "$KERNEL_MINOR" = 4 -a "$KERNEL_PATCH" -ge 168 ]; then sed -i "s|KERNEL_VERSION(4, 9, 0)|KERNEL_VERSION(4, 4, 168)|" vboxdrv/r0drv/linux/memobj-r0drv-linux.c fi +patch -p1 < $CWD/kernel_4.17.patch + make KERN_DIR=${KERNELPATH} mkdir -p $PKG/lib/modules/$KERNEL/misc diff --git a/system/virtualbox-kernel/virtualbox-kernel.info b/system/virtualbox-kernel/virtualbox-kernel.info index deded0026e..0a313bdf48 100644 --- a/system/virtualbox-kernel/virtualbox-kernel.info +++ b/system/virtualbox-kernel/virtualbox-kernel.info @@ -1,8 +1,8 @@ PRGNAM="virtualbox-kernel" -VERSION="5.0.40" +VERSION="5.2.8" HOMEPAGE="https://www.virtualbox.org" -DOWNLOAD="http://www.liwjatan.at/files/src/virtualbox-kernel/virtualbox-kernel-5.0.40.tar.xz" -MD5SUM="475de2d0a915ce7c0c623ac50696bb79" +DOWNLOAD="http://www.liwjatan.at/files/src/virtualbox-kernel/virtualbox-kernel-5.2.8.tar.xz" +MD5SUM="280bf7fe55842b3a6e088f2b4c6e83e0" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="" -- cgit v1.2.3