Port-amd64 archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
VirtualBOX additions (again)
Hi,
Just for information, a year after the first attempt I managed again
to build VirtualBox v6.0 additions on -current (from today). I used
stock pkgsrc kbuild and yasm, following some of the points in
https://mail-index.netbsd.org/port-amd64/2017/11/18/msg002614.html
thread, with not many problems along the way, e.g. I had to:
--------
--- /home/xci/Projects/VirtualBox-6.0.0/src/VBox/Additions/common/VBoxGuest/VBoxGuest-netbsd.c.ORIG
2018-12-21 15:55:22.810988966 +0000
+++ /home/xci/Projects/VirtualBox-6.0.0/src/VBox/Additions/common/VBoxGuest/VBoxGuest-netbsd.c
2018-12-21 16:03:18.710341956 +0000
@@ -646,12 +646,12 @@
int rc;
struct kauth_cred *pCred = pLwp->l_cred;
uint32_t fRequestor = VMMDEV_REQUESTOR_USERMODE |
VMMDEV_REQUESTOR_TRUST_NOT_GIVEN;
- if (pCred && kauth_cred_geteuid(pCred) == 0)
+ if (pCred)
fRequestor |= VMMDEV_REQUESTOR_USR_ROOT;
else
fRequestor |= VMMDEV_REQUESTOR_USR_USER;
- if (pCred && kauth_cred_ismember_gid(pCred, 0))
+ if (pCred)
fRequestor |= VMMDEV_REQUESTOR_GRP_WHEEL;
fRequestor |= VMMDEV_REQUESTOR_NO_USER_DEVICE; /** @todo
implement /dev/vboxuser
if (!fUnrestricted)
@@ -671,7 +671,7 @@
kmem_free(fdata, sizeof(*fdata));
}
else
- error = NOMEM;
+ error = ENOMEM;
return error;
}
------
(no /usr/include/sys/kauth.h, no idea if this is right but seems to be working),
then get rid of a reference to openssl-1.1.0 .kmk file. which is absent:
------
--- ./src/libs/Makefile.kmk.ORIG 2018-12-21 15:24:33.621860040 +0000
+++ ./src/libs/Makefile.kmk 2018-12-21 15:24:51.010191378 +0000
@@ -50,14 +50,6 @@
include $(PATH_SUB_CURRENT)/curl-7.62.0/Makefile.kmk
endif
-# OpenSSL.
-if !defined(VBOX_ONLY_SDK) \
- && (!defined(VBOX_ONLY_ADDITIONS) ||
!defined(VBOX_ONLY_ADDITIONS_WITHOUT_RTISOMAKER)) \
- && (!defined(VBOX_ONLY_EXTPACKS) ||
defined(VBOX_NEED_EXTPACK_OPENSSL) ||
!defined(VBOX_ONLY_EXTPACKS_USE_IMPLIBS)) \
- && ("$(SDK_VBOX_OPENSSL_INCS)" ==
"$(SDK_VBOX_OPENSSL_VBOX_DEFAULT_INCS)" ||
defined(VBOX_NEED_EXTPACK_OPENSSL))
- include $(PATH_SUB_CURRENT)/openssl-1.1.0j/Makefile.kmk
-endif
-
# libjpeg for VRDP video redirection and ExtPack's DrvHostWebcam
if (defined(VBOX_WITH_VRDP) || defined(VBOX_WITH_EXTPACK_PUEL)) \
&& !defined(VBOX_ONLY_ADDITIONS)
-----
then for some reason at one place it could not find <sys/stdint.h>, so I
-----
--- ./include/iprt/stdint.h.ORIG 2018-12-21 15:36:28.007331099 +0000
+++ ./include/iprt/stdint.h 2018-12-21 15:36:53.959233854 +0000
@@ -88,7 +88,7 @@
# ifndef __STDC_LIMIT_MACROS
# define __STDC_LIMIT_MACROS
# endif
-# include <sys/stdint.h>
+# include "/usr/include/sys/stdint.h"
#else /* No system stdint.h */
---------
For some reason it didn't build first time vboxmouse drivers at all,
so I had to cd to ./src/VBox/Additions/x11/vboxmouse and run kmk
there; it still didn't build the 118 version of ot, so I had to apply
the patch described in the above thread:
-------
--- Makefile.kmk.ORIG 2018-12-21 21:14:43.232249286 +0000
+++ Makefile.kmk 2018-12-21 20:10:52.966897608 +0000
@@ -226,6 +226,17 @@
# XXX: should switch to the kernel driver but for now provide the
# driver for X.Org 1.18 in NetBSD-8
+DLLS += vboxmouse_drv_118
+vboxmouse_drv_118_TEMPLATE = VBOXGUESTR3XORGMOD
+vboxmouse_drv_118_DEFS := $(vboxmouse_drv_70_DEFS) NO_ANSIC
+vboxmouse_drv_118_INCS := \
+ $(vboxmouse_xorg_INCS) \
+ $(VBOX_PATH_X11_ROOT)/xorg-server-1.18.0 \
+ $(PATH_SUB_CURRENT)
+vboxmouse_drv_118_SOURCES = \
+ vboxmouse.c
+
+
endif # neq ($(KBUILD_TARGET),linux)
-------
Next I'll do it on a fresh NetBSD 8.0 system for comparison.
Chavdar Ivanov
--
----
Home |
Main Index |
Thread Index |
Old Index