none
Registry RRS feed

  • Question

  • Hey there,

    I have two storage devices in my platform. Inbuilt MMC card and removable SD. Hive registry is working on these devices individually. 

    [HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\MMC]
        "MountAsRoot"=dword:0
        "MountAsBootable"=dword:1
        "AutoMount"=dword:1
        "AutoPart"=dword:1
        "AutoFormat"=dword:1

    With above registry settings, hive will be on MMC, with below registry settings hive will be on SD card.

    [HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\MMC]
        "MountAsRoot"=dword:0
        "MountAsBootable"=dword:0
        "AutoMount"=dword:1
        "AutoPart"=dword:1
        "AutoFormat"=dword:1

    If I make this above settings, same SD image will not boot from MMC card.

    [HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\SDMemory]
        "MountAsRoot"=dword:0
        "MountAsBootable"=dword:1
        "AutoMount"=dword:1
        "AutoPart"=dword:1
        "AutoFormat"=dword:1

    [HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\MMC]
        "MountAsRoot"=dword:0
        "MountAsBootable"=dword:1
        "AutoMount"=dword:1
        "AutoPart"=dword:1
        "AutoFormat"=dword:1

    If I make this registry settings hive will be always on MMC card.

    I want to have a single image in which hive should be placed on SD if I boot from SD otherwise on MMC. I mean if SD card is not inserted hive should be placed on MMC with the same image which has been used to boot from SD. 

    Any suggestions to make it work??

    Seeth


    Seeth

    Monday, December 10, 2012 9:36 AM

Answers

  • The first thing that comes to mind is IOCTL_HAL_INITREGISTRY. First, in your platform.reg, set both settings to "MountAsBootable"=dword:0. Then, in the IOCTL_HAL_INITREGISTRY handler code, determine if an SD card is inserted (check the card detect GPIO, you can do this before the SD card driver loads) and if not, initialize the registry with the MMC "MountAsBootable" flag to 1 (and leave the SDMemory as "MountAsBootable" 0). If an SD card is inserted then set the SDMemory "MountAsBootable" flag to 1 and leave MMC as 0.

    That should work...


    Good luck,

    Michel Verhagen, eMVP
    Check out my blog: http://guruce.com/blog

    GuruCE
    Microsoft Embedded Partner
    http://guruce.com
    Consultancy, training and development services.

    Thursday, December 13, 2012 5:45 AM
    Moderator

All replies

  • The first thing that comes to mind is IOCTL_HAL_INITREGISTRY. First, in your platform.reg, set both settings to "MountAsBootable"=dword:0. Then, in the IOCTL_HAL_INITREGISTRY handler code, determine if an SD card is inserted (check the card detect GPIO, you can do this before the SD card driver loads) and if not, initialize the registry with the MMC "MountAsBootable" flag to 1 (and leave the SDMemory as "MountAsBootable" 0). If an SD card is inserted then set the SDMemory "MountAsBootable" flag to 1 and leave MMC as 0.

    That should work...


    Good luck,

    Michel Verhagen, eMVP
    Check out my blog: http://guruce.com/blog

    GuruCE
    Microsoft Embedded Partner
    http://guruce.com
    Consultancy, training and development services.

    Thursday, December 13, 2012 5:45 AM
    Moderator
  • Thanks Michel, I will follow this procedure. I had done this in bus driver actually,

    Regards,

    Seeth


    Seeth

    Wednesday, December 19, 2012 5:15 AM