New iteration of the mender-convert tool


As you might be aware of we have a tool we call mender-convert to enable support for Mender on binary distributions.

We are happy that this has worked out, enabling people to securely update their devices on non-Yocto devices. Even though we are happy with the functionality of the current tool, there are a couple drawbacks in the current design of the tool, which we want to improve. We looked hard at the current code and decided, to achieve the desired design we would need to do a re-write.

We obviously learned a lot while developing the first iteration and we are trying to apply that knowledge to the current development effort.

The goals of the re-write was to achieve the following (lacking today):

  1. It should be easy to extend the tool to support other boards or distributions
  2. We should not compile code in the tool (rely on binaries built elsewhere)
    • compiling code increases complexity, due to requirement of toolchains etc.
  3. The tool shall not be designed around specific hardware/platform types
    • This is the case today with the usage of --device-type flag
  4. The tool should be to convert images without knowing anything about the hardware/platform
    • relates to above 3.
  5. Configuration interface should be simplified
    • command line flags -> configuration files
  6. Platform specific code shall be provided trough “hooks”, and are not part of the “core” mender-convert code
  7. It shall be easy to extend functionality
    • support for rootfs overlay to inject user applications/configurations
    • ability to override how the Mender Artifact is generated (to be able to sign and include state-scripts)
  8. Code structure should be modular
    • Eases Maintenance and possibility of making isolated changes

With that being said, the source code of the new iteration that tries to implement above mentioned goals currently lives here,

Considered this a early beta release, and would love to get feedback on the design and if you are able to test things out and report any issues.

There is still a lot of documentation to be written, and you will probably need to inspect the source code to get a full understanding of how certain things work but that is how it is :smiley:.

The following platforms have been run-time tested:

  • Raspbian (Raspberry Pi 3) which is covered in the README
  • Ubuntu Bionic (x86-64) - Instructions on how to test this can be found here
  • Armbian (Pine64 ROCKPro64, SD & eMMC)
  • Debian on BeagleBone Black (SD & eMMC)

There is no defined timeline when we would make the switch to make this tool the official one, and we will maintain both until we decide on this. Though new development will be focused on the updated version, especially adding support for new boards or distributions.


Edit: @mirzak: Updated link to the next branch of mender-convert repository, which is the current development branch for this new version of the tool



Thanks for the new iteration, I use it to alter a ubuntu image on x86 64.

Which branch do you suggest to use? the v2 branch or the master-replaced-v1-with-v2?

I tested the v2 branch, it can mender -install <new.mender> and can boot into it, but on boot, it says:

error: no such device: (hd0, msdos1)/EFI/BOOT/EFI/BOOT/grub.cfg.
lock: OK
lock: OK

Also, the esp partition is a bit messy (EFI nested in /boot/efi), is this intended?

# hand-typed
$ ls /boot xxxx
a5f4ae(a long string, seems like a checksum)

Actually I would recommend to try this branch,

Forgot to update this thread with the progress