Modifying Mender client version in Yocto sumo

Hello, I’ve integrated Mender with a Yocto sumo build and I have successfully connected it to the demo server. I can also send OTA updates.

But now, I am facing 2 problems:

  1. The version of the mender client I am currently using is by default 1.7.1. Is it possible to modify this version to a newer one? Will it still be compatible with yocto sumo? (On the official github repository of meta-mender, branch sumo, there is no mender-client folder and that’s why I am asking).

  2. When I send an update, I want to wait for user confirmation before the ArtifactReboot state. I did that by adding a new state script in a recipe that inherits mender-state-scripts. Obviously, if there is no confirmation from the user, the script returns 21 so that the server could try again later. The script only checks if a file exists and does not contain any loop that would block mender.
    The problem is that the server calls this script only once: if the returned value is 21, nothing happens. If the value is 0, the reboot begins.
    I did not set the variables StateScriptRetryTimeoutSeconds and StateScriptRetryIntervalSeconds in mender.conf so that the default values will be used. Also, it was a bit confusing given the fact that before Mender v2.0 these two variables were reversed and I didn’t know whether it was the client version (that is currently 1.7.1 on my setup), or the server (that is >2.0).

Could you tell me where should I look to solve these problems?

Thank you!

Hi @teonaseverin,

The recipe for the Mender client was renamed in newer branches which is why you don’t see a mender-client_* recipe. It looks like the version 2.2.1 recipe is in sumo but you will need to enable it. Since 2.0 came out long after sumo and was a major version update we did not want to change the default on sumo. To make this change, add the following to your local.conf:

PREFERRED_VERSION_pn-mender = “2.%”
PREFERRED_VERSION_pn-mender-artifact = “3.%”
PREFERRED_VERSION_pn-mender-artifact-native = “3.%”

I suggest you update to the newer Mender version before we spend much time on debugging your state scripts. What you describe certainly sounds like it should work. From within your script, if you log to stderr, that info will appear in the Mender client logs which may give us an idea of what is going on.

Drew

Hey @drewmoseley,
I am currently trying to upgrade our mender-client version to 3.4.0. I tried using the steps you mentioned in this thread as well as the recommendation at this page:

https://docs.mender.io/troubleshoot/yocto-project-build

However when I build the package, I am getting an error which reads “The LIC_FILES_CHKSUM does not match for file” on the md5 checksum of the LIC_FILES_CHKSUM in the mender repo. Any idea what would be causing that?

Thanks!
Cornelius

Hi @cornhart yes, that simply means that the license text has changed. This link may help.

At this point Sumo is extremely old and has been unsupported/umaintained since 2019. I strongly recommend you investigate simply updating to a newer Yocto version which will include newer Mender versions out-of-the-box. This link will give you more details about the Yocto releases.

Drew