How to develop software for Wiren Board

Материал из Wiren Board
Версия от 13:45, 7 июня 2019; RomanKulibaba (обсуждение | вклад) (Новая страница: «The Assembly of packages is made by calling the wbdeb, for example:»)

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

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 #запустить виртуализованное qemu сhroot окружение с Debian 7 архитектуры armel
$ wbdev make # вызвать make в виртуализованном qemu chroot окружении
$ wbdev cdeb # собрать пакет, написанный на C++ в виртуализованном qemu chroot окружении
$ wbdev gdeb # собрать пакет, написанный на Go, с использованием кросс-компиляции Go
$ wbdev ndeb # собрать архитектурно-независимый пакет, например содержащий проект на Python

Полное описание работы с окружением - в документации.


Другие статьи

Сборка ядра

Сборка образов прошивки

Уникальные идентификаторы - для идентификации устройства, привязки софта

Узнать степень износа внутреннего накопителя

Пересборка Device Tree