Yocto, new mender client, old artifact


I’m using Yocto with Mender 2.0. Now I’m trying to get my image to be an artifact v2, but contain a client capable of doring v3 artifacts. How do i do that?

I can’t find anything about this…

With kind regards,
Matthijs ter Woord

Just following up on my own post here…

I did find the PREFERRED_VERSION_pn-mender (and -artifact and -artifact-native) documentation, but am unable to get this working at all. Builds error.

You can use MENDER_ARTIFACT_EXTRA_ARGS in the Yocto environment, e.g

PREFERRED_VERSION_pn-mender = "2.%"
PREFERRED_VERSION_pn-mender-artifact = "3.%"
PREFERRED_VERSION_pn-mender-artifact-native = "3.%"


This will produce Mender Artifacts compatible with Artifact version 2, and will install the Mender 2.0 client.

1 Like

Turns out,

PREFERRED_VERSION_pn-mender = "2.%"

has no effect.

Please elaborate, I do not see any problems with that on my end.

If I set,

PREFERRED_VERSION_pn-mender = "2.%"

It builds the 2.0.0 client, if I remove above line it will build the 1.7 client.

Hi Mirza,

Sorry, I’m feeling stupid now. Somehow I had a bug in the snippet that has been there for a few months. The image is correct now. Now on to my next journey…

Thanks for holding up with me :slight_smile: