Difference between revisions of "iMX8M Industrial Mender"
Line 57: | Line 57: | ||
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 [https://docs.mender.io/artifact-creation/standalone-deployment?target=_blank Standalone deployments], due to lack of server configuration. | 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 [https://docs.mender.io/artifact-creation/standalone-deployment?target=_blank Standalone deployments], due to lack of server configuration. | ||
− | Edit the ''conf/local.conf'' file to provide the Mender server configuration, ensuring the generated images and Mender Artifacts are connecting to the Mender server that are used. There should already be a commented section in the generated ''conf/local.conf'' file. Thus simply uncommenting the relevant configuration options and assigning appropriate values to them is sufficient. | + | Edit the ''conf/local.conf'' file to provide the Mender server configuration, ensuring that the generated images and Mender Artifacts are connecting to the Mender server that are used. There should already be a commented section in the generated ''conf/local.conf'' file. Thus simply uncommenting the relevant configuration options and assigning appropriate values to them is sufficient. |
Build for Hosted Mender: | Build for Hosted Mender: |
Revision as of 19:16, 9 December 2023
This Wiki page describes Mender OTA updater integration into the Yocto Project for the iMX8M Industrial Development Kit. Mender is a secure, robust and industry leading software update system capable to handle a large number of devices.
Mender supports several extensions enabling features like Remote Terminal, Port Forward, File Transfer, and Device Configuration, together with the ability to monitor and alert.
The steps described on this Wiki page are primarily focused on complying Mender updater into the Yocto Project. The well written official Mender documentation covers all the other important aspects of this utility.
Prerequisites
In-depth information can be found in the Yocto mega manual, a forum thread concerning repo usage for Mender integration can provide additional insight as well.
Because the Mender utility will be integrated into the Yocto Project Release 3.1 (dunfell), the Mender layer share the same steps for host machine setup as the Yocto Project.
To prepare the machine, follow the Yocto Project Prerequisites Wiki page.
Configuring the build
Setup Yocto environment
Set the Yocto Project branch to build for:
export BRANCH="dunfell"
Create a directory for the mender-<TARGET> setup to work in and clone the meta information:
mkdir mender-<TARGET> && cd mender-<TARGET>
Initialize repo manifest:
repo init -u https://github.com/mendersoftware/meta-mender-community \ -m meta-mender-<TARGET>/scripts/manifest-<TARGET>.xml \ -b ${BRANCH}
Fetch layers in manifest:
repo sync
Setup build environment
Initialize the build environment:
source setup-environment <TARGET>
Note: Accepting the Freescale EULA at …/sources/meta-freescale/EULA is required. Please read it and continue by accepting it in the local.conf file:
ACCEPT_FSL_EULA = "1"
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 deployments, due to lack of server configuration.
Edit the conf/local.conf file to provide the Mender server configuration, ensuring that the generated images and Mender Artifacts are connecting to the Mender server that are used. There should already be a commented section in the generated conf/local.conf file. Thus simply uncommenting the relevant configuration options and assigning appropriate values to them is sufficient.
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
Everything was setup to proceed with building an image:
MACHINE=imx8mq-voipac bitbake core-image-base
Replace core-image-base with your desired image target.
Using the build output
After a successful build, the images and build artifacts are placed in tmp/deploy/images/imq8mq-voipac/.
The disk image (with .sdimg.bz2 suffix) is used to provision the storage for devices without Mender already running. Please proceed to the official documentation on provisioning a new device for steps to do so.
On the other hand, if Mender has been running on the device and want to deploy a rootfs update using this build, the Mender Artifact files, with .mender suffix, can be used instead. This Artifact can either be deployed in managed mode with the Mender server (upload it under Releases in the server UI) or by using the Mender client standalone mode.
Flashing instructions
Follow the flashing procedure instructions for image flashing.