I'm attempting to get mender working for my device on a non-yocto build system and I thought I had everything integrated. However, I'm having some trouble getting updates to work correctly.
On my device, the update seems to go well. It downloads the artifact and reboots into the new partition, as expected. However, on the server the progress goes from "rebooting" to "already installed" after the device reboots. The mender client also looks as though it doesn't commit the update on the new partition, because rebooting the device once it has successfully booted into the new partition causes uboot to boot back to the original partition because the bootlimit is exceeded.
Curiously, once booted back into the original partition, the mender client seems to know that it should have been updated and complains that "got invalid entrypoint into the state machine: state: reboot".
Am I doing something wrong? Why does the client think the update was already installed and why isn't it committing the update? It seems to be that after the reboot, the client doesn't realise it's in the updated partition and instead tries to pull the update again? Is it possible that the mender client state is being stored in the wrong uboot environment?
Some potentially relevant info:
* I'm using the Mender demo server
* The existing rootfs and update rootfs use the same mender-agent.pem file (it's symlinked from /data)
* Using mender 1.7
* The update rootfs is basically the same as the original rootfs but with /etc/mender/artifact_info changed as well as some new files in the root directory. All the mender configuration apart from this is the same across both rootfs.
* I have the following /etc/fw_env.conf file:
/dev/mmcblk0 0x400000 0x20000
/dev/mmcblk0 0x800000 0x20000
and I have the corresponding offsets and sizes set in my uboot src (I guess if this wasn't working then it wouldn't properly reboot into the new partition?)
* Using the default identity script which uses the mac address, mac address doesn't change after the update and both pre and post update seem to properly identify as the same device in the UI
Mender logs attached, from both before and after the reboot (before the reboot is on mmcblk0p2 and after is mmcblk0p3). In the "after-reboot" logs I included the mender logs for the client once I had rebooted from the updated partition.
Appreciate any help, I'm assuming this is probably just me misconfiguring something but I'm having trouble figuring out what I misconfigured!