Migrating from mender-converted Debian to Yocto

debian
#1

Hey there! I’m interested in using the mender-convert toolchain to integrate Mender into my existing Raspberry Pi Zero W “golden image.” However I’m skeptical of this decision, as I intend to move to Yocto in the near future.

If I deploy devices with a Debian image processed by mender-convert, will I be able to update those devices to Yocto? Any known or anticipated gotchas that I should expect along the way?

Are there any differences between U-boot for the Yocto codebase vs Debian? I assume the partition layout is the the same, but haven’t dug into this yet as I am new to Mender, Yocto, and U-boot.

I suppose that I could use the Mender 2.0 update modules to make any required boot partition changes during a migration to Yocto from Debian, but I haven’t seen any examples of this. Has anyone tried this migration before?

#2

Hi @phaseOne,

If I deploy devices with a Debian image processed by mender-convert, will I be able to update those devices to Yocto? Any known or anticipated gotchas that I should expect along the way?

This is not something that I have tested recently, but there is one gotcha and that would be the content of the boot partition (bootloader, devicetree and rpi boot firmware) and you should assume that you will need to update these during a Debian -> Yocto migration, which is a “risk” and it might be hard to support a full rollback in case something goes wrong during this update.

Are there any differences between U-boot for the Yocto codebase vs Debian? I assume the partition layout is the the same, but haven’t dug into this yet as I am new to Mender, Yocto, and U-boot.

The U-boot integration in mender-convert, is copied from the Yocto environment and the version used is aligned with the latest Yocto stable branch (thud right now)

I suppose that I could use the Mender 2.0 update modules to make any required boot partition changes during a migration to Yocto from Debian, but I haven’t seen any examples of this.

I do not have an example using update modules, but I do have an example on how to do this using “state-scripts”

 https://github.com/mirzak/meta-mender/commits/rpi-boot-part-update
#3

Also check out the “Known Issues” section here,

Raspberry Pi 3 Model B/B+

The boot partition (rpi boot firmware files) on Raspberry Pi is problematic and can even cause problems when updating Yocto -> Yocto during major releases.

#4

Thanks for the tips! That state-script will really help.

After rereading the known issues regarding the boot partition, things make a lot more sense.

I’ve known for quite a while that I’d encounter various issues—unfixable due to proprietary firmware—while deploying the Raspberry Pi as a production system, but this issue crystalizes the limitations and lack of flexibility when attempting to scale. All the more reason to redesign with a stable SoM.