From owner-freebsd-current@FreeBSD.ORG Sat Jul 21 15:59:20 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A02CD106566C for ; Sat, 21 Jul 2012 15:59:20 +0000 (UTC) (envelope-from jamesbrandongooch@gmail.com) Received: from mail-ob0-f182.google.com (mail-ob0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id 27F1A8FC18 for ; Sat, 21 Jul 2012 15:59:20 +0000 (UTC) Received: by obbun3 with SMTP id un3so8606905obb.13 for ; Sat, 21 Jul 2012 08:59:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=3VYWAg9bes3QUPYJqa1IJ/f49rf/k9CnkyAtOA0Gzfw=; b=OmCIHqZI2fige6ZJYYz8G+blXBoBML8+P3PyayjHomgIM5TVKMso3llzvb5AaGAlR4 FOPJFuVQ9io7vTJ7mgbXKyIg3HnTSOp/yzs43cZBaznNqmJRPJpUgMm8vkurJ/af/OMv 4O19zGVs0FiSlz61DSYRGucicADJQzNGJiB6PbvF3sCOeb/LjDXtwG+amxG80zWt4Xhx wEdyTbHE78pB94Jeax2pv6rUQeZC1S95bi2765AiFjb3XqAyY9Irwm7h/cYiguU1/9a0 RDpjipzQz6BbGB0ITEv+HDZY+rMcdgWfsyCgJN0sY4nEZHrmD9+qoadpjI0rCZE6Bkzv NT1Q== MIME-Version: 1.0 Received: by 10.182.131.98 with SMTP id ol2mr12550430obb.69.1342886359549; Sat, 21 Jul 2012 08:59:19 -0700 (PDT) Received: by 10.60.61.38 with HTTP; Sat, 21 Jul 2012 08:59:19 -0700 (PDT) In-Reply-To: <500AC68D.70501@zedat.fu-berlin.de> References: <500AC258.3030508@zedat.fu-berlin.de> <500AC68D.70501@zedat.fu-berlin.de> Date: Sat, 21 Jul 2012 10:59:19 -0500 Message-ID: From: Brandon Gooch To: "O. Hartmann" Content-Type: text/plain; charset=ISO-8859-1 Cc: Current FreeBSD Subject: Re: kldload: can't load /boot/modules/vboxdrv.ko: Exec format error X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Jul 2012 15:59:20 -0000 On Sat, Jul 21, 2012 at 10:11 AM, O. Hartmann wrote: > On 07/21/12 16:53, O. Hartmann wrote: >> On FreeBSD 10.0-CURRENT #1 r238671: Sat Jul 21 16:21:32 CEST 2012 >> (/usr/src recently update, is at Revision: 238672), VirtualBox seems to >> be broken: >> >> kldload: can't load /boot/modules/vboxdrv.ko: Exec format error >> >> When both buildworld and kernel as well as /usr/src itself were at >> Revision: 238671, I did a build of the whole port >> /emulators/virtual-box-ose[-kmod] to prevent the vboxdrv.ko kernel >> module located in /boot/modules/ and its siblings being in sync with >> /usr/src. >> >> But it doesn't work. I searched the net and I only found hints of the >> form that both, /usr/src and the last time the module >> /emulators/virtual-box-ose-kmod has been build are out of sync. This is >> not the case in my case. >> >> VirtualBox is at version 4.1.18. >> >> What is wrong? Am I wrong and repeating an error over and over again? >> >> Regards, >> Oliver >> > > I found this in the message log: > > Jul 21 16:41:37 <0.2> thor kernel: link_elf_obj: symbol > vm_contig_grow_cache undefined > Jul 21 16:41:37 <0.2> thor kernel: KLD file vboxdrv.ko - could not > finalize loading > The function vm_contig_grow_cache was renamed: http://svnweb.freebsd.org/base?view=revision&revision=238561 Apply the following patch in ports/emulators/virtualbox-ose-kmod/files, then rebuild the kmod: Index: patch-src-VBox-Runtime-r0drv-freebsd-memobj-r0drv-freebsd.c =================================================================== --- patch-src-VBox-Runtime-r0drv-freebsd-memobj-r0drv-freebsd.c (revision 301265) +++ patch-src-VBox-Runtime-r0drv-freebsd-memobj-r0drv-freebsd.c (working copy) @@ -149,7 +149,7 @@ + VM_OBJECT_UNLOCK(pObject); + if (pPages || tries >= 1) + break; -+ vm_contig_grow_cache(tries, 0, VmPhysAddrHigh); ++ vm_pageout_grow_cache(tries, 0, VmPhysAddrHigh); + tries++; + } + return pPages; @@ -176,7 +176,7 @@ + pPages = vm_phys_alloc_contig(cPages, 0, VmPhysAddrHigh, uAlignment, 0); + if (pPages || tries >= 1) + break; -+ vm_contig_grow_cache(tries, 0, VmPhysAddrHigh); ++ vm_pageout_grow_cache(tries, 0, VmPhysAddrHigh); + tries++; + } + if (!pPages) Let us know if it works. -Brandon