Difference between revisions of "iMX8M Industrial Mender"
(9 intermediate revisions by the same user not shown) | |||
Line 13: | Line 13: | ||
== Prerequisites == | == Prerequisites == | ||
− | + | In-depth information about the machine requirements can be found in the [https://docs.yoctoproject.org/3.1/mega-manual/mega-manual.html Yocto mega manual], a forum thread concerning [https://hub.mender.io/t/google-repo/58 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 [[iMX8M Industrial Yocto Prerequisites|Yocto Project Prerequisites]] Wiki page. | To prepare the machine, follow the [[iMX8M Industrial Yocto Prerequisites|Yocto Project Prerequisites]] Wiki page. | ||
Line 24: | Line 26: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
− | Create a directory for the mender-<TARGET> setup to work and clone the meta information: | + | Create a directory for the mender-<TARGET> setup to work in and clone the meta information: |
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
mkdir mender-<TARGET> && cd mender-<TARGET> | mkdir mender-<TARGET> && cd mender-<TARGET> | ||
Line 55: | 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 | + | 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. There should already be a commented section in the generated ''conf/local.conf'' file. A simple uncommenting the relevant configuration and assigning appropriate values sets up the server sufficiently. |
Build for Hosted Mender: | Build for Hosted Mender: | ||
Line 78: | Line 80: | ||
== Using the build output == | == Using the build output == | ||
− | After a successful build, the images and build artifacts are placed in ''tmp/deploy/images/imq8mq-voipac/''. | + | After a successful build, the images and build artifacts are placed in ''tmp/deploy/images/imq8mq-voipac/'' directory. |
The disk image (with ''.sdimg.bz2'' suffix) is used to provision the storage for devices without Mender already running. Please proceed to the [https://docs.mender.io/system-updates-yocto-project/provisioning-a-new-device?target=_blank official documentation on provisioning a new device] for steps to do so. | The disk image (with ''.sdimg.bz2'' suffix) is used to provision the storage for devices without Mender already running. Please proceed to the [https://docs.mender.io/system-updates-yocto-project/provisioning-a-new-device?target=_blank 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 [https://docs.mender.io/ | + | On the other hand, if Mender has already been running on the device and want to deploy a rootfs update using this build, the [https://docs.mender.io/overview/artifact?target=_blank 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 [https://docs.mender.io/artifact-creation/standalone-deployment standalone mode]. |
== Flashing instructions == | == Flashing instructions == | ||
Follow the [[iMX8M Industrial Flashing Procedure|flashing procedure]] instructions for image flashing. | Follow the [[iMX8M Industrial Flashing Procedure|flashing procedure]] instructions for image flashing. |
Latest revision as of 19:25, 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 about the machine requirements 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. There should already be a commented section in the generated conf/local.conf file. A simple uncommenting the relevant configuration and assigning appropriate values sets up the server sufficiently.
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/ directory.
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 already 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.