Как разрабатывать ПО для Wiren Board/en: различия между версиями

Материал из Wiren Board
(Новая страница: «=== Environment ===»)
 
(не показано 18 промежуточных версий этого же участника)
Строка 10: Строка 10:
=== Environment ===
=== Environment ===


Все контроллеры Wiren Board поставляются с полноценным Debian Linux. Архитектура процессора: armel.
All Wiren Board controllers come with full Debian Linux. Processor architecture: armel. The controller uses libc version 2.13.
На контроллере используется libc версии 2.13.


Установка ПО рекомендуется производить с помощью пакетного менеджера Debian, и упаковывать ПО в deb-пакеты
It is recommended to install the software using the Debian package Manager and package the SOFTWARE in deb packages






=== Общие соображения ===
=== General consideration ===


Контроллеры Wiren Board имеют, в зависимости от модели, от 64 до 512MB оперативной памяти. Это значит, что необходимо учитывать потребление памяти при разработке своих программ. Про то, как контролировать потребление памяти в Linux, см. сайт http://www.linuxatemyram.ru/.
Wiren Board controllers have from 64 to 512MB of RAM,  depending on the model. This means that you need to consider memory consumption when developing your programs. For information about how to control memory consumption in Linux, see the website http://www.linuxatemyram.ru/.






=== Сборка пакетов и программ ===
=== Building packages and programs ===


Сборку программ рекомендуется производить на компьютере с Linux, используя специальное разработческое окружение.
It is recommended to build programs on a Linux computer using a special development environment. Compiling and developing directly on the Wiren Board 5 is not recommended due to the small amount of RAM.
Компиляция и разработка непосредственно на Wiren Board 5 не рекомендуется из-за маленького объёма RAM.






==== Разработческое окружение ====
==== Development environment ====


Разработческое окружение предоставляется в виде Docker-контейнера.
The development environment is provided as a Docker container. For its use in Linux, there is a convenient script wbdev. When using an environment, cross-compilation is not necessary. The wbdev script automatically runs the appropriate commands in a virtualized environment with the armel architecture corresponding to the Wiren Board processor architecture.
Для его использования в Linux существует удобный скрипт wbdev.
При использовании окружения, кросс-компиляция не нужна. Скрипт wbdev автоматически запускает соответствующие команды в виртуализованном окружении с архитектурой armel, соответствующей архитектуре процессора Wiren Board.


Сборка пакетов производится с помощью вызова wbdeb, например так:
The Assembly of packages is made by calling the wbdeb, for example:


<pre>
<pre>
$ wbdev chroot #запустить виртуализованное qemu сhroot окружение с Debian 7 архитектуры armel
$ wbdev chroot #run virtualized qemu chroot environment with Debian 7 armel architecture
$ wbdev make # вызвать make в виртуализованном qemu chroot окружении
$ wbdev make # call 'make' in a virtualized qemu chroot environment
$ wbdev cdeb # собрать пакет, написанный на C++ в виртуализованном qemu chroot окружении
$ wbdev cdeb # build a package written in C++ in a virtualized qemu chroot environment
$ wbdev gdeb # собрать пакет, написанный на Go, с использованием кросс-компиляции Go
$ wbdev gdeb # build a package written in Go using cross-compile Go
$ wbdev ndeb # собрать архитектурно-независимый пакет, например содержащий проект на Python
$ wbdev ndeb # collect architecture-independent package, containing for example a project in Python
</pre>
</pre>


Полное описание работы с окружением - в [https://github.com/contactless/wirenboard/blob/master/README.md документации].
Full description of the work with the environment is in the
[https://github.com/contactless/wirenboard/blob/master/README.md documentation].






=== Другие статьи ===
=== Other articles ===


[[Special:MyLanguage/Сборка ядра|Сборка ядра]]
[[Сборка ядра/en|Kernel compilation]]


[[Special:MyLanguage/Сборка образов прошивки|Сборка образов прошивки]]
[[Сборка образов прошивки/en|Firmware image biulding]]


[[Special:MyLanguage/Уникальные идентификаторы|Уникальные идентификаторы]] - для идентификации устройства, привязки софта
[[Уникальные идентификаторы/en|Unique identifiers]]


[[Special:MyLanguage/eMMC flash storage wear level|Узнать степень износа внутреннего накопителя]]  
[[eMMC flash storage wear level|eMMC flash storage wear level]]  


[[Special:MyLanguage/Пересборка Device Tree|Пересборка Device Tree]]
[[Device Tree/en|Device Tree]]

Текущая версия на 13:57, 7 июня 2019

Другие языки:

Note: this article is about how to create new software for Wiren Board, and is intended for programmers;



Environment

All Wiren Board controllers come with full Debian Linux. Processor architecture: armel. The controller uses libc version 2.13.

It is recommended to install the software using the Debian package Manager and package the SOFTWARE in deb packages


General consideration

Wiren Board controllers have from 64 to 512MB of RAM, depending on the model. This means that you need to consider memory consumption when developing your programs. For information about how to control memory consumption in Linux, see the website http://www.linuxatemyram.ru/.


Building packages and programs

It is recommended to build programs on a Linux computer using a special development environment. Compiling and developing directly on the Wiren Board 5 is not recommended due to the small amount of RAM.


Development environment

The development environment is provided as a Docker container. For its use in Linux, there is a convenient script wbdev. When using an environment, cross-compilation is not necessary. The wbdev script automatically runs the appropriate commands in a virtualized environment with the armel architecture corresponding to the Wiren Board processor architecture.

The Assembly of packages is made by calling the wbdeb, for example:

$ wbdev chroot #run virtualized qemu chroot environment with Debian 7 armel architecture
$ wbdev make # call 'make' in a virtualized qemu chroot environment
$ wbdev cdeb #  build a package written in C++ in a virtualized qemu chroot environment
$ wbdev gdeb #  build a package written in Go using cross-compile Go
$ wbdev ndeb # collect architecture-independent package, containing for example a project in Python

Full description of the work with the environment is in the documentation.


Other articles

Kernel compilation

Firmware image biulding

Unique identifiers

eMMC flash storage wear level

Device Tree