Changes between Version 21 and Version 22 of UsersGuide/CompilingFromSource
- Timestamp:
- 2016-01-08T13:25:12Z (8 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
UsersGuide/CompilingFromSource
v21 v22 7 7 This method is not recommended for beginners. If you are running HelenOS for the first time, please [UsersGuide/QuickStart run a pre-built, supported HelenOS image] (see instructions in that article). 8 8 9 Compiling an operating system is not quite simple as the {{{configure && make && make install}}} you use to compile your favorite application. If you still want to do it, please follow these instructions carefully. If you don't follow the instructions to the letter, it won't compile (or it will not run) and then don't bother us on the mailing list, please. We are somewhat tired of telling the people again and again to install the fine compiler toolchain.9 Compiling an operating system is not quite as simple as running the common {{{configure && make && make install}}} combo you use to compile your favorite application. If you still want to do it, please follow these instructions very carefully. If you skip parts of these instructions without knowing exactly what you are doing, it won't compile (or it will not run). We are happy to help with actual problems, but please don't bother us on the mailing list with fake issues caused by not following these instructions. For example, if you choose not to install our fine compiler toolchain, then please don't expect that the compilation process of HelenOS should magically work without it. 10 10 11 11 == 1. Get the sources == … … 34 34 '''Note:''' In older revisions of the source tree the ''toolchain.sh'' script was present in the ''contrib'' directory (not the ''tools'' directory where it is now). 35 35 36 The toolchain script will print a list of software packages that are required for the toolchain to correctly build. Make sure you install all the dependencies. 36 The toolchain script will print a list of software packages that are required for the toolchain to correctly build. Make sure you install all the dependencies. Unfortunately, the script cannot install the required dependencies for you automatically since the host environments are very diverse. In case the compilation of the toolchain fails half way through, try to analyze the error message(s), add appropriate missing dependencies and try again. 37 37 38 Here are some of the packages you will need for Ubuntu 12.10:38 As an example, here are some of the packages you will need for Ubuntu 12.10: 39 39 40 40 {{{ 41 41 build-essential libgmp-dev libmpfr-dev ppl-dev libmpc-dev zlib1g-dev texinfo libtinfo-dev xutils-dev 42 42 }}} 43 44 In case the toolchain script won't work no matter how hard you try, let us know. Please supply as many relevant information (your OS and distribution, list of installed packages with version information, the output of the toolchain script, etc.) as possible. 43 45 44 46 == 3. Did you install the compiler toolchain? Good. == … … 47 49 48 50 Why it can't work? 49 * Tool versions: We only test HelenOS on the one single version of GCC, binutils, etc. We don't have the resources to test other versions. Other versions have bugs (or lack required features) . It won't compile.51 * Tool versions: We only test HelenOS on the one single version of GCC, binutils, etc. We don't have the resources to test other versions. Other versions have bugs (or lack required features), experimental modifications that break HelenOS, etc. It won't compile. 50 52 * Different ABIs: Each OS has a different ABI and different set of compiler settings. If you build binaries with your native compiler, they will run fine in your OS, but certainly not in HelenOS! 51 53 * {{{-Werror}}}: Developer builds use -Werror and each compiler version produces different warnings. Thus, you will get warnings and these get turned into errors. … … 53 55 == 4. Configure and build == 54 56 55 Go back to the source root and start the build process57 Go back to the source root of HelenOS and start the build process 56 58 57 59 {{{ … … 66 68 == 5. Run it == 67 69 68 When you get the command line back, there should be an `image.iso` file in the source root directory. If you have Q emu, you should be able to start HelenOS by running70 When you get the command line back, there should be an `image.iso` file in the source root directory. If you have QEMU, you should be able to start HelenOS by running 69 71 70 72 {{{ 71 $ qemu -cdrom image.iso73 $ qemu-system-i386 -boot d -cdrom image.iso 72 74 }}} 73 75 74 If you want to use network, you may add [wiki:UsersGuide/RunningInQEMU#Networking other parameters] or, preferably, you shall use a helper script that adds all these parameters for you and sets-up even port forwarding:76 If you want to use network, you may add [wiki:UsersGuide/RunningInQEMU#Networking other parameters] or, preferably, you shall use a helper script that adds all these parameters for you and sets-up even the port forwarding: 75 77 76 78 {{{ … … 78 80 }}} 79 81 80 For additional information about running HelenOS, see [[UsersGuide/RunningInQEMU]] or [[UsersGuide/RunningInVirtualBox]] or see files in `contrib/conf`.82 For additional information about running HelenOS, see [[UsersGuide/RunningInQEMU]] or [[UsersGuide/RunningInVirtualBox]] or see the files in `contrib/conf`. 81 83 82 84 == Advanced Topics == … … 107 109 '''Please Note:''' Normally '''you don't need to do this'''. Manual configuration was mostly used in the past where HelenOS had no command line. Nowadays manual configuration (and configuration options in general) are used much less and only when absolutely necessary (e.g. if you '''really''' need to build a smaller system). If you configure HelenOS manually and it does not build (or does not work), you probably hit a combination of the configuration options that nobody tested properly. In that case you should [wiki:HowToFileABug file a bug]. 108 110 109 With manual configuration you can change screen resolution, disable building of some components, etc.111 With manual configuration you can change the initial screen resolution, disable building of some components, etc. 110 112 111 113 '''Warning:''' Do not select a different compiler unless you really know what you are doing! If you use ''gcc_native'' instead of ''gcc_cross'', it won't work, so please don't ask in the mailing list! Building HelenOS with a native compiler is '''not supported'''! … … 123 125 }}} 124 126 125 this will cause HelenOS build to automatically start once you are done with the configuration.127 this will cause the HelenOS build to automatically start once you are done with the configuration. 126 128 127 129 === Building release files === 128 130 129 This procedure is used to create HelenOS realease files before releasing a new HelenOS version, or for simulating that process. 130 The resulting system image is based on one of the predefined configuration profiles (as opposed to the current configuration!) 131 This procedure is used to create HelenOS realease files before releasing a new HelenOS version, or for simulating that process. The resulting system image is based on one of the predefined configuration profiles (as opposed to the current configuration). 131 132 132 Before building release files make sure you have no uncommitted changes. 133 These will not be build since we are building from exported sources. 133 Before building release files make sure you have no uncommitted changes. These will not be build since we are building from exported sources. 134 134 135 135 To build all release files go to the source root and run: