diff options
author | Bernhard Froehlich <decke@FreeBSD.org> | 2012-02-21 12:43:15 +0000 |
---|---|---|
committer | Bernhard Froehlich <decke@FreeBSD.org> | 2012-02-21 12:43:15 +0000 |
commit | f3865a976c842403ea1aedb3c3785a1b01d97f69 (patch) | |
tree | 8a0b4b41e451928d3354db68bd19b5abd9be91cd /emulators/virtualbox-ose-kmod-legacy | |
parent | c59600683f0ba4ad5afeae4cf73846ee416f65bf (diff) | |
download | freebsd-ports-f3865a976c842403ea1aedb3c3785a1b01d97f69.zip |
- Update to 4.0.16
- Fix lib32 checks to use /usr/lib32/libc.so
Obtained from: redports.org/~virtualbox/
Diffstat (limited to 'emulators/virtualbox-ose-kmod-legacy')
7 files changed, 114 insertions, 33 deletions
diff --git a/emulators/virtualbox-ose-kmod-legacy/Makefile b/emulators/virtualbox-ose-kmod-legacy/Makefile index ad14b5105274..9c1ab3d3243f 100644 --- a/emulators/virtualbox-ose-kmod-legacy/Makefile +++ b/emulators/virtualbox-ose-kmod-legacy/Makefile @@ -6,14 +6,13 @@ # PORTNAME= virtualbox-ose -DISTVERSION= 3.2.12 -PORTREVISION= 3 +DISTVERSION= 4.0.16 CATEGORIES= emulators kld MASTER_SITES= http://tmp.chruetertee.ch/ \ http://freebsd.unixfreunde.de/sources/ \ http://disasterarea.chruetertee.ch/ PKGNAMESUFFIX= -kmod-legacy -DISTNAME= VirtualBox-${DISTVERSION}-OSE +DISTNAME= VirtualBox-${DISTVERSION} MAINTAINER= vbox@FreeBSD.org COMMENT= VirtualBox kernel module for FreeBSD @@ -38,9 +37,11 @@ CONFIGURE_ARGS+=--with-gcc="${CC}" --with-g++="${CXX}" --nofatal \ --build-headless CONFLICTS= bcc-[0-9]* +CONFLICTS_BUILD= kBuild-devel-[0-9]* CONFLICTS_INSTALL= virtualbox-ose-kmod-[3,4]* virtualbox-ose-kmod-devel-[3,4]* -OPTIONS= DEBUG "Build with debugging symbols" off +OPTIONS= DEBUG "Build with debugging symbols" off \ + VIMAGE "VIMAGE virtual networking support" off .include <bsd.port.options.mk> @@ -72,11 +73,18 @@ IGNORE= requires kernel sources .include <bsd.port.pre.mk> +.if ${OSVERSION} < 800500 && defined(WITH_VIMAGE) +IGNORE= newer kernel is required to build with VIMAGE +.endif + post-patch: @${ECHO} 'VBOX_WITH_VBOXDRV = 1' > ${WRKSRC}/LocalConfig.kmk @${ECHO} 'VBOX_WITH_NETFLT = 1' >> ${WRKSRC}/LocalConfig.kmk @${ECHO} 'VBOX_WITH_NETADP = 1' >> ${WRKSRC}/LocalConfig.kmk @${ECHO} 'VBOX_WITH_ADDITIONS =' >> ${WRKSRC}/LocalConfig.kmk +.if defined(WITH_VIMAGE) + @${ECHO} 'VBOX_WITH_NETFLT_VIMAGE = 1' >> ${WRKSRC}/LocalConfig.kmk +.endif @${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|g' \ ${WRKSRC}/Config.kmk \ ${WRKSRC}/configure diff --git a/emulators/virtualbox-ose-kmod-legacy/distinfo b/emulators/virtualbox-ose-kmod-legacy/distinfo index 8a9c1e15c918..c43dcee8c56e 100644 --- a/emulators/virtualbox-ose-kmod-legacy/distinfo +++ b/emulators/virtualbox-ose-kmod-legacy/distinfo @@ -1,2 +1,2 @@ -SHA256 (VirtualBox-3.2.12-OSE.tar.bz2) = 064eb382e5b752a3f9189c930734393765125e70b5f99679a63ff4eb6186e261 -SIZE (VirtualBox-3.2.12-OSE.tar.bz2) = 58239733 +SHA256 (VirtualBox-4.0.16.tar.bz2) = d6c165cc41063cb8eb8283606b712904cae180000171fb1f833b7eaada633c77 +SIZE (VirtualBox-4.0.16.tar.bz2) = 70042175 diff --git a/emulators/virtualbox-ose-kmod-legacy/files/patch-include-iprt-types.h b/emulators/virtualbox-ose-kmod-legacy/files/patch-include-iprt-types.h new file mode 100644 index 000000000000..afa28bbb1461 --- /dev/null +++ b/emulators/virtualbox-ose-kmod-legacy/files/patch-include-iprt-types.h @@ -0,0 +1,19 @@ +- Fix build failure on FreeBSD 10-CURRENT after r228444 + +include/iprt/types.h:174: error: redefinition of typedef 'bool' +@/sys/types.h:271: error: previous declaration of 'bool' was here + +Submitted by: Daichi GOTO <daichi@freebsd.org> +--- include/iprt/types.h.orig 2011-10-28 16:29:51.000000000 +0200 ++++ include/iprt/types.h 2011-12-22 10:17:16.000000000 +0100 +@@ -167,6 +167,10 @@ + # if defined(__GNUC__) + # if defined(RT_OS_LINUX) && __GNUC__ < 3 + typedef uint8_t bool; ++# elif defined(RT_OS_FREEBSD) ++# ifndef __bool_true_false_are_defined ++typedef _Bool bool; ++# endif + # else + # if defined(RT_OS_DARWIN) && defined(_STDBOOL_H) + # undef bool diff --git a/emulators/virtualbox-ose-kmod-legacy/files/patch-src-VBox-HostDrivers-Support-freebsd-SUPDrv-freebsd.c b/emulators/virtualbox-ose-kmod-legacy/files/patch-src-VBox-HostDrivers-Support-freebsd-SUPDrv-freebsd.c new file mode 100644 index 000000000000..8bc13932892d --- /dev/null +++ b/emulators/virtualbox-ose-kmod-legacy/files/patch-src-VBox-HostDrivers-Support-freebsd-SUPDrv-freebsd.c @@ -0,0 +1,31 @@ +- Fix compile error: 'D_PSEUDO' undeclared here on 10-CURRENT + +Submitted by: Jung-uk Kim <jkim@FreeBSD.org> + +- Fix check that kernel module can not be unloaded when there +are running VMs + +Submitted by: aeichner +Reported by: avg +--- src/VBox/HostDrivers/Support/freebsd/SUPDrv-freebsd.c.orig 2011-11-04 12:19:39.000000000 +0100 ++++ src/VBox/HostDrivers/Support/freebsd/SUPDrv-freebsd.c 2011-12-13 12:22:44.325251163 +0100 +@@ -100,7 +100,9 @@ + static struct cdevsw g_VBoxDrvFreeBSDChrDevSW = + { + .d_version = D_VERSION, +-#if __FreeBSD_version > 800061 ++#if __FreeBSD_version >= 1000000 ++ .d_flags = D_TRACKCLOSE | D_NEEDMINOR, ++#elif __FreeBSD_version > 800061 + .d_flags = D_PSEUDO | D_TRACKCLOSE | D_NEEDMINOR, + #else + .d_flags = D_PSEUDO | D_TRACKCLOSE, +@@ -205,7 +207,7 @@ + Log(("VBoxDrvFreeBSDUnload:\n")); + + if (g_cUsers > 0) +- return EBUSY; ++ return VERR_RESOURCE_BUSY; + + /* + * Reserve what we did in VBoxDrvFreeBSDInit. diff --git a/emulators/virtualbox-ose-kmod-legacy/files/patch-src-VBox-Runtime-r0drv-freebsd-memobj-r0drv-freebsd.c b/emulators/virtualbox-ose-kmod-legacy/files/patch-src-VBox-Runtime-r0drv-freebsd-memobj-r0drv-freebsd.c index fd376f9b528b..91bacd4eef20 100644 --- a/emulators/virtualbox-ose-kmod-legacy/files/patch-src-VBox-Runtime-r0drv-freebsd-memobj-r0drv-freebsd.c +++ b/emulators/virtualbox-ose-kmod-legacy/files/patch-src-VBox-Runtime-r0drv-freebsd-memobj-r0drv-freebsd.c @@ -5,9 +5,13 @@ to VPO_UNMANAGED for an additional assert. Reviewed by: kib See: http://svnweb.freebsd.org/base?view=revision&revision=224746 ---- src/VBox/Runtime/r0drv/freebsd/memobj-r0drv-freebsd.c.orig 2011-04-05 14:34:09.000000000 +0200 -+++ src/VBox/Runtime/r0drv/freebsd/memobj-r0drv-freebsd.c 2011-08-11 15:06:46.000000000 +0200 -@@ -394,9 +394,13 @@ +--- src/VBox/Runtime/r0drv/freebsd/memobj-r0drv-freebsd.c.orig 2011-11-04 07:19:54.000000000 -0400 ++++ src/VBox/Runtime/r0drv/freebsd/memobj-r0drv-freebsd.c 2011-11-29 18:13:32.000000000 -0500 +@@ -391,12 +391,18 @@ + + static void rtR0MemObjFreeBSDPhysPageInit(vm_page_t pPage, vm_pindex_t iPage) + { ++#if __FreeBSD_version <= 1000000 pPage->wire_count = 1; pPage->pindex = iPage; pPage->act_count = 0; @@ -20,6 +24,41 @@ See: http://svnweb.freebsd.org/base?view=revision&revision=224746 +#else + Assert(pPage->flags & PG_UNMANAGED != 0); +#endif ++#endif } +@@ -408,6 +414,9 @@ + int rc = VINF_SUCCESS; + uint32_t cPages = cb >> PAGE_SHIFT; + vm_paddr_t VmPhysAddrHigh; ++#if __FreeBSD_version >= 1000001 ++ int pFlags = VM_ALLOC_INTERRUPT | VM_ALLOC_NOOBJ | VM_ALLOC_WIRED; ++#endif + + /* create the object. */ + PRTR0MEMOBJFREEBSD pMemFreeBSD = (PRTR0MEMOBJFREEBSD)rtR0MemObjNew(RT_OFFSETOF(RTR0MEMOBJFREEBSD, u.Phys.apPages[cPages]), +@@ -424,7 +433,11 @@ + + if (fContiguous) + { ++#if __FreeBSD_version >= 1000001 ++ vm_page_t pPage = vm_page_alloc_contig(NULL, 0, pFlags, cPages, 0, VmPhysAddrHigh, uAlignment, 0, VM_MEMATTR_DEFAULT); ++#else + vm_page_t pPage = vm_phys_alloc_contig(cPages, 0, VmPhysAddrHigh, uAlignment, 0); ++#endif + + if (pPage) + for (uint32_t iPage = 0; iPage < cPages; iPage++) +@@ -440,7 +453,11 @@ + /* Allocate page by page */ + for (uint32_t iPage = 0; iPage < cPages; iPage++) + { ++#if __FreeBSD_version >= 1000001 ++ vm_page_t pPage = vm_page_alloc_contig(NULL, iPage, pFlags, 1, 0, VmPhysAddrHigh, uAlignment, 0, VM_MEMATTR_DEFAULT); ++#else + vm_page_t pPage = vm_phys_alloc_contig(1, 0, VmPhysAddrHigh, uAlignment, 0); ++#endif + + if (!pPage) + { diff --git a/emulators/virtualbox-ose-kmod-legacy/files/patch-src-VBox-Runtime-r0drv-freebsd-mp-r0drv-freebsd.c b/emulators/virtualbox-ose-kmod-legacy/files/patch-src-VBox-Runtime-r0drv-freebsd-mp-r0drv-freebsd.c index b089715a27ec..c298f52fd501 100644 --- a/emulators/virtualbox-ose-kmod-legacy/files/patch-src-VBox-Runtime-r0drv-freebsd-mp-r0drv-freebsd.c +++ b/emulators/virtualbox-ose-kmod-legacy/files/patch-src-VBox-Runtime-r0drv-freebsd-mp-r0drv-freebsd.c @@ -1,7 +1,7 @@ ---- src/VBox/Runtime/r0drv/freebsd/mp-r0drv-freebsd.c.orig 2010-12-01 18:09:43.000000000 +0100 -+++ src/VBox/Runtime/r0drv/freebsd/mp-r0drv-freebsd.c 2011-06-27 16:13:16.000000000 +0200 -@@ -163,17 +163,26 @@ - /* Will panic if no rendezvouing cpus, so check up front. */ +--- src/VBox/Runtime/r0drv/freebsd/mp-r0drv-freebsd.c.orig 2011-05-16 12:33:52.000000000 -0400 ++++ src/VBox/Runtime/r0drv/freebsd/mp-r0drv-freebsd.c 2011-06-24 13:57:31.000000000 -0400 +@@ -163,17 +163,26 @@ RTDECL(int) RTMpOnOthers(PFNRTMPWORKER p + /* Will panic if no rendezvousing cpus, so check up front. */ if (RTMpGetOnlineCount() > 1) { -#if __FreeBSD_version >= 700000 @@ -30,7 +30,7 @@ smp_rendezvous_cpus(Mask, NULL, rtmpOnOthersFreeBSDWrapper, smp_no_rendevous_barrier, &Args); #else smp_rendezvous(NULL, rtmpOnOthersFreeBSDWrapper, NULL, &Args); -@@ -203,8 +212,10 @@ +@@ -203,8 +212,10 @@ static void rtmpOnSpecificFreeBSDWrapper RTDECL(int) RTMpOnSpecific(RTCPUID idCpu, PFNRTMPWORKER pfnWorker, void *pvUser1, void *pvUser2) { @@ -43,7 +43,7 @@ #endif RTMPARGS Args; -@@ -218,7 +229,11 @@ +@@ -218,7 +229,11 @@ RTDECL(int) RTMpOnSpecific(RTCPUID idCpu Args.idCpu = idCpu; Args.cHits = 0; #if __FreeBSD_version >= 700000 @@ -55,7 +55,7 @@ smp_rendezvous_cpus(Mask, NULL, rtmpOnSpecificFreeBSDWrapper, smp_no_rendevous_barrier, &Args); #else smp_rendezvous(NULL, rtmpOnSpecificFreeBSDWrapper, NULL, &Args); -@@ -242,13 +257,21 @@ +@@ -242,13 +257,21 @@ static void rtmpFreeBSDPokeCallback(void RTDECL(int) RTMpPokeCpu(RTCPUID idCpu) { @@ -65,7 +65,7 @@ cpumask_t Mask; +#endif - /* Will panic if no rendezvouing cpus, so make sure the cpu is online. */ + /* Will panic if no rendezvousing cpus, so make sure the cpu is online. */ if (!RTMpIsCpuOnline(idCpu)) return VERR_CPU_NOT_FOUND; diff --git a/emulators/virtualbox-ose-kmod-legacy/files/patch-src-VBox-Runtime-r0drv-freebsd-thread-r0drv-freebsd.c b/emulators/virtualbox-ose-kmod-legacy/files/patch-src-VBox-Runtime-r0drv-freebsd-thread-r0drv-freebsd.c deleted file mode 100644 index e379ac172b4a..000000000000 --- a/emulators/virtualbox-ose-kmod-legacy/files/patch-src-VBox-Runtime-r0drv-freebsd-thread-r0drv-freebsd.c +++ /dev/null @@ -1,16 +0,0 @@ -*** ./src/VBox/Runtime/r0drv/freebsd/thread-r0drv-freebsd.c~ Wed Dec 1 12:09:43 2010 ---- ./src/VBox/Runtime/r0drv/freebsd/thread-r0drv-freebsd.c Wed Feb 9 13:44:28 2011 -*************** -*** 101,107 **** ---- 101,111 ---- - - RTDECL(bool) RTThreadYield(void) - { -+ #if (__FreeBSD_version >= 900032) -+ kern_yield(curthread->td_user_pri); -+ #else - uio_yield(); -+ #endif - return false; /** @todo figure this one ... */ - } - |