Changeset 7517 in vbox for trunk/src/VBox/Additions/common
- Timestamp:
- Mar 22, 2008 11:15:44 PM (17 years ago)
- svn:sync-xref-src-repo-rev:
- 28986
- Location:
- trunk/src/VBox/Additions/common
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
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
Note:
See TracChangeset
for help on using the changeset viewer.