Files
buildroot/package/mender/readme.txt
Adam Duskett 67c6d1b12c package/mender: bump version to 3.5.3
Updating directly to 4.x is too difficult and complex, as mender 4.x is
a complete rewrite in C++, with several new dependencies and changes.

As such, update to the last version that was written in Go, which is
3.5.3. The following changes are necessary:

The artifact_info file is no longer supported. Instead, mender now expects a
bootstrap.mender artifact created by mender-artifact /var/lib/mender.
See the following for more information:
https://northerntech.atlassian.net/browse/MEN-2585
https://northerntech.atlassian.net/browse/MEN-2583
https://docs.mender.io/release-information/release-notes-changelog/mender-client#mender-3-5-0-1
https://github.com/mendersoftware/mender/blob/3.5.3/Documentation/automatic-bootstrap-artifact.md

  - Remove all instances of creating or copying an artifact_info file
    from board examples and package/mender.

  - Add a generate_mender_bootstrap_artifact method to
    board/mender/x86_64/post-image-efi.sh which creates a proper
    bootstrap.mender file and places it in the data partition.

  - Add a post-build.sh script to support/testing/tests/package/test_mender
    with the same generate_mender_bootstrap_artifact method with one change:
    As the rootfs.ext4 file is not yet created; we omit the optional
    --provides "rootfs-image.checksum:${img_checksum}" argument when
    generating the bootstrap.mender file.

Mender expects the device_type file to exist in /var/lib/mender/device_type.
  This is further supported by the following line in tests/Dockerfile.daemon:
  `echo device_type=docker-client > /var/lib/mender/device_type`

Add a migration section in docs/manual/migrating.adoc

Update the package/mender/readme.txt to include a quick mention of the
bootstrap.mender artifact change.

License changes:

New:
vendor/github.com/klauspost/compress/internal/snapref/LICENSE (BSD-3-Clause)
vendor/github.com/klauspost/compress/zstd/internal/xxhash/LICENSE.txt (MIT)

Removed:
vendor/github.com/klauspost/compress/internal/snapref/LICENSE
vendor/github.com/klauspost/compress/zstd/internal/xxhash/LICENSE.txt

Modified:
LICENSE: Update year from 2022 to 2024
LIC_FILES_CHKSUM.sha256: Sum of all Licenses changed
vendor/github.com/mendersoftware/mender-artifact/LICENSE
  - Update year from 2022 to 2023

Signed-off-by: Adam Duskett <adam.duskett@amarulasolutions.com>
[Arnout:
  - fix LIC_FILES_CHKSUM.sha256 hash
  - Better URL for bootstrap artifact doc
  - Migrate to 2025.02 instead of 2024.11
  - Improve migrating text (editorial changes)
]
Signed-off-by: Arnout Vandecappelle <arnout@mind.be>
2025-02-04 15:00:19 +01:00

133 lines
4.7 KiB
Plaintext

=== Notes on using Mender on Buildroot
======================================
Mender is an open source over-the-air (OTA) software updater for
embedded Linux devices. Mender comprises a client running at the
embedded device, as well as a server that manages deployments across
many devices. There is also various tooling around the Mender project,
such as 'mender-artifact' which is used to create Mender Artifacts
that are compatible with the Mender client and server.
Mender aims to address this challenge with a robust and easy to use
updater for embedded Linux devices, which is open source and available
to anyone.
Robustness is ensured with atomic image-based deployments using a dual
A/B rootfs partition layout. This makes it always possible to roll
back to a working state, even when losing power at any time during the
update process.
The official documentation is a good resource to get an in depth
understanding of how Mender works:
https://docs.mender.io
In Buildroot the following packages are provided:
- BR2_PACKAGE_MENDER
- This will install the client on target rootfs
- BR2_PACKAGE_HOST_MENDER_ARTIFACT
- This will install the 'mender-artifact' tool in host rootfs.
- BR2_PACKAGE_MENDER_CONNECT
- This installs a client that allows for remote terminal access
to mender clients registered on a mender server.
- BR2_PACKAGE_MENDER_GRUBENV
- This package provides boot scripts to integrate mender into grub.
Mender recommends every client to use this package, including boards
using uboot as the primary bootloader.
To fully utilize atomic image-based deployments using the A/B update
strategy, additional integration is required in the bootloader. This
integration is board specific.
Currently supported bootloaders are GRUB and U-boot. Buildroot provides
a reference integration at board/mender/x86_64/ using the
mender_x86_64_efi_defconfig file.
Additional support and integrations are found at:
https://github.com/mendersoftware/buildroot-mender
Default configurations files
----------------------------
Buildroot comes with a default configuration and there a couple of
files that need your attention:
- /etc/mender/mender.conf
- main configuration file for the Mender client
- https://docs.mender.io/client-installation/configuration/configuration-options
- /var/lib/mender/device_type
- A string that defines the type of device
Mender server configuration
---------------------------
The Mender server can be setup in different ways, and how you
configure the Mender client differs slightly depending on which server
environment is used.
- Mender demo environment
This is if you have followed the Getting started documentation where
you launch a Mender server locally and to configure your environment
to connect to this local server you need to provide the IP address of
the server on the local network.
By default the demo environment will connect to 'docker.mender.io' and
's3.docker.mender.io' and we need to make sure that these are resolved
to the local IP address of the running server by adding the following
entry to '/etc/hosts'
<ip address of demo environment> docker.mender.io s3.docker.mender.io
This is required because the communication between client and server
is utilizing TLS and the provided demo server certificate (server.crt)
is only valid for 'docker.mender.io' and 's3.docker.mender.io'
domains.
- Hosted Mender
To authenticate the Mender client with the Hosted Mender server you
need a tenant token.
To get your tenant token:
- log in to https://hosted.mender.io
- click your email at the top right and then “My organization”
- press the “COPY TO CLIPBOARD”
- assign content of clipboard to TenantToken
Example mender.conf options for Hosted Mender:
{
...
"ServerURL": "https://hosted.mender.io",
"TenantToken": "<paste tenant token here>"
...
}
Creating Mender Artifacts
-------------------------
To create Mender Artifacts based on Buildroot build output you must
include BR2_PACKAGE_HOST_MENDER_ARTIFACT in your configuration, and
then you would typically create the Mender Artifact in a post image
script (BR2_ROOTFS_POST_IMAGE_SCRIPT). See the generate_mender_image
method in board/mender/x86_64/post-image-efi.sh for a working example.
Additionally, mender requires a bootstrap.mender file which is also
generated using the host-mender-artifact package. See the
generate_mender_bootstrap_artifact method in
board/mender/x86_64/post-image-efi.sh for an example
Configuring Mender with certificates
------------------------------------
Mender uses TLS to communicate with the management server, and if you
use a CA-signed certificate on the server, you must include
BR2_PACKAGE_CA_CERTIFICATES in your configuration to authenticate TLS
connections.