diff --git a/content/contributing/building-exectos.md b/content/contributing/building-exectos.md index ce1baa3..dd6c449 100644 --- a/content/contributing/building-exectos.md +++ b/content/contributing/building-exectos.md @@ -2,40 +2,55 @@ title = 'Building ExectOS' date = 2024-06-18T16:37:24+02:00 +++ -ExectOS must be compiled with the XTChain toolchain. Make sure you have already [downloaded](/download) and installed it. -Once this is done and the source code is ready, open a terminal and launch the XTChain Build Environment. +To build ExectOS, you must use the XTchain toolchain. Make sure you have already [downloaded](/download) and installed it. +Once the toolchain is installed and the source code is ready, open a terminal and launch the XTchain Build Environment: ``` xtchain ``` -Then, set your target build architecture and the build type and configure the project. Choose `i686` or `amd64` depending -on the architecture you wish to target. The build type can be either `DEBUG` for debugging purposes or `RELEASE` for -a production build. +Next, set your target architecture and build type. You can choose between: + * Architecture: i686 (32-bit) or amd64 (64-bit) + * Build type: DEBUG (for development and debugging) or RELEASE (for production) + +Use the following commands: ``` charch [i686|amd64] chbuild [DEBUG|RELEASE] +``` +Now, configure the project: + * On Linux, run: +``` ./configure.sh ``` -After the sources are configured, navigate to the build directory and compile the source code. +* On Windows, run: +``` +.\configure.ps1 +``` +Once configuration is complete, navigate to the build directory and compile the source: ``` cd build xbuild ``` -Afterwards, you will find the binaries in `build/output/binaries` directory. Apart from that, depending on build type, you -can also find a debug symbols in PDB format in `build/output/symbols` folder and precompiled libraries that can be used to -link other software using XTDK in `build/output/library` +After the build completes, the compiled binaries will be located in the `build/output/binaries` directory. Additionally, +depending on the selected build type, you may also find debug symbols in PDB format inside the `build/output/symbols` +folder. Precompiled libraries intended for linking other software with XTDK are available in the `build/output/library` +directory. ## Creating Qemu Disk Image -If you want to build a disk image that is ready to use with Qemu, you can use the following command: +If you want to build a bootable disk image for use with QEMU, you can do so with the following command: ``` xbuild diskimg ``` -This will create a disk image that you can boot within a Qemu Virtual Machine, or convert to other format for use within -other hypervisor, like VirtualBox. +This command generates a virtual disk image that can be directly booted in a QEMU virtual machine. You can also convert +this image into other formats compatible with alternative hypervisors such as VirtualBox or VMware. ## Testing with Qemu -After successfully compiling ExectOS, you can test it using Qemu with either hardware virtualization (KVM) or software -emulation (TCG). To start Qemu with KVM, use the `testkvm` target, and for TCG emulation, use the `testtcg` target. These -targets are provided for convenience and you can run these commands from your build directory. +Once ExectOS has been successfully compiled, you can test it in a virtual environment. The recommended approach is to use +QEMU, which supports both hardware virtualization (via KVM) and software emulation (via TCG). + +After successfully compiling ExectOS, you can test it using QEMU with either hardware virtualization (KVM) or software +emulation (TCG). To start QEMU with KVM, use the testkvm target, and for TCG emulation, use the testtcg target. These +targets are provided for convenience and can be executed directly from the build directory. For example, run +`xbuild testkvm` to launch QEMU with hardware virtualization, or `xbuild testtcg` to use software emulation: ``` xbuild testkvm # For KVM hardware virtualization ``` @@ -43,16 +58,20 @@ or ``` xbuild testtcg # For TCG software emulation ``` -These commands will automatically configure Qemu with the appropriate settings for ExectOS and start the virtual machine. -In addition to Qemu, you can also use Bochs for emulation. Bochs is an IA-32 (x86) PC emulator that provides a different -emulation environment. To launch Bochs with the ExectOS image, run the following command: +These commands will automatically configure QEMU with the appropriate settings and start the virtual machine. Keep in mind +that QEMU is not distributed with XTchain and must be installed manually. + +In addition to QEMU, you can also test ExectOS using Bochs, an IA-32 (x86) PC emulator that offers a different emulation +environment. To launch Bochs with the ExectOS disk image, run the following command: ``` xbuild bochsvm ``` -This will start the Bochs emulator with ExectOS loaded, allowing you to test the system in an environment that may offer -different debugging capabilities compared to Qemu. +This will start the Bochs emulator with ExectOS loaded, allowing you to test the system in a context that may offer +different debugging capabilities compared to QEMU. Like QEMU, Bochs is not bundled with XTchain and needs to be installed +separately. -Remember that the performance and debugging features will vary depending on whether you use KVM, TCG, or Bochs. KVM -requires that your host machine supports hardware virtualization, while TCG is a pure software emulator which works on -systems without hardware virtualization. Bochs provides a rich set of debugging features, which can be useful when -troubleshooting complex issues. +The performance and debugging experience will differ depending on which emulator you use. KVM requires a host system with +hardware virtualization support and offers the best performance. TCG is a pure software-based emulator and works even on +systems without virtualization capabilities, albeit at slower speeds. Bochs, while slower than both, provides a rich set of +debugging features which can be especially helpful when troubleshooting complex or low-level issues. Alternatively, you may +use other hypervisors like VMware or VirtualBox by manually configuring them to boot from the generated disk image.