After flashing the Yocto produced image sdimg via dd or bmaptool into RPI3 then in mender server I see: artifact_name unknown
But then if I update my image to next release all are fine and the artifact_name is fixed.
Problem started after upgrade from sumo version to kirkstone where the /etc/mender/artifact_info file has been removed.
Has been substituted with something else?
In /data/mender/mender-store I can see:
and also:
mender show-artifact shows “unknown”
As the title also says.
Is there a command so I can save this in my sdimg when producing it via yocto, or at least afterwards at first target boot if I save the ARTIFACT_NAME in a separate file into the ROOTFS?
The board I use is a custom RPI3 board with eMMC card.
I am using Yocto Kirkstone Version 4.0.11
This should be covered by the bootstrap artifact which is automatically generated and added in the build process, unless you have modified the defaults. Can you check if this happens in your setup?
The /etc/mender/artifact_info file has been deprected some time ago, and is not being used anymore now.
When you mean the defaults you also mean variable: MENDER_DEVICE_TYPES_COMPATIBLE?
Yes I have change that variable and added a device type different of the MACHINE I am using.
And actually this is the problem.
If I remove my change in MENDER_DEVICE_TYPES_COMPATIBLE then everything works fine.
But, if I change this variable or add 2 device types I want my image to be compatible with, the problem appears and when flashing the sdimg image via dd you get:
mender show-provides
artifact_name=unknown
The .mender image seems to be fine. The only problem is when flashing anew with sdimg, and now I am trying to understand the issue.
I think I understood the issue and why I have this problem which actually does not seems to be a problem.
Let me give the full sequence in order everyone is up to date.
I have a fleet of devices in sumo branch with device type raspberrypi3 and I want to upgrade them all to kirkstone version. But then at this version I would also change the device type to the new one lets say, raspberrypi3-kirkstone
So I created a special upgrade image with Yocto which had the ONE-TIME UPGRADE CONFIGURATION required for the jump from sumo to kirkstone.
Let’s name this image: jump_image
Which has the following configuration:
The .mender jump_image being created by Yocto it is absolutely fine for use in mender server.
Since this image is compatible for all sumo devices with type raspberrypi3.
But the .sdimg being created via Yocto has issues because the device type used is not raspberrypi3 anymore but raspberrypi3-kirkstone.
So, this is my speculation now, since the yocto produced bootstrap-artifact is not compatible with my new device type, mender does not install that bootstrap-artifact with all necessary information, along with the ARTIFACT_NAME and that is the reason I get the unknown staff.
Now if I completely remove the ONE-TIME staff everything works fine because this is now a normal: raspberrypi3-kirkstone → raspberrypi3-kirkstone image and the correct device-type is being used.
I will just reflash now my fresh devices with the normal image and everything will be fine.
I wrote the above for reference in case anyone deals the same issue.