Posts
80
Comments
214
Trackbacks
0
Gimme the right key
This post is not about lockpicking... it's about registry settings (and keys) and configuration files, but I can't manage to find a better title.
You can configure a Windows CE OS Image using different kinds of configuration files.
Registry files (.reg) allows you to configure the registry and, since most of the OS components read their configuration from it, it allows you to customize most of the components that you can add to your OS Design.
The merge order of the reg files is somewhat counter-intuitive. The system takes common files first (common.reg and .reg files from different OS components), then merges project.reg (OSDesign specific), then the platform.reg (BSP specific) and, last but not least, the .reg file of your subprojects. The merge tool overwrites values with new values while processing the merged registry file (reginit.ini), and that means that if you have more values specified for the same parameter inside different files, the values specified inside the last merged file is the ones that will be included in the OS image.
If you need to override a common settings (for example the size of IE cache), you can do that inside your BSP configuration (not a good idea in my opinion, because this parameter is not related to the hardware) or inside your project.reg (one for each BSP included in your OS design) or in one of your subprojects settings.
Things get more complicated if your want to override a BSP-related parameter. If you do that inside platform.reg you'll modifiy that parameter for all the OSDesigns that use the same BSP (unless you use some enviroment variable to include it only in a specific OSDesign). You can also remove it from platform.reg and move it inside project.reg of all the OSDesign that share the BSP, each one with its own parameter, but if you make a new OSDesign you should remember to include that parameter in your project.reg... quite a maintenance nightmare.
If you want to set the same parameter for all the BSPs included in your OSDesign you cannot change common.reg or other system files (this will change the parameter for all the platforms generated on your PC and may be overwritten by QFEs released by microsoft) and you'll have to add it to each platform.reg, keeping them synchronized.
An alternative approach that could solve this kind of problems is to move those parameters inside the configuration files of one of your subprojects. If you don't want to put inside a subproject some parameters that are not specific for that components you can add an empty subproject for this pourpose.
You can download a template from here.
The project is named "Settings" (it's a good idea to use the same name on every OSDesing, so you can recognize it as a special subproject) and it builds no target but provides a .reg file that allow you to have "the last and definitive word" on your registry configuration and share the parameter between the different BSP-based configurations of your OSDesign.
It provides also .dat, .db and .bib files to allow you to customize the filesystem, the databases or to add some files to your OSImage.
posted on Tuesday, March 3, 2009 1:29 PM Print
Comments
No comments posted yet.

Post Comment

Title *
Name *
Email
Comment *  
Verification
Toradex logo

Cookies in Use
Tag Cloud