Skip to content
Mender over-the-air software updater client.
Branch: master
Clone or download
kacf Merge pull request #414 from kacf/rootfs-image-v2_correct_behavior
rootfs-image-v2: Make sure to follow the spec regarding `stream-next`.
Latest commit c02de42 Jul 19, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Documentation Update modules: Implement `NeedsArtifactReboot` -> `Automatic`. Apr 16, 2019
client Mender Client HTTP Proxy Support as proposed by Mirza Krak on 07/26/2… May 20, 2019
datastore Remove ability to set RebootRequestedType in non-ascending order. Mar 29, 2019
examples/state-scripts Download_Leave_02 Jul 16, 2019
installer Accept running the unit tests as root user May 21, 2019
statescript readVersion: Avoid unintentional concatenation of multiple lines. Apr 11, 2019
store MEN-2000: Implement initial version of update modules. Feb 28, 2019
support Clean permissions file after Artifact creation in single-file generator Jul 2, 2019
system Fix comments and messages after review. Mar 29, 2019
tests rootfs-image-v2: Make sure to follow the spec regarding `stream-next`. Jul 17, 2019
utils Refactored all store implementations into /store Jul 18, 2017
vendor Update vendored mender-artifact library in mender client May 23, 2019
.gitignore MEN-1972 Failover Mender Server Sep 28, 2018
.gitlab-ci.yml removed race check & cleaned up pipeline accordingly Jul 2, 2019
.travis.yml Remove deploy logic from Travis CI May 22, 2019
CONTRIBUTING.md Merge pull request #341 from mchalski/contributing-commits-guide Feb 25, 2019
LICENSE MEN-2000: Implement initial version of update modules. Feb 28, 2019
LIC_FILES_CHKSUM.sha256 Update licenses file after vendor updates May 23, 2019
Makefile Simplify names of update modules. Apr 24, 2019
README.md Added author information to README May 3, 2019
auth.go MEN-2000: Implement initial version of update modules. Feb 28, 2019
auth_test.go Split OS calls and installer related code into packages. Mar 20, 2019
code-of-conduct.md Add Community Code of Conduct Sep 28, 2018
config.go Make the device type file location configurable May 8, 2019
config_test.go Make the device type file location configurable May 8, 2019
daemon.go MEN-2131: Provide command line interface to force inventory update. May 6, 2019
daemon_test.go MEN-2131: Provide command line interface to force inventory update. May 6, 2019
deployment_log_hook.go Mofidy deployment hook to use latest logrus library May 23, 2019
deployment_logger.go Print version of client each time we enable deployment logging. Mar 5, 2019
deployment_logger_test.go Print version of client each time we enable deployment logging. Mar 5, 2019
device.go Make the device type file location configurable May 8, 2019
error.go Update copyright to Northern.tech and current year. Jul 11, 2017
error_test.go Update copyright to Northern.tech and current year. Jul 11, 2017
identity_data.go Split OS calls and installer related code into packages. Mar 20, 2019
identity_data_test.go Split OS calls and installer related code into packages. Mar 20, 2019
inventory_data.go Split OS calls and installer related code into packages. Mar 20, 2019
inventory_data_test.go Update copyright to Northern.tech and current year. Jul 11, 2017
license_test.go Update copyright to Northern.tech and current year. Jul 11, 2017
main.go Merge pull request #392 from kacf/force_inventory_update May 20, 2019
main_test.go Merge pull request #392 from kacf/force_inventory_update May 20, 2019
mender-default-test.conf MEN-806: Split poll intervals and increase to 30 min. Nov 28, 2016
mender.conf.demo MEN-2383: Support installing most files using Makefile `install` target. Mar 8, 2019
mender.conf.production Include poll intervals in production template. Mar 11, 2019
mender.go Make the device type file location configurable May 8, 2019
mender_logo.png README: added logo png May 25, 2016
mender_test.go Split OS calls and installer related code into packages. Mar 20, 2019
modules_common_test.go Reduce cyclomatic complexity of update module code. Mar 1, 2019
paths.go MEN-2000: Implement initial version of update modules. Feb 28, 2019
paths_local.go Update copyright to Northern.tech and current year. Jul 11, 2017
standalone.go Restore error code 2 behavior when there is nothing to commit. Jun 17, 2019
standalone_test.go Split OS calls and installer related code into packages. Mar 20, 2019
state.go MEN-2131: Provide command line interface to force inventory update. May 6, 2019
state_test.go MEN-2131: Provide command line interface to force inventory update. May 6, 2019
transition.go MEN-2000: Implement initial version of update modules. Feb 28, 2019
transition_test.go MEN-2000: Implement initial version of update modules. Feb 28, 2019
version.go
version_test.go Update copyright to Northern.tech and current year. Jul 11, 2017

