Registry save FAILED! message after updating bootload and flash

I am creating and testing out a field update process to update the OS image to the latest version (2.4).
According to page (Update Tool | Toradex Developer Center),

“In a field upgrade we recommend to update only single sections, like image, flashdisk or bootloader if not required differently.”

So my process uses the Update Tool, where I update the bootloader and the winCE7 image.
I downloaded the most recent Update Tool (ver 6.0.19), as well as “tegra_winceimage_2.4_20220107_bis.zip”. I unzipped the zip to a USB drive and copied over the Update Tool.
With the USB drive connected to the Colibri, I start the Update Tool from the USB drive, go to Update, set Type to IMAGE files, select “EBOOT.NB0”, and click OK. Once successful and complete, I repeat from Update, and select “NK_CE7.NB0”. This also appears to succeed, and so I close this out and restart.

The registry setting were cleared from this, so I need to restore them. (A less important question is What the best way to save and restore registry? It seemed like it could be done through the Update Tool, but I’m not clear how.)

When I save the registry through the update tool, I get the “Registry save FAILED!” message box.

What is the best way to avoid this? I feel like if I use the config files I would have better success, but I worry about doing that in the field.

Also, I’m going to need to test this out a few times, so I’ll need to downgrade back to image ver 1.2, but I can do that any way I want in house. I see the note on the update page under “Downgrade from 1.4 and later (Tegra only)”, so I think the best way to downgrade for retest is to use the config files?
Do I use the most recent Update Tool version to do this, or should I download the version in use in image 1.2? I need it to be just like it was before the update so that testing is accurate. Is this possible, or do I need to put the Colibri in the Evaluation board and reset something?

Sorry for all the questions - this is something I have to get correct.

TL:DR:

  • Can’t save registry after update
  • What is best way to save/restore registry for this update?
  • How to downgrade such that it is the same (e.g. the flash memory is layed out the same way) before update?

Colibri T20 512MB V1.2A
Custom carrier board

After Update:
BCT V0.0 (333Mhz)
Bootloader (in Flash)
Ver: 2.4 (TEGRA)
Built: 07 Jan 2022 13:10:06PM (GMT)
Image (currently running)
Ver: 2.4 (CE 7.0, TEGRA)
Built: 07 Jan 2022 13:10:53PM (GMT)

Before Update:
Bootloader (in Flash)
ID: COLIBRI TEGRA
Ver: 1.2
Image (currently running)
ID: COLIBRI TEGRA
Ver: 1.2 (CE 7.0)
Built: 29 Jan 2014 15:38:27PM (GMT)

I appreciate your help and time!
-Tony

Could you please clarify how you attempted to save the registry? Were you trying to restore the registry using the Update tool? It’s important to note that the registry format was altered between versions 1.2 and 2.4, which means you cannot backup the registry on v1.2 and then restore it on v2.4, or vice versa. Additionally, numerous critical registry keys have been added since v1.2, so even if you manage to copy the entire old registry to a new image, it could potentially render the OS unstable or inoperative. I would suggest flashing a new image (v2.4), clearing the registry (for instance, using the e_Boot menu), then exporting the registry to a text file using the Registry Editor. You can then create a file in the same format with any necessary additions. This text file can be used for production programming by importing mentioned files using RegEdit.

You’ve mentioned, 'I think the best way to downgrade for retest is to use the config files?’ Could you please elaborate on what you mean by using config files?

To downgrade, I recommend the following process:
Before flashing a new image, backup everything using the Update tool supplied with v1.2. When you need to downgrade, flash a clean v1.2 image using the NVflash tool from the v1.2 package in recovery mode. Then, restore the backup from the previous step using the Update tool included in v1.2

I’m glad I checked - sounds like things may be a more complex than I thought, but that’s ok. Thank you for a quick reply. My follow-up is kinda late in the day, so no worries on getting back within hours again.

Could you please clarify how you attempted to save the registry? Were you trying to restore the registry using the Update tool?

For the first try, I did not end up saving nor backing up the registry. In theory I thought I would back it up using the update tool, but I couldn’t figure out how I would restore it from there. Instead, I used a script that we use in-house to write to a freshly flashed registry the values needed for our setup. After running that, I got the “Registry save failed” when I try to save from the update tool, or from the Toradex menu under the start menu.

I wondered if the in-house script was doing something inappropriate for this version, so I re-flashed the bootloader and image (same way as I described). I saved without changing anything, and then changed a single registry value, and then saved. Same failure message both times.

I think I can figure out the registry once I nail down the update part. It sounds like I can use the clean registry from the update and then add back in the things our script adds. I think the script also removes values, or attempts to. Is there documentation I should refer to that would show me if we are altering or deleting things we shouldn’t in version 2.4 that we may have used in ver 1.2? Or am I fine so long as the registry is the same structure as the flashed ver 2.4 one?

