You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Complete the README file with mroe user-friendly content after first
test from external people.
Fixed local sample cross-file to be uptodate to Sentry kernel needs.
Add default `dts-include-dirs` option value for standalone build
This kernel aims to be fully portable. Its initial target are ARM Cortex-M MCUs (starting with STM32) and thus one needs a cross toolchain for such target. One can use any cross toolchain as long as this is a GNU compatible compiler for Cortex-M. The reference toolchain used for `CI/CD` is bundled in this project using `meson` wrap mechanism.
25
25
26
+
Cross-toolchain relative need to be declared so that the `meson` build system is able to detect overall cross-compilers and associated tools. This is
27
+
done by defining `cross-files`. The meson build system describes these cross file [here](https://mesonbuild.com/Cross-compilation.html).
28
+
26
29
### Project bootstrap
27
30
28
31
A common good practice is `do not inject environment variable for build configuration`. For this purpose, `meson` does not allow using relative path in toolchain definition. Toolchain path **_must_** be absolute.
@@ -58,17 +61,41 @@ menuconfig
58
61
59
62
# How to build
60
63
64
+
## About build options
65
+
66
+
The Sentry kernel has the following configuration options, that can be added at `meson setup` time using `-D<optname>=<optvalue>`
67
+
68
+
*`with_doc` (boolean, false): Enable support for building docs
69
+
*`with_tests` (boolean, false): Enable unit test suite support through `meson test`
70
+
*`with_proof` (boolean, false): Enable support for frama-C analysis through `meson test`
*`config`: (string): path to the defconfig file. Can be externally provided, while respecting the kernel Kconfig
76
+
*`dts` (string): DTS file path, may be local or any externaly provided DTS file
77
+
*`dts-include-dirs` (array): DTS file include dir for dtsi resolution, depending on the DTS file content
78
+
79
+
It is to note that all the `with_` options are not mandatory, while others are.
80
+
61
81
## meson setup
62
82
The first step in meson build is project setup, this will create a specific build directory for the given options. This step also configures the toolchain to use.
83
+
63
84
Some cross-files describing toolchain configuration are set in `support/meson` directory. More than one cross file can be used if needed.
EVA and WP targets generate `.eva` and `.wp` files in the corresponding test build directory that can then be opened with `ivette` and the Frama-C GUI for analysis.
112
-
In the same time, red-alarms file holding detected RTE are also stored for each test.
140
+
Each Frama-C execution is stored in a dedicated build directory that hold all usual files such as session file, red alarms, flamgraph and so on,
141
+
that allows various post-processing, such as results analysis or Frama-C tools usage such as `ivette` or `frama-c-gui`.
113
142
114
143
## tests
115
144
@@ -141,5 +170,19 @@ meson test -C <builddir> --suite ut-utils
141
170
[...]
142
171
```
143
172
144
-
## doc
145
-
TBD
173
+
## Documentation
174
+
175
+
Sentry documentation is written in the `doc/` subdirectory.
176
+
It can be build if the `with_doc` flag is set to true.
177
+
178
+
There are multiple doc types:
179
+
180
+
* concepts: Overall Sentry concepts definition, and high level documentation, targetting the user or application developer
181
+
* internals: Sentry internal code hierarchy, mostly built using doxygen. This doc is for kernel developers
182
+
* mandb: Sentry UAPI manuals, in groff (man) format, so that it can be used with the `man` utitily
183
+
184
+
The ninja targets associated to these documentations are `doc-concepts` (`doc-concepts-pdf` for PDF generation), `doc-internals` and `mandb`.
185
+
186
+
Generated documentation is in the `$BUILDDIR/doc` directory, and are also deployed in `/usr/share/doc` in case of the usage of the `install` target.
187
+
188
+
More information about the various concepts of the Sentry-kernel and its build system can be found in the `concepts` documentation.
0 commit comments