VirtualBox

Changes between Version 15 and Version 16 of FreeBSD build instructions


Ignore:
Timestamp:
Sep 21, 2009 7:05:59 PM (15 years ago)
Author:
aeichner
Comment:

FreeBSD build instructions update

Legend:

Unmodified
Added
Removed
Modified
  • FreeBSD build instructions

    v15 v16  
    55If you like to help out with the FreeBSD port, please join the #vbox-dev irc channel or drop a mail on the development mailing list.
    66
    7 '''Current state:''' the kernel driver needs a substantial effort to get ported, so only people who want to help us getting this changed should think about building !VirtualBox on FreeBSD. In other words: without help from FreeBSD kernel experts who can tell us how to safely allocate physical memory, assign it to user processes and the such there's little point in reporting build issues.
     7'''Current state:''' It works quite stable by now for FreeBSD 7.x and 8-CURRENT. There is a port in the FreeBSD ports tree too.
    88
    99== Prerequisites ==
     
    2323 * '''xsltproc''' (libxslt, XML style sheet processor)[[BR]]
    2424   => {{{/usr/ports/textproc/libxslt}}}
     25 * '''libxml2''' [[BR]]
     26   => {{{/usr/ports/textproc/libxml2}}}
    2527 * '''libXcursor''' (required to support color mouse pointers in guest) [[BR]]
    2628   => Probably installed, if not try {{{/usr/ports/x11/libXcursor}}}.
     
    3133 * '''libSDL''' [[BR]]
    3234   => {{{/usr/ports/devel/sdl12}}}
    33  * '''mkisofs''' [[BR]]
     35 * '''mkisofs''' (required only for additions which aren't supported yet) [[BR]]
    3436   => {{{/usr/ports/sysutils/cdrtools}}}
    35  * '''FreeBSD 6.x compat libs''' for kBuild and other prebuilt binaries [[BR]]
    36    => {{{/usr/ports/misc/compat6x}}}
     37 * '''kBuild''' (The one provided with the VirtualBox sources doesn't with FreeBSD 8-CURRENT) [[BR]]
     38   => {{{/usr/ports/devel/kBuild}}}
     39 * '''curl''' [[BR]]
     40   => {{{/usr/ports/ftp/curl}}}
     41 * '''libXmu''' [[BR]]
     42   => {{{/usr/ports/x11-toolkits/libXmu}}}
    3743 * '''Qt 4.4.x''' [[BR]]
    3844   => {{{/usr/ports/x11-toolkits/qt4-gui}}}, {{{/usr/ports/net/qt4-network}}}, {{{/usr/ports/devel/qt4-moc}}}, {{{/usr/ports/net/qt4-uic}}}, {{{/usr/ports/net/qt4-rcc}}}   and {{{/usr/ports/net/qt4-linguist}}} ; or configure --disable-qt
     
    4046== Building !VirtualBox ==
    4147
    42 To be written.
     48 1. Change to the root directory of the sources and execute the configure script:
     49{{{
     50./configure --disable-hardening
     51}}}
     52 If it finds everything it needs, it will create a file called '!AutoConfig.kmk' containing paths to the various tools on your system. Also, it will create an environment setup script called `env.sh`.  This step only has to be done once (if something changes in your build tool setup, you might have to repeat it but keep in mind that both output files will be overwritten).
     53
     54 The switch ''--disable-hardening'' should '''not''' be used for building packages for redistribution or for production use.
     55
     56 2. Whenever you want to build !VirtualBox, you have to open a shell and source the generated environment setup script 'env.sh', i.e. do
     57{{{
     58source ./env.sh
     59}}}
     60
     61 3. To build a release package, type
     62{{{
     63kmk all
     64}}}
     65 This produces the required binaries in `out/freebsd.x86/release/bin/`. If you want to build a debug version, type
     66{{{
     67kmk BUILD_TYPE=debug
     68}}}
     69 In case you have more than one CPU core, kmk will automatically do a parallel build.
    4370
    4471== Running your build ==
     72You can run !VirtualBox directly from the build target directory (`out/freebsd.x86/release/bin/`).
    4573
    46 To be written.
     74You have to load the kernel driver first using {{{kldload ./vboxdrv.ko}}} as root. Make sure you give yourself read and write access to {{{/dev/vboxdrv}}}.
     75
     76If you made a ''hardened build'', make sure that the setuid stubs have the correct permissions:
     77{{{
     78for f in VirtualBox VBoxHeadless VBoxSDL VBoxBFE VBoxNetDHCP VBoxNetAdpCtl; do
     79  chown root.root $f
     80  chmod 4511 $f
     81done
     82}}}
     83
     84Finally, you can start one of the frontends, e.g.
     85{{{
     86LD_LIBRARY_PATH=. ./VirtualBox
     87}}}

© 2023 Oracle
ContactPrivacy policyTerms of Use