source: mainline/README.md@ 522eecf

Last change on this file since 522eecf was 522eecf, checked in by Jiri Svoboda <jiri@…>, 15 months ago

Third time's the charm

  • Property mode set to 100644
File size: 5.6 KB
Line 
1# HelenOS
2
3HelenOS is a portable microkernel-based multiserver operating
4system designed and implemented from scratch. It decomposes key
5operating system functionality such as file systems, networking,
6device drivers and graphical user interface into a collection of
7fine-grained user space components that interact with each other
8via message passing. A failure or crash of one component does not
9directly harm others. HelenOS is therefore flexible, modular,
10extensible, fault tolerant and easy to understand.
11
12![screenshot](http://www.helenos.org/raw-attachment/wiki/Screenshots/gui-14.1-aio.png "Screenshot")
13
14HelenOS aims to be compatible with the C11 and C++14 standards, but does not
15aspire to be a clone of any existing operating system and trades compatibility
16with legacy APIs for cleaner design. Most of HelenOS components have been made
17to order specifically for HelenOS so that its essential parts can stay free of
18adaptation layers, glue code, franken-components and the maintenance burden
19incurred by them.
20
21* [Website](http://helenos.org)
22* [Wiki](http://helenos.org/wiki)
23* [Tickets](http://www.helenos.org/report/1)
24* [How to contribute](http://www.helenos.org/wiki/HowToContribute)
25
26## Portability
27
28HelenOS runs on eight different processor architectures and machines ranging
29from embedded ARM devices and single-board computers through multicore 32-bit
30and 64-bit desktop PCs to 64-bit Itanium and SPARC rack-mount servers.
31
32## Building
33
34### Building the toolchain
35
36In order to build HelenOS, one must first build the cross-compiler toolchain
37(the default installation location can be overridden by specifying the
38`CROSS_PREFIX` environment variable) by running (example for the amd64
39architecture, further list of targets can be found in the `default` directory):
40
41```
42$ cd HelenOS/tools
43$ ./toolchain.sh amd64
44```
45
46The toolchain script will print a list of software packages that are required
47for the toolchain to correctly build. Make sure you install all the dependencies.
48Unfortunately, the script cannot install the required dependencies for you automatically
49since the host environments are very diverse. In case the compilation of the toolchain
50fails half way through, try to analyze the error message(s), add appropriate missing
51dependencies and try again.
52
53As an example, here are some of the packages you will need for Ubuntu 16.04:
54
55```
56$ sudo apt install build-essential wget texinfo flex bison dialog python-yaml genisoimage
57```
58
59Whereas for CentOS/Fedora, you will need:
60
61```
62# sudo dnf group install 'Development Tools'
63# sudo dnf install wget texinfo PyYAML genisoimage flex bison
64```
65
66In case the toolchain script won't work no matter how hard you try, let us know.
67Please supply as many relevant information (your OS and distribution, list of
68installed packages with version information, the output of the toolchain script, etc.) as
69possible.
70
71### Configuring the build
72
73Since the summer of 2019, HelenOS uses the Meson build system.
74Make sure you have a recent-enough version of Meson and Ninja.
75The safest bet is installing both using `pip3` tool.
76
77```sh
78$ pip3 install ninja
79$ pip3 install meson
80```
81
82Meson does not support in-tree builds, so you have to create a directory
83for your build. You can have as many build directories as you want, each with
84its own configuration. `cd` into your build directory and run `configure.sh`
85script which exists in the source root. `configure.sh` can be run with a profile
86name, to use one of the predefined profiles, or without arguments for interactive
87configuration.
88
89```sh
90$ git clone https://github.com/HelenOS/helenos.git
91$ mkdir -p build/amd64
92$ cd build/amd64
93$ ../../helenos/configure.sh amd64
94```
95
96Note: If you installed the toolchain to a custom directory, make sure `CROSS_PREFIX`
97environment variable is correctly set.
98
99Once configuration is finished, use `ninja` to build HelenOS.
100Invoking `ninja` without arguments builds all binaries and
101debug files, but not bootable image. This is because during
102development, most builds are incremental and only meant to check
103that code builds properly. In this case, the time-consuming process of
104creating a boot image is not useful and takes most time. This behavior
105might change in the future.
106
107In case you want to rebuild the bootable image, you must invoke
108`ninja image_path`. This also emits the name of the bootable image into the
109file `image_path` in build directory.
110
111```
112$ ninja
113$ ninja image_path
114```
115
116Now HelenOS should automatically start building.
117
118### Running the OS
119
120When you get the command line back, there should be an `image.iso` file in the build
121root directory. If you have QEMU, you should be able to start HelenOS by running:
122
123```
124$ ./tools/ew.py
125```
126
127For additional information about running HelenOS, see
128[UsersGuide/RunningInQEMU](http://www.helenos.org/wiki/UsersGuide/RunningInQEMU) or
129[UsersGuide/RunningInVirtualBox](http://www.helenos.org/wiki/UsersGuide/RunningInVirtualBox) or
130see the files in tools/conf.
131
132## Contributing
133
134There is a whole section of our wiki devoted to
135[how to contribute to HelenOS](http://www.helenos.org/wiki/HowToContribute).
136But to highlight the most important points, you should subscribe to
137our mailing list and if you have an idea for contributing, discuss it
138with us first so that we can agree upon the design.
139
140Especially if you are a first time contributor, blindingly shooting
141a pull request may result in it being closed on the grounds that it
142does not fit well within the grand scheme of things. That would not
143be efficient use of time.
144
145Communicating early and often is the key to successful acceptance of
146your patch/PR.
147
148## License
149
150HelenOS is open source, free software. Its source code is available under
151the BSD license. Some third-party components are licensed under GPL.
Note: See TracBrowser for help on using the repository browser.