Сборка образов прошивки/en: различия между версиями

Материал из Wiren Board
(Новая страница: «* Firmware update * Wiren Board 5: Восстановление прошивки/en|Wiren Board…»)
(Новая страница: «E.g., if the repository address is passed http://localhost:8086/, then in sources.list it will be presented as»)
(не показано 8 промежуточных версий этого же участника)
Строка 70: Строка 70:




== Build an image to upload to the controller ==
== Сборка образа для загрузки на контроллер ==


''TODO: this section is incomplete ''
''TODO: раздел требует дополнения''


The scripts for building images are located in the images directory. Before you build the image, you need a ready-made root FS.
Скрипты для сборки образов находятся в директории images. Перед сборкой образа необходима готовая корневая ФС.


Additionally, the host machine will require utilities (names are given for Debian/Ubuntu):
Дополнительно на хост-машине потребуются утилиты (названия приведены для Debian/Ubuntu):


* kpartx
* kpartx
Строка 82: Строка 82:
* u-boot-tools
* u-boot-tools


Example: building firmware for Wiren Board 5, the root filesystem is located here: rootfs/rootfs/:
Пример: собираем образ прошивки для Wiren Board 5, корневая ФС находится по пути rootfs/rootfs/:


<pre>
<pre>
Строка 89: Строка 89:
</pre>
</pre>


Here ''tag'' is the suffix to be added to the image file name.
Здесь ''tag'' - суффикс, который будет добавлен к имени файла образа.


The finished image will lie in the path image/image/wb5/<current_datetime>/<current_datetime>_emmc_<tag>.img.
Готовый образ будет лежать по пути image/image/wb5/<current_datetime>/<current_datetime>_emmc_<tag>.img.




== See also ==
== См. также ==


* [[Special:MyLanguage/Обновление прошивки/en|Firmware update]]
* [[Special:MyLanguage/Обновление прошивки|Обновление прошивки]]
* [[Wiren Board 5: Восстановление прошивки/en|Wiren Board 5: Firmware recovery]]
* [[Wiren Board 5: Восстановление прошивки|Wiren Board 5: Восстановление прошивки]]

Версия 13:57, 3 июня 2019

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

A special set of scripts has been prepared to build the controller firmware images. The image build process consists of two steps:

  1. Preparing the root filesystem (rootfs)
  2. Build an image to upload to the controller

The scripts are located in the wirenboard repository. Then the paths will be indicated from the repository folder



Build an image to upload to the controller


Preparing rootfs

The script for preparing the root FS is located in the rootfs folder.

How to use create_rootfs.sh script:

 $ ./create_rootfs.sh <path_to_new_rootfs> <board_ver> [<list of additional repos>]

Here:

  • path_to_new_rootfs - the name of the directory in which to create the root filesystem. The directory will be created automatically;
  • board_ver - controller revision version. Valid values:
    • 5 - for Wiren Board 5
    • 55 - for Wiren Board 5.5
    • 4 - for Wiren Board 4
    • 32 - for WB Smart Home (3.2)
    • 28
    • NETMON
    • MKA3
    • CQC10
    • MKA31
    • AC-E1
  • list of additional repos -addresses of additional repositories with test packages (see below). This parameter is optional.

Example. Build basic (without additional repositories) root FS in the directory rootfs/rootfs for Wiren Board 5.5:

 $ cd rootfs
 $ ./create_rootfs.sh ./rootfs/ 55


Additional repositories

Additional repositories are necessary if you want to add your own versions of packages to the root FS being built.

Only the address of the repository are sent to the script. For example:

 $ ./create_rootfs.sh ./rootfs/ 55 http://server1.net/ http://server2.net:8086/

The format of the repositories corresponds to the one created by the wbrepo utility. Specifically, the additional repository has the following requirements:

E.g., if the repository address is passed http://localhost:8086/, then in sources.list it will be presented as

 deb http://localhost:8086/ testing main


Сборка образа для загрузки на контроллер

TODO: раздел требует дополнения

Скрипты для сборки образов находятся в директории images. Перед сборкой образа необходима готовая корневая ФС.

Дополнительно на хост-машине потребуются утилиты (названия приведены для Debian/Ubuntu):

  • kpartx
  • device-tree-compiler
  • u-boot-tools

Пример: собираем образ прошивки для Wiren Board 5, корневая ФС находится по пути rootfs/rootfs/:

 $ cd image
 $ ./create_images_wb5.sh ../rootfs/rootfs/ <tag>

Здесь tag - суффикс, который будет добавлен к имени файла образа.

Готовый образ будет лежать по пути image/image/wb5/<current_datetime>/<current_datetime>_emmc_<tag>.img.


См. также