Persistent Registry questions, confused about sysgen and flags RRS feed

  • Question

  • So i have a couple of questions. First I'd like to understand why there are two flags to make this work one way.


    SYSGEN_FSREGHIVE gets enabled in the catalog, this is pretty easy to understand. PRJ_ENABLE_FSREGHIVE  is a bit more confusing for me though. When disabled WinCE will create the registry hive in the object store. When enabled it will create the registry on the the first bootable filesystem

    So still seems pretty simple right?? Well someone here didn't know about the PRJ_ENABLE_FSREGHIVE  flag and made this crazy work around that formats the filesystem and causes WinCE to use the registry in the filesystem without that flag enabled.

    I'm confused!

    I guess PRJ_ENABLE_FSREGHIVE makes it "automatic" to some extent. But I don't get how the OS knows to use the disk instead of the object store during the first boot phase after being manually formatted.

    This has caused us some serious issues after enabling PRJ_ENABLE_FSREGHIVE, as our devices sometimes fail to load the registry during boot when trying to mix the format and auto setup.

    Wednesday, June 5, 2013 6:06 PM

All replies

  • To understand this, just go through this on the \WINCE600\PUBLIC\COMMON\OAK\FILES\common.reg, where you can see the usage of PRJ_ENABLE_FSREGHIVE.


    Thursday, June 6, 2013 7:28 AM
  • @ Kevin

    Are you asking for help?  Or, venting frustration?

    What are you attempting to do?

      1.  Trying to build an OS image with Hive-based registry implementation, using an existing BSP?

      2.  Trying to fix an BSP to support Hive-based registry implementation?

    In addition setting the SYSGEN_FSREGHIVE and PRJ_ENABLE_FSREGHIVE environment variables, there are other configuration needed, which may be part of the BSP.

    If you are asking for help, we need to know what you are using, what you have done to understand your problem in order to help you.

    Samuel Phung [eMVP] Blog: Twitter: @Samuelp101

    Friday, June 7, 2013 12:39 AM
  • Well once we started to mix the two our devices starting bricking because they failed to initialize the registry hive. The previous implementation had to format the disk after boot to get the registry to persist, our new kernel used PRJ_ENABLE_FSREGHIVE auto formatted the regsitry disk. 

    I'm just curious because I don't understand how the registry persists with the formatted partition. Although i haven't had a chance to look at the common.reg yet. 

    Friday, June 7, 2013 12:52 AM
  • While Platform Builder provides the general framework to support Hive-base registry, the BSP has to be properly configured to support hive based registry implementation.

    With Hive-based registry support enabled, the system goes through 2 separate boot phases.

    During the 1st boot phase, minimal drivers are loaded to enable the system to access the file system and retrieve previously persisted registry.  If the system is booting for the 1st time, it write/store the default registry to the file system and continue to the 2nd boot phase.

    During the 2nd boot phase, the system continue to the boot process using registry configuration read during the 1st boot phase.

    If you review the PLATFORM.REG registry file for the BSP you are using, you can file multiple group of entries wrap between the following pair, to control the boot process:



    Registry entries in PLATFORM.REG, which is part of the BSP, supersede entries in COMMON.REG

    Samuel Phung [eMVP] Blog: Twitter: @Samuelp101

    Wednesday, June 26, 2013 5:22 PM