1 | | = Source code organization = |
2 | | |
3 | | You can browse the source code online [/browser/trunk here]. |
4 | | |
5 | | == include/ == |
6 | | |
7 | | == kBuild/ == |
8 | | |
9 | | `kBuild/` contains the relevant kBuild distro, please refer to the [wiki:"kBuild"] page for details. |
10 | | |
11 | | == out/ == |
12 | | |
13 | | `out/` is the output directory. Into here, the build system puts all output code, sorted by platform and release/debug version. |
14 | | |
15 | | == src/ == |
16 | | |
17 | | `src/` is, naturally, by far the biggest and most complicated subtree. For the following, a basic understanding of the [wiki:"VirtualBox architecture"] is helpful. Here you find, by subdirectory: |
18 | | |
19 | | * `src/libs/` contains various libraries in specific versions that we depend on. We can't very well ask our customers to descend into dependency hell; we therefore statically compile these into the !VirtualBox binaries. The various licenses under which these libraries were shipped are all documented in the appendices of the [wiki:"Downloads" user manual]. |
20 | | |
21 | | * `src/recompiler/` contains a recompiler (emulator based on QEMU) for a few situations within !VirtualBox. Essentially, all guest code runs natively on the hardware. The recompiler, however, steps in as a fallback when |
22 | | * guest code disables interrupts and !VirtualBox cannot determine when they will be switched back on; |
23 | | * for single instruction execution on faults; |
24 | | * for real-mode code (e.g. BIOS, DOS, operating system startup). |
25 | | |
26 | | * `src/VBox/` contains the bulk of the !VirtualBox code, again sorted into subdirectories. This has: |
27 | | * `src/VBox/Frontends/`: the various user interfaces are all found below this directory: |
28 | | * `src/VBox/Frontends/VBoxBFE/`: The "Basic Front End GUI", a very limited UI that communicates with the VMM directly, without using COM. |
29 | | * `src/VBox/Frontends/VBoxFB/`: The "Framebuffer GUI", a GUI that sits directly on the Linux framebuffer. Not currently maintained. |
30 | | * `src/VBox/Frontends/VBoxSDL/`: An alternative frontend based on [http://www.libsdl.org/index.php SDL]. This is useful for business use as well as testing during development. The VMs then have to be controlled with VBoxManage. |
31 | | * `src/VBox/Frontends/VirtualBox/`: The Qt GUI as shown on the [wiki:"Screenshots"] page. |
32 | | * `src/VBox/Frontends/VBoxManage/`: The !VBoxManage textual interface that exposes the API in Main to the command line. |
33 | | * `src/VBox/Debugger/`: An (incomplete) guest debugger that is still evolving. |
34 | | * `src/VBox/Devices/`: Code for the various guest devices that the VMM virtualizes, such as the audio, network, and graphics card, as well as the virtual hard disk and USB controller. |
35 | | * `src/VBox/Disassembler/`: The !VirtualBox Disassembler (part of the VM core), which analyzes guest code on commission of various other !VirtualBox components (mostly from the VMM, below). |
36 | | * `src/VBox/Additions/`: The "Guest Additions" for Windows and Linux (and possibly more in the future); this is code that must be installed within a guest to optimize its performance and usability. The build system compiles this code into an ISO file that can be mounted as a VM's virtual CD-ROM drive, as described in the [wiki:"Downloads" user manual]. |
37 | | * `src/VBox/HostServices/`: |
38 | | * `src/VBox/Installer/`: The code for the Linux and Windows installes, in their respective subdirectories. For Linux, we use some shell scripts glued together with a tarball, for Windows, we build a .MSI package. |
39 | | * `src/VBox/Main/`: The COM/XPCOM backend (see [wiki:"COM-XPCOM interoperability"]) which lies on top of the VMM code (see below). This is shared by the various components of !VirtualBox. |
40 | | * `src/VBox/HostDrivers/`: Below this directory, you find the following device drivers (or kernel modules respectively) that run on the host system: |
41 | | * `src/VBox/HostDrivers/VBoxTAP/`: This contains a TAP driver for Windows (not needed with Linux since the Linux kernel has one). (This is a ''host'' driver and therefore does not belong under `Devices/` above.) |
42 | | * `src/VBox/HostDrivers/Support/`: The main !VirtualBox host driver that allows the VMM to gain control over your system. A real trojan horse, but a friendly one. |
43 | | * `src/VBox/Runtime/`: The [wiki:"IPRT" InnoTek Portable Runtime]. |
44 | | * `src/VBox/VMM/`: The Virtual Machine Monitor, part of the VM core. |
45 | | |
46 | | |
47 | | == tools/ == |
48 | | |
49 | | Into `tools/`, we have put some tools that we don't want to rely on on the host platform, mostly because some versions of these tools are known to be buggy and we want to make sure that a specific version is used. |
50 | | |
51 | | The tools are sorted into subdirectories for the various platforms: |
52 | | |
53 | | * `x86.linux` contains: |
54 | | * `bin/as86` and `bin/bcc` are some old compilers that we require for some real-mode code in !VirtualBox. This is from the [http://homepage.ntlworld.com/robert.debath/ Linux 8086 development environment project.] |
55 | | * `bin/iasl` is the Intel ACPI DSL compiler, available with source from [http://www.intel.com/technology/iapc/acpi/downloads.htm here]. |
56 | | * `bin/xd` is a tiny tool to convert a binary file into a C array. This is from [http://www.fourmilab.ch/xd/ here] and public domain. |
57 | | * `makeself` contains some shell scripts to create our self-extracting Linux installer. |
58 | | * `yasm/` contains [http://www.tortall.net/projects/yasm/ YASM], a rewrite of the venerable NASM assembler, a project released under the BSD license. |
59 | | |
60 | | * `x86.win32` contains: |
61 | | ''(fill this in when it's up-to-date)'' |
62 | | |
63 | | |
64 | | |
| 1 | This page has moved to [wiki:"Source_code_organization"]. |