Skip to content

Commit 3f4d446

Browse files
Merge pull request #13 from deryugina/master
Try to improve the structure of ru-documentation
2 parents c86f11d + 1f12e86 commit 3f4d446

9 files changed

+47
-57
lines changed

en/embox_quick_start_en.md

Lines changed: 45 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -7,31 +7,28 @@ Clone git repository:
77
```
88
$ git clone https://github.com/embox/embox
99
```
10-
Or download as an archive [https://github.com/embox/embox/releases](https://github.com/embox/embox/releases)
11-
10+
Or download as an archive:
11+
```
12+
[https://github.com/embox/embox/releases](https://github.com/embox/embox/releases/)
13+
```
1214
## Work on Windows or MacOS
1315
### Please follow the next recommendations:
14-
15-
Download an actual version of PowerShell
16-
17-
[How to download PowerShell](https://learn.microsoft.com/en-us/powershell/scripting/install/installing-powershell-on-windows?view=powershell-7.3)
18-
19-
Open PowerShell as an administrator and install WSL2 (please pay your attention to the demands on Windows version)
20-
21-
[How to install WSL2](https://learn.microsoft.com/en-us/windows/wsl/install-manual)
22-
16+
Download an actual version of PowerShell:
2317
```
24-
Before the next step upgrade WSL1 to WSL2 if you did'nt do this(the instruction is in a link above). In other way Embox won't run on Windows
18+
[How to download PowerShell](https://learn.microsoft.com/en-us/powershell/scripting/install/installing-powershell-on-windows?view=powershell-7.3/)
2519
```
20+
Open PowerShell as an administrator and install WSL2 (please pay your attention to the demands on Windows version):
21+
```
22+
[How to install WSL2](https://learn.microsoft.com/en-us/windows/wsl/install-manual)
23+
```
24+
Before the next step upgrade WSL1 to WSL2 if you did'nt do this(the instruction is in a link above). In other way Embox won't run on Windows.
2625

27-
Download Ubuntu from Microsoft Store
28-
26+
### Download Ubuntu from Microsoft Store
2927
Check yout version of WSL the next way: insert the command below in PowerShell:
3028
```
3129
wsl -l -v
3230
```
3331
Run the commands below in command line of Ubuntu for installing necessary programs:
34-
3532
```
3633
sudo apt-get update
3734
sudo apt-get install unzip
@@ -42,14 +39,15 @@ Run the commands below in command line of Ubuntu for installing necessary progra
4239
sudo apt-get install python3
4340
sudo apt-get install python-is-python3
4441
```
45-
Clone version of embox to yourself(use https or ssh)
46-
47-
git clone <https://github.com/embox/embox.git>
48-
git clone <[email protected]:embox/embox.git>
42+
Clone version of embox to yourself(use https or ssh):
43+
```
44+
git clone <https://github.com/embox/embox.git>
45+
git clone <[email protected]:embox/embox.git>
46+
```
4947

5048
Open the directory of the embox project
5149
```
52-
cd embox
50+
cd embox
5351
```
5452
Run the next three commands
5553
```
@@ -59,14 +57,13 @@ Run the next three commands
5957
```
6058
P.S.: If you have any problems with running Embox on Windows -- please check a correctness of the inserted commands.
6159
If it's correct -- you can use the recommendations from the article(the link is below):
62-
63-
[How to solve problems with WSL](https://learn.microsoft.com/en-us/windows/wsl/troubleshooting)
64-
65-
60+
```
61+
[How to solve problems with WSL](https://learn.microsoft.com/en-us/windows/wsl/troubleshooting)
62+
```
6663

6764
## Enviroment Settings
6865
Minimal required packages: *make*, *gcc*, (cross-compiler for target platform. see "Cross-compiler installation").
69-
Optional packages which are recomended to install at once: *build-essential*, *gcc-multilib*, *curl*, *libmpc-dev*, *python*.
66+
Optional packages, which are recomended to install at once: *build-essential*, *gcc-multilib*, *curl*, *libmpc-dev*, *python*.
7067

7168
For Debian/Ubuntu:
7269
```
@@ -96,16 +93,23 @@ or for Debian:
9693
```
9794
$ sudo apt install gcc-arm-none-eabi
9895
```
99-
You can also download the archive with ARM cross-tools from [https://launchpad.net/gcc-arm-embedded](https://launchpad.net/gcc-arm-embedded)
96+
You can also download the archive with ARM cross-tools from [https://launchpad.net/gcc-arm-embedded](https://launchpad.net/gcc-arm-embedded).
10097
Extract files from archive and set *PATH* enviroment variable:
10198
```
10299
$ export PATH=$PATH:<path to toolchain>/gcc-arm-none-eabi-<version>/bin
103100
```
104101

105102
***SPARC, Microblaze, MIPS, PowerPC, MSP430***:
106103
You can try to use some cross-compiler based on gcc in case if you already have a suitable one.
107-
But it would be better if you will use our project for cross-compiler installation [https://github.com/embox/crosstool](https://github.com/embox/crosstool).
108-
You can use already ready-to-use archives from [https://github.com/embox/crosstool/releases](https://github.com/embox/crosstool/releases). Or you can build cross-compiler with the script in the project's root folder:
104+
But it would be better if you will use our project for cross-compiler installation:
105+
```
106+
[https://github.com/embox/crosstool](https://github.com/embox/crosstool)
107+
```
108+
You can use already ready-to-use archives from:
109+
```
110+
[https://github.com/embox/crosstool/releases](https://github.com/embox/crosstool/releases)
111+
```
112+
Or you can build cross-compiler with the script in the project's root folder:
109113
```
110114
$ ./crosstool.sh ARCH
111115
```
@@ -147,28 +151,30 @@ Example of how to build with 4 parallel jobs:
147151
```
148152
$ make -j4
149153
```
150-
151154
Now you are able to run Embox:
152155
```
153156
$ ./scripts/qemu/auto_qemu
154157
```
155158
Console output example:
156159
```
157160
Embox kernel start
158-
unit: initializing embox.kernel.task.task_resource: done
159-
unit: initializing embox.mem.vmem_alloc: done
161+
unit: initializing embox.kernel.task.task_resource: done
162+
unit: initializing embox.mem.vmem_alloc: done
160163
```
161164
If all unit tests passed successfully and all modules loaded, then command prompt will appear.
162165
Now you can execute commands included in the configuration (`mods.conf`). You can start with ***help*** command which prints list of available commands.
163166

164167
Press ***ctrl+’A’*** and then `***x***` to exit from Qemu.
165168

166169
## Preliminaries to Mybuild build system
167-
Embox is modular and configurable. Declarative program language Mybuild has been developed for these features. Mybuild allows to describe both single modules and whole target system.
170+
Embox is modular and configurable. Declarative program language "Mybuild" has been developed for these features. Mybuild allows to describe both single modules and whole target system.
171+
168172
A module is a base concept for build system. A module description contains: source files list, options which can be set for the module during configuration, and dependences list.
173+
169174
The configuration is a particular description of the whole system. It contains list of required modules, modules options and build rules (cross-compiler, additional compiler flags, memory map etc.).
175+
170176
Graph of the system will be based on the configuration and modules descriptions.
171-
Build system then generates different build artifacts: linker scripts, makefiles, headers.
177+
Build system, that generates different build artifacts: linker scripts, makefiles, headers.
172178
It's not necesary to include all modules, they will be enabled using dependencies for each module included in the initial configuration list.
173179

174180
Current configuration locates in ***conf/*** folder. It can be set up with:
@@ -179,8 +185,7 @@ For example, to set up demo configuration for qemu-arm you should do the followi
179185
```
180186
$ make confload-arm/qemu
181187
```
182-
183-
Use
188+
Use:
184189
```
185190
$ make confload
186191
```
@@ -198,22 +203,18 @@ Source code of Embox application is usual POSIX program written in C, and so can
198203
To add your own simplest application "Hello world" you can do the following:
199204

200205
* Create folder *hello_world* in *src/cmds*:
201-
202206
```
203207
$ mkdir src/cmds/hello_world
204208
```
205209
* Create *src/cmds/hello_world/hello_world.c*:
206-
207210
```
208211
#include <stdio.h>
209212
210213
int main(int argc, char **argv) {
211214
printf("Hello, world!\n");
212215
}
213216
```
214-
215217
* Create file *src/cmds/hello_world/Mybuild* with your module description:
216-
217218
```
218219
package embox.cmd
219220
@@ -223,27 +224,19 @@ To add your own simplest application "Hello world" you can do the following:
223224
source "hello_world.c"
224225
}
225226
```
226-
227227
* Now add the application into your configuration *conf/mods.conf*:
228-
229228
```
230229
include embox.cmd.hello_world
231230
```
232-
233231
* Build Embox:
234-
235232
```
236233
$ make
237234
```
238-
239235
* Run Embox:
240-
241236
```
242237
$ ./scripts/qemu/auto_qemu
243238
```
244-
245239
* Type ***help*** in Embox console to check if there is ***hello_world*** in commands list. Execute ***hello_world*** command and you will see:
246-
247240
```
248241
root@embox:/#hello_world
249242
Hello, world!
@@ -252,7 +245,6 @@ To add your own simplest application "Hello world" you can do the following:
252245

253246
### Mybuild file for "Hello World"
254247
Let's look at the Mybuild file from "Hello world" example in more details:
255-
256248
```
257249
package embox.cmd
258250
@@ -262,21 +254,20 @@ Let's look at the Mybuild file from "Hello world" example in more details:
262254
source "hello_world.c"
263255
}
264256
```
265-
266257
The first line contains package name ***embox.cmd***. In Embox all modules are organized into packages.
267258
Full module name consist of the corresponding package name appended with module name. Module name is defined in string ***module hello_world***.
268259

269260
## Debugging
270261
You can use the same script with *-s -S -no-kvm* flags for debugging:
271262
```
272-
$ sudo ./scripts/qemu/auto_qemu -s -S -no-kvm
263+
$ sudo ./scripts/qemu/auto_qemu -s -S -no-kvm
273264
```
274265
After running that QEMU waits for a connection from a gdb-client. Run gdb in the other terminal:
275266
```
276-
$ gdb ./build/base/bin/embox
277-
...
278-
(gdb) target extended-remote :1234
279-
(gdb) continue
267+
$ gdb ./build/base/bin/embox
268+
...
269+
(gdb) target extended-remote :1234
270+
(gdb) continue
280271
```
281272
The system starts to load.
282273

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
# Пример добавления драйвера
2+
Раздел в разработке

ru/embox_blinking_led_example_ru.md renamed to ru/examples/embox_blinking_led_example_ru.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,3 +85,4 @@ int main(int argc, char *argv[]) {
8585
```
8686

8787
Отличие от примера с простым миганием светодиодом заключается в использовании еще одного вывода, который переключен в режим прерывания с помощью функции gpio_setup_mode(). А с помощью функции gpio_irq_attach() на событие по изменению состояния на выводе подключенном к кнопке, повешен обработчик. В обработчике происходит инвертирование значения на выходе светодиода.
88+
File renamed without changes.
File renamed without changes.

ru/embox_supported_platforms_arm_ru.md renamed to ru/platforms/embox_supported_platforms_arm_ru.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,3 @@ Embox поддерживает несколько популярных аппа
1010
* IMX6
1111
* Raspberry Pi
1212
* BeagleBoard
13-

ru/embox_supported_platforms_qemu_ru.md renamed to ru/platforms/embox_supported_platforms_qemu_ru.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,3 @@ make
3030
$ ./scripts/qemu/auto_qemu
3131
```
3232
данный скрипт разберет содержимое конфигурационных файлов в папке conf/ и запустит qemu c нужными параметрами. Для каждой архитектуры будет выбрана своя платформа по умолчанию.
33-
File renamed without changes.

ru/embox_supported_platforms_x86_ru.md renamed to ru/platforms/embox_supported_platforms_x86_ru.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,3 @@ Embox поддерживает:
77
* qemu-system-i386
88
* Загрузка через GRUB
99
* BifferBoard
10-

0 commit comments

Comments
 (0)