The official Mender documentation explains how Mender works. This is a board-specific complement to the official documentation.
Board description
UP² is the world’s fastest x86 pro maker board based on the latest Intel platform Apollo Lake. The 40 Pin I/O connector, the multiple USB 3.0 ports, the double Gigabit Ethernet, the HDMI and more other features make it a perfect solution for different domains and products like Robotics, Drone, Machine Vision, Smart Home, Education, Digital Signage, Intelligent Cars, Internet Of Things.
URL: https://up-board.org/upsquared/specifications/
Wiki: https://wiki.up-community.org/Main_Page
Test results
The Yocto Project releases in the table below have been tested by the Mender community. Please update it if you have tested this integration on other Yocto Project releases:
Yocto Project | Build | Runtime |
---|---|---|
sumo (2.5) | 1 |
1. The latest branch on meta-up-board is pyro
, but it is compatible with sumo
branch of poky
and meta-mender
.
Build Means that the Yocto Project build using this Mender integration completes without errors and outputs images.
Runtime Means that Mender has been verified to work on the board. For U-Boot-based boards, the integration checklist has been verified.
Getting started
Prerequisites
- A supported Linux distribution and dependencies installed on your workstation/laptop as described in the Yocto Mega Manual
- NOTE. Instructions depend on which Yocto version you intend to use.
- Google repo tool installed and in your
PATH
.
Configuring the build
Setup Yocto environment
Set the Yocto Project branch you are building for:
# set to your branch, make sure it is supported (see table above)
export BRANCH="sumo"
Create a directory for your mender-up
setup to live in and clone the
meta information.
mkdir mender-up && cd mender-up
Initialize repo manifest:
repo init -u https://github.com/mendersoftware/meta-mender-community \
-m meta-mender-up/scripts/manifest-up.xml \
-b ${BRANCH}
Fetch layers in manifest:
repo sync
Setup build environment
Initialize the build environment:
source setup-environment up
Configure Mender server URL (optional)
This section is not required for a successful build but images that are generated by default are only suitable for usage with the Mender client in standalone mode, due to lack of server configuration.
You can edit the conf/local.conf
file to provide your Mender server configuration, ensuring the generated images and Mender Artifacts are connecting to the Mender server that you are using. There should already be a commented section in the generated conf/local.conf
file and you can simply uncomment the relevant configuration options and assign appropriate values to them.
Build for Hosted Mender:
# 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 MENDER_TENANT_TOKEN
#
MENDER_SERVER_URL = "https://hosted.mender.io"
MENDER_TENANT_TOKEN = "<copy token here>"
Building the image
You can now proceed with building an image:
MACHINE=up-board bitbake upboard-image-sato
Replace upboard-image-sato
with your desired image target.
Using the build output
After a successful build, the images and build artifacts are:
- tmp/deploy/images/up-board/upboard-image-sato-up-board.uefiimg.gz
- tmp/deploy/images/up-board/upboard-image-sato-up-board.mender
The disk image (with .uefiimg.gz
suffix) is used to provision the device storage for devices without Mender running already. Please proceed to below sections (Boot from USB / Boot from on-board eMMC)
On the other hand, if you already have Mender running on your device and want to deploy a rootfs update using this build, you should use the Mender Artifact files, which have .mender
suffix. You can either deploy this Artifact in managed mode with the Mender server (upload it under Releases in the server UI) or by using the Mender client standalone mode.
Boot from USB
The default settings assume that you will write the uefiimg
to the on-board eMMC. To be able to do this you must boot the system using a USB flash drive.
You can create an image suitable to boot from USB flash drive by changing the following in your local.conf
:
MENDER_STORAGE_DEVICE = "/dev/mmcblk0"
to
MENDER_STORAGE_DEVICE = "/dev/sda"
This will will produce an uefiimg
that you can write to a USB flash drive which you can use as a live disk image for provisioning the eMMC, e.g:
zcat tmp/deploy/images/up-board/upboard-image-sato-up-board.uefiimg.gz | sudo dd of=<device to write> bs=8M
WANRING! Double check the device name in above command, to avoid overwriting your running system.
Once you have done this remember to change back to:
MENDER_STORAGE_DEVICE = "/dev/mmcblk0"
Booting from on-board eMMC
Once the system is booted from the USB flash drive you must transfer the upboard-image-sato-up-board.uefiimg.gz
file, e.g using scp
:
scp tmp/deploy/images/up-board/upboard-image-sato-up-board.uefiimg.gz root@192.168.128.61:/tmp
NOTE! Replace IP address from the example to the actual IP address of your device
Once the file is transferred you need to write the uefiimg
to the on-board eMMC by running the following command:
zcat /tmp/upboard-image-sato-up-board.uefiimg.gz | dd of=/dev/mmcblk0 bs=8M
If this post was useful to you, please press like, or leave a thank you note to the contributor who put valuable time into this and made it available to you. It will be much appreciated!