README.md

Build Status codecov

Mender: over-the-air updater for embedded Linux devices

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.

Embedded product teams often end up creating homegrown updaters at the last minute due to the need to fix bugs in field-deployed devices. However, the most important requirement for an embedded update process is robustness, for example loss of power at any time should not brick a device. This creates a challenge given the time constraints to develop and maintain a homegrown updater.

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.

Ease of use is addressed with an intuitive UI, comprehensive documentation, a meta layer for the Yocto Project for easy integration into existing environments, and high quality software (see the test coverage badge).

This repository contains the Mender client updater, which can be run in standalone mode (manually triggered through its command line interface) or managed mode (connected to the Mender server).

Mender not only provides the client-side updater, but also the backend and UI for managing deployments as open source. The Mender server is designed as a microservices architecture and comprises several repositories.

Mender logo

Getting started

To start using Mender, we recommend that you begin with the Getting started section in the Mender documentation.

In order to support rollback, the Mender client depends on integration with U-Boot and the partition layout. It is therefore most easily built as part of your Yocto Project image by using the meta layer for the Yocto Project.

Contributing

We welcome and ask for your contribution. If you would like to contribute to Mender, please read our guide on how to best get started contributing code or documentation.

License

Mender is licensed under the Apache License, Version 2.0. See LICENSE for the full license text.

Security disclosure

We take security very seriously. If you come across any issue regarding security, please disclose the information by sending an email to security@mender.io. Please do not create a new public issue. We thank you in advance for your cooperation.

Installing from source

Requirements

LZMA support opt-out

If no LZMA Artifact compression support if desired, you can ignore the liblzma-dev package dependency and substitute the make commands in the instructions below for:

make TAGS=nolzma

Steps

To install Mender on a device from source, please run the following commands inside the cloned repository:

make
sudo make install

Installation notes

Installing this way does not offer a complete system updater. For this you need additional integration steps. However, it is possible to use Update Modules and update other parts of the system.

In order to connect to a Mender server, you either need to get a Hosted Mender account, or set up a server environment. If you are setting up a demo environment, you will need to put the support/demo.crt file into /etc/mender/server.crt on the device and add the configuration line below to /etc/mender/mender.conf after the installation steps above:

  "ServerCertificate": "/etc/mender/server.crt"

Keep in mind that /etc/mender/mender.conf will be overwritten if you rerun the sudo make install command.

Important: demo.crt is not a secure certificate, and should only be used for demo purposes, never in production.

Cross-compiling

Requirements

Build steps

Cross-compiler setup

Download the cross-compiler required for your device. Then add the cross-compiler bin/ subfolder in your path and set the CC variable accordingly using the commands:

export PATH=$PATH:<path_to_my_cross_compiler>/bin
export CC=<cross_compiler_prefix>

For intance, to cross-compiling for Raspberry Pi:

git clone https://github.com/raspberrypi/tools.git
export PATH="$PATH:$(pwd)/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin"
export CC=arm-linux-gnueabihf-gcc

liblzma dependency

Donwload, extract, compile, and install liblzma with the following commands:

wget -q https://tukaani.org/xz/xz-5.2.4.tar.gz
tar -xzf xz-5.2.4.tar.gz
cd xz-5.2.4
./configure --host=<target-arch> --prefix=$(pwd)/install
make
make install

Where target-arch should match your device toolchain, for example arm-linux-gnueabihf

Export an env variable for later use:

export LIBLZMA_INSTALL_PATH=$(pwd)/install

Build steps

Now, to cross-compile Mender, run the following commands inside the cloned repository:

make CGO_CFLAGS="-I${LIBLZMA_INSTALL_PATH}/include" CGO_LDFLAGS="-L${LIBLZMA_INSTALL_PATH}/lib" \
CGO_ENABLED=1 GOOS=linux GOARCH=<arch>

Where arch is the target architecture (for example arm). See all possible values for GOARCH in the source code. Also note that for arm architecture you also need to specify which family to compile for with GOARM; for more information see this link

You can deploy the mender client file tree in a custom directory in order to send it to your device afterwards. To deploy all mender client files in a custom directory, run the command:

make prefix=<custom-dir> install

Where custom-dir is the destination folder for your file tree

Finally, copy this file tree into your target's device rootfs. You can do it remotely using SSH, for example.

See also Installation notes

Running

Once installed, Mender can be enabled by executing:

systemctl enable mender && systemctl start mender

Connect with us

Authors

Mender was created by the team at Northern.tech AS, with many contributions from the community. Thanks everyone!

Mender is sponsored by Northern.tech AS.

You can’t perform that action at this time.