In our production we use a batch file to load OS and application onto the devices. In about 1/3 of the installations the registry is not saved but the default registry is still present after the process.
The script looks like this:
SET SourcePath=\USB HD\BinaryFiles
ECHO Cleaning flash registry...
ECHO Programming bootloader...
"%SourcePath%\UpdateTool_CE7.exe" /u bootloader,spl,%SourcePath%\eboot.spl
ECHO Programming flash config block...
"%SourcePath%\UpdateTool_CE7.exe" /u configblock,raw,%SourcePath%\eboot.cfg
ECHO Programming windows ce image...
"%SourcePath%\UpdateTool_CE7.exe" /u os,compressed,%SourcePath%\nk7.nbx
ECHO Programming registry...
"%SourcePath%\UpdateTool_CE7.exe" /u registry,raw,%SourcePath%\registry.i6r
ECHO Programming splash screen...
"%SourcePath%\UpdateTool_CE7.exe" /u splashscreen,raw,%SourcePath%\splash.tss
ECHO Reboot system...
After some local tests we found that the removal of the first call (Cleaning flash registry) improves the behavior. Is there an explanation for this?
Cleaning is not needed anyway. Saving will overwrite old copy in a safe way. But we don’t have explanation why cleaning generates this issue. Could you [log the serial debug message] and share it with us? let us try to find any clue from there?
: Enable the debug messages | Toradex Developer Center
Unfortunately it is not possible to enable the debug output in the production area. I can just simulate the production process and enable the debug output locally on my device. For completeness: in our production we first load eboot.spl, eboot.cfg, nk7.nbx and registry.i6r over EasyInstaller using a customized template (Toradex Documents - iMX6 Easy Installer template for custom images). After this we run a script similar to what I posted initially to load the current WinEC7 version and install our application.
In my simulation I found just one sequence in which the registry gets lost:
- Clear registry
- Cold reboot
- Clear registry
- Update WinEC7 image (*.nbx)
- Update registry (*.i6r)
- Save registry
- Cold reboot
I attached following logs:
- Log after step 2. (RegistryClearedAndRebooted.txt)
- Log after step 7. (RegistryNotLoadedCorrectly.txt)
Is there a recommended sequence to update bootloader, OS and registry? Are there dos or donts?
Thank you for the explanations. In this case we will remove the clean registry call in the beginning of the script. We will just call update registry to load the backup *.i6r and then reboot the device without calling save registry. This sequence worked well locally on my device. We will test it in the production area in December. If we encounter further problems I will come back to you.
Thank you for your reply.
Step 5. Update registry (.i6r) and 6. Save registry is a mess here.
- After cleaning the registry, WinCE reads the default registry and loads it in the system on the next boot.
- You did, Update Registry through the script, this will save your backup registry into Flash but the system registry won’t change on this step.
- After that, you did Save Registry, this will program System registry(which is the default here) into Flash Memory.
- On Next reboot, the last programmed default system registry from the Flash will be loaded by the OS. Hence you would not get the Backup registry.
We are suggesting you, do anyone Clear Registry or Update registry or Save Registry in a single boot and then reboot the device.
Please do let us know if you still see the registry problem with the above-suggested method.
The new procedure in our production seems to work smoothly now. Thank you again for your support.
Thank you for the update. Wish you good luck!