Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 21 Jul 2012 18:56:21 +0200
From:      "O. Hartmann" <ohartman@zedat.fu-berlin.de>
To:        Brandon Gooch <jamesbrandongooch@gmail.com>
Cc:        Current FreeBSD <freebsd-current@freebsd.org>
Subject:   Re: kldload: can't load /boot/modules/vboxdrv.ko: Exec format error
Message-ID:  <500ADF35.1010603@zedat.fu-berlin.de>
In-Reply-To: <CALBk6y%2Bba9iWdEVOG19rhknhdzEiFUpsWYt07EOqyNBjWmEO5g@mail.gmail.com>
References:  <500AC258.3030508@zedat.fu-berlin.de> <500AC68D.70501@zedat.fu-berlin.de> <CALBk6y%2Bba9iWdEVOG19rhknhdzEiFUpsWYt07EOqyNBjWmEO5g@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enigA339E3AAE45B749882609C06
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

On 07/21/12 17:59, Brandon Gooch wrote:
> On Sat, Jul 21, 2012 at 10:11 AM, O. Hartmann
> <ohartman@zedat.fu-berlin.de> 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
>>
>=20
> The function vm_contig_grow_cache was renamed:
>=20
> http://svnweb.freebsd.org/base?view=3Drevision&revision=3D238561
>=20
> Apply the following patch in
> ports/emulators/virtualbox-ose-kmod/files, then rebuild the kmod:
>=20
> Index: patch-src-VBox-Runtime-r0drv-freebsd-memobj-r0drv-freebsd.c
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> --- patch-src-VBox-Runtime-r0drv-freebsd-memobj-r0drv-freebsd.c
> (revision 301265)
> +++ patch-src-VBox-Runtime-r0drv-freebsd-memobj-r0drv-freebsd.c (workin=
g copy)
> @@ -149,7 +149,7 @@
>  +        VM_OBJECT_UNLOCK(pObject);
>  +        if (pPages || tries >=3D 1)
>  +            break;
> -+        vm_contig_grow_cache(tries, 0, VmPhysAddrHigh);
> ++        vm_pageout_grow_cache(tries, 0, VmPhysAddrHigh);
>  +        tries++;
>  +    }
>  +    return pPages;
> @@ -176,7 +176,7 @@
>  +        pPages =3D vm_phys_alloc_contig(cPages, 0, VmPhysAddrHigh,
> uAlignment, 0);
>  +        if (pPages || tries >=3D 1)
>  +            break;
> -+        vm_contig_grow_cache(tries, 0, VmPhysAddrHigh);
> ++        vm_pageout_grow_cache(tries, 0, VmPhysAddrHigh);
>  +        tries++;
>  +    }
>  +    if (!pPages)
>=20
> Let us know if it works.
>=20
> -Brandon
>=20


Patch applied and it seems to work (I guess it works when I'm able to
start Windows 7 sucessfully?) ...

Thank you very much and in hope that the pacth makes it into the ports,

regsrds,
Oliver



--------------enigA339E3AAE45B749882609C06
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (FreeBSD)

iQEcBAEBAgAGBQJQCt89AAoJEOgBcD7A/5N8vOYH/3iwsEWb4nsZz0AXAyQwQ8Pu
QGvSdCFAlDDon+PGODvobYmBs88HwOcZZwqPew0Pyo/Aqr7yBkhp4VfirpzKXW93
LxSW/YMbqCHWFf73pMQJP2fjWF/BxiyihgK+LZkl2XE4Bcp1JQCyfEb5enHeizxL
9L3wWfsDl9rnJQOxbKnBDTNODqy0eHjxrna+5M0wUmaNGkGf1r1Foc2ZlWNch9gY
pl4WVQKU2lcYcdks5LyN8FhNdrMaxEqXYDngi92absoRNWASXSNT1XjddYjxyRKq
usC3W4pIlNOHKLVurMXi5lV0/t72g0RhHq5PLnMJb//4IBHn9WQxArVAdV3xL88=
=QANL
-----END PGP SIGNATURE-----

--------------enigA339E3AAE45B749882609C06--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?500ADF35.1010603>