This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

file system and datastorage



I am trying to implement persistent storage for evm3530 in win ce 6.0 R3.Every reboot, files which are  created in the desktop are wiped out.how to fix this issue.

  • The BSP is configured by default to have its filesystem run out of RAM memory, hence being volatile. If you want to persist data acrosse reboots, you can store this data under a storage device (SD Card, NAND Flash, USB pen driver, etc...), or configure your image to be "ROM only" where you would have to choose a non-volatile location to store your image's filesystem.

  • Hi,

    I'm facing similar problem on EVM8148 trying to get root filesystem on SD card

    I'm unable to bootup, it hangs during initial kernel phase, can you pls tell me how you solved the problem?

    Windows CE Kernel for ARM (Thumb Enabled)
    CPU CP15 Control Register = 0xc5387f
    CPU CP15 Auxiliary Control Register = 0x42
    +OALTimerInit(1, 20000, 200)
    --- High Performance Frequecy is 24 MHz---

    PID:00400002 TID:00410002 +PrcmPostInit()
    PID:00400002 TID:013C0006 SDHC: CPU revision 0xffffffff
    PID:00400002 TID:013C0006 SDHC host controller initialize: m_fastPathSDIO:1 m_fastPathSDMEM:0

    ..hangs here

    I've used the patch given by TI for SD card persistent storage..

    http://processors.wiki.ti.com/index.php/Persistent_Registry_in_ARM-A8_BSP#SD.2FMMC_Persistent_Storage

    Attached platform.reg and sdhc.reg. Can you tell me if I've missed out on something...

    platform.reg

    --------------------------------------------------------------

    ;===============================================================================

    #define PLAT_TEST_DIR $(_TARGETPLATROOT)\src\test

    #include "$(_TARGETPLATROOT)\SRC\INC\image_cfg.h"
    #include "$(_PLATFORMROOT)\AM387x_BSP\SRC\DRIVERS\UART\uart.reg"
    #include "$(_PLATFORMROOT)\AM387x_BSP\SRC\DRIVERS\MCSPI\mcspi.reg"
    ;
    ; HIVE BOOT SECTION
    [HKEY_LOCAL_MACHINE\init\BootVars]
        "Flags"=dword:3  
    ; END HIVE BOOT SECTION

    ; HIVE BOOT SECTION
    IF IMGREGHIVE_SD
    ; @CESYSGEN IF FILESYS_FSYSRAM
    [HKEY_LOCAL_MACHINE\System\StorageManager\AutoLoad\ObjectStore]
       ;;"MountAsBootable"=-    
    ; @CESYSGEN ENDIF FILESYS_FSYSRAM
    ENDIF IMGREGHIVE_SD
    ; END HIVE BOOT SECTION

    IF BSP_ETH_CPSW3G_DRIVER
    #include "$(_PLATFORMROOT)\AM387x_BSP\SRC\DRIVERS\EMAC\cpsw3gMiniport.reg"
    ENDIF BSP_ETH_CPSW3G_DRIVER

    IF BSP_ETH_CPGMAC_KITL_DRIVER
    #include "$(_PLATFORMROOT)\AM387x_BSP\SRC\DRIVERS\EMAC\cpgmacKitlMiniport.reg"
    ENDIF BSP_ETH_CPGMAC_KITL_DRIVER

    IF BSP_ETH_CPGMAC_DRIVER    
    #include "$(_PLATFORMROOT)\AM387x_BSP\SRC\DRIVERS\EMAC\cpgmacMiniport.reg"
    ENDIF BSP_ETH_CPGMAC_DRIVER

    ;===============================================================================
    ; USB driver
    #include "$(_PLATFORMROOT)\AM387x_BSP\SRC\DRIVERS\USB\USBCDMA\usbcdma.reg"
    #include "$(_PLATFORMROOT)\AM387x_BSP\SRC\DRIVERS\USB\USBH\usbh.reg"
    #include "$(_PLATFORMROOT)\AM387x_BSP\SRC\DRIVERS\USB\USBFN\usbfn.reg"
    #include "$(_PLATFORMROOT)\AM387x_BSP\SRC\DRIVERS\USB\USBOTG\usbotg.reg"

    #define PLAT_DRIVERS_DIR $(_TARGETPLATROOT)\src\drivers
    #define PLAT_APP_DIR $(_TARGETPLATROOT)\src\app


    ;;===============================================================================
    ;; enable telnet server
    [HKEY_LOCAL_MACHINE\Comm\TELNETD]
        "IsEnabled"=dword:1
        "UseAuthentication"=dword:0
    ;
    ;;===============================================================================
    ;; enable ftp server
    [HKEY_LOCAL_MACHINE\COMM\FTPD]
        "IsEnabled"=dword:1
        "UseAuthentication"=dword:0
        "AllowAnonymous"=dword:1
        "AllowAnonymousUpload"=dword:1
        "AllowAnonymousVroots"=dword:1
        "DefaultDir"="\\"


    #if defined BSP_AM387X_GPIO
    #include "$(_PLATFORMROOT)\AM387x_BSP\SRC\DRIVERS\GPIO\gpio.reg"
    #endif

    ; @CESYSGEN IF CE_MODULES_FSDMGR
    IF BSP_NAND
    #include "$(_PLATFORMROOT)\AM387x_BSP\SRC\DRIVERS\BLOCK\NAND\NAND.reg"
    #include "$(PLAT_TEST_DIR)\testNAND\Driver\nand_test_driver.reg"
    ENDIF
    ; @CESYSGEN ENDIF CE_MODULES_FSDMGR

    ; @CESYSGEN IF CE_MODULES_SDBUS
    IF BSP_SDHC
    #include "$(_PLATFORMROOT)\AM387x_BSP\SRC\DRIVERS\SDHC\IMPL\sdhc.reg"
    ENDIF
    ; @CESYSGEN ENDIF CE_MODULES_SDBUS


    ;-- I2C Proxy Driver -----------------------------------------------------------
    [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\I2CPROXY1]
        "Prefix"="I2C"
        "Dll"="i2cproxy.dll"
        "Index"=dword:1
    ;    "Order"=dword:100  
        "Order"=dword:2  

    [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\I2CPROXY2]
        "Prefix"="I2C"
        "Dll"="i2cproxy.dll"
        "Index"=dword:2
    ;    "Order"=dword:100
        "Order"=dword:2  

    [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\I2CPROXY3]
        "Prefix"="I2C"
        "Dll"="i2cproxy.dll"
        "Index"=dword:3
    ;    "Order"=dword:100  
        "Order"=dword:2  

    [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\I2CPROXY4]
        "Prefix"="I2C"
        "Dll"="i2cproxy.dll"
        "Index"=dword:4
    ;    "Order"=dword:100
        "Order"=dword:2  

    [HKEY_LOCAL_MACHINE\Software\Microsoft\TxtShell\Extensions]
        "OMAP Extension"="omap_shell.dll"

    [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\ProxyDriver]
        "Prefix"="PXY"
        "Dll"="proxydriver.dll"
        "Index"=dword:1
        "Order"=dword:100

    ;===============================================================================
    ; EDMA Driver

    ; HIVE BOOT SECTION
    ;IF BSP_NOEDMA !

    [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\Edma]
        "Dll"="edmadrvr.dll"
        "Prefix"="EDM"
        "Index"=dword:1
        "Order"=dword:1
        "Flags"=dword:1000
        "Priority256"=dword:46

    ;ENDIF BSP_NOEDMA !
    ; END HIVE BOOT SECTION

    ;===============================================================================
    ; EDMA Test Driver

    ;IF BSP_NOEDMA !
    ;IF BSP_INCLUDE_TEST_APPS

    [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\EdmaTest]
        "Dll"="edma_test.dll"
        "Prefix"="EDT"
        "Index"=dword:1
        "Order"=dword:20
        "Flags"=dword:0                      

    ;ENDIF BSP_INCLUDE_TEST_APPS
    ;ENDIF BSP_NOEDMA !

    ;===============================================================================

    ;[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\RndTst]
        ;"Dll"="rndtst.dll"
        ;"Prefix"="RDT"
        ;"Index"=dword:1
        ;"Order"=dword:1
        ;"Flags"=dword:0                      
    ;
    ;===============================================================================


    [HKEY_LOCAL_MACHINE\Software\Microsoft\TxtShell\Extensions]
        "OMAP Extension"="omap_shell.dll"

    [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\ProxyDriver]
        "Prefix"="PXY"
        "Dll"="proxydriver.dll"
        "Index"=dword:1
        "Order"=dword:100

    ;===============================================================================

    IF BSP_AM387X_DISPLAY
    ; Syslink driver (Display driver has dependency on Syslink)
    #include "$(_PLATFORMROOT)\AM387x_BSP\FILES\syslink.reg"

    ; Netra Display driver (DSS)
    ;#include "$(PLAT_DRIVERS_DIR)\DISPLAY\DSS\dss.reg"
    #include "$(_PLATFORMROOT)\AM387X_BSP\SRC\DRIVERS\DISPLAY\DSS\dss.reg"
    ENDIF

    ;===============================================================================
    #include "$(_PLATFORMROOT)\AM387x_BSP\SRC\DRIVERS\NLED\am387x_nled.reg"

    ;===============================================================================

    IF BSP_AM387X_HDMI
    #include "$(_PLATFORMROOT)\AM387x_BSP\SRC\DRIVERS\HDMI\am387x_hdmi.reg"
    ENDIF

    ;===============================================================================

    ;-- WAVEDEV2 Driver ------------------------------------------------------------
    IF BSP_WAVEDEV2
    #include "$(_PLATFORMROOT)\AM387x_BSP\SRC\DRIVERS\WaVEDEV2\am387x_wavedev2.reg"
    ENDIF


    #include "$(_PLATFORMROOT)\AM387x_BSP\SRC\APP\EBOOT_CFG\ebootCfg.reg"
    ;===============================================================================
    ; @CESYSGEN IF CPLMAIN_DISPLAY
    [HKEY_CURRENT_USER\ControlPanel\Desktop]
    ; @CESYSGEN IF IMAGING_IMG_JPEGDECODER
        "wallpaper"="\\Windows\\wallpaper.jpg"
    ; @CESYSGEN ELSE
    ; @CESYSGEN ENDIF IMAGING_IMG_JPEGDECODER
    ; @CESYSGEN ENDIF CPLMAIN_DISPLAY


    ; @CESYSGEN IF CE_MODULES_RAMDISK
    ; HIVE BOOT SECTION
    [HKEY_LOCAL_MACHINE\System\StorageManager\AutoLoad\RAMDisk]
        "DriverPath"="Drivers\\BlockDevice\\RAMDisk"
        "LoadFlags"=dword:1
        "BootPhase"=dword:0
        "DefaultFileSystem"="FATFS"

    [HKEY_LOCAL_MACHINE\Drivers\BlockDevice\RAMDisk]
        "Dll"="ramdisk.dll"
        "Prefix"="DSK"
        "FriendlyName"="RAM Disk Driver"
        "Order"=dword:0
        "Ioctl"=dword:4
        "IClass"=multi_sz:"{A4E7EDDA-E575-4252-9D6B-4195D48BB865}"
        "Profile"="RAMDisk"
        "Size"=dword:$(IMAGE_WINCE_RAM_DISK_SIZE_HEX)
        "Address"=dword:$(IMAGE_WINCE_RAM_DISK_CA_HEX)


    [HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\RAMDisk]
        "AutoPart"=dword:1
        "AutoFormat"=dword:1

    [HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\RAMDisk\FATFS]
        "Flags"=dword:14
        "FormatTFAT"=dword:1
    IF IMGREGHIVE_SD !    
        "MountAsBootable"=dword:1     
    ENDIF    
        "MountAsBootable"=dword:1     
        "MountAsRoot"=dword:1
        "MountPermanent"=dword:1     ; Do not allow un-mounting (else we d fail to flush the registry)
    ; END HIVE BOOT SECTION   

    ; @CESYSGEN IF CE_MODULES_FSREPLXFILT
    ; HIVE BOOT SECTION
    [HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\RAMDISK\FATFS\Filters\fsreplxfilt]
        "Dll"="fsreplxfilt.dll"
        "Order"=dword:1 ; must be loaded before other filters
    ; END HIVE BOOT SECTION
    ; @CESYSGEN ENDIF CE_MODULES_FSREPLXFILT
    ; @CESYSGEN ENDIF CE_MODULES_RAMDISK


    IF IMGBOOTTEST
    [HKEY_LOCAL_MACHINE\init]
        "Launch200"="bootStress.exe"
    ENDIF IMGBOOTTEST

    ; Disabling save password because it doesnt seem to work if RDP is not in OS-design
    ; @CESYSGEN IF CE_MODULES_CREDMAN
    [HKEY_LOCAL_MACHINE\Comm\Security]
        "DisallowSavedNetworkPasswords"=dword:1
    ; @CESYSGEN ENDIF CE_MODULES_CREDMAN


    ;===============================================================================
    ---------------------------------------------------------------

    sdhc.reg

    ---------------------------------------------------------------


    ;-- SDIO host controller driver ------------------------------------------------
    ; HIVE BOOT SECTION
    ; @CESYSGEN IF CE_MODULES_SDBUS
    ;; @XIPREGION IF PACKAGE_OEMDRIVERS

    IF BSP_SDHC
    [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\SDHC]
        "Prefix"="SHC"
        "Dll"="am387x_sdhc.dll"
        "Index"=dword:1
        "Order"=dword:21
        "PowerFlags"=dword:00000103         ; send pre/post device state changes
    ;    "MemBase"=multi_sz:"4809C000"
    ;    "MemLen"=multi_sz:"00000200"

        "SDIOPriority"=dword:d3
        "CDPriority"=dword:d4

        "BaseClockFrequency"=dword:16e3600 ; override the max clock rate (24 MHz default)

        "ReadWriteTimeout"=dword:1000   ; (0x1000 clock ticks default)
        "DTOTimeout"=dword:200          ; Data timeout in milliseconds - 512 ms default
     
        "WakeupSources"=dword:3         ; 0 - no wakeup, 1 - wakeup on SDIO,
                                        ; 2 - wakeup on card detect,
                                        ; 3 - wakeup on both

        "CardDetectGPIO"=dword:40         ; for netra, this is the SD interrupt
        "CardInsertedState"=dword:0       ; not used for netra

    ;
    ; Disable CardWPGPIO here to initialize sdhc.cpp/m_dwCardWPGPIO to MMC_NO_GPIO_CARD_WP (-1)
    ; and thus sdconroller.cpp GPIOGetBit/GPIOSetMode calls won't take effect
    ;
    ;;;;;;;    "CardWPGPIO"=dword:7E             ; card R/W protection detection is done via GPIO_126
    ;;;;;;;    "CardWriteProtectedState"=dword:1 ; logical 1 means the card is write protected
        
        "SlotNumber"=dword:2

    ;;;;;;;;;;;;;;;;IF MMCHS1_LOW_VOLTAGE
    ;;;;;;;;;;;;;;;;    "LowVoltageSlot"=dword:1        ; 1 if MMC/SD/SDIO slot 1 is a low voltage (1.8V slot)
    ;;;;;;;;;;;;;;;;ENDIF
        
        "Sdio4BitDisable"=dword:0         ; 1 if SDIO cards must use 1 bit data path, 0 for 4 bit data path
        "SdMem4BitDisable"=dword:0        ; 1 if SD Memory cards must use 1 bit data path, 0 for 4 bit data path

        "DmaEnable"=dword:1         ; 1 to enable TX/RX DMA
         "Flags"=dword:11000

        ; CE_DRIVER_POWER_MANAGEABLE_GENERIC_GUID, PMCLASS_PMEXT_GUID   
        "IClass"=multi_sz:"{A32942B7-920C-486b-B0E6-92A702A99B35}",
                          "{0AE2066F-89A2-4D70-8FC2-29AEFA68413C}"
    ENDIF BSP_SDHC

    ;; @XIPREGION ENDIF PACKAGE_OEMDRIVERS
    ; @CESYSGEN ENDIF CE_MODULES_SDBUS
    ; END HIVE BOOT SECTION
    ;-------------------------------------------------------------------------------

    ; HIVE BOOT SECTION
    ; @CESYSGEN IF CE_MODULES_SDBUS
    [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\SDBusDriver]
      "Order"=dword:15
      "Dll"="SDBus.dll"
      "Prefix"="SDC"
      "ThreadPriority"=dword:64     ; default thread priority for dispatch thread
      "RequestListDepth"=dword:30   ; pre-allocated requests
      "IClass"=multi_sz:"{20FA98A8-B298-4b32-8D72-C716AEE2FA84}=%b","{6F40791D-300E-44E4-BC38-E0E63CA8375C}=%b"
       "Flags"=dword:1000
    ; @CESYSGEN ENDIF CE_MODULES_SDBUS
    ; END HIVE BOOT SECTION


    ; HIVE BOOT SECTION
    ; @CESYSGEN IF CE_MODULES_SDMEMORY
    ; SD Memory Storage class driver
    [HKEY_LOCAL_MACHINE\Drivers\SDCARD\ClientDrivers\Class\SDMemory_Class]
      "Dll"="SDMemory.dll"
      "Prefix"="DSK"
      "BlockTransferSize"=dword:40  ; send no more than 64 blocks of data per bus transfer
      ;"SingleBlockWrites"=dword:1  ; alternatively force the driver to use single block access
      ;"IdleTimeout"=dword:7D0      ; 2000 milliseconds
      ;"IdlePowerState"=dword:2     ; 0 == D0, 1 == D1, etc.
      ;"DisablePowerManagement"=""  ; if value present, then disable (remove value to enable)
      "Profile"="SDMemory"
      "IClass"=multi_sz:"{A4E7EDDA-E575-4252-9D6B-4195D48BB865}",
                        "{8DD679CE-8AB4-43c8-A14A-EA4963FAA715}"
    ; SDHC Memory Storage class driver
    [HKEY_LOCAL_MACHINE\Drivers\SDCARD\ClientDrivers\Class\SDMemory_Class\High_Capacity]
      "Dll"="SDMemory.dll"
      "Prefix"="DSK"
      "BlockTransferSize"=dword:40  ; send no more than 64 blocks of data per bus transfer
      ;"SingleBlockWrites"=dword:1  ; alternatively force the driver to use single block access
      ;"IdleTimeout"=dword:7D0      ; 2000 milliseconds
      ;"IdlePowerState"=dword:2     ; 0 == D0, 1 == D1, etc.
      ;"DisablePowerManagement"=""  ; if value present, then disable (remove value to enable)
      "Profile"="SDMemory"
      "IClass"=multi_sz:"{A4E7EDDA-E575-4252-9D6B-4195D48BB865}",
                        "{8DD679CE-8AB4-43c8-A14A-EA4963FAA715}"
    ; MMC Storage Class Driver
    [HKEY_LOCAL_MACHINE\Drivers\SDCARD\ClientDrivers\Class\MMC_Class]
      "Dll"="SDMemory.dll"
      "Prefix"="DSK"
      "BlockTransferSize"=dword:40  ; send no more than 64 blocks of data per bus transfer
      ;"SingleBlockWrites"=dword:1  ; alternatively force the driver to use single block access
      ;"IdleTimeout"=dword:7D0      ; milliseconds
      ;"IdlePowerState"=dword:2     ; 0 == D0, 1 == D1, etc.
      ;"DisablePowerManagement"=""  ; if value present, then disable (remove value to enable)
      "Profile"="MMC"
      "IClass"=multi_sz:"{A4E7EDDA-E575-4252-9D6B-4195D48BB865}",
                        "{8DD679CE-8AB4-43c8-A14A-EA4963FAA715}"        
    ; @CESYSGEN ENDIF CE_MODULES_SDMEMORY
    ; END HIVE BOOT SECTION

    ; HIVE BOOT SECTION
    ; @CESYSGEN IF CE_MODULES_SDMEMORY       
    [HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\SDMemory]
       "Name"="SD Memory Card"
       "Folder"="Storage Card"
       ;"PartitionDriver"=""          ; removable storage cannot have partitions  
       "LoadFlags"=dword:1
       "DefaultFileSystem"="FATFS"
    IF IMGREGHIVE_SD
       "Order"=dword:0
       "AutoMount"=dword:1
       "AutoPart"=dword:0
       "AutoFormat"=dword:0
       "MountAsRoot"=dword:0  
       "MountAsBootable"=dword:1  
       "MountPermanent"=dword:1     ; Do not allow un-mounting (else we fail to flush the registry)
        "BootPhase"=dword:1
    ENDIF IMGREGHIVE_SD
    [HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\MMC]
       "Name"="MMC Card"
       "Folder"="Storage Card"
       ;"PartitionDriver"=""          ; removable storage cannot have partitions      
    IF IMGREGHIVE_SD
       "MountAsBootable"=dword:0  
       "MountPermanent"=dword:0     ; Do not allow un-mounting (else we fail to flush the registry)
    ENDIF IMGREGHIVE_SD
    ; @CESYSGEN ENDIF CE_MODULES_SDMEMORY
    ; END HIVE BOOT SECTION
    ----------------------------------------------------------------

    Thanks.