Changeset 7517 in vbox
- Timestamp:
- Mar 22, 2008 11:15:44 PM (17 years ago)
- svn:sync-xref-src-repo-rev:
- 28986
- Location:
- trunk
- Files:
-
- 17 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/VBoxGuest.h
r7464 r7517 67 67 /** device name */ 68 68 # define VBOXGUEST_DEVICE_NAME_DOS L"\\DosDevices\\VBoxGuest" 69 70 #elif defined(RT_OS_FREEBSD) 71 /** The support device name. */ 72 # define VBOXGUEST_DEVICE_NAME "/dev/vboxguest" 69 73 70 74 #else … … 1015 1019 # define VBOXGUEST_IOCTL_STRIP_SIZE(Code) VBOXGUEST_IOCTL_CODE(_IOC_NR((Code)), 0) 1016 1020 1017 #elif 0 /* BSD style - needs some adjusting since _IORW takes a type and not a size. */1021 #elif defined(RT_OS_FREEBSD) 1018 1022 # include <sys/ioccom.h> 1019 # define VBOXGUEST_IOCTL_CODE(Function, Size) _IORW('V', (Function) | VBOXGUEST_IOCTL_FLAG, (Size)) 1023 1024 # define VBOXGUEST_IOCTL_CODE(Function, Size) _IOWR('V', (Function) | VBOXGUEST_IOCTL_FLAG, VBGLBIGREQ) 1020 1025 # define VBOXGUEST_IOCTL_CODE_FAST(Function) _IO( 'V', (Function) | VBOXGUEST_IOCTL_FLAG) 1021 1026 # define VBOXGUEST_IOCTL_STRIP_SIZE(Code) IOCBASECMD(Code) -
trunk/src/VBox/Additions/Makefile.kmk
r7229 r7517 53 53 VBOX_WITH_ADDITIONS_ISO.solaris.x86 = 1 54 54 endif 55 ifeq ($(BUILD_TARGET),freebsd) 56 VBOX_WITH_ADDITIONS_ISO.freebsd.x86 = 1 57 endif 55 58 56 59 # Include sub-makefiles. … … 67 70 ifeq ($(BUILD_TARGET),solaris) 68 71 include $(PATH_SUB_CURRENT)/solaris/Makefile.kmk 72 endif 73 ifeq ($(BUILD_TARGET),freebsd) 74 include $(PATH_SUB_CURRENT)/freebsd/Makefile.kmk 69 75 endif 70 76 … … 170 176 endif 171 177 178 # 179 # The x86 FreeBSD .iso file spec. 180 # 181 ifdef VBOX_WITH_ADDITIONS_ISO.freebsd.x86 182 ifdef VBOX_ONLY_ADDITIONS 183 VBOX_PATH_ADDITIONS.freebsd.x86 = $(PATH_OUT_BASE)/freebsd.x86/$(BUILD_TYPE)/bin/additions 184 else 185 # 32-bit only hack 186 VBOX_PATH_ADDITIONS.freebsd.x86 = $(VBOX_PATH_ADDITIONS) 187 endif 188 GUESTADDITIONS_FILESPEC.freebsd.x86 = \ 189 VBoxFreeBSDAdditions.tbz=$(VBOX_PATH_ADDITIONS.freebsd.x86)/VBoxFreeBSDAdditions.tbz 190 endif 172 191 173 192 # … … 192 211 $(GUESTADDITIONS_FILESPEC.linux.x86) \ 193 212 $(GUESTADDITIONS_FILESPEC.solaris.x86) \ 194 $(GUESTADDITIONS_FILESPEC.os2.x86) 195 endif 196 197 213 $(GUESTADDITIONS_FILESPEC.os2.x86) \ 214 $(GUESTADDITIONS_FILESPEC.freebsd.x86) 215 endif 216 217 -
trunk/src/VBox/Additions/common/Makefile.kmk
r6138 r7517 22 22 # Include sub-makefile. 23 23 include $(PATH_SUB_CURRENT)/VBoxGuestLib/Makefile.kmk 24 if1of ($(BUILD_TARGET),os2 solaris )24 if1of ($(BUILD_TARGET),os2 solaris freebsd) 25 25 include $(PATH_SUB_CURRENT)/VBoxGuest/Makefile.kmk 26 26 include $(PATH_SUB_CURRENT)/VBoxService/Makefile.kmk -
trunk/src/VBox/Additions/common/VBoxGuest/Makefile.kmk
r6711 r7517 82 82 $(VBOX_LIB_VBGL_R0BASE) \ 83 83 $(VBOX_LIB_IPRT_GUEST_R0) 84 84 85 else if1of ($(BUILD_TARGET),freebsd) 86 # 87 # vboxguest - The Guest Additions Driver 88 # 89 90 SYSMODS.freebsd += vboxguest 91 vboxguest_TEMPLATE = VBOXGUESTR0 92 vboxguest_DEFS = VBGL_VBOXGUEST VBOX_HGCM 93 vboxguest_INCS = \ 94 $(PATH_SUB_CURRENT) \ 95 $(PATH_TARGET) 96 vboxguest_DEPS = \ 97 $(PATH_TARGET)/pci_if.h \ 98 $(PATH_TARGET)/bus_if.h \ 99 $(PATH_TARGET)/device_if.h 100 vboxguest_SOURCES = \ 101 VBoxGuest-$(BUILD_TARGET).c \ 102 VBoxGuest.cpp 103 vboxguest_LIBS = \ 104 $(VBOX_LIB_VBGL_R0BASE) \ 105 $(VBOX_LIB_IPRT_GUEST_R0) 106 vboxguest_CLEAN += \ 107 $(PATH_TARGET)/pci_if.h \ 108 $(PATH_TARGET)/bus_if.h \ 109 $(PATH_TARGET)/device_if.h 110 111 # We need to generate some headers with awk to make building work 112 VBOX_AWKCMD := /usr/bin/awk 113 114 # We cannot give a path to the awk program where the header should be generated but can only 115 # make it produce the header at the location of the source file rather than in the current directory. 116 # Thatshwy we copy the source file to the destination of the header first and execute the program with the copied file 117 # afterwards. 118 $(PATH_TARGET)/bus_if.h: $(VBOX_FREEBSD_SRC)/kern/bus_if.m 119 $(call MSG_TOOL,awk,VBoxGuest,$<,$@) 120 $(QUIET)$(CP) -f $(VBOX_FREEBSD_SRC)/kern/bus_if.m $(PATH_TARGET)/bus_if.m 121 $(QUIET)$(VBOX_AWKCMD) -f $(VBOX_FREEBSD_SRC)/tools/makeobjops.awk $(PATH_TARGET)/bus_if.m -h -p 122 $(QUIET)$(RM) $(PATH_TARGET)/bus_if.m 123 124 $(PATH_TARGET)/device_if.h: $(VBOX_FREEBSD_SRC)/kern/device_if.m 125 $(call MSG_TOOL,awk,VBoxGuest,$<,$@) 126 $(QUIET)$(CP) -f $(VBOX_FREEBSD_SRC)/kern/device_if.m $(PATH_TARGET)/device_if.m 127 $(QUIET)$(VBOX_AWKCMD) -f $(VBOX_FREEBSD_SRC)/tools/makeobjops.awk $(PATH_TARGET)/device_if.m -h -p 128 $(QUIET)$(RM) $(PATH_TARGET)/device_if.m 129 130 $(PATH_TARGET)/pci_if.h: $(VBOX_FREEBSD_SRC)/dev/pci/pci_if.m 131 $(call MSG_TOOL,awk,VBoxGuest,$<,$@) 132 $(QUIET)$(CP) -f $(VBOX_FREEBSD_SRC)/dev/pci/pci_if.m $(PATH_TARGET)/pci_if.m 133 $(QUIET)$(VBOX_AWKCMD) -f $(VBOX_FREEBSD_SRC)/tools/makeobjops.awk $(PATH_TARGET)/pci_if.m -h -p 134 $(QUIET)$(RM) $(PATH_TARGET)/pci_if.m 135 85 136 endif 86 137 -
trunk/src/VBox/Additions/common/VBoxGuestLib/SysHlp.cpp
r6020 r7517 58 58 } 59 59 60 #elif defined(RT_OS_LINUX) 60 #elif defined(RT_OS_LINUX) || defined(RT_OS_FREEBSD) 61 61 NOREF(ppvCtx); 62 62 NOREF(pv); … … 92 92 } 93 93 94 #elif defined(RT_OS_LINUX) 94 #elif defined(RT_OS_LINUX) || defined(RT_OS_FREEBSD) 95 95 NOREF(pvCtx); 96 96 … … 138 138 extern DECLVBGL(int) VBoxGuestSolarisServiceCall (void *pvOpaque, unsigned int iCmd, void *pvData, size_t cbSize, size_t *pcbReturn); 139 139 __END_DECLS 140 141 #elif defined (RT_OS_FREEBSD) 142 __BEGIN_DECLS 143 extern DECLVBGL(void *) VBoxGuestFreeBSDServiceOpen (uint32_t *pu32Version); 144 extern DECLVBGL(void) VBoxGuestFreeBSDServiceClose (void *pvOpaque); 145 extern DECLVBGL(int) VBoxGuestFreeBSDServiceCall (void *pvOpaque, unsigned int iCmd, void *pvData, size_t cbSize, size_t *pcbReturn); 146 __END_DECLS 147 140 148 #endif 141 149 … … 194 202 if ( pDriver->pvOpaque 195 203 && u32VMMDevVersion == VMMDEV_VERSION) 204 return VINF_SUCCESS; 205 206 Log(("vbglDriverOpen: failed\n")); 207 return VERR_FILE_NOT_FOUND; 208 209 #elif defined (RT_OS_FREEBSD) 210 uint32_t u32VMMDevVersion; 211 pDriver->pvOpaque = VBoxGuestFreeBSDServiceOpen(&u32VMMDevVersion); 212 if (pDriver->pvOpaque && (u32VMMDevVersion == VMMDEV_VERSION)) 196 213 return VINF_SUCCESS; 197 214 … … 260 277 return VBoxGuestSolarisServiceCall(pDriver->pvOpaque, u32Function, pvData, cbData, NULL); 261 278 279 #elif defined (RT_OS_FREEBSD) 280 return VBoxGuestFreeBSDServiceCall(pDriver->pvOpaque, u32Function, pvData, cbData, NULL); 281 262 282 #else 263 283 # error "Port me" … … 280 300 VBoxGuestSolarisServiceClose (pDriver->pvOpaque); 281 301 302 #elif defined (RT_OS_FREEBSD) 303 VBoxGuestFreeBSDServiceClose(pDriver->pvOpaque); 304 282 305 #else 283 306 # error "Port me" -
trunk/src/VBox/Additions/common/VBoxGuestLib/SysHlp.h
r6020 r7517 57 57 #elif defined (RT_OS_SOLARIS) 58 58 void *pvOpaque; 59 #elif defined (RT_OS_FREEBSD) 60 void *pvOpaque; 59 61 #else 60 62 # error "Port me" -
trunk/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3Lib.cpp
r6569 r7517 24 24 # define INCL_ERRORS 25 25 # include <os2.h> 26 #elif defined(RT_OS_SOLARIS) 26 #elif defined(RT_OS_SOLARIS) || defined(RT_OS_FREEBSD) 27 27 # include <sys/types.h> 28 28 # include <sys/stat.h> … … 226 226 return RTErrConvertFromOS2(rc); 227 227 228 #elif defined(RT_OS_SOLARIS) 228 #elif defined(RT_OS_SOLARIS) || defined(RT_OS_FREEBSD) 229 229 VBGLBIGREQ Hdr; 230 230 Hdr.u32Magic = VBGLBIGREQ_MAGIC; … … 244 244 /* PORTME - This is preferred over the RTFileIOCtl variant below, just be careful with the (int). */ 245 245 /** @todo test status code passing! */ 246 246 247 int rc = xf86ioctl(g_File, iFunction, pvData); 247 248 if (rc == -1) -
trunk/src/VBox/Additions/common/VBoxService/Makefile.kmk
r6469 r7517 43 43 $(VBOX_LIB_IPRT_GUEST_R3) \ 44 44 $(VBOX_LIB_VBGL_R3) 45 45 VBoxService_LIBS.freebsd = \ 46 iconv 47 VBoxService_LIBPATH.freebsd = \ 48 /usr/local/lib 46 49 include $(PATH_KBUILD)/subfooter.kmk 47 50 -
trunk/src/VBox/Additions/common/VBoxService/VBoxServiceInternal.h
r6136 r7517 93 93 extern int VBoxServiceArgUInt32(int argc, char **argv, const char *psz, int *pi, uint32_t *pu32, uint32_t u32Min, uint32_t u32Max); 94 94 95 #if defined(RT_OS_OS2) || defined(RT_OS_WINDOWS) || defined(RT_OS_SOLARIS) 95 #if defined(RT_OS_OS2) || defined(RT_OS_WINDOWS) || defined(RT_OS_SOLARIS) || defined(RT_OS_FREEBSD) 96 96 extern int daemon(int, int); 97 97 #endif -
trunk/src/VBox/Additions/x11/Makefile.kmk
r6756 r7517 20 20 21 21 # Include sub-makefiles. 22 if1of ($(BUILD_TARGET),l4 linux solaris )22 if1of ($(BUILD_TARGET),l4 linux solaris freebsd) 23 23 include $(PATH_SUB_CURRENT)/xclient/Makefile.kmk 24 24 include $(PATH_SUB_CURRENT)/xgraphics/Makefile.kmk -
trunk/src/VBox/Additions/x11/x11include/1.3/xorg/xf86Modes.h
r6499 r7517 30 30 31 31 #include <stddef.h> 32 /* Including this header results in compiler errors on FreeBSD */ 33 #ifndef RT_OS_FREEBSD 32 34 #include <string.h> 35 #endif 33 36 #include <stdio.h> 34 37 -
trunk/src/VBox/Additions/x11/x11include/1.4/xorg/xf86Modes.h
r6499 r7517 30 30 31 31 #include <stddef.h> 32 /* Including this header results in compiler errors on FreeBSD */ 33 #ifndef RT_OS_FREEBSD 32 34 #include <string.h> 35 #endif 33 36 #include <stdio.h> 34 37 -
trunk/src/VBox/Additions/x11/xclient/Makefile.kmk
r7363 r7517 40 40 X11 \ 41 41 Xt 42 VBoxClient_LIBPATH.freebsd += \ 43 /usr/local/lib 44 VBoxClient_LIBS.freebsd += \ 45 iconv 42 46 ifdef VBOX_X11_SEAMLESS_GUEST 43 47 VBoxClient_DEFS += SEAMLESS_GUEST DYNAMIC_RESIZE -
trunk/src/VBox/Additions/x11/xclient/seamless-guest.h
r6783 r7517 79 79 }; 80 80 81 #if defined(RT_OS_LINUX) || defined(RT_OS_SOLARIS) 81 #if defined(RT_OS_LINUX) || defined(RT_OS_SOLARIS) || defined(RT_OS_FREEBSD) 82 82 # include "seamless-x11.h" /* for VBoxGuestSeamlessGuestImpl */ 83 83 #else -
trunk/src/VBox/Additions/x11/xmouse/xorg14/mouse.c
r6202 r7517 1057 1057 1058 1058 #ifdef VBOX 1059 1060 /* ImPS/2 is not supported on FreeBSD */ 1061 # ifdef RT_OS_FREEBSD 1062 protocol = "PS/2"; 1063 # else 1059 1064 protocol = "ImPS/2"; 1065 # endif 1060 1066 protocolFrom = X_CONFIG; 1061 1067 #else -
trunk/src/VBox/Runtime/Makefile.kmk
r7491 r7517 533 533 RuntimeGuestR3_INCS.$(BUILD_TARGET) := $(RuntimeR3_INCS.$(BUILD_TARGET)) 534 534 RuntimeGuestR3_INCS.$(BUILD_PLATFORM) := $(RuntimeR3_INCS.$(BUILD_PLATFORM)) 535 RuntimeGuestR3_LIBS.freebsd := \ 536 iconv 535 537 RuntimeGuestR3_SOURCES := $(filter-out \ 536 538 common/time/timesupref.cpp \ … … 590 592 r3/posix/utf8-posix.cpp 591 593 RuntimeGuestR3Mini_SOURCES.solaris = \ 594 r3/posix/fileio-posix.cpp \ 595 r3/posix/path-posix.cpp \ 596 r3/posix/utf8-posix.cpp 597 RuntimeGuestR3Mini_SOURCES.freebsd = \ 592 598 r3/posix/fileio-posix.cpp \ 593 599 r3/posix/path-posix.cpp \ … … 1024 1030 common/string/memmove.asm \ 1025 1031 common/string/strpbrk.cpp \ 1032 common/string/memcmp.asm \ 1033 common/string/strchr.asm \ 1026 1034 generic/RTAssertDoBreakpoint-generic.cpp \ 1027 1035 generic/RTLogWriteDebugger-generic.cpp \ … … 1105 1113 common/string/strlen.cpp 1106 1114 endif 1115 RuntimeGuestR0_SOURCES.freebsd += \ 1116 common/string/memset.cpp \ 1117 common/string/memcmp.cpp \ 1118 common/string/strchr.asm 1107 1119 1108 1120 RuntimeOS2GuestR0_TEMPLATE = VBOXOS2GUESTR0LIB -
trunk/src/VBox/Runtime/r0drv/freebsd/thread2-r0drv-freebsd.c
r3680 r7517 70 70 } 71 71 72 #if __FreeBSD_version < 700000 72 73 /* Do like they're doing in subr_ntoskrnl.c... */ 73 74 mtx_lock_spin(&sched_lock); 75 #else 76 thread_lock(curthread); 77 #endif 74 78 sched_prio(curthread, iPriority); 75 79 #if __FreeBSD_version < 600000 76 80 curthread->td_base_pri = iPriority; 77 81 #endif 82 #if __FreeBSD_version < 700000 78 83 mtx_unlock_spin(&sched_lock); 84 #else 85 thread_unlock(curthread); 86 #endif 79 87 80 88 return VINF_SUCCESS;
Note:
See TracChangeset
for help on using the changeset viewer.