Skip to content

Commit 2f27a32

Browse files
committed
Fixed some little problems
1 parent db6a4f9 commit 2f27a32

File tree

1 file changed

+30
-31
lines changed

1 file changed

+30
-31
lines changed

en/embox_modular_structure_en.md

Lines changed: 30 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Important features of Embox are: **modularity** and **configurability**.
44

5-
A modularity is splitting project into small logical parts that is modules.
5+
A **modularity** is splitting project into small logical parts that is modules.
66

77
And **configurability** is ability to determinate the characteristics of the end system,
88
based on list of modules and their parameters.
@@ -28,13 +28,14 @@ The example of package naming:
2828
### Interfaces and abstract modules
2929
Interfaces for modules are direct analogues of abstract classes and interfaces in OOP.
3030

31-
Module description language supports **interface** that allows to to introduce the **interface** concept (modules without implementation)
32-
and **abstract modules** (modules with partial implementation).
31+
**Module description language** supports **interface** that allows to to introduce the next points:
3332

34-
This method allows you to choose from the list of modules (that implement the same interface, but have different algorithm) the needed one.
33+
* the **interface** concept (modules without implementation)
34+
* **abstract modules** (modules with partial implementation)
3535

36-
To mark a module as inherited, you need to use `abstract` keyword.
36+
This method allows you to choose from the list of modules (that implement the same interface, but have different algorithms) the needed one.
3737

