Registry not flashed with UpdateLib on iMX7

We are working with

  • a Colibri iMX7D 512MB module
  • running WinCE7 (v 1.3b2)
  • Toradex CE Libraries 2.6

We recently switched from using a bat script for updates to implementing our own updater using UpdateLib. In our newest update I found out, that the registry does not get flashed properly. Our update process is as follows:

  1. Flash OS
  2. Flash bootloader
  3. Flash splashscreen
  4. Flash configblock
  5. Flash registry
  6. Flash filesystem
  7. Delete and copy some files to SD Card

We already decided that we don’t need to update all flash sections every time, but for the initial setup it will be necessary for everything to work properly. In the past, we used the UpdateTool via a bat script where everything worked properly. The raw registry file can also be flashed manually using the UpdateTool without issues. Other things I already tested:

  • Call RegSave after flashing the registry (I know by now that this does quite the opposite since it persists the current registry from RAM again)
  • Only flash the registry during the update process
  • Flash the sections in a different order

I couldn’t get the registry to be properly persisted. After rebooting the device, it still does not have the proper settings. The settings I noticed to be wrong were the desktop background image and the “Do not show hidden files and folders” option.

I didn’t get any error message during the execution of Imx7Upd_Restore, also no messages via the UART debug output. Before calling the Restore, I’m setting the filename, format, section and callback parameters via the proper SetConfig functions. I don’t have any more ideas what I might be doing wrong here, so I’m hoping someone can help me out here.

Best Regards
Lukas

Could you please create and share a minimal reproducible project that demonstrates the registry flashing issue you are describing?

Hi Alex,

Slight issue here. While building a minimal sample solution that only flashes the registry, I tested if it worked and… it did. It did flash the registry perfectly fine, so I’ll have to do some more testing which part of our other code interferes with it. I’ll get back to you when I’ve got more information. Thanks for the fast reaction, as always

Regards
Lukas

I found the issue. It’s almost embarrasing to say, but it’s due to escaping. Our updater reads a json configuration for the steps and files. And since we’ve had the registry stored as “registry.i7r”, together with the full path it ended up as “Backup**\r**egistry.i7r” which was interpreted as a carriage return. Sorry for that. We do still have another issue with the update process, but I will open another thread since it’s to do with the flashing of the OS image.

Regards
Lukas