Could you please elaborate on what you mean by using config files?

I mean by (possibly altering, and) using the CE7.CFG supplied in “tegra_winceimage_2.4_20220107_bis.zip” to re-layout the flash memory and write it (I think that’s what it does?).

To downgrade, I recommend the following process: …

What you wrote looks good; I will incorporate this method, thank you!

Regards,
-Tony

It looks strange, I just tested v2.4 and registry saving works as expected. Could you please go to the e_boot menu and do a “Clear Flash Registry” (option C) then reboot and try save registry again?

I’m afraid I already changed this Colibri - I used the CE7.CFG file to reflash it. Odd thing is that it failed because it was looking for nvflash.dll on the USB drive. I found that file in the BSP zip for the current version and put it on the drive and it worked. Saving the registry works, too.

I thought about going back to ver 1.2 and trying the bootloader and image separately, again. If I do this and get into the same situation, I will then try:

Could you please go to the e_boot menu and do a “Clear Flash Registry” (option C) then reboot and try save registry again?

There was clearly some issue with my first update, just comparing the Versions dialog
part flash:
flash_part

full flash with config:
flash_config_all

This all suggests to me that perhaps the version we have on these instruments is too old to just partially flash. (?)
I don’t necessarily have to flash the parts in the field, I was just going by the suggestion on the Update Tool page about field updates.

I’m running into a slight issue where I cannot hide the WinCE desktop like we could on the old version. Our splashscreen is not being used, and I can’t get rid of the taskbar until our software starts.
So I have a 'desktop.ini" file, along with the taskbar for a few seconds between boot up and software auto-start. Looking around the docs, I get the feeling I’m going to need to disable the desktop, but then we lose ActiveSync. We haven’t necessarily needed once they leave the shop, but it was a nice backup to have. I see some example code to restore ActiveSync, but this would involve a new release for our software…

So how you did it on the old version? Yes, If you prevent explorer from starting as described there you will loose an Active Sync, but you should be still able to use a Web Admin.

Have you tried to Clear registry to fix Save Registry issue?

My apologies for the hiatus. I have tried a few update paths now and here is what I believe to be the best course of action:

(Starting at Image v1.2)

  1. Close out of our main program.
  2. Export the registry to USB (we have some necessary data in there that is unit specific that needs to persist)
  3. Using latest update tool (currently 6.0.19), update to image v2.4 via custom cfg package, using Production Programming for Tegra Modules page to make this image.
  4. Restart and import the unit specific registry from the export (step 2).
  5. Restart and resume our main program.

We do still have the “desktop.ini” icon on the CE desktop before the program starts.

In the old version, we deleted the entries under HKLM\Explorer\Desktop - there were only two. Now there are 3, one being a default that cannot be deleted. Then we hide the taskbar.

I can do most of this again, the old version didn’t have “desktop.ini”. I’m still looking into the ramifications of dropping Active Sync. Web Admin is not an option for these units, unfortunately.

I have not. That Colibri has been re-imaged several times now. The way I got into that state was by using the update tool (v6.0.19) to update the bootloader and the CE7 .nb0 files individually (from v1.2 to v2.4). My thought was that since the images are laid out so differently, I would not be able to piece in the new bootloader and CE image like this without issues.
Since that initial try, I have been updating via the v2.4 CE7.cfg and associated files with success.

So, where are we?
If the update steps above look safe and reasonable, I think we can figure out the “desktop.ini” thing, so I’m not terribly worried about that.
Less important: I am curious if the 2nd bootloader is intended in the new version, or if I did something to cause that.

In your original reply you had a recommended way to downgrade/restore the Colibri back so I could re-test the process again:

Before flashing a new image, backup everything using the Update tool supplied with v1.2.

I found out that update tool v5.5.0 (I think), the one supplied with v1.2, does not have the ability to backup. The button is disabled. I tried using update tools v5.9.0 (image v1.3) and v5.12.0 (image v1.4). The backups were successful, but I could not restore “configblock.nb0”. I’d get an error saying that I should not change the default name.
Even less important: This is more of a curiosity, as well. I have a decent work-around so this is no big deal for me.

As always, I appreciate your time and information!
-Tony

As per your original question regarding the " Registry save FAILED" please clear the registry. If you have any other questions, could you please create new thread(s) for each question? It’s recommended to have one question per thread.

Understood. I suppose the solution to the original problem alludes me, since I have not the time to go back down that path that got me to the error.

The solution is to reflash the whole Colibri via a .cfg file, and not update individual sections, despite what the Update Tool page says.

I suppose I am to blame for the unclear issue. In general, I was having an issue updating between two versions that are, apparently, too different to just piecewise update (despite the Update Tool page suggestion to update pieces). While it presented as a registry issue, the issue really is that you cannot piecewise update between two versions that are very far apart from release date.

Thanks again,
Tony