diff options
author | Diego Elio Pettenò <flameeyes@gentoo.org> | 2008-12-18 12:30:50 +0000 |
---|---|---|
committer | Diego Elio Pettenò <flameeyes@gentoo.org> | 2008-12-18 12:30:50 +0000 |
commit | 876fce517737242d32c0237ce2a8aa24cfa5f4f7 (patch) | |
tree | ed0d229ba8a60464ffe8f32acc8e64754e750f36 /app-emulation/virtualbox-modules | |
parent | Commit initd fixes from Alessio. (diff) | |
download | gentoo-2-876fce517737242d32c0237ce2a8aa24cfa5f4f7.tar.gz gentoo-2-876fce517737242d32c0237ce2a8aa24cfa5f4f7.tar.bz2 gentoo-2-876fce517737242d32c0237ce2a8aa24cfa5f4f7.zip |
Proxy fix from Alessio.
(Portage version: 2.2_rc17/cvs/Linux 2.6.27-gentoo-r6 x86_64)
Diffstat (limited to 'app-emulation/virtualbox-modules')
3 files changed, 151 insertions, 1 deletions
diff --git a/app-emulation/virtualbox-modules/ChangeLog b/app-emulation/virtualbox-modules/ChangeLog index cfd276ecc22f..47bb6965e8e0 100644 --- a/app-emulation/virtualbox-modules/ChangeLog +++ b/app-emulation/virtualbox-modules/ChangeLog @@ -1,6 +1,28 @@ # ChangeLog for app-emulation/virtualbox-modules # Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-emulation/virtualbox-modules/ChangeLog,v 1.28 2008/11/29 20:39:49 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-emulation/virtualbox-modules/ChangeLog,v 1.29 2008/12/18 12:30:50 flameeyes Exp $ + + 18 Dec 2008; Diego E. Pettenò <flameeyes@gentoo.org> + +files/virtualbox-modules-1.6.6_2.6.27.patch, + +virtualbox-modules-1.6.6-r1.ebuild: + Proxy fix from Alessio. + +*virtualbox-modules-1.6.6-r1 (18 Dec 2008) + + 18 Dec 2008; Diego E. Pettenò <flameeyes@gentoo.org> + +files/virtualbox-modules-1.6.6_2.6.27.patch, + +virtualbox-modules-1.6.6-r1.ebuild: + Proxy fix from Alessio. + + 25 Nov 2008; Alessio Cassibba (X-Drum) <swapon@gmail.com> + -virtualbox-modules-2.0.2.ebuild: + drop version 2.0.2 + + 10 Nov 2008; Alessio Cassibba (X-Drum) <swapon@gmail.com> + -virtualbox-modules-1.6.6.ebuild, +virtualbox-modules-1.6.6-r1.ebuild, + +files/virtualbox-modules-1.6.6_2.6.27.patch: + fix compilation against kernel 2.6.27 thanks to gengor@gentoo.org, see bug + #245624 *virtualbox-modules-2.0.6 (29 Nov 2008) diff --git a/app-emulation/virtualbox-modules/files/virtualbox-modules-1.6.6_2.6.27.patch b/app-emulation/virtualbox-modules/files/virtualbox-modules-1.6.6_2.6.27.patch new file mode 100644 index 000000000000..2fa70a28df4e --- /dev/null +++ b/app-emulation/virtualbox-modules/files/virtualbox-modules-1.6.6_2.6.27.patch @@ -0,0 +1,79 @@ +--- a/linux/SUPDrv-linux.c ++++ b/linux/SUPDrv-linux.c +@@ -115,44 +115,6 @@ + # error "CONFIG_X86_HIGH_ENTRY is not supported by VBoxDrv at this time." + #endif + +-/* +- * This sucks soooo badly on x86! Why don't they export __PAGE_KERNEL_EXEC so PAGE_KERNEL_EXEC would be usable? +- */ +-#if defined(RT_ARCH_AMD64) +-# define MY_PAGE_KERNEL_EXEC PAGE_KERNEL_EXEC +-#elif defined(PAGE_KERNEL_EXEC) && defined(CONFIG_X86_PAE) +-# define MY_PAGE_KERNEL_EXEC __pgprot(cpu_has_pge ? _PAGE_KERNEL_EXEC | _PAGE_GLOBAL : _PAGE_KERNEL_EXEC) +-#else +-# define MY_PAGE_KERNEL_EXEC PAGE_KERNEL +-#endif +- +-/* +- * The redhat hack section. +- * - The current hacks are for 2.4.21-15.EL only. +- */ +-#ifndef NO_REDHAT_HACKS +-/* accounting. */ +-# if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 0) +-# ifdef VM_ACCOUNT +-# define MY_DO_MUNMAP(a,b,c) do_munmap(a, b, c, 0) /* should it be 1 or 0? */ +-# endif +-# endif +- +-/* backported remap_page_range. */ +-# if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 0) +-# include <asm/tlb.h> +-# ifdef tlb_vma /* probably not good enough... */ +-# define HAVE_26_STYLE_REMAP_PAGE_RANGE 1 +-# endif +-# endif +- +-#endif /* !NO_REDHAT_HACKS */ +- +- +-#ifndef MY_DO_MUNMAP +-# define MY_DO_MUNMAP(a,b,c) do_munmap(a, b, c) +-#endif +- + + /** @def ONE_MSEC_IN_JIFFIES + * The number of jiffies that make up 1 millisecond. Must be at least 1! */ +--- a/r0drv/linux/alloc-r0drv-linux.c ++++ b/r0drv/linux/alloc-r0drv-linux.c +@@ -131,11 +131,10 @@ PRTMEMHDR rtMemAlloc(size_t cb, uint32_t + } + else + # endif +- pHdr = (PRTMEMHDR)__vmalloc(cb + sizeof(*pHdr), GFP_KERNEL | __GFP_HIGHMEM, PAGE_KERNEL_EXEC); ++ pHdr = (PRTMEMHDR)__vmalloc(cb + sizeof(*pHdr), GFP_KERNEL | __GFP_HIGHMEM, MY_PAGE_KERNEL_EXEC); + + #elif defined(PAGE_KERNEL_EXEC) && defined(CONFIG_X86_PAE) +- pHdr = (PRTMEMHDR)__vmalloc(cb + sizeof(*pHdr), GFP_KERNEL | __GFP_HIGHMEM, +- __pgprot(cpu_has_pge ? _PAGE_KERNEL_EXEC | _PAGE_GLOBAL : _PAGE_KERNEL_EXEC)); ++ pHdr = (PRTMEMHDR)__vmalloc(cb + sizeof(*pHdr), GFP_KERNEL | __GFP_HIGHMEM, MY_PAGE_KERNEL_EXEC); + #else + pHdr = (PRTMEMHDR)vmalloc(cb + sizeof(*pHdr)); + #endif +--- a/r0drv/linux/the-linux-kernel.h ++++ b/r0drv/linux/the-linux-kernel.h +@@ -174,7 +174,12 @@ DECLINLINE(unsigned long) msecs_to_jiffi + #if defined(RT_ARCH_AMD64) + # define MY_PAGE_KERNEL_EXEC PAGE_KERNEL_EXEC + #elif defined(PAGE_KERNEL_EXEC) && defined(CONFIG_X86_PAE) +-# define MY_PAGE_KERNEL_EXEC __pgprot(cpu_has_pge ? _PAGE_KERNEL_EXEC | _PAGE_GLOBAL : _PAGE_KERNEL_EXEC) ++# ifdef __PAGE_KERNEL_EXEC ++ /* >= 2.6.27 */ ++# define MY_PAGE_KERNEL_EXEC __pgprot(cpu_has_pge ? __PAGE_KERNEL_EXEC | _PAGE_GLOBAL : __PAGE_KERNEL_EXEC) ++# else ++# define MY_PAGE_KERNEL_EXEC __pgprot(cpu_has_pge ? _PAGE_KERNEL_EXEC | _PAGE_GLOBAL : _PAGE_KERNEL_EXEC) ++# endif + #else + # define MY_PAGE_KERNEL_EXEC PAGE_KERNEL + #endif diff --git a/app-emulation/virtualbox-modules/virtualbox-modules-1.6.6-r1.ebuild b/app-emulation/virtualbox-modules/virtualbox-modules-1.6.6-r1.ebuild new file mode 100644 index 000000000000..038a3587f2bd --- /dev/null +++ b/app-emulation/virtualbox-modules/virtualbox-modules-1.6.6-r1.ebuild @@ -0,0 +1,49 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-emulation/virtualbox-modules/virtualbox-modules-1.6.6-r1.ebuild,v 1.1 2008/12/18 12:30:50 flameeyes Exp $ + +inherit eutils linux-mod + +MY_P=vbox-kernel-module-src-${PV} +DESCRIPTION="Kernel Modules for Virtualbox" +HOMEPAGE="http://www.virtualbox.org/" +SRC_URI="http://gentoo.zerodev.it/files/${MY_P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +RDEPEND="!=app-emulation/virtualbox-ose-9999" + +S=${WORKDIR}/vboxdrv + +BUILD_TARGETS="all" +BUILD_TARGET_ARCH="${ARCH}" +MODULE_NAMES="vboxdrv(misc:${S})" + +pkg_setup() { + linux-mod_pkg_setup + BUILD_PARAMS="KERN_DIR=${KV_DIR} KERNOUT=${KV_OUT_DIR}" + enewgroup vboxusers +} + +src_unpack() { + unpack ${A} + cd "${S}" + if kernel_is 2 6 27 ; then + epatch "${FILESDIR}"/${P}_2.6.27.patch + fi +} + +src_install() { + linux-mod_src_install + + # udev rule for vboxdrv + dodir /etc/udev/rules.d + echo 'KERNEL=="vboxdrv", GROUP="vboxusers" MODE=660' >> "${D}/etc/udev/rules.d/60-virtualbox.rules" +} + +pkg_postinst() { + linux-mod_pkg_postinst +} |