diff options
author | Felix Geyer <debfx-pkg@fobos.de> | 2011-04-23 16:56:55 +0200 |
---|---|---|
committer | Felix Geyer <debfx-pkg@fobos.de> | 2011-04-23 16:56:55 +0200 |
commit | 9a3b0065d7af23ea10b87593745b3241fa6c22a1 (patch) | |
tree | 2979e7d1efbf0a90e1486e2a32439ee2ee236d99 | |
parent | 1014ff728ba5fc8c764c73c486a65de70051bcf5 (diff) | |
download | virtualbox-ubuntu/4.0.4-dfsg-1ubuntu4.tar.gz |
Fix build failures of guest kernel modules with kernel 2.6.39-rc1.ubuntu/4.0.4-dfsg-1ubuntu4
Add 30-kernel-2.6.39.patch, cherry-picked from upstream.
-rw-r--r-- | debian/changelog | 7 | ||||
-rw-r--r-- | debian/patches/30-kernel-2.6.39.patch | 166 | ||||
-rw-r--r-- | debian/patches/series | 1 |
3 files changed, 174 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog index 521bee038..cc8d40ff5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +virtualbox-ose (4.0.4-dfsg-1ubuntu4) natty; urgency=low + + * Fix build failures of guest kernel modules with kernel 2.6.39-rc1. + - Add 30-kernel-2.6.39.patch, cherry-picked from upstream. + + -- Felix Geyer <debfx-pkg@fobos.de> Fri, 22 Apr 2011 19:00:47 +0200 + virtualbox-ose (4.0.4-dfsg-1ubuntu3) natty; urgency=low * Rebuild to pick up new xserver-xorg-core dependencies. diff --git a/debian/patches/30-kernel-2.6.39.patch b/debian/patches/30-kernel-2.6.39.patch new file mode 100644 index 000000000..70992fe69 --- /dev/null +++ b/debian/patches/30-kernel-2.6.39.patch @@ -0,0 +1,166 @@ +Description: Fix build failure with kernel 2.6.39-rc1. +Origin: upstream, http://www.virtualbox.org/changeset/36471 + +Index: trunk/src/VBox/Additions/linux/drm/vboxvideo_drm.c +=================================================================== +--- trunk/src/VBox/Additions/linux/drm/vboxvideo_drm.c (revision 35662) ++++ trunk/src/VBox/Additions/linux/drm/vboxvideo_drm.c (revision 36471) +@@ -67,5 +67,5 @@ + + static struct pci_device_id pciidlist[] = { +- vboxvideo_PCI_IDS ++ vboxvideo_PCI_IDS + }; + +@@ -73,5 +73,5 @@ + { + # if LINUX_VERSION_CODE >= KERNEL_VERSION (2, 6, 28) +- return drm_vblank_init(dev, 1); ++ return drm_vblank_init(dev, 1); + #else + return 0; +@@ -79,49 +79,69 @@ + } + +-static struct drm_driver driver = { +- /* .driver_features = DRIVER_USE_MTRR, */ +- .load = vboxvideo_driver_load, +- .reclaim_buffers = drm_core_reclaim_buffers, +- /* As of Linux 2.65.37, always the internal functions are used. */ ++static struct drm_driver driver = ++{ ++ /* .driver_features = DRIVER_USE_MTRR, */ ++ .load = vboxvideo_driver_load, ++ .reclaim_buffers = drm_core_reclaim_buffers, ++ /* As of Linux 2.65.37, always the internal functions are used. */ + #if LINUX_VERSION_CODE < KERNEL_VERSION (2, 6, 37) +- .get_map_ofs = drm_core_get_map_ofs, +- .get_reg_ofs = drm_core_get_reg_ofs, ++ .get_map_ofs = drm_core_get_map_ofs, ++ .get_reg_ofs = drm_core_get_reg_ofs, + #endif +- .fops = { +- .owner = THIS_MODULE, +- .open = drm_open, +- .release = drm_release, +- /* This was changed with Linux 2.6.33 but Fedora backported this +- * change to their 2.6.32 kernel. */ ++ .fops = ++ { ++ .owner = THIS_MODULE, ++ .open = drm_open, ++ .release = drm_release, ++ /* This was changed with Linux 2.6.33 but Fedora backported this ++ * change to their 2.6.32 kernel. */ + #if defined(DRM_UNLOCKED) || LINUX_VERSION_CODE >= KERNEL_VERSION (2, 6, 33) +- .unlocked_ioctl = drm_ioctl, ++ .unlocked_ioctl = drm_ioctl, + #else +- .ioctl = drm_ioctl, ++ .ioctl = drm_ioctl, + #endif +- .mmap = drm_mmap, +- .poll = drm_poll, +- .fasync = drm_fasync, +- }, +- .pci_driver = { +- .name = DRIVER_NAME, +- .id_table = pciidlist, +- }, ++ .mmap = drm_mmap, ++ .poll = drm_poll, ++ .fasync = drm_fasync, ++ }, ++#if LINUX_VERSION_CODE < KERNEL_VERSION (2, 6, 39) ++ .pci_driver = ++ { ++ .name = DRIVER_NAME, ++ .id_table = pciidlist, ++ }, ++#endif ++ .name = DRIVER_NAME, ++ .desc = DRIVER_DESC, ++ .date = DRIVER_DATE, ++ .major = DRIVER_MAJOR, ++ .minor = DRIVER_MINOR, ++ .patchlevel = DRIVER_PATCHLEVEL, ++}; + +- .name = DRIVER_NAME, +- .desc = DRIVER_DESC, +- .date = DRIVER_DATE, +- .major = DRIVER_MAJOR, +- .minor = DRIVER_MINOR, +- .patchlevel = DRIVER_PATCHLEVEL, ++#if LINUX_VERSION_CODE >= KERNEL_VERSION (2, 6, 39) ++static struct pci_driver pci_driver = ++{ ++ .name = DRIVER_NAME, ++ .id_table = pciidlist, + }; ++#endif + + static int __init vboxvideo_init(void) + { +- return drm_init(&driver); ++#if LINUX_VERSION_CODE < KERNEL_VERSION (2, 6, 39) ++ return drm_init(&driver); ++#else ++ return drm_pci_init(&driver, &pci_driver); ++#endif + } + + static void __exit vboxvideo_exit(void) + { +- drm_exit(&driver); ++#if LINUX_VERSION_CODE < KERNEL_VERSION (2, 6, 39) ++ drm_exit(&driver); ++#else ++ drm_pci_exit(&driver, &pci_driver); ++#endif + } + +Index: trunk/src/VBox/Additions/linux/sharedfolders/vfsmod.c +=================================================================== +--- trunk/src/VBox/Additions/linux/sharedfolders/vfsmod.c (revision 33994) ++++ trunk/src/VBox/Additions/linux/sharedfolders/vfsmod.c (revision 36471) +@@ -447,12 +447,12 @@ + } + +-#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 18) ++# if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 18) + static struct super_block *sf_get_sb(struct file_system_type *fs_type, int flags, +- const char *dev_name, void *data) ++ const char *dev_name, void *data) + { + TRACE(); + return get_sb_nodev(fs_type, flags, data, sf_read_super_26); + } +-#else ++# elif LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 39) + static int sf_get_sb(struct file_system_type *fs_type, int flags, + const char *dev_name, void *data, struct vfsmount *mnt) +@@ -461,5 +461,12 @@ + return get_sb_nodev(fs_type, flags, data, sf_read_super_26, mnt); + } +-#endif ++# else ++static struct dentry *sf_mount(struct file_system_type *fs_type, int flags, ++ const char *dev_name, void *data) ++{ ++ TRACE(); ++ return mount_nodev(fs_type, flags, data, sf_read_super_26); ++} ++# endif + + static struct file_system_type vboxsf_fs_type = +@@ -467,5 +474,9 @@ + .owner = THIS_MODULE, + .name = "vboxsf", ++# if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 39) + .get_sb = sf_get_sb, ++# else ++ .mount = sf_mount, ++# endif + .kill_sb = kill_anon_super + }; diff --git a/debian/patches/series b/debian/patches/series index ca07d9956..57d3921cd 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -11,3 +11,4 @@ 27-hide-host-cache-warning.patch 28-no-selinux-fedora.patch 29-fix-ftbfs-as-needed.patch +30-kernel-2.6.39.patch |