diff options
author | John Marino <marino@FreeBSD.org> | 2014-09-09 19:18:28 +0000 |
---|---|---|
committer | John Marino <marino@FreeBSD.org> | 2014-09-09 19:18:28 +0000 |
commit | efd0d5fc6e279984ac610a97d55f4ccd5ce5016b (patch) | |
tree | 48719dd433652ddad1dbe95ebb24f153c6b77090 /emulators/virtualbox-ose-kmod-legacy | |
parent | c0dc3135345a3cb933323ac73ba9c304e3023b08 (diff) | |
download | freebsd-ports-efd0d5fc6e279984ac610a97d55f4ccd5ce5016b.zip |
Remove virtualbox-*-legacy due to lack of staging
The virtualbox-ose-kmod-legacy port is staged, but it has no purpose
without the unstaged virtualbox-ose-legacy port, so both ports have
been removed at the same time.
Diffstat (limited to 'emulators/virtualbox-ose-kmod-legacy')
18 files changed, 0 insertions, 684 deletions
diff --git a/emulators/virtualbox-ose-kmod-legacy/Makefile b/emulators/virtualbox-ose-kmod-legacy/Makefile deleted file mode 100644 index 9e4f90b99870..000000000000 --- a/emulators/virtualbox-ose-kmod-legacy/Makefile +++ /dev/null @@ -1,99 +0,0 @@ -# Created by: Bernhard Froehlich <decke@bluelife.at> -# $FreeBSD$ - -PORTNAME= virtualbox-ose -DISTVERSION= 4.2.22 -PORTREVISION= 1 -CATEGORIES= emulators -MASTER_SITES= http://download.virtualbox.org/virtualbox/${DISTVERSION}/ \ - http://tmp.chruetertee.ch/ \ - http://disasterarea.chruetertee.ch/ -PKGNAMESUFFIX= -kmod-legacy -DISTNAME= VirtualBox-${DISTVERSION} - -MAINTAINER= vbox@FreeBSD.org -COMMENT= VirtualBox kernel module for FreeBSD - -LICENSE= GPLv2 -LICENSE_FILE= ${WRKSRC}/COPYING - -BUILD_DEPENDS= kmk:${PORTSDIR}/devel/kBuild - -UNIQUENAME= ${PORTNAME}${PKGNAMESUFFIX} -WRKSRC= ${WRKDIR}/VirtualBox-${PORTVERSION} -USE_RC_SUBR= vboxnet -ONLY_FOR_ARCHS= i386 amd64 - -HAS_CONFIGURE= yes -CONFIGURE_ARGS+=--with-gcc="${CC}" --with-g++="${CXX}" --nofatal \ - --disable-xpcom --disable-sdl-ttf --disable-pulse \ - --disable-alsa --disable-dbus --disable-python \ - --build-headless - -CONFLICTS_INSTALL= virtualbox-ose-kmod-4* virtualbox-ose-kmod-devel-4* - -OPTIONS_DEFINE= DEBUG VIMAGE -DEBUG_DESC= Debug symbols, additional logs and assertions -VIMAGE_DESC= VIMAGE virtual networking support - -USES= kmod tar:bzip2 -.include <bsd.port.options.mk> - -VBOX_BIN= ${WRKSRC}/out/${KMK_ARCH}/${KMK_BUILDTYPE}/bin/src - -KMK_BUILDTYPE= release -KMK_CONFIG= VBOX_LIBPATH_X11=${LOCALBASE} VBOX_FREEBSD_SRC=${SRC_BASE}/sys -KMK_FLAGS= HostDrivers-scripts vboxdrv-mod VBoxNetFlt-src VBoxNetAdp-src - -MAKE_FLAGS= SYSDIR=${SRC_BASE}/sys - -.if ${PORT_OPTIONS:MDEBUG} -KMK_FLAGS+= BUILD_TYPE=debug -KMK_BUILDTYPE= debug -EXTRA_PATCHES+= ${FILESDIR}/extrapatch-Config.kmk ${FILESDIR}/extrapatch-src-VBox-HostDrivers-Support-freebsd-Makefile -MAKE_FLAGS+= DEBUG_FLAGS="-O1 -g" -PLIST_SUB+= WITH_DEBUG="" -.else -PLIST_SUB+= WITH_DEBUG="@comment " -.endif - -.if ${ARCH} == i386 -KMK_ARCH= freebsd.x86 -.else -KMK_ARCH= freebsd.${ARCH} -.endif - -.include <bsd.port.pre.mk> - -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 ${PORT_OPTIONS:MVIMAGE} - @${ECHO} 'VBOX_WITH_NETFLT_VIMAGE = 1' >> ${WRKSRC}/LocalConfig.kmk -.endif - @${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|g' \ - ${WRKSRC}/Config.kmk \ - ${WRKSRC}/configure - @${REINPLACE_CMD} -e 's|\$$KBUILDDIR_BIN/kmk_sed|${LOCALBASE}/bin/kmk_sed|g' ${WRKSRC}/configure - -pre-build: - @${REINPLACE_CMD} -e 's|/bin/bash|/bin/sh|' \ - ${WRKSRC}/env.sh - -do-build: - cd ${WRKSRC} && ${SH} env.sh && cd ${WRKSRC}/src/VBox/HostDrivers && ${KMK_CONFIG} ${LOCALBASE}/bin/kmk ${KMK_FLAGS} - cd ${VBOX_BIN} && make ${MAKE_FLAGS} - -do-install: - ${INSTALL_KLD} ${VBOX_BIN}/vboxdrv/vboxdrv.ko ${STAGEDIR}${KMODDIR} - ${INSTALL_KLD} ${VBOX_BIN}/vboxnetadp/vboxnetadp.ko ${STAGEDIR}${KMODDIR} - ${INSTALL_KLD} ${VBOX_BIN}/vboxnetflt/vboxnetflt.ko ${STAGEDIR}${KMODDIR} -.if ${PORT_OPTIONS:MDEBUG} - ${INSTALL_KLD} ${VBOX_BIN}/vboxdrv/vboxdrv.ko.symbols ${STAGEDIR}${KMODDIR} - ${INSTALL_KLD} ${VBOX_BIN}/vboxnetadp/vboxnetadp.ko.symbols ${STAGEDIR}${KMODDIR} - ${INSTALL_KLD} ${VBOX_BIN}/vboxnetflt/vboxnetflt.ko.symbols ${STAGEDIR}${KMODDIR} -.endif - -.include <bsd.port.post.mk> diff --git a/emulators/virtualbox-ose-kmod-legacy/distinfo b/emulators/virtualbox-ose-kmod-legacy/distinfo deleted file mode 100644 index f6a742ba3954..000000000000 --- a/emulators/virtualbox-ose-kmod-legacy/distinfo +++ /dev/null @@ -1,2 +0,0 @@ -SHA256 (VirtualBox-4.2.22.tar.bz2) = 4a017ec5fa0e0cfa830ae6c2b9d680c9b108e5fb96348e1397a7d0ea051f8bc1 -SIZE (VirtualBox-4.2.22.tar.bz2) = 77039185 diff --git a/emulators/virtualbox-ose-kmod-legacy/files/extrapatch-Config.kmk b/emulators/virtualbox-ose-kmod-legacy/files/extrapatch-Config.kmk deleted file mode 100644 index 7df1b0883f27..000000000000 --- a/emulators/virtualbox-ose-kmod-legacy/files/extrapatch-Config.kmk +++ /dev/null @@ -1,11 +0,0 @@ ---- Config.kmk.orig 2012-05-24 01:15:53.393052000 +0200 -+++ Config.kmk 2012-05-24 01:16:15.883067161 +0200 -@@ -3188,7 +3188,7 @@ - | xargs -J% objcopy % $(out) - - ## Strip debug info (comment out if debugging or something). -- objcopy --strip-debug $(out) -+# objcopy --strip-debug $(out) - endef - else # x86 - TOOL_FREEBSDKMODLD_LINK_SYSMOD_OUTPUT = $(outbase).kld diff --git a/emulators/virtualbox-ose-kmod-legacy/files/extrapatch-src-VBox-HostDrivers-Support-freebsd-Makefile b/emulators/virtualbox-ose-kmod-legacy/files/extrapatch-src-VBox-HostDrivers-Support-freebsd-Makefile deleted file mode 100644 index 67361da543f7..000000000000 --- a/emulators/virtualbox-ose-kmod-legacy/files/extrapatch-src-VBox-HostDrivers-Support-freebsd-Makefile +++ /dev/null @@ -1,11 +0,0 @@ ---- src/VBox/HostDrivers/Support/freebsd/Makefile.orig 2012-10-18 16:23:16.000000000 +0200 -+++ src/VBox/HostDrivers/Support/freebsd/Makefile 2012-10-20 08:13:07.301179212 +0200 -@@ -27,7 +27,7 @@ - - KMOD = vboxdrv - --CFLAGS += -DRT_OS_FREEBSD -DIN_RING0 -DIN_RT_R0 -DIN_SUP_R0 -DSUPDRV_WITH_RELEASE_LOGGER -DVBOX -DRT_WITH_VBOX -Iinclude -I. -Ir0drv -w -DVBOX_WITH_HARDENING -DVBOX_WITH_64_BITS_GUESTS -+CFLAGS += -DRT_OS_FREEBSD -DIN_RING0 -DIN_RT_R0 -DIN_SUP_R0 -DSUPDRV_WITH_RELEASE_LOGGER -DVBOX -DRT_WITH_VBOX -Iinclude -I. -Ir0drv -w -DVBOX_WITH_HARDENING -DVBOX_WITH_64_BITS_GUESTS -DDEBUG - - .if (${MACHINE_ARCH} == "i386") - CFLAGS += -DRT_ARCH_X86 diff --git a/emulators/virtualbox-ose-kmod-legacy/files/patch-Config.kmk b/emulators/virtualbox-ose-kmod-legacy/files/patch-Config.kmk deleted file mode 100644 index d7edc886bb4a..000000000000 --- a/emulators/virtualbox-ose-kmod-legacy/files/patch-Config.kmk +++ /dev/null @@ -1,56 +0,0 @@ ---- Config.kmk.orig 2012-12-20 14:44:38.260858319 +0100 -+++ Config.kmk 2012-12-20 14:55:59.491850177 +0100 -@@ -3239,7 +3239,7 @@ - $(VBOX_GCC_WARN) -Wpointer-arith -Winline $(VBOX_GCC_Wno-pointer-sign) $(VBOX_GCC_fdiagnostics-show-option) \ - -Wstrict-prototypes -Wmissing-prototypes -Wstrict-prototypes \ - -Wimplicit-function-declaration -Werror-implicit-function-declaration \ -- -O2 -fformat-extensions -ffreestanding -fno-strict-aliasing -fno-common -finline-limit=8000 \ -+ -O2 -ffreestanding -fno-strict-aliasing -fno-common -finline-limit=8000 \ - $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) \ - -nostdinc -std=c99 - TEMPLATE_VBOXR0DRV_CFLAGS.x86 = -m32 -mno-align-long-strings -mpreferred-stack-boundary=2 -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -@@ -3248,7 +3248,7 @@ - -mno-3dnow -msoft-float -fno-asynchronous-unwind-tables -Wundef - TEMPLATE_VBOXR0DRV_CXXFLAGS = -fno-exceptions -fno-rtti \ - $(VBOX_GCC_WARN) -Wpointer-arith -Winline \ -- -O2 -fno-format-extensions -fno-strict-aliasing -fno-common -finline-limit=8000 \ -+ -O2 -fno-strict-aliasing -fno-common -finline-limit=8000 \ - $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) \ - -nostdinc - TEMPLATE_VBOXR0DRV_CXXFLAGS.x86 = $(TEMPLATE_VBOXR0DRV_CFLAGS.x86) -@@ -3465,8 +3465,6 @@ - /usr/X11R6/include \ - /usr/local/include - TEMPLATE_VBOXR3EXE_LIBPATH += \ -- /usr/lib \ -- /usr/X11R6/lib \ - /usr/local/lib - else ifeq ($(KBUILD_TARGET),solaris) - TEMPLATE_VBOXR3EXE_TOOL = GXX3PLAIN -@@ -3955,8 +3953,6 @@ - /usr/X11R6/include \ - /usr/local/include - TEMPLATE_VBOXMAINEXE_LIBPATH += \ -- /usr/lib \ -- /usr/X11R6/lib \ - /usr/local/lib - else ifeq ($(KBUILD_TARGET),solaris) - TEMPLATE_VBOXMAINEXE_TOOL = GXX3PLAIN -@@ -4371,8 +4367,6 @@ - /usr/X11R6/include \ - /usr/local/include - TEMPLATE_VBOXQT4GUIEXE_LIBPATH += \ -- /usr/lib \ -- /usr/X11R6/lib \ - /usr/local/lib - endif - ifeq ($(KBUILD_TARGET),solaris) -@@ -4555,8 +4549,6 @@ - /usr/X11R6/include \ - /usr/local/include - TEMPLATE_VBOXBLDPROG_LIBPATH += \ -- /usr/lib \ -- /usr/X11R6/lib \ - /usr/local/lib - else ifeq ($(KBUILD_HOST),solaris) - TEMPLATE_VBOXBLDPROG_TOOL = GXX3PLAIN diff --git a/emulators/virtualbox-ose-kmod-legacy/files/patch-include-iprt-x86.h b/emulators/virtualbox-ose-kmod-legacy/files/patch-include-iprt-x86.h deleted file mode 100644 index 53b7a7a34524..000000000000 --- a/emulators/virtualbox-ose-kmod-legacy/files/patch-include-iprt-x86.h +++ /dev/null @@ -1,15 +0,0 @@ ---- include/iprt/x86.h.orig 2014-01-11 03:15:24.000000000 -0500 -+++ include/iprt/x86.h 2014-03-13 14:13:50.000000000 -0400 -@@ -35,6 +35,12 @@ - # pragma D depends_on library vbox-types.d - #endif - -+/* Workaround for FreeBSD machine/specialreg.h defining MSRs */ -+#ifdef RT_OS_FREEBSD -+# undef MSR_IA32_PLATFORM_ID -+# undef MSR_IA32_MISC_ENABLE -+#endif -+ - /* Workaround for Solaris sys/regset.h defining CS, DS */ - #ifdef RT_OS_SOLARIS - # undef CS diff --git a/emulators/virtualbox-ose-kmod-legacy/files/patch-src-VBox-HostDrivers-VBoxNetAdp-Makefile.kmk b/emulators/virtualbox-ose-kmod-legacy/files/patch-src-VBox-HostDrivers-VBoxNetAdp-Makefile.kmk deleted file mode 100644 index 01d25b3ac02a..000000000000 --- a/emulators/virtualbox-ose-kmod-legacy/files/patch-src-VBox-HostDrivers-VBoxNetAdp-Makefile.kmk +++ /dev/null @@ -1,25 +0,0 @@ -Fix kmod panic when VIMAGE is disabled in the kernel and port - -Submitted by: Gleb Kurtsou <gleb@freebsd.org> ---- src/VBox/HostDrivers/VBoxNetAdp/Makefile.kmk.orig 2013-04-12 03:38:10.000000000 -0700 -+++ src/VBox/HostDrivers/VBoxNetAdp/Makefile.kmk 2013-06-11 21:24:05.000000000 -0700 -@@ -143,12 +143,15 @@ - $$(if $$(eq $$(VBoxNetAdp/freebsd/Makefile_VBOX_HARDENED),$$(VBOX_WITH_HARDENING)),,FORCE) \ - | $$(dir $$@) - $(QUIET)$(RM) -f -- $@ -- ifndef VBOX_WITH_HARDENING -- $(QUIET)$(SED) -e "s;-DVBOX_WITH_HARDENING;;g" --output $@ $< -- else - $(QUIET)$(CP) -f $< $@ -+ ifndef VBOX_WITH_HARDENING -+ $(QUIET)$(SED) -e "s;-DVBOX_WITH_HARDENING;;g" --output $@.tmp $@ -+ ${QUIET}$(MV) -f $@.tmp $@ -+ endif -+ ifndef VBOX_WITH_NETFLT_VIMAGE -+ $(QUIET)$(SED) -e "s;-DVIMAGE;;g" --output $@.tmp $@ -+ ${QUIET}$(MV) -f $@.tmp $@ - endif -- - endif # freebsd - - include $(FILE_KBUILD_SUB_FOOTER) diff --git a/emulators/virtualbox-ose-kmod-legacy/files/patch-src-VBox-HostDrivers-VBoxNetFlt-freebsd-VBoxNetFlt-freebsd.c b/emulators/virtualbox-ose-kmod-legacy/files/patch-src-VBox-HostDrivers-VBoxNetFlt-freebsd-VBoxNetFlt-freebsd.c deleted file mode 100644 index 6cb5a1ebd30c..000000000000 --- a/emulators/virtualbox-ose-kmod-legacy/files/patch-src-VBox-HostDrivers-VBoxNetFlt-freebsd-VBoxNetFlt-freebsd.c +++ /dev/null @@ -1,72 +0,0 @@ -Add VLAN trunking support to vboxnetflt - -See: http://lists.freebsd.org/pipermail/freebsd-emulation/2012-April/009698.html -See: http://lists.freebsd.org/pipermail/freebsd-emulation/2013-May/010605.html -Submitted by: Landon J Fuller <landonf at plausible.coop> ---- ./src/VBox/HostDrivers/VBoxNetFlt/freebsd/VBoxNetFlt-freebsd.c.orig 2013-04-12 06:38:11.000000000 -0400 -+++ ./src/VBox/HostDrivers/VBoxNetFlt/freebsd/VBoxNetFlt-freebsd.c 2013-05-25 20:14:52.152180452 -0400 -@@ -51,6 +51,7 @@ - #include <net/if_dl.h> - #include <net/if_types.h> - #include <net/ethernet.h> -+#include <net/if_vlan_var.h> - - #include <netgraph/ng_message.h> - #include <netgraph/netgraph.h> -@@ -427,6 +428,8 @@ - struct ifnet *ifp = pThis->u.s.ifp; - unsigned int cSegs = 0; - bool fDropIt = false, fActive; -+ bool is_vl_tagged = false; -+ uint16_t vl_tag; - PINTNETSG pSG; - - VBOXCURVNET_SET(ifp->if_vnet); -@@ -439,6 +442,19 @@ - if (m == NULL) - break; - -+ /* Prepend a VLAN header for consumption by the virtual switch */ -+ if (m->m_flags & M_VLANTAG) { -+ vl_tag = m->m_pkthdr.ether_vtag; -+ is_vl_tagged = true; -+ -+ m = ether_vlanencap(m, m->m_pkthdr.ether_vtag); -+ if (m == NULL) { -+ printf("vboxflt: unable to prepend VLAN header\n"); -+ break; -+ } -+ m->m_flags &= ~M_VLANTAG; -+ } -+ - for (m0 = m; m0 != NULL; m0 = m0->m_next) - if (m0->m_len > 0) - cSegs++; -@@ -453,6 +469,27 @@ - vboxNetFltFreeBSDMBufToSG(pThis, m, pSG, cSegs, 0); - fDropIt = pThis->pSwitchPort->pfnRecv(pThis->pSwitchPort, NULL /* pvIf */, pSG, INTNETTRUNKDIR_WIRE); - RTMemTmpFree(pSG); -+ -+ /* Restore the VLAN flags before re-injecting the packet */ -+ if (is_vl_tagged && !fDropIt) { -+ struct ether_vlan_header *vl_hdr; -+ -+ /* This shouldn't fail, as the header was just prepended */ -+ if (m->m_len < sizeof(*vl_hdr) && (m = m_pullup(m, sizeof(*vl_hdr))) == NULL) { -+ printf("vboxflt: unable to pullup VLAN header\n"); -+ m_freem(m); -+ break; -+ } -+ -+ /* Copy the MAC dhost/shost over the 802.1q field */ -+ vl_hdr = mtod(m, struct ether_vlan_header *); -+ bcopy((char *)vl_hdr, (char *)vl_hdr + ETHER_VLAN_ENCAP_LEN, ETHER_HDR_LEN - ETHER_TYPE_LEN); -+ m_adj(m, ETHER_VLAN_ENCAP_LEN); -+ -+ m->m_pkthdr.ether_vtag = vl_tag; -+ m->m_flags |= M_VLANTAG; -+ } -+ - if (fDropIt) - m_freem(m); - else diff --git a/emulators/virtualbox-ose-kmod-legacy/files/patch-src-VBox-Runtime-r0drv-freebsd-alloc-r0drv-freebsd.c b/emulators/virtualbox-ose-kmod-legacy/files/patch-src-VBox-Runtime-r0drv-freebsd-alloc-r0drv-freebsd.c deleted file mode 100644 index f8b9743c21c8..000000000000 --- a/emulators/virtualbox-ose-kmod-legacy/files/patch-src-VBox-Runtime-r0drv-freebsd-alloc-r0drv-freebsd.c +++ /dev/null @@ -1,16 +0,0 @@ ---- src/VBox/Runtime/r0drv/freebsd/alloc-r0drv-freebsd.c 2013-09-06 06:30:30.000000000 -0600 -+++ src/VBox/Runtime/r0drv/freebsd/alloc-r0drv-freebsd.c 2013-09-18 12:01:45.000000000 -0600 -@@ -79,8 +79,13 @@ - return VERR_NO_EXEC_MEMORY; - - /* Addr contains a start address vm_map_find will start searching for suitable space at. */ -+#if __FreeBSD_version >= 1000055 -+ int rc = vm_map_find(kernel_map, pVmObject, 0, &Addr, -+ cbAllocated, 0, VMFS_ANY_SPACE, VM_PROT_ALL, VM_PROT_ALL, 0); -+#else - int rc = vm_map_find(kernel_map, pVmObject, 0, &Addr, - cbAllocated, TRUE, VM_PROT_ALL, VM_PROT_ALL, 0); -+#endif - if (rc == KERN_SUCCESS) - { - rc = vm_map_wire(kernel_map, Addr, Addr + cbAllocated, 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 deleted file mode 100644 index b666b7ed0362..000000000000 --- a/emulators/virtualbox-ose-kmod-legacy/files/patch-src-VBox-Runtime-r0drv-freebsd-memobj-r0drv-freebsd.c +++ /dev/null @@ -1,56 +0,0 @@ -From Alan L. Cox on FreeBSD-current: - - I just glanced at the virtualbox code for a couple minutes. For - FreeBSD 9 and 10, these lock acquires are completely unnecessary, and - have been since FreeBSD 9.0. Just delete them. They may be equally - unnecessary under FreeBSD 8, but I didn't look carefully enough to - answer that question. - -[1] http://lists.freebsd.org/pipermail/freebsd-current/2012-November/037963.html ---- - src/VBox/Runtime/r0drv/freebsd/memobj-r0drv-freebsd.c | 9 +++++++++ - 1 file changed, 9 insertions(+) - -diff --git a/src/VBox/Runtime/r0drv/freebsd/memobj-r0drv-freebsd.c b/src/VBox/Runtime/r0drv/freebsd/memobj-r0drv-freebsd.c -index 5c90cf3..1176b51 100644 ---- src/VBox/Runtime/r0drv/freebsd/memobj-r0drv-freebsd.c -+++ src/VBox/Runtime/r0drv/freebsd/memobj-r0drv-freebsd.c -@@ -164,14 +164,19 @@ DECLHIDDEN(int) rtR0MemObjNativeFree(RTR0MEMOBJ pMem) - { - VM_OBJECT_LOCK(pMemFreeBSD->pObject); - vm_page_t pPage = vm_page_find_least(pMemFreeBSD->pObject, 0); -+#if __FreeBSD_version < 900000 -+ /* See http://lists.freebsd.org/pipermail/freebsd-current/2012-November/037963.html */ - vm_page_lock_queues(); -+#endif - for (vm_page_t pPage = vm_page_find_least(pMemFreeBSD->pObject, 0); - pPage != NULL; - pPage = vm_page_next(pPage)) - { - vm_page_unwire(pPage, 0); - } -+#if __FreeBSD_version < 900000 - vm_page_unlock_queues(); -+#endif - VM_OBJECT_UNLOCK(pMemFreeBSD->pObject); - vm_object_deallocate(pMemFreeBSD->pObject); - break; -@@ -263,11 +268,15 @@ static int rtR0MemObjFreeBSDPhysAllocHelper(vm_object_t pObject, u_long cPages, - while (iPage-- > 0) - { - pPage = vm_page_lookup(pObject, iPage); -+#if __FreeBSD_version < 900000 - vm_page_lock_queues(); -+#endif - if (fWire) - vm_page_unwire(pPage, 0); - vm_page_free(pPage); -+#if __FreeBSD_version < 900000 - vm_page_unlock_queues(); -+#endif - } - VM_OBJECT_UNLOCK(pObject); - return rcNoMem; --- -1.7.11.5 - diff --git a/emulators/virtualbox-ose-kmod-legacy/files/patch-src-VBox-Runtime-r0drv-freebsd-memobj-r0drv-freebsd_VM_MAP_FIND.c b/emulators/virtualbox-ose-kmod-legacy/files/patch-src-VBox-Runtime-r0drv-freebsd-memobj-r0drv-freebsd_VM_MAP_FIND.c deleted file mode 100644 index 6dfe0b99208e..000000000000 --- a/emulators/virtualbox-ose-kmod-legacy/files/patch-src-VBox-Runtime-r0drv-freebsd-memobj-r0drv-freebsd_VM_MAP_FIND.c +++ /dev/null @@ -1,48 +0,0 @@ ---- src/VBox/Runtime/r0drv/freebsd/memobj-r0drv-freebsd.c.orig 2013-09-06 12:30:30.000000000 +0000 -+++ src/VBox/Runtime/r0drv/freebsd/memobj-r0drv-freebsd.c 2013-09-21 18:12:53.000000000 +0000 -@@ -286,9 +286,15 @@ - pMemFreeBSD->pObject = vm_object_allocate(OBJT_PHYS, cPages); - - /* No additional object reference for auto-deallocation upon unmapping. */ -+#if __FreeBSD_version >= 1000055 -+ rc = vm_map_find(kernel_map, pMemFreeBSD->pObject, 0, -+ &MapAddress, pMemFreeBSD->Core.cb, 0, VMFS_ANY_SPACE, -+ fExecutable ? VM_PROT_ALL : VM_PROT_RW, VM_PROT_ALL, 0); -+#else - rc = vm_map_find(kernel_map, pMemFreeBSD->pObject, 0, - &MapAddress, pMemFreeBSD->Core.cb, VMFS_ANY_SPACE, - fExecutable ? VM_PROT_ALL : VM_PROT_RW, VM_PROT_ALL, 0); -+#endif - - if (rc == KERN_SUCCESS) - { -@@ -551,6 +557,9 @@ - 0, /* offset */ - &MapAddress, /* addr (IN/OUT) */ - cb, /* length */ -+#if __FreeBSD_version >= 1000055 -+ 0, /* max addr */ -+#endif - pvFixed == (void *)-1 ? VMFS_ANY_SPACE : VMFS_NO_SPACE, - /* find_space */ - VM_PROT_NONE, /* protection */ -@@ -628,6 +637,9 @@ - offSub, /* Start offset in the object */ - &Addr, /* Start address IN/OUT */ - cbSub, /* Size of the mapping */ -+#if __FreeBSD_version >= 1000055 -+ 0, /* Upper bound of mapping */ -+#endif - VMFS_ANY_SPACE, /* Whether a suitable address should be searched for first */ - ProtectionFlags, /* protection flags */ - VM_PROT_ALL, /* Maximum protection flags */ -@@ -704,6 +716,9 @@ - 0, /* Start offset in the object */ - &AddrR3, /* Start address IN/OUT */ - pMemToMap->cb, /* Size of the mapping */ -+#if __FreeBSD_version >= 1000055 -+ 0, /* Upper bound of the mapping */ -+#endif - R3PtrFixed == (RTR3PTR)-1 ? VMFS_ANY_SPACE : VMFS_NO_SPACE, - /* Whether a suitable address should be searched for first */ - ProtectionFlags, /* protection flags */ diff --git a/emulators/virtualbox-ose-kmod-legacy/files/patch-src-VBox-Runtime-r0drv-freebsd-memobj-r0drv-freebsd_VM_OBJECT_RENAME.c b/emulators/virtualbox-ose-kmod-legacy/files/patch-src-VBox-Runtime-r0drv-freebsd-memobj-r0drv-freebsd_VM_OBJECT_RENAME.c deleted file mode 100644 index 103f0f45cb19..000000000000 --- a/emulators/virtualbox-ose-kmod-legacy/files/patch-src-VBox-Runtime-r0drv-freebsd-memobj-r0drv-freebsd_VM_OBJECT_RENAME.c +++ /dev/null @@ -1,115 +0,0 @@ -$FreeBSD$ - ---- src/VBox/Runtime/r0drv/freebsd/memobj-r0drv-freebsd.c.orig 2014-03-14 17:25:46.000000000 -0400 -+++ src/VBox/Runtime/r0drv/freebsd/memobj-r0drv-freebsd.c 2014-03-14 17:34:35.000000000 -0400 -@@ -162,7 +162,11 @@ - case RTR0MEMOBJTYPE_PHYS: - case RTR0MEMOBJTYPE_PHYS_NC: - { -+#if __FreeBSD_version >= 1000030 -+ VM_OBJECT_WLOCK(pMemFreeBSD->pObject); -+#else - VM_OBJECT_LOCK(pMemFreeBSD->pObject); -+#endif - vm_page_t pPage = vm_page_find_least(pMemFreeBSD->pObject, 0); - #if __FreeBSD_version < 900000 - /* See http://lists.freebsd.org/pipermail/freebsd-current/2012-November/037963.html */ -@@ -177,7 +181,11 @@ - #if __FreeBSD_version < 900000 - vm_page_unlock_queues(); - #endif -+#if __FreeBSD_version >= 1000030 -+ VM_OBJECT_WUNLOCK(pMemFreeBSD->pObject); -+#else - VM_OBJECT_UNLOCK(pMemFreeBSD->pObject); -+#endif - vm_object_deallocate(pMemFreeBSD->pObject); - break; - } -@@ -198,17 +206,25 @@ - vm_page_t pPages; - int cTries = 0; - --#if __FreeBSD_version > 1000000 -+#if __FreeBSD_version >= 902508 - int fFlags = VM_ALLOC_INTERRUPT | VM_ALLOC_NOBUSY; - if (fWire) - fFlags |= VM_ALLOC_WIRED; - - while (cTries <= 1) - { -+#if __FreeBSD_version >= 1000030 -+ VM_OBJECT_WLOCK(pObject); -+#else - VM_OBJECT_LOCK(pObject); -+#endif - pPages = vm_page_alloc_contig(pObject, iPIndex, fFlags, cPages, 0, - VmPhysAddrHigh, uAlignment, 0, VM_MEMATTR_DEFAULT); -+#if __FreeBSD_version >= 1000030 -+ VM_OBJECT_WUNLOCK(pObject); -+#else - VM_OBJECT_UNLOCK(pObject); -+#endif - if (pPages) - break; - vm_pageout_grow_cache(cTries, 0, VmPhysAddrHigh); -@@ -264,7 +280,11 @@ - if (!pPage) - { - /* Free all allocated pages */ -+#if __FreeBSD_version >= 1000030 -+ VM_OBJECT_WLOCK(pObject); -+#else - VM_OBJECT_LOCK(pObject); -+#endif - while (iPage-- > 0) - { - pPage = vm_page_lookup(pObject, iPage); -@@ -278,7 +298,11 @@ - vm_page_unlock_queues(); - #endif - } -+#if __FreeBSD_version >= 1000030 -+ VM_OBJECT_WUNLOCK(pObject); -+#else - VM_OBJECT_UNLOCK(pObject); -+#endif - return rcNoMem; - } - } -@@ -417,9 +441,17 @@ - if (fContiguous) - { - Assert(enmType == RTR0MEMOBJTYPE_PHYS); -+#if __FreeBSD_version >= 1000030 -+ VM_OBJECT_WLOCK(pMemFreeBSD->pObject); -+#else - VM_OBJECT_LOCK(pMemFreeBSD->pObject); -+#endif - pMemFreeBSD->Core.u.Phys.PhysBase = VM_PAGE_TO_PHYS(vm_page_find_least(pMemFreeBSD->pObject, 0)); -+#if __FreeBSD_version >= 1000030 -+ VM_OBJECT_WUNLOCK(pMemFreeBSD->pObject); -+#else - VM_OBJECT_UNLOCK(pMemFreeBSD->pObject); -+#endif - pMemFreeBSD->Core.u.Phys.fAllocated = true; - } - -@@ -838,9 +870,17 @@ - case RTR0MEMOBJTYPE_PHYS_NC: - { - RTHCPHYS addr; -+#if __FreeBSD_version >= 1000030 -+ VM_OBJECT_WLOCK(pMemFreeBSD->pObject); -+#else - VM_OBJECT_LOCK(pMemFreeBSD->pObject); -+#endif - addr = VM_PAGE_TO_PHYS(vm_page_lookup(pMemFreeBSD->pObject, iPage)); -+#if __FreeBSD_version >= 1000030 -+ VM_OBJECT_WUNLOCK(pMemFreeBSD->pObject); -+#else - VM_OBJECT_UNLOCK(pMemFreeBSD->pObject); -+#endif - return addr; - } - diff --git a/emulators/virtualbox-ose-kmod-legacy/files/patch-src-VBox-Runtime-r0drv-freebsd-memobj-r0drv-freebsd_VM_PAGEOUT_GROW_CACHE.c b/emulators/virtualbox-ose-kmod-legacy/files/patch-src-VBox-Runtime-r0drv-freebsd-memobj-r0drv-freebsd_VM_PAGEOUT_GROW_CACHE.c deleted file mode 100644 index 95dc2fcc27d5..000000000000 --- a/emulators/virtualbox-ose-kmod-legacy/files/patch-src-VBox-Runtime-r0drv-freebsd-memobj-r0drv-freebsd_VM_PAGEOUT_GROW_CACHE.c +++ /dev/null @@ -1,37 +0,0 @@ ---- src/VBox/Runtime/r0drv/freebsd/memobj-r0drv-freebsd.c.orig 2014-03-17 14:08:04.000000000 -0400 -+++ src/VBox/Runtime/r0drv/freebsd/memobj-r0drv-freebsd.c 2014-03-17 14:09:34.000000000 -0400 -@@ -211,7 +211,7 @@ - if (fWire) - fFlags |= VM_ALLOC_WIRED; - -- while (cTries <= 1) -+ while (1) - { - #if __FreeBSD_version >= 1000030 - VM_OBJECT_WLOCK(pObject); -@@ -225,18 +225,22 @@ - #else - VM_OBJECT_UNLOCK(pObject); - #endif -- if (pPages) -+ if (pPages || cTries >= 1) - break; -+#if __FreeBSD_version >= 1000015 - vm_pageout_grow_cache(cTries, 0, VmPhysAddrHigh); -+#else -+ vm_contig_grow_cache(cTries, 0, VmPhysAddrHigh); -+#endif - cTries++; - } - - return pPages; - #else -- while (cTries <= 1) -+ while (1) - { - pPages = vm_phys_alloc_contig(cPages, 0, VmPhysAddrHigh, uAlignment, 0); -- if (pPages) -+ if (pPages || cTries >= 1) - break; - vm_contig_grow_cache(cTries, 0, VmPhysAddrHigh); - cTries++; diff --git a/emulators/virtualbox-ose-kmod-legacy/files/patch-src-VBox-Runtime-r0drv-freebsd-sleepqueue-r0drv-freebsd.h b/emulators/virtualbox-ose-kmod-legacy/files/patch-src-VBox-Runtime-r0drv-freebsd-sleepqueue-r0drv-freebsd.h deleted file mode 100644 index e1ae4d7ea855..000000000000 --- a/emulators/virtualbox-ose-kmod-legacy/files/patch-src-VBox-Runtime-r0drv-freebsd-sleepqueue-r0drv-freebsd.h +++ /dev/null @@ -1,20 +0,0 @@ -Without this patch any waits for periods shorter than a single tick return -immediately leading to a lot of unnecessary spinning. For example, I observe that -my guest's idle loop does a lot of sleeps with periods slightly shorter than 1 ms -(1/hz), e.g. 900us. All that waiting turns into pure spinning and VirtualBox eats -100% of a core. -The patch improves the situation significantly. Also, it (approximately) follows -what tvtohz does. - -Submitted by: Andriy Gapon <avg@FreeBSD.org> ---- src/VBox/Runtime/r0drv/freebsd/sleepqueue-r0drv-freebsd.h.orig 2012-12-19 19:27:29.000000000 +0100 -+++ src/VBox/Runtime/r0drv/freebsd/sleepqueue-r0drv-freebsd.h 2012-12-20 12:07:48.941861966 +0100 -@@ -82,6 +82,8 @@ - uint64_t cTicks = ASMMultU64ByU32DivByU32(uTimeout, hz, UINT32_C(1000000000)); - if (cTicks >= INT_MAX) - return RTSEMWAIT_FLAGS_INDEFINITE; -+ else if (cTicks == 0 && uTimeout > 0) -+ pWait->iTimeout = 1; - else - pWait->iTimeout = (int)cTicks; - #endif diff --git a/emulators/virtualbox-ose-kmod-legacy/files/patch-src-VBox-Runtime-r0drv-freebsd-the-freebsd-kernel.h b/emulators/virtualbox-ose-kmod-legacy/files/patch-src-VBox-Runtime-r0drv-freebsd-the-freebsd-kernel.h deleted file mode 100644 index 24acae278364..000000000000 --- a/emulators/virtualbox-ose-kmod-legacy/files/patch-src-VBox-Runtime-r0drv-freebsd-the-freebsd-kernel.h +++ /dev/null @@ -1,14 +0,0 @@ -$FreeBSD$ - ---- src/VBox/Runtime/r0drv/freebsd/the-freebsd-kernel.h 2012-12-19 10:27:29.000000000 -0800 -+++ src/VBox/Runtime/r0drv/freebsd/the-freebsd-kernel.h 2013-03-20 19:10:15.854804053 -0700 -@@ -50,6 +50,9 @@ - #include <sys/unistd.h> - #include <sys/kthread.h> - #include <sys/lock.h> -+#if __FreeBSD_version >= 1000030 -+#include <sys/rwlock.h> -+#endif - #include <sys/mutex.h> - #include <sys/sched.h> - #include <sys/callout.h> diff --git a/emulators/virtualbox-ose-kmod-legacy/files/vboxnet.in b/emulators/virtualbox-ose-kmod-legacy/files/vboxnet.in deleted file mode 100644 index 073ee3764176..000000000000 --- a/emulators/virtualbox-ose-kmod-legacy/files/vboxnet.in +++ /dev/null @@ -1,73 +0,0 @@ -#!/bin/sh -# -# $FreeBSD$ -# - -# PROVIDE: vboxnet -# REQUIRE: FILESYSTEMS NETWORKING ldconfig -# KEYWORD: nojail - -# -# Add the following lines to /etc/rc.conf.local or /etc/rc.conf -# to enable this service: -# -# vboxnet_enable (bool): Set to NO by default. -# Set it to YES to load network related kernel modules on startup - -. /etc/rc.subr - -name="vboxnet" -rcvar=vboxnet_enable -start_cmd="vboxnet_start" -stop_cmd="vboxnet_stop" - -vboxnet_start() -{ - if ! kldstat -q -m ng_vboxnetflt; - then - if ! kldload vboxnetflt > /dev/null 2>&1; - then - warn "Can't load vboxnetflt module." - return 1 - fi - fi - - if ! kldstat -q -m vboxnetadp; - then - if ! kldload vboxnetadp > /dev/null 2>&1; - then - warn "Can't load vboxnetadp module." - return 1 - fi - fi - - # initialize configured host-only interfaces - %%PREFIX%%/bin/VBoxManage list hostonlyifs >/dev/null -} - -vboxnet_stop() -{ - if kldstat -q -m vboxnetadp; - then - if ! kldunload vboxnetadp > /dev/null 2>&1; - then - warn "Can't unload vboxnetadp module." - return 1 - fi - fi - - if kldstat -q -m ng_vboxnetflt; - then - if ! kldunload vboxnetflt > /dev/null 2>&1; - then - warn "Can't unload vboxnetflt module." - return 1 - fi - fi -} - -load_rc_config $name - -: ${vboxnet_enable="NO"} - -run_rc_command "$1" diff --git a/emulators/virtualbox-ose-kmod-legacy/pkg-descr b/emulators/virtualbox-ose-kmod-legacy/pkg-descr deleted file mode 100644 index d10019c03792..000000000000 --- a/emulators/virtualbox-ose-kmod-legacy/pkg-descr +++ /dev/null @@ -1,7 +0,0 @@ -VirtualBox is a family of powerful x86 virtualization products for -enterprise as well as home use. Not only is VirtualBox an extremely -feature rich, high performance product for enterprise customers, it -is also the only professional solution that is freely available as -Open Source Software under the terms of the GNU General Public License. - -WWW: http://www.virtualbox.org/ diff --git a/emulators/virtualbox-ose-kmod-legacy/pkg-plist b/emulators/virtualbox-ose-kmod-legacy/pkg-plist deleted file mode 100644 index 50d6e52825bb..000000000000 --- a/emulators/virtualbox-ose-kmod-legacy/pkg-plist +++ /dev/null @@ -1,7 +0,0 @@ -@cwd / -%%KMODDIR%%/vboxdrv.ko -%%WITH_DEBUG%%%%KMODDIR%%/vboxdrv.ko.symbols -%%KMODDIR%%/vboxnetadp.ko -%%WITH_DEBUG%%%%KMODDIR%%/vboxnetadp.ko.symbols -%%KMODDIR%%/vboxnetflt.ko -%%WITH_DEBUG%%%%KMODDIR%%/vboxnetflt.ko.symbols |