Permalink
Browse files

With patches included (non official) for having functional VBox kerne…

…l modules (4.1.4/4.1.6) under Linux 3.2
  • Loading branch information...
1 parent e503f61 commit b70e20cfdfd9b8210db53fc82304be86954da88c @adessemond committed Nov 8, 2011
@@ -0,0 +1,11 @@
+AUX iommu-linux-3.2.patch 1304 RMD160 693e8bd8eaff287c3f072aabb99e717183baa49b SHA1 1f63541f668b2841acd3bb7c0acccdf3b6ddb60d SHA256 f90178923310e2a5683d5d05bd39dc37653f8c02e24d6fcaf498c543e1c0f8c7
+AUX virtualbox-modules-4.1.4-pax-const.patch 2335 RMD160 6d082729b5393bab9c185cdc768488636ac9e59e SHA1 efc1fa014934afa0ea3ae692d93e1996441945a2 SHA256 d23da93fa1a3b7833766caa8329745ed7de7a5ed6ce1fecb090325fdc83e42f3
+DIST vbox-kernel-module-src-4.0.12.tar.bz2 901005 RMD160 6bc21432d363ec7d92a3c7b784788f3d8b2e60b9 SHA1 b431fd82d1e23cbcab52fcc2461424d896058eff SHA256 de7306958d5e807d5aed0aa401e0cbf6106f7f89c5930a7b04ceb8cd2d7ca5d1
+DIST vbox-kernel-module-src-4.1.4.tar.bz2 505952 RMD160 c540fb563d6fdab747366c66d5e472ebffbd3639 SHA1 35a4274118d44bd8603fecfa93817ef129c8e57c SHA256 03577cd31e5ff322102e9bec1ed40f189c50d94032e2d62206b6541a0fda1fb8
+DIST vbox-kernel-module-src-4.1.6.tar.xz 454840 RMD160 f1166c7b2e95276a60beb4c6dbe022826bc21ff2 SHA1 7816f6773f00f28cb287eaf4eb8b31a9b3bbdd37 SHA256 557425714e5d9e1b737c963d5a4d1b67a6e60ec47c2ddf2449dbbfd786c41cdf
+EBUILD virtualbox-modules-4.0.12.ebuild 1570 RMD160 48502bec63dcabe8f9cae90651a0d08e1a2cd60e SHA1 42aa2e640f5e8772ae2ea0ccf6f7a427051572ea SHA256 56012f6439898de74457cfb429cd2f72c29c58daf67df9d833619a27d44a73de
+EBUILD virtualbox-modules-4.1.4-r1.ebuild 1698 RMD160 e1b6dd22eb7f2c37e6dce4e8da47bd9cca86770e SHA1 8454e45fe47d2d5daf5f33a63e7441b02c822785 SHA256 3c8275b2176eb4027a314e93a2f09fec4a4d7a424cb2c2a01444d435ccec9df3
+EBUILD virtualbox-modules-4.1.4.ebuild 1596 RMD160 393d63add8172ca384ea48cb88d4ffe7718f4f0e SHA1 9e25216dd88fc20f9c6f6b7e6f0d41d5d41627ad SHA256 afdd14e1dd4134ca385c62e864be635b7ba853d67f803e4ac660ecb2ea817e5b
+EBUILD virtualbox-modules-4.1.6-r1.ebuild 1677 RMD160 b1fe085f0f9326d6b3538b46bedf0840527cd4fd SHA1 596547118b7851cac95fae580f677341e40be50b SHA256 eddd4913a13c736767a3f439b6c8bce0113003ff3c365934bc1e2811d2735f7c
+EBUILD virtualbox-modules-4.1.6.ebuild 1596 RMD160 df8e44020ba8b559f9589ef7985f98eb9bde71f5 SHA1 f7165c67183ce89d7109c26037bc6383b196f9f2 SHA256 29924453b32c60617ef366f8906dbf0765e3b7098318588d5c6228c9db9b8e7e
+MISC metadata.xml 524 RMD160 605893cae913de8fca2a99e283854a7c195fa4e2 SHA1 a476b7fcd62a5d1a54ad1a018c4daac50bb27d0b SHA256 9ae0eab26084901b8d307d8923f5c130d310deceb09047aae884557a00f70bbb
@@ -0,0 +1,43 @@
+--- vboxpci.orig/linux/VBoxPci-linux.c 2011-11-08 17:06:55.273578424 -0500
++++ vboxpci/linux/VBoxPci-linux.c 2011-11-08 17:11:41.544832752 -0500
+@@ -35,11 +35,19 @@
+ #ifdef VBOX_WITH_IOMMU
+ #include <linux/dmar.h>
+ #include <linux/intel-iommu.h>
++#include <linux/pci.h>
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 1, 0)
+ # include <asm/amd_iommu.h>
+ #else
+ # include <linux/amd-iommu.h>
+ #endif
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 2, 0)
++#define IOMMU_PRESENT() iommu_found()
++#define IOMMU_DOMAIN_ALLOC() iommu_domain_alloc()
++#else
++#define IOMMU_PRESENT() iommu_present(&pci_bus_type)
++#define IOMMU_DOMAIN_ALLOC() iommu_domain_alloc(&pci_bus_type)
++#endif
+ #endif
+
+
+@@ -146,7 +154,7 @@
+ #endif
+
+ #ifdef VBOX_WITH_IOMMU
+- if (iommu_found())
++ if (IOMMU_PRESENT())
+ printk(KERN_INFO "vboxpci: IOMMU found\n");
+ else
+ printk(KERN_INFO "vboxpci: IOMMU not found (not registered)\n");
+@@ -984,9 +992,9 @@
+ printk(KERN_DEBUG "vboxPciOsInitVm: %p\n", pThis);
+ #endif
+ #ifdef VBOX_WITH_IOMMU
+- if (iommu_found())
++ if (IOMMU_PRESENT())
+ {
+- pThis->pIommuDomain = iommu_domain_alloc();
++ pThis->pIommuDomain = IOMMU_DOMAIN_ALLOC();
+ if (!pThis->pIommuDomain)
+ {
+ printk(KERN_DEBUG "cannot allocate IOMMU domain\n");
@@ -0,0 +1,48 @@
+diff -urp vboxdrv.orig/SUPDrvIDC.h vboxdrv/SUPDrvIDC.h
+--- vboxdrv.orig/SUPDrvIDC.h 2011-09-06 15:53:27.852567531 +0200
++++ vboxdrv/SUPDrvIDC.h 2011-09-06 15:54:05.420565524 +0200
+@@ -160,7 +160,7 @@ typedef struct SUPDRVIDCREQGETSYM
+ {
+ /** The symbol address. */
+ PFNRT pfnSymbol;
+- } Out;
++ } __no_const Out;
+ } u;
+ } SUPDRVIDCREQGETSYM;
+ /** Pointer to a SUPDRV IDC get symbol request. */
+diff -urp vboxnetflt.orig/include/VBox/intnet.h vboxnetflt/include/VBox/intnet.h
+--- vboxnetflt.orig/include/VBox/intnet.h 2011-09-06 15:53:27.852567531 +0200
++++ vboxnetflt/include/VBox/intnet.h 2011-09-06 15:54:05.424565524 +0200
+@@ -783,7 +783,7 @@ typedef struct INTNETTRUNKFACTORY
+ DECLR0CALLBACKMEMBER(int, pfnCreateAndConnect,(struct INTNETTRUNKFACTORY *pIfFactory, const char *pszName,
+ PINTNETTRUNKSWPORT pSwitchPort, uint32_t fFlags,
+ PINTNETTRUNKIFPORT *ppIfPort));
+-} INTNETTRUNKFACTORY;
++} __no_const INTNETTRUNKFACTORY;
+ /** Pointer to the trunk factory. */
+ typedef INTNETTRUNKFACTORY *PINTNETTRUNKFACTORY;
+
+diff -urp vboxnetflt.orig/linux/VBoxNetFlt-linux.c vboxnetflt/linux/VBoxNetFlt-linux.c
+--- vboxnetflt.orig/linux/VBoxNetFlt-linux.c 2011-07-19 12:15:22.000000000 +0200
++++ vboxnetflt/linux/VBoxNetFlt-linux.c 2011-09-06 15:56:00.516559379 +0200
+@@ -840,7 +840,7 @@ typedef struct ethtool_ops OVR_OPSTYPE;
+
+ # else /* LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 29) */
+
+-typedef struct net_device_ops OVR_OPSTYPE;
++typedef net_device_ops_no_const OVR_OPSTYPE;
+ # define OVR_OPS netdev_ops
+ # define OVR_XMIT pOrgOps->ndo_start_xmit
+
+diff -urp vboxpci.orig/include/VBox/rawpci.h vboxpci/include/VBox/rawpci.h
+--- vboxpci.orig/include/VBox/rawpci.h 2011-04-18 17:01:12.000000000 +0200
++++ vboxpci/include/VBox/rawpci.h 2011-09-06 15:57:17.340555277 +0200
+@@ -545,7 +545,7 @@ typedef struct RAWPCIFACTORY
+ DECLR0CALLBACKMEMBER(void, pfnDeinitVm,(PRAWPCIFACTORY pFactory,
+ PVM pVM,
+ PRAWPCIPERVM pPciData));
+-} RAWPCIFACTORY;
++} __no_const RAWPCIFACTORY;
+
+ #define RAWPCIFACTORY_UUID_STR "ea089839-4171-476f-adfb-9e7ab1cbd0fb"
+
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>polynomial-c@gentoo.org</email>
+ <name>Lars Wendler</name>
+ </maintainer>
+ <maintainer>
+ <email>patrick@gentoo.org</email>
+ <name>Patrick Lauer</name>
+ </maintainer>
+<maintainer>
+ <email>swapon@gmail.com</email>
+ <name>Alessio Cassibba</name>
+</maintainer>
+<use>
+ <flag name="pax_kernel">Apply patch needed for pax enabled kernels</flag>
+</use>
+</pkgmetadata>
@@ -0,0 +1,58 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/virtualbox-modules/virtualbox-modules-4.0.12.ebuild,v 1.3 2011/07/22 16:58:45 hwoarang Exp $
+
+# XXX: the tarball here is just the kernel modules split out of the binary
+# package that comes from virtualbox-bin
+
+EAPI=2
+
+inherit eutils linux-mod
+
+MY_P=vbox-kernel-module-src-${PV}
+DESCRIPTION="Kernel Modules for Virtualbox"
+HOMEPAGE="http://www.virtualbox.org/"
+SRC_URI="http://dev.gentoo.org/~polynomial-c/virtualbox/${MY_P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+RDEPEND="!=app-emulation/virtualbox-9999"
+
+S=${WORKDIR}
+
+BUILD_TARGETS="all"
+BUILD_TARGET_ARCH="${ARCH}"
+MODULE_NAMES="vboxdrv(misc:${S}) vboxnetflt(misc:${S}) vboxnetadp(misc:${S})"
+
+pkg_setup() {
+ linux-mod_pkg_setup
+ BUILD_PARAMS="KERN_DIR=${KV_DIR} KERNOUT=${KV_OUT_DIR}"
+ enewgroup vboxusers
+}
+
+src_prepare() {
+ if kernel_is -ge 2 6 33 ; then
+ # evil patch for new kernels - header moved
+ grep -lR linux/autoconf.h * | xargs sed -i -e 's:<linux/autoconf.h>:<generated/autoconf.h>:'
+ fi
+}
+
+src_install() {
+ linux-mod_src_install
+}
+
+pkg_postinst() {
+ linux-mod_pkg_postinst
+ elog "Starting with the 3.x release new kernel modules were added,"
+ elog "be sure to load all the needed modules."
+ elog ""
+ elog "Please add \"vboxdrv\", \"vboxnetflt\" and \"vboxnetadp\" to:"
+ if has_version sys-apps/openrc; then
+ elog "/etc/conf.d/modules"
+ else
+ elog "/etc/modules.autoload.d/kernel-${KV_MAJOR}.${KV_MINOR}"
+ fi
+}
@@ -0,0 +1,63 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/virtualbox-modules/virtualbox-modules-4.1.4.ebuild,v 1.4 2011/11/06 13:16:19 polynomial-c Exp $
+
+# XXX: the tarball here is just the kernel modules split out of the binary
+# package that comes from virtualbox-bin
+
+EAPI=2
+
+inherit eutils linux-mod
+
+MY_P=vbox-kernel-module-src-${PV}
+DESCRIPTION="Kernel Modules for Virtualbox"
+HOMEPAGE="http://www.virtualbox.org/"
+SRC_URI="http://dev.gentoo.org/~polynomial-c/virtualbox/${MY_P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~x86"
+IUSE="pax_kernel"
+
+RDEPEND="!=app-emulation/virtualbox-9999"
+
+S=${WORKDIR}
+
+BUILD_TARGETS="all"
+BUILD_TARGET_ARCH="${ARCH}"
+MODULE_NAMES="vboxdrv(misc:${S}) vboxnetflt(misc:${S}) vboxnetadp(misc:${S}) vboxpci(misc:${S})"
+
+pkg_setup() {
+ linux-mod_pkg_setup
+
+ BUILD_PARAMS="KERN_DIR=${KV_DIR} KERNOUT=${KV_OUT_DIR}"
+ enewgroup vboxusers
+}
+
+src_prepare() {
+ if kernel_is -ge 2 6 33 ; then
+ # evil patch for new kernels - header moved
+ grep -lR linux/autoconf.h * | xargs sed -i -e 's:<linux/autoconf.h>:<generated/autoconf.h>:'
+ fi
+
+ if use pax_kernel && kernel_is -ge 3 0 0 ; then
+ epatch "${FILESDIR}"/${PN}-4.1.4-pax-const.patch
+ fi
+
+ if kernel_is -ge 3 2 0 ; then
+ epatch "${FILESDIR}"/iommu-linux-3.2.patch
+ fi
+}
+
+src_install() {
+ linux-mod_src_install
+}
+
+pkg_postinst() {
+ linux-mod_pkg_postinst
+ elog "Starting with the 3.x release new kernel modules were added,"
+ elog "be sure to load all the needed modules."
+ elog ""
+ elog "Please add \"vboxdrv\", \"vboxnetflt\" and \"vboxnetadp\" to:"
+ elog "/etc/conf.d/modules"
+}
@@ -0,0 +1,59 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/virtualbox-modules/virtualbox-modules-4.1.4.ebuild,v 1.4 2011/11/06 13:16:19 polynomial-c Exp $
+
+# XXX: the tarball here is just the kernel modules split out of the binary
+# package that comes from virtualbox-bin
+
+EAPI=2
+
+inherit eutils linux-mod
+
+MY_P=vbox-kernel-module-src-${PV}
+DESCRIPTION="Kernel Modules for Virtualbox"
+HOMEPAGE="http://www.virtualbox.org/"
+SRC_URI="http://dev.gentoo.org/~polynomial-c/virtualbox/${MY_P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~x86"
+IUSE="pax_kernel"
+
+RDEPEND="!=app-emulation/virtualbox-9999"
+
+S=${WORKDIR}
+
+BUILD_TARGETS="all"
+BUILD_TARGET_ARCH="${ARCH}"
+MODULE_NAMES="vboxdrv(misc:${S}) vboxnetflt(misc:${S}) vboxnetadp(misc:${S}) vboxpci(misc:${S})"
+
+pkg_setup() {
+ linux-mod_pkg_setup
+
+ BUILD_PARAMS="KERN_DIR=${KV_DIR} KERNOUT=${KV_OUT_DIR}"
+ enewgroup vboxusers
+}
+
+src_prepare() {
+ if kernel_is -ge 2 6 33 ; then
+ # evil patch for new kernels - header moved
+ grep -lR linux/autoconf.h * | xargs sed -i -e 's:<linux/autoconf.h>:<generated/autoconf.h>:'
+ fi
+
+ if use pax_kernel && kernel_is -ge 3 0 0 ; then
+ epatch "${FILESDIR}"/${PN}-4.1.4-pax-const.patch
+ fi
+}
+
+src_install() {
+ linux-mod_src_install
+}
+
+pkg_postinst() {
+ linux-mod_pkg_postinst
+ elog "Starting with the 3.x release new kernel modules were added,"
+ elog "be sure to load all the needed modules."
+ elog ""
+ elog "Please add \"vboxdrv\", \"vboxnetflt\" and \"vboxnetadp\" to:"
+ elog "/etc/conf.d/modules"
+}
@@ -0,0 +1,63 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/virtualbox-modules/virtualbox-modules-4.1.6.ebuild,v 1.2 2011/11/06 13:16:19 polynomial-c Exp $
+
+# XXX: the tarball here is just the kernel modules split out of the binary
+# package that comes from virtualbox-bin
+
+EAPI=4
+
+inherit eutils linux-mod
+
+MY_P=vbox-kernel-module-src-${PV}
+DESCRIPTION="Kernel Modules for Virtualbox"
+HOMEPAGE="http://www.virtualbox.org/"
+SRC_URI="http://dev.gentoo.org/~polynomial-c/virtualbox/${MY_P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="pax_kernel"
+
+RDEPEND="!=app-emulation/virtualbox-9999"
+
+S=${WORKDIR}
+
+BUILD_TARGETS="all"
+BUILD_TARGET_ARCH="${ARCH}"
+MODULE_NAMES="vboxdrv(misc:${S}) vboxnetflt(misc:${S}) vboxnetadp(misc:${S}) vboxpci(misc:${S})"
+
+pkg_setup() {
+ linux-mod_pkg_setup
+
+ BUILD_PARAMS="KERN_DIR=${KV_DIR} KERNOUT=${KV_OUT_DIR}"
+ enewgroup vboxusers
+}
+
+src_prepare() {
+ if kernel_is -ge 2 6 33 ; then
+ # evil patch for new kernels - header moved
+ grep -lR linux/autoconf.h * | xargs sed -i -e 's:<linux/autoconf.h>:<generated/autoconf.h>:'
+ fi
+
+ if use pax_kernel && kernel_is -ge 3 0 0 ; then
+ epatch "${FILESDIR}"/${PN}-4.1.4-pax-const.patch
+ fi
+
+ if kernel_is -ge 3 2 0 ; then
+ epatch "${FILESDIR}"/iommu-linux-3.2.patch
+ fi
+}
+
+src_install() {
+ linux-mod_src_install
+}
+
+pkg_postinst() {
+ linux-mod_pkg_postinst
+ elog "Starting with the 3.x release new kernel modules were added,"
+ elog "be sure to load all the needed modules."
+ elog ""
+ elog "Please add \"vboxdrv\", \"vboxnetflt\" and \"vboxnetadp\" to:"
+ elog "/etc/conf.d/modules"
+}
Oops, something went wrong.

0 comments on commit b70e20c

Please sign in to comment.