38+
To mark a module as inherited, you need to use the `abstract` keyword.
3839
The example of module declaration:
3940
```java
4041
package embox.arch
@@ -43,7 +44,6 @@ The example of module declaration:
4344
//...
4445
```
4546
To point at inheritance, we use `extends` keyword.
46-
4747
The instance of inheritance from the abstract module:
4848
```java
4949
module interrupt_stub extends embox.arch.interrupt {
@@ -59,29 +59,30 @@ Description of every module consists of several possible attributes:
5959

6060
#### Files of source code
6161
A module can point at list of file, which you need to compile and to add in a final image.
62-
Except "ordinary" files in C and assembler, it's possible to include header files and additional linker scripts.
6362

64-
Types of files differ according to file extension: `.c/.S`, `.h`, `.lds.S`.
63+
Except **"ordinary" files** in C and assembler, it's possible to include **header files** and **additional linker scripts**.
64+
65+
**Types of files differ according to file extension: ".c/.S", ".h", ".lds.S".**
6566

66-
**.c/.S** is a source code, written in C or assembler. In the assembly process it's compelled and included in final image of system.
67+
**".c/.S"** is a **source code**, written in C or assembler. In the assembly process it's compelled and included in final image of system.
6768
During the compilation it's possible to get values of options of module that connected with files of source code.
6869

69-
**.h** is a header file containing the definitions, needed for implementation of interface.
70+
**".h"** is a **header file** containing the definitions, needed for implementation of interface.
7071
During the building of module the special header file is generated. It has all listed .h-files of this module.
7172

7273
It allows you to use different implementations of some interface without changing the source code of the modules that use it.
7374
Such way of abstraction is necessary, because different implementations can define one or the other structure in different ways
7475
while this structure can be used by other modules without knowledge about details of implementation.
7576

76-
**.lds.S** are linker scripts that allow you to affect on loading the modules in final image. The typical using is an addition of new sections.
77+
**".lds.S"** are **linker scripts** that allow you to affect on loading the modules in final image. The typical using is an addition of new sections.
7778

78-
The example of adding the **.h-file** to the module:
79+
The example of adding the **".h-file"** to the module:
7980
```java
8081
module interrupt_stub extends embox.arch.interrupt {
8182
source "interrupt_stub.h"
8283
}
8384
```
84-
The instance of adding the **.lds.S-file** and **.c-file** to the module:
85+
The instance of adding the **".lds.S-file"** and **".c-file"** to the module:
8586
```java
8687
module static_heap extends heap_place {
8788
//...
@@ -94,18 +95,16 @@ The instance of adding the **.lds.S-file** and **.c-file** to the module:
9495

9596
#### Options
9697
**The characteristics of options:**
97-
9898
* allow you to define numerical, boolean and string parameters at the configuration stage
99-
* their parameters can affect how the module is assembled, initialized and how it works
10099
* can have default value, if the value doesn't exist -- ad it to your configuration
101100

102101
Options allow you to define **numerical**, **boolean** and **string parameters** at the configuration stage.
103-
These parameters can affect how the module is assembled, initialized and how it works.
102+
103+
These **parameters can affect how the module is assembled, initialized** and **how it works**.
104104

105105
To define a type of some options, it's needed to write it after the `option` keyword.
106106

107107
To get a value of some option during the compilation of source code, it's used the next **special macros**:
108-
109108
* **OPTION_STRING_GET** is for string options
110109
* **OPTION_NUMBER_GET** is for numerical options
111110
* **OPTION_BOOLEAN_GET** is for boolean options
@@ -114,24 +113,24 @@ The argument of macro is option name defined in **my-file**.
114113
#### Dependencies
115114
**Dependencies** are the way to show to the assembly system that the correct module working is impossible without other ones.
116115

117-
The list of dependencies can include some interfaces. It means that only one module implemented required interface can be included in a building.
116+
The **list of dependencies** can include some interfaces.
117+
It means that only one module implemented required interface can be included in a building.
118118

119-
Use the `depends` attribute to define dependencies between modules.
119+
Use the **"depends"** attribute to define dependencies between modules.
120120
You can count modules and interfaces in value of this attribute.
121121

122122
Assembly system guarantees that the dependencies of specific module will be added when this module is included in the system.
123-
We use of the interface implementations in case when dependencies have interface.
124123

125-
In some cases you just need to add a module what you need without changing the loading order.
126-
This method is used for such global modules as, for example: **multiprocessing support**, **logging**, **debug statement (assert)**.
124+
In some cases you just need **to add a module** what you need **without changing the loading order**.
125+
This method is used for such global modules as, **for example**: **"multiprocessing support"**, **"logging"**, **"debug statement" (assert)**.
126+
127+
Due to the fact that these **modules don't have a status** in the usual sence (such as **"loaded"** or **"unloaded"**),
128+
it's required to add the ***@NoRuntime*** annotation to the **"depends"** attribute.
127129

128-
Due to the fact that these modules don't have a status in the usual sence (such as "loaded" or "unloaded"),
129-
it's required to add the *@NoRuntime* annotation to the **depends** attribute.
130130
In this case, the dependencies will be used during the building , but won't determine module loading order.
131131

132132
### Annotations
133133
**The characteristics of annotations:**
134-
135134
* are used for changing the semantics of description elements
136135
* allow to extend description language without changing the grammar
137136
* make description language more flexible
@@ -144,17 +143,17 @@ The instance of implementation the abstract module with help of the annotation:
144143

145144
## Configuration description
146145
**Module description** is used to create a target image.
146+
147147
During the configuration the assembly system allows to merge modules of system (e. g. kernel modules, drivers, tests, applications)
148148
and to install parameters for these, and also to define additional parameters to create an image for different hardware platforms.
149149

150150
### The structure of configuration
151-
Image configuration is running through file editing in the **conf/** directory.
151+
Image configuration is running through file editing in the **"conf/"** directory.
152152
It contains the following:
153-
154-
* **lds.conf** -- contains the definition of memory card, which is used by specific hardware platforms
155-
* **mods.conf** -- contains names and options of modules, which will be included in OS image.
153+
* **"lds.conf"** -- contains the definition of memory card, which is used by specific hardware platforms
154+
* **"mods.conf"** -- contains names and options of modules, which will be included in OS image.
156155
Also you can set every modules in this file to new values
157-
* **rootfs** -- contains files, which will be included into the file system
156+
* **"rootfs"** -- contains files, which will be included into the file system
158157

159158
### Configuration process
160159
To use some module in OS image means to add it into some OS configuration.
@@ -169,7 +168,7 @@ For example, to get a basic configuration to support x86 platform, use the next
169168
```
170169
make confload-x86/qemu
171170
```
172-
This command loads basic "qemu" configuration for x86 platform in the **conf/** directory.
171+
This command loads basic "qemu" configuration for x86 platform in the **"conf/"** directory.
173172

174173
The list of basic configurations you can see and choose the needed one, type:
175174
```

0 commit comments

Comments
 (0)