mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-10-03 13:30:36 +00:00
linuxPackages.virtualboxGuestAdditions: update for 5.1.32 and linux 4.15
This commit is contained in:
@@ -19,7 +19,7 @@ stdenv.mkDerivation {
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://download.virtualbox.org/virtualbox/${version}/VBoxGuestAdditions_${version}.iso";
|
||||
sha256 = "0vxhavlh55fdlm4zhvi21fyxzdydbn56y499bq5aghvsdsmwiy3d";
|
||||
sha256 = "06p3n7ssxwfjbliipsg14hswkr8swfbh5ys0hpj8msbciibbbpzn";
|
||||
};
|
||||
|
||||
KERN_DIR = "${kernel.dev}/lib/modules/*/build";
|
||||
@@ -62,7 +62,6 @@ stdenv.mkDerivation {
|
||||
for i in *
|
||||
do
|
||||
cd $i
|
||||
patch -d vboxvideo -p6 < ${./linux-4.14.patch}
|
||||
find . -type f | xargs sed 's/depmod -a/true/' -i
|
||||
make
|
||||
cd ..
|
||||
@@ -148,5 +147,8 @@ stdenv.mkDerivation {
|
||||
license = "GPL";
|
||||
maintainers = [ lib.maintainers.sander ];
|
||||
platforms = lib.platforms.linux;
|
||||
# video drivers are in kernel since 4.14, vboxsf etc. will follow with 4.16+
|
||||
# guest additions currently fail to compile with anything >4.14
|
||||
broken = (!lib.versionOlder kernel.version "4.15");
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,138 +0,0 @@
|
||||
Author: aszlig <aszlig@nix.build>
|
||||
Date: Fri Oct 20 10:17:44 2017 +0000
|
||||
|
||||
Backport Linux 4.14 fixes against version 5.1.26
|
||||
|
||||
This combines the following upstream commits:
|
||||
|
||||
* Additions/linux/drm: make vboxvideo work with Linux 4.14.
|
||||
bugref:8524: Additions/linux: play nicely with distribution-installed Additions
|
||||
|
||||
Changes needed to build against Linux 4.14, applying them to older versions
|
||||
too where that will not hurt.
|
||||
|
||||
Upstream changeset URL: https://www.virtualbox.org/changeset/69143/vbox
|
||||
|
||||
* Additions/linux/drm: remove load_lut call-back removed in 4.14.
|
||||
bugref:8524: Additions/linux: play nicely with distribution-installed Additions
|
||||
|
||||
The load_lut call-back has been optional since Linux 3.11, which is the oldest
|
||||
kernel that we support the drm driver on. It was removed altogether for
|
||||
4.14, so remove it from our source.
|
||||
|
||||
Upstream changeset URL: https://www.virtualbox.org/changeset/69525/vbox
|
||||
|
||||
* Linux/NetFlt: (bugref:9036) Drop UFO support to prevent compilation issues with Linux kernel 4.14
|
||||
|
||||
Upstream changeset URL: https://www.virtualbox.org/changeset/69539/vbox
|
||||
|
||||
* VBoxPci-linux.c: use kernel_write instead of vfs_write as of Linux 4.14.
|
||||
bugref:9057: VBoxPci: vfs_write() no longer exported by Linux kernel
|
||||
|
||||
As of Linux 4.14 vfs_write() is no longer exported for use by modules. Other
|
||||
users have been converted to use kernel_write(), which is a wrapper around
|
||||
vfs_write() with some added boiler-plate calls to make it safe to use on
|
||||
kernel addresses too. It seems to me like we should probably already have
|
||||
been using kernel_write(), but I prefer to leave that decision to someone who
|
||||
knows the code, so this change switches over for 4.14 and later.
|
||||
|
||||
Fixes: ticketref:17267:comment:6
|
||||
|
||||
Upstream changeset URL: https://www.virtualbox.org/changeset/69744/vbox
|
||||
|
||||
I've rebased these commits against revision 62611, because that revision
|
||||
seems to be around the time 5.1.26 was released and the upstream project
|
||||
unfortunately doesn't use tags.
|
||||
|
||||
This patch contains only the hunks necessary for the Linux guest
|
||||
additions.
|
||||
|
||||
diff --git a/src/VBox/Additions/linux/drm/vbox_drv.c b/src/VBox/Additions/linux/drm/vbox_drv.c
|
||||
index 16075a475f..00779a9c9c 100644
|
||||
--- a/src/VBox/Additions/linux/drm/vbox_drv.c
|
||||
+++ b/src/VBox/Additions/linux/drm/vbox_drv.c
|
||||
@@ -248,7 +248,9 @@ static struct drm_driver driver =
|
||||
.master_set = vbox_master_set,
|
||||
.master_drop = vbox_master_drop,
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 18, 0)
|
||||
+# if LINUX_VERSION_CODE < KERNEL_VERSION(4, 14, 0)
|
||||
.set_busid = drm_pci_set_busid,
|
||||
+# endif
|
||||
#endif
|
||||
|
||||
.fops = &vbox_fops,
|
||||
@@ -278,4 +280,4 @@ static int __init vbox_init(void)
|
||||
-#ifdef CONFIG_VGA_CONSOLE
|
||||
+#if defined(CONFIG_VGA_CONSOLE) || LINUX_VERSION_CODE >= KERNEL_VERSION(4, 7, 0)
|
||||
if (vgacon_text_force() && vbox_modeset == -1)
|
||||
return -EINVAL;
|
||||
#endif
|
||||
@@ -289,11 +291,11 @@ static int __init vbox_init(void)
|
||||
if (vc_cons[i].d && vc_cons[i].d->vc_mode == KD_GRAPHICS)
|
||||
return -EINVAL;
|
||||
|
||||
- return drm_pci_init(&driver, &vbox_pci_driver);
|
||||
+ return pci_register_driver(&vbox_pci_driver);
|
||||
}
|
||||
static void __exit vbox_exit(void)
|
||||
{
|
||||
- drm_pci_exit(&driver, &vbox_pci_driver);
|
||||
+ pci_unregister_driver(&vbox_pci_driver);
|
||||
}
|
||||
|
||||
module_init(vbox_init);
|
||||
diff --git a/src/VBox/Additions/linux/drm/vbox_fb.c b/src/VBox/Additions/linux/drm/vbox_fb.c
|
||||
index b55860b237..c6cc2445a5 100644
|
||||
--- a/src/VBox/Additions/linux/drm/vbox_fb.c
|
||||
+++ b/src/VBox/Additions/linux/drm/vbox_fb.c
|
||||
@@ -375,23 +375,8 @@ out:
|
||||
return ret;
|
||||
}
|
||||
|
||||
-static void vbox_fb_gamma_set(struct drm_crtc *crtc, u16 red, u16 green,
|
||||
- u16 blue, int regno)
|
||||
-{
|
||||
-
|
||||
-}
|
||||
-
|
||||
-static void vbox_fb_gamma_get(struct drm_crtc *crtc, u16 *red, u16 *green,
|
||||
- u16 *blue, int regno)
|
||||
-{
|
||||
- *red = regno;
|
||||
- *green = regno;
|
||||
- *blue = regno;
|
||||
-}
|
||||
|
||||
static struct drm_fb_helper_funcs vbox_fb_helper_funcs = {
|
||||
- .gamma_set = vbox_fb_gamma_set,
|
||||
- .gamma_get = vbox_fb_gamma_get,
|
||||
.fb_probe = vboxfb_create,
|
||||
};
|
||||
|
||||
diff --git a/src/VBox/Additions/linux/drm/vbox_mode.c b/src/VBox/Additions/linux/drm/vbox_mode.c
|
||||
index 00e95d6f8c..6e5c5e6d0c 100644
|
||||
--- a/src/VBox/Additions/linux/drm/vbox_mode.c
|
||||
+++ b/src/VBox/Additions/linux/drm/vbox_mode.c
|
||||
@@ -145,11 +145,6 @@ static int vbox_set_view(struct drm_crtc *crtc)
|
||||
return 0;
|
||||
}
|
||||
|
||||
-static void vbox_crtc_load_lut(struct drm_crtc *crtc)
|
||||
-{
|
||||
-
|
||||
-}
|
||||
-
|
||||
static void vbox_crtc_dpms(struct drm_crtc *crtc, int mode)
|
||||
{
|
||||
struct vbox_crtc *vbox_crtc = to_vbox_crtc(crtc);
|
||||
@@ -298,10 +293,8 @@ static const struct drm_crtc_helper_funcs vbox_crtc_helper_funcs = {
|
||||
.mode_set = vbox_crtc_mode_set,
|
||||
/* .mode_set_base = vbox_crtc_mode_set_base, */
|
||||
.disable = vbox_crtc_disable,
|
||||
- .load_lut = vbox_crtc_load_lut,
|
||||
.prepare = vbox_crtc_prepare,
|
||||
.commit = vbox_crtc_commit,
|
||||
-
|
||||
};
|
||||
|
||||
static void vbox_crtc_reset(struct drm_crtc *crtc)
|
||||
Reference in New Issue
Block a user