Raspberry Pi OS 64 Bit conversion

Hi Josef,

I have several Raspberry Pi 4 devices currently running arm32 Debian Bookworm images in standalone mode. In the past, we had to use arm32 because mender-convert didn’t support arm64. Now that arm64 is supported, I need to upgrade these devices from arm32 to arm64 using a golden image.

I created the artifact from a golden arm64 device and installed it successfully. I also remapped the /uboot mount point to /boot/firmware to match the new layout, and the update process itself went smoothly.

However, I’m running into issues with the U-Boot environment variables. The arm32 and arm64 configurations use different variables, and simply switching the root filesystem isn’t enough.

To address this, I used dd to extract the U-Boot environment sectors from the arm64 device—specifically from offsets 0x400000 (size 0x4000) and 0x800000 (size 0x4000)—and wrote them to the same locations on the target devices. With this, the device boots successfully into the arm64 system and the new partition.

The issue is that these U-Boot variables include some device-specific values, such as the MAC address. When I overwrite these sectors, I also overwrite those identifiers, which is problematic.

Is there a way to trigger a regeneration of the U-Boot environment variables in a similar way to how they are initially created when the system boots for the first time from a fresh image? That way, I could avoid overwriting device-specific data like the MAC address, while still applying the correct layout and boot configuration for arm64.

Thanks in advance!