Mender
Mender is an open source remote software updater for embedded Linux devices. It enables management of software updates to connected devices remotely over any TCP/IP network.
For a high-level introduction to Mender and its architecture, visit Mender.io.
Follow the instructions to update your device by Mender.
- You need to build a OES Prime image with Mender
!!! note
Refer to Yocto tutorial for more information.
Initialize your environment:
bash init.sh -d poky-OES Prime-mender
source poky/oe-init-build-env build
Add following to $OES Prime-IMAGE/meta-layers/meta-emlid-OES Prime/meta-OES Prime-distro/recipes-core/images/OES Prime-image.bbappend
:
require recipes-core/images/OES Prime-mender-image.inc
Run bitbake OES Prime-image
- You need to flash your OES Prime S1 module and boot
Image: $BUILD/tmp/deploy/images/OES Prime-S1/*.sdimg
!!! note
Download and install OES Prime Flasher to update OES Prime S1 firmware.
- Connect your module to Internet Network
!!! note
Refer to Connectivity examples for more information.
- Run a simple HTTP server on your build machine
Go to the build directory, mender file has to be there.
Mender file’s name is OES Prime-image-OES Prime-S1-(...).mender
cd $BUILD/tmp/deploy/images/OES Prime-S1
Run a server by the following command:
python -m SimpleHTTPServer
Figure out your build machine’s ip address, we use 192.168.1.4
as an example.
- Run an update
root@OES Prime-S1:~# mender -rootfs http://192.168.1.4:8000/OES Prime-image-OES Prime-S1-(...).mender
Check a progress status and wait for a result.
root@OES Prime-S1:~# mender -rootfs http://192.168.1.4:8000/OES Prime-image-OES Prime-S1-20180919125739.mender
INFO[0000] Performing remote update from: [http://192.168.1.4:8000/OES Prime-image-OES Prime-S1-20180919125739.mender]. module=rootfs
Installing update from the artifact of size 141756416
INFO[0000] opening device /dev/mmcblk2p3 for writing module=block_device
INFO[0000] partition /dev/mmcblk2p3 size: 746586112 module=block_device
................................ 0% 1024 KiB
................................ 1% 2048 KiB
...
................................ 99% 138240 KiB
................................ 100% 138434 KiB
INFO[0199] wrote 746586112/746586112 bytes of update to device /dev/mmcblk2p3 module=device
INFO[0200] Enabling partition with new image installed to be a boot candidate: 3 module=device
-
Reboot your module
- Check a mender status (boot partition) and commit an update
root@OES Prime-S1:~# mender -commit
INFO[0000] Commiting update